Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IError ¶
type IError interface { // Message returns the user world error message. This must not leak // internal system details. Message() string // IsFatal defines if the error is transient and may be retried. IsFatal() bool // User world error code. Use HTTPStatusCode for ease of use. StatusCode() int // Returns the actual error message. This should be populated from the // source error. Error() string // System level error code. These internal error codes can be // sent to the user world for pin pointing the error source. SystemCode() string }
IError is the base error interface used across the project. This can be accepted as a standard `error` since it implements Error() method.
type Notifier ¶
type Notifier struct { ID string `json:"id,omitempty"` Config *NotifierConfiguration `json:"config,omitempty"` TenantID string `json:"tenant_id,omitempty"` DateCreated time.Time `json:"date_created,omitempty"` DateUpdated time.Time `json:"date_updated,omitempty"` Type ProviderType `json:"type"` }
type NotifierConfiguration ¶
type NotifierConfiguration struct { Secret *NotifierSecret `json:"secret"` Opts map[string]interface{} `json:"options"` }
type NotifierRepository ¶
type NotifierRepository interface{}
type NotifierSecret ¶
type NotifierSecret struct {
Token string `json:"token"`
}
type ProviderType ¶
type ProviderType string
type Template ¶
type Template struct { ID string `json:"id,omitempty"` Pattern string `json:"pattern,omitempty"` Type TemplateType `json:"type,omitempty"` DateCreated time.Time `json:"date_created,omitempty"` DateUpdated time.Time `json:"date_updated,omitempty"` SupportedProviders []ProviderType `json:"supported_providers"` }
func (*Template) GetTemplater ¶
func (*Template) IsSupported ¶
func (t *Template) IsSupported(provider ProviderType) bool
type TemplateRepository ¶
type TemplateType ¶
type TemplateType string
const ( TemplateTypeText TemplateType = "text" TemplateTypeMustache TemplateType = "mustache" TemplateTypeGoTemplate TemplateType = "gotmpl" )
Click to show internal directories.
Click to hide internal directories.