Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func StartEvaluator ¶
Types ¶
type Adapter ¶
type Adapter interface {
Type() string
Send(ctx context.Context, msg Message) error
Validate() error
}
func NewAdapter ¶
func NewAdapter(channelType string, configJSON json.RawMessage) (Adapter, error)
type EmailAdapter ¶
type EmailAdapter struct {
Recipients []string `json:"recipients"`
}
func (*EmailAdapter) Type ¶
func (a *EmailAdapter) Type() string
func (*EmailAdapter) Validate ¶
func (a *EmailAdapter) Validate() error
type EvalResult ¶
type ExceptionDetails ¶
type GitHubAdapter ¶
type GitHubAdapter struct {
Token string `json:"token"`
Owner string `json:"owner"`
Repo string `json:"repo"`
Labels []string `json:"labels,omitempty"`
}
func (*GitHubAdapter) Type ¶
func (a *GitHubAdapter) Type() string
func (*GitHubAdapter) Validate ¶
func (a *GitHubAdapter) Validate() error
type PushoverAdapter ¶ added in v1.7.22
type PushoverAdapter struct {
UserKey string `json:"userKey"`
AppToken string `json:"appToken"`
Device string `json:"device,omitempty"`
Priority int `json:"priority,omitempty"`
Retry int `json:"retry,omitempty"`
Expire int `json:"expire,omitempty"`
Sound string `json:"sound,omitempty"`
TTL int `json:"ttl,omitempty"`
HTML bool `json:"html,omitempty"`
Callback string `json:"callback,omitempty"`
}
func (*PushoverAdapter) Send ¶ added in v1.7.22
func (a *PushoverAdapter) Send(ctx context.Context, msg Message) error
func (*PushoverAdapter) Type ¶ added in v1.7.22
func (a *PushoverAdapter) Type() string
func (*PushoverAdapter) Validate ¶ added in v1.7.22
func (a *PushoverAdapter) Validate() error
type RuleEvaluator ¶
type RuleEvaluator func(ctx context.Context, rule *models.NotificationRule, projectId uuid.UUID) (*EvalResult, error)
type SlackAdapter ¶
type SlackAdapter struct {
WebhookURL string `json:"webhookUrl"`
Channel string `json:"channel,omitempty"`
Username string `json:"username,omitempty"`
}
func (*SlackAdapter) Type ¶
func (a *SlackAdapter) Type() string
func (*SlackAdapter) Validate ¶
func (a *SlackAdapter) Validate() error
type TelegramAdapter ¶ added in v1.7.24
func (*TelegramAdapter) Send ¶ added in v1.7.24
func (a *TelegramAdapter) Send(ctx context.Context, msg Message) error
func (*TelegramAdapter) Type ¶ added in v1.7.24
func (a *TelegramAdapter) Type() string
func (*TelegramAdapter) Validate ¶ added in v1.7.24
func (a *TelegramAdapter) Validate() error
type WebhookAdapter ¶
type WebhookAdapter struct {
URL string `json:"url"`
Method string `json:"method,omitempty"`
Headers map[string]string `json:"headers,omitempty"`
Secret string `json:"secret,omitempty"`
}
func (*WebhookAdapter) Type ¶
func (a *WebhookAdapter) Type() string
func (*WebhookAdapter) Validate ¶
func (a *WebhookAdapter) Validate() error
Click to show internal directories.
Click to hide internal directories.