Documentation ¶
Index ¶
Constants ¶
View Source
const EnvBotName = "SLACK_BOT_NAME"
EnvBotName is Slack bot name
View Source
const EnvChannelID = "SLACK_CHANNEL_ID"
EnvChannelID is Slack channel ID
View Source
const EnvToken = "SLACK_TOKEN"
EnvToken is Slack API Token
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type API ¶
type API interface {
ChatPostMessage(ctx context.Context, attachments []*objects.Attachment) (*objects.ChatResponse, error)
}
API is Slack API interface
type Client ¶
type Client struct { *slack.Client Config Config Notify *NotifyService API API // contains filtered or unexported fields }
Client is a API client for Slack
type Config ¶
type Config struct { Token string Channel string Botname string Title string Message string CI string Parser terraform.Parser Template terraform.Template }
Config is a configuration for Slack client
type NotifyService ¶
type NotifyService service
NotifyService handles communication with the notification related methods of Slack API
type Slack ¶
Slack represents the attribute information necessary for requesting Slack API
func (*Slack) ChatPostMessage ¶
func (s *Slack) ChatPostMessage(ctx context.Context, attachments []*objects.Attachment) (*objects.ChatResponse, error)
ChatPostMessage is a wrapper of https://godoc.org/github.com/lestrrat-go/slack#ChatPostMessageCall
Click to show internal directories.
Click to hide internal directories.