Documentation
¶
Index ¶
- type IndividualJobStatus
- type JobStatus
- type LeaseExtensionRepository
- type LinkTemplate
- type LoggingDummyRepository
- func (this *LoggingDummyRepository) AbortAndRemoveJob(jobId string) error
- func (this *LoggingDummyRepository) AddRecipient(jobId, recipient string) error
- func (this *LoggingDummyRepository) CreateJob(jobId string, htmlTemplate string) error
- func (this *LoggingDummyRepository) ExtendLease(jobId, recipient string) error
- func (this *LoggingDummyRepository) FinishPreparation(jobId string, numberOfRecipients int) error
- func (this *LoggingDummyRepository) GetJobStatus(jobIds []string) (status JobStatus, err error)
- func (this *LoggingDummyRepository) GetNextOpenRecipient(jobId string) (recipient string, err error)
- func (this *LoggingDummyRepository) GetRandomOpenJob() (jobId string, err error)
- func (this *LoggingDummyRepository) GetTemplates(jobId string) (templates Templates, err error)
- func (this *LoggingDummyRepository) MarkJobAsFailed(jobId, reason string) error
- func (this *LoggingDummyRepository) MarkRecipientAsDone(jobId, recipient string) error
- func (this *LoggingDummyRepository) MarkRecipientAsFailed(jobId, recipient, recipientId string, cause error) error
- func (this *LoggingDummyRepository) WriteSendingFailuresToFile(targetFile string, jobIds []string) (err error)
- type MailSendingFailure
- type RedisRepository
- func (this *RedisRepository) AbortAndRemoveJob(jobId string) error
- func (this *RedisRepository) AddRecipient(jobId, recipient string) error
- func (this *RedisRepository) CreateJob(jobId string, htmlTemplate string) error
- func (this *RedisRepository) ExtendLease(jobId, recipient string) error
- func (this *RedisRepository) FinishPreparation(jobId string, numberOfRecipients int) error
- func (this *RedisRepository) GetJobStatus(jobIds []string) (status JobStatus, err error)
- func (this *RedisRepository) GetNextOpenRecipient(jobId string) (recipient string, err error)
- func (this *RedisRepository) GetRandomOpenJob() (jobId string, err error)
- func (this *RedisRepository) GetTemplates(jobId string) (templates Templates, err error)
- func (this *RedisRepository) MarkJobAsFailed(jobId, reason string) error
- func (this *RedisRepository) MarkRecipientAsDone(jobId, recipient string) error
- func (this *RedisRepository) MarkRecipientAsFailed(jobId, recipient, recipientId string, cause error) error
- func (this *RedisRepository) WriteSendingFailuresToFile(targetFile string, jobIds []string) (err error)
- type Repository
- type RepositoryError
- type Templates
- type TemplatesString
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IndividualJobStatus ¶
type JobStatus ¶
type JobStatus struct { Jobs map[string]IndividualJobStatus Summary IndividualJobStatus }
type LinkTemplate ¶
type LoggingDummyRepository ¶
type LoggingDummyRepository struct { // storage to use after logging Repository Repository }
func (*LoggingDummyRepository) AbortAndRemoveJob ¶
func (this *LoggingDummyRepository) AbortAndRemoveJob(jobId string) error
func (*LoggingDummyRepository) AddRecipient ¶
func (this *LoggingDummyRepository) AddRecipient(jobId, recipient string) error
func (*LoggingDummyRepository) CreateJob ¶
func (this *LoggingDummyRepository) CreateJob(jobId string, htmlTemplate string) error
func (*LoggingDummyRepository) ExtendLease ¶
func (this *LoggingDummyRepository) ExtendLease(jobId, recipient string) error
func (*LoggingDummyRepository) FinishPreparation ¶
func (this *LoggingDummyRepository) FinishPreparation(jobId string, numberOfRecipients int) error
func (*LoggingDummyRepository) GetJobStatus ¶
func (this *LoggingDummyRepository) GetJobStatus(jobIds []string) (status JobStatus, err error)
func (*LoggingDummyRepository) GetNextOpenRecipient ¶
func (this *LoggingDummyRepository) GetNextOpenRecipient(jobId string) (recipient string, err error)
func (*LoggingDummyRepository) GetRandomOpenJob ¶
func (this *LoggingDummyRepository) GetRandomOpenJob() (jobId string, err error)
func (*LoggingDummyRepository) GetTemplates ¶
func (this *LoggingDummyRepository) GetTemplates(jobId string) (templates Templates, err error)
func (*LoggingDummyRepository) MarkJobAsFailed ¶
func (this *LoggingDummyRepository) MarkJobAsFailed(jobId, reason string) error
func (*LoggingDummyRepository) MarkRecipientAsDone ¶
func (this *LoggingDummyRepository) MarkRecipientAsDone(jobId, recipient string) error
func (*LoggingDummyRepository) MarkRecipientAsFailed ¶
func (this *LoggingDummyRepository) MarkRecipientAsFailed(jobId, recipient, recipientId string, cause error) error
func (*LoggingDummyRepository) WriteSendingFailuresToFile ¶
func (this *LoggingDummyRepository) WriteSendingFailuresToFile(targetFile string, jobIds []string) (err error)
type MailSendingFailure ¶
type RedisRepository ¶
func (*RedisRepository) AbortAndRemoveJob ¶
func (this *RedisRepository) AbortAndRemoveJob(jobId string) error
func (*RedisRepository) AddRecipient ¶
func (this *RedisRepository) AddRecipient(jobId, recipient string) error
func (*RedisRepository) CreateJob ¶
func (this *RedisRepository) CreateJob(jobId string, htmlTemplate string) error
func (*RedisRepository) ExtendLease ¶
func (this *RedisRepository) ExtendLease(jobId, recipient string) error
func (*RedisRepository) FinishPreparation ¶
func (this *RedisRepository) FinishPreparation(jobId string, numberOfRecipients int) error
func (*RedisRepository) GetJobStatus ¶
func (this *RedisRepository) GetJobStatus(jobIds []string) (status JobStatus, err error)
func (*RedisRepository) GetNextOpenRecipient ¶
func (this *RedisRepository) GetNextOpenRecipient(jobId string) (recipient string, err error)
func (*RedisRepository) GetRandomOpenJob ¶
func (this *RedisRepository) GetRandomOpenJob() (jobId string, err error)
func (*RedisRepository) GetTemplates ¶
func (this *RedisRepository) GetTemplates(jobId string) (templates Templates, err error)
func (*RedisRepository) MarkJobAsFailed ¶
func (this *RedisRepository) MarkJobAsFailed(jobId, reason string) error
func (*RedisRepository) MarkRecipientAsDone ¶
func (this *RedisRepository) MarkRecipientAsDone(jobId, recipient string) error
func (*RedisRepository) MarkRecipientAsFailed ¶
func (this *RedisRepository) MarkRecipientAsFailed(jobId, recipient, recipientId string, cause error) error
func (*RedisRepository) WriteSendingFailuresToFile ¶
func (this *RedisRepository) WriteSendingFailuresToFile(targetFile string, jobIds []string) (err error)
type Repository ¶
type Repository interface { LeaseExtensionRepository GetRandomOpenJob() (jobId string, err error) /* * Creates a new job with the given jobId or returns an * error if this job already exists. */ CreateJob(jobId string, templates string) error AbortAndRemoveJob(jobId string) error GetJobStatus(jobIds []string) (status JobStatus, err error) WriteSendingFailuresToFile(targetFile string, jobIds []string) (err error) /** * marks the job as fully prepared and sets the total number of recipients */ FinishPreparation(jobId string, numberOfRecipients int) error MarkJobAsFailed(jobId, reason string) error AddRecipient(jobId, recipient string) error /* * Pops the next remaining recipient for the given job id. * * see ExtendLease * see RemoveRemaining */ GetNextOpenRecipient(jobId string) (recipient string, err error) MarkRecipientAsDone(jobId, recipient string) error MarkRecipientAsFailed(jobId, recipient, recipientId string, cause error) error GetTemplates(jobId string) (templates Templates, err error) }
type RepositoryError ¶
type RepositoryError struct {
// contains filtered or unexported fields
}
func (*RepositoryError) Error ¶
func (this *RepositoryError) Error() string
type Templates ¶
type Templates struct { SubjectTemplate *template.Template BodyTemplate *template.Template ReceiverEmailTemplate *template.Template ReceiverNameTemplate *template.Template SenderEmailTemplate *template.Template SenderNameTemplate *template.Template ReplyToEmailTemplate *template.Template LinkTemplates map[string]LinkTemplate }
type TemplatesString ¶
type TemplatesString struct { SubjectTemplate string BodyTemplate string ReceiverEmailTemplate string ReceiverNameTemplate string SenderEmailTemplate string SenderNameTemplate string ReplyToEmailTemplate string LinkTemplates map[string]LinkTemplate }
func (*TemplatesString) Parse ¶
func (this *TemplatesString) Parse() (templates Templates, err error)
Click to show internal directories.
Click to hide internal directories.