Documentation ¶
Index ¶
Constants ¶
View Source
const ( ProviderTypeSlack = "slack" ProviderTypeLark = "lark" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct { Provider string `mapstructure:"provider" validate:"omitempty,oneof=slack lark"` Name string `mapstructure:"name"` ClientID string `mapstructure:"client_id,omitempty"` ClientSecret string `mapstructure:"client_secret,omitempty"` Criteria string `mapstructure:"criteria"` // slack AccessToken string `mapstructure:"access_token" validate:"required_without=SlackConfig"` SlackConfig SlackConfig `mapstructure:"slack_config" validate:"required_without=AccessToken,dive"` // custom messages Messages domain.NotificationMessages }
type NotifyManager ¶ added in v0.12.2
type NotifyManager struct {
// contains filtered or unexported fields
}
func NewMultiClient ¶ added in v0.12.2
func NewMultiClient(notifiers *[]Config, logger log.Logger) (*NotifyManager, error)
func (*NotifyManager) Notify ¶ added in v0.12.2
func (m *NotifyManager) Notify(ctx context.Context, notification []domain.Notification) []error
type SlackConfig ¶ added in v0.7.6
type SlackConfig map[string]interface{}
SlackConfig is a map of workspace name to config
func (SlackConfig) Decode ¶ added in v0.7.6
func (c SlackConfig) Decode(v interface{}) error
Click to show internal directories.
Click to hide internal directories.