Documentation ¶
Index ¶
- Constants
- func Add(name string, f Func)
- func FillStructFromTemplate(ctx context.Context, tmpl string, fill interface{}) *nerr.E
- func SendEmail(ctx context.Context, with []byte, log *zap.SugaredLogger) *nerr.E
- func SendSlack(ctx context.Context, with []byte, log *zap.SugaredLogger) *nerr.E
- type Email
- type Func
- type SlackMessage
- type Then
Constants ¶
View Source
const ( // SlackMessageFrequency . SlackMessageFrequency = 4 * time.Second )
Variables ¶
This section is empty.
Functions ¶
func FillStructFromTemplate ¶
FillStructFromTemplate .
Types ¶
type Email ¶
type Email struct { From string `json:"from"` To []string `json:"to"` Subject string `json:"subject"` Body string `json:"body"` // Attachment stuff (if any) Attachment []byte `json:"attachment"` AttachmentName string `json:"attachment-name"` // Auth stuff for the SMTP server User string `json:"user"` Pass string `json:"pass"` SMTPAddr string `json:"smtp-addr"` }
Email includes information about who to send the email as, auth stuff, etc. etc.
type SlackMessage ¶
type SlackMessage struct { URL string `json:"url"` Attachment slack.Attachment `json:"attachment"` }
SlackMessage .
type Then ¶
type Then struct { Do string `json:"do"` With json.RawMessage `json:"with"` }
Then represents something to be done as a result of all of an action's If checks passing
Click to show internal directories.
Click to hide internal directories.