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 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 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.