Documentation ¶
Index ¶
- Constants
- Variables
- type Job
- func BuildAPIJob(payload string, relatedId string) (Job, error)
- func BuildChatJob(body string, relatedId string, to ...string) (*Job, error)
- func BuildEmailJob(from, subject, body, tag string, tracking, isHTML bool, ...) (*Job, error)
- func BuildSMSJob(from, body string, relatedId string, to ...string) (Job, error)
- type JobData
- type JobHandler
- type Storage
- type Store
Constants ¶
View Source
const ( JobTypeSMS = "SMS" JobTypeEmail = "Email" JobTypeChat = "Chat" JobTypeApi = "Api" )
View Source
const StatusJobComplete = "complete"
View Source
const StatusJobCreated = ""
View Source
const StatusJobError = "error"
View Source
const StatusJobPending = "pending"
Variables ¶
View Source
var (
ErrorNoJobFound = errors.New("no job found")
)
Functions ¶
This section is empty.
Types ¶
type Job ¶
type Job struct { ID uuid.UUID Type string // "email", "sms", "chat" , ? Status string RelatedId string Data JobData // Failure Information RetryCount int Created time.Time }
Job stores the state and raw information to turn it into a task to be executed.
func BuildEmailJob ¶
func BuildEmailJob(from, subject, body, tag string, tracking, isHTML bool, attachments map[string][]byte, relatedId string, to ...string) (*Job, error)
BuildEmailJob from is email subject is string max len?? to is email
func BuildSMSJob ¶
BuildSMSJob from is a phone number body is the content to is a list of target phone numbers
type JobData ¶
type JobHandler ¶
Click to show internal directories.
Click to hide internal directories.