Documentation ¶
Index ¶
- type NotificationConfig
- type PluginService
- func (s *PluginService) GetSystemDefaultTemplate() string
- func (s *PluginService) PostHookDBTransformConfigs(ctx context.Context, configurations map[string]any) (map[string]any, error)
- func (s *PluginService) PostHookQueueTransformConfigs(ctx context.Context, notificationConfigMap map[string]any) (map[string]any, error)
- func (s *PluginService) PreHookDBTransformConfigs(ctx context.Context, configurations map[string]any) (map[string]any, error)
- func (s *PluginService) PreHookQueueTransformConfigs(ctx context.Context, notificationConfigMap map[string]any) (map[string]any, error)
- func (s *PluginService) Send(ctx context.Context, notificationMessage notification.Message) (bool, error)
- type ReceiverConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NotificationConfig ¶
type NotificationConfig struct {
ReceiverConfig `mapstructure:",squash"`
}
NotificationConfig has all configs needed to send notification
func (*NotificationConfig) AsMap ¶
func (c *NotificationConfig) AsMap() map[string]any
func (*NotificationConfig) Validate ¶
func (c *NotificationConfig) Validate() error
Validate validates whether notification config contains required fields or not channel_name is not mandatory because in NotifyToReceiver flow, channel_name is being passed from the request (not from the config)
type PluginService ¶
type PluginService struct { base.UnimplementedService // contains filtered or unexported fields }
PluginService is a plugin service layer for slack channel type
func NewPluginService ¶
func NewPluginService(cfg slack.AppConfig, cryptoClient slack.Encryptor, opts ...slack.ServiceOption) *PluginService
NewPluginService returns slack channel plugin service struct. This service implement [receiver.Resolver] and notification.Notifier interface.
func (*PluginService) GetSystemDefaultTemplate ¶
func (s *PluginService) GetSystemDefaultTemplate() string
func (*PluginService) PostHookDBTransformConfigs ¶
func (s *PluginService) PostHookDBTransformConfigs(ctx context.Context, configurations map[string]any) (map[string]any, error)
PostHookTransformConfigs do transformation in post-hook service lifecycle
func (*PluginService) PostHookQueueTransformConfigs ¶
func (*PluginService) PreHookDBTransformConfigs ¶
func (*PluginService) PreHookQueueTransformConfigs ¶
func (*PluginService) Send ¶
func (s *PluginService) Send(ctx context.Context, notificationMessage notification.Message) (bool, error)
type ReceiverConfig ¶
type ReceiverConfig struct { SlackReceiverConfig slack.ReceiverConfig `mapstructure:",squash"` ChannelName string `json:"channel_name" mapstructure:"channel_name"` ChannelType string `json:"channel_type" mapstructure:"channel_type"` }
ReceiverConfig is a stored config for a slack receiver
func (*ReceiverConfig) AsMap ¶
func (c *ReceiverConfig) AsMap() map[string]any
func (*ReceiverConfig) Validate ¶
func (c *ReceiverConfig) Validate() error
Click to show internal directories.
Click to hide internal directories.