Skip to main content

The service interface

Implemented in the Go programming language (If it can't be searched up try Golang)

import (
	"uuid"
	"enmime"
)

type RecipentsList []Recipent

type RecievingPersonTrie struct {
	Name         string
	Surname      string
	EmailAddress string
}

type RecievingPersonTries []RecievingPersonTrie

type ArchiveService interface {
	// Part should be the root part of the message MIME envelope
	// Screenshot seems to imply HTML messages are allowed
	// This gets that and attachments out of the way
	PresentArchivedMessage(messageID uuid.UUID) (*enmime.Part, error)
    // A Recipent is a study group
  	ViewRecipents(messageID uuid.UUID)          (RecipentsList, error)
    // An email address in this context is a trie containing 
    // the name, surname and the e-mail address
	ViewEmailAddresses(messageID uuid.UUID)     (RecievingPersonTries, error)
	DeleteArchivedMessage(messageID uuid.UUID)  error
	ResendMessage(messageID uuid.UUID)          error
}