Documentation ¶
Index ¶
- Constants
- func NewErr(statusCode int, systemCode, message, internal string, isFatal bool) domain.IError
- func NewSlackProvider(httpClient provider.IHTTPClient) provider.Provider
- type Channel
- type Client
- type GetChannelsRequest
- type GetChannelsResponse
- type Opts
- type Payload
- type ResponseMetadata
- type SendMessageRequest
- type SendMessageResponse
Constants ¶
View Source
const ProviderType = domain.ProviderType("slack")
Variables ¶
This section is empty.
Functions ¶
func NewSlackProvider ¶
func NewSlackProvider(httpClient provider.IHTTPClient) provider.Provider
Types ¶
type Client ¶
type Client struct {
HTTPClient provider.IHTTPClient
}
func (*Client) GetChannels ¶
func (*Client) SendMessage ¶
func (c *Client) SendMessage(request *SendMessageRequest) (*SendMessageResponse, domain.IError)
type GetChannelsRequest ¶
type GetChannelsRequest struct {
BearerToken string `json:"_"`
}
type GetChannelsResponse ¶
type GetChannelsResponse struct { Ok bool `json:"ok"` Channels []Channel `json:"channels"` ResponseMetadata ResponseMetadata `json:"response_metadata"` }
type Opts ¶
type Opts struct { Secret *domain.NotifierSecret Channel string `mapstructure:"channel"` }
type ResponseMetadata ¶ added in v1.1.1
type ResponseMetadata struct {
NextCursor string `json:"next_cursor"`
}
type SendMessageRequest ¶
type SendMessageResponse ¶
type SendMessageResponse struct {
Ok bool `json:"ok"`
}
Click to show internal directories.
Click to hide internal directories.