Documentation ¶
Index ¶
- func Signature(signingSecret string, ts time.Time, data []byte) string
- type Channel
- type ChannelSender
- func (s *ChannelSender) Channel(ctx context.Context, channelID string) (*Channel, error)
- func (s *ChannelSender) DMSender() *DMSender
- func (s *ChannelSender) ListChannels(ctx context.Context) ([]Channel, error)
- func (s *ChannelSender) ListUserGroups(ctx context.Context) ([]UserGroup, error)
- func (s *ChannelSender) Send(ctx context.Context, msg notification.Message) (*notification.SentMessage, error)
- func (s *ChannelSender) ServeMessageAction(w http.ResponseWriter, req *http.Request)
- func (s *ChannelSender) SetReceiver(r notification.Receiver)
- func (s *ChannelSender) TeamID(ctx context.Context) (string, error)
- func (s *ChannelSender) TeamName(ctx context.Context, id string) (name string, err error)
- func (s *ChannelSender) User(ctx context.Context, id string) (*User, error)
- func (s *ChannelSender) UserGroup(ctx context.Context, id string) (*UserGroup, error)
- func (s *ChannelSender) UserGroupSender() *UserGroupSender
- type Config
- type DMSender
- type User
- type UserGroup
- type UserGroupSender
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ChannelSender ¶
type ChannelSender struct {
// contains filtered or unexported fields
}
func NewChannelSender ¶
func NewChannelSender(ctx context.Context, cfg Config) (*ChannelSender, error)
func (*ChannelSender) DMSender ¶ added in v0.31.0
func (s *ChannelSender) DMSender() *DMSender
DMSender returns a new DMSender wrapping the given ChannelSender.
func (*ChannelSender) ListChannels ¶
func (s *ChannelSender) ListChannels(ctx context.Context) ([]Channel, error)
ListChannels will return a list of channels visible to the slack bot.
func (*ChannelSender) ListUserGroups ¶ added in v0.31.0
func (s *ChannelSender) ListUserGroups(ctx context.Context) ([]UserGroup, error)
ListUserGroups will return a list of all Slack user groups.
func (*ChannelSender) Send ¶
func (s *ChannelSender) Send(ctx context.Context, msg notification.Message) (*notification.SentMessage, error)
func (*ChannelSender) ServeMessageAction ¶ added in v0.29.0
func (s *ChannelSender) ServeMessageAction(w http.ResponseWriter, req *http.Request)
func (*ChannelSender) SetReceiver ¶ added in v0.29.0
func (s *ChannelSender) SetReceiver(r notification.Receiver)
func (*ChannelSender) TeamID ¶ added in v0.28.0
func (s *ChannelSender) TeamID(ctx context.Context) (string, error)
func (*ChannelSender) UserGroupSender ¶ added in v0.31.0
func (s *ChannelSender) UserGroupSender() *UserGroupSender
UserGroupSender returns a new UserGroupSender wrapping the given ChannelSender.
type DMSender ¶ added in v0.31.0
type DMSender struct {
*ChannelSender
}
DMSender wraps a ChannelSender with DM-specific functionality.
type UserGroupSender ¶ added in v0.31.0
type UserGroupSender struct {
*ChannelSender
}
UserGroupSender processes on-call notifications by updating the members of a Slack user group.
func (*UserGroupSender) Send ¶ added in v0.31.0
func (s *UserGroupSender) Send(ctx context.Context, msg notification.Message) (*notification.SentMessage, error)
Send implements notification.Sender.
Click to show internal directories.
Click to hide internal directories.