Documentation ¶ Index ¶ type Client func NewClient(urlStr string, logger *log.Logger) (*Client, error) func (c *Client) PostFile(ctx context.Context, token string, param *PostFileParam) error func (c *Client) PostText(ctx context.Context, param *PostTextParam) error type PostFileParam type PostTextParam type Slack Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ This section is empty. Types ¶ type Client ¶ type Client struct { Slack URL *url.URL HTTPClient *http.Client Logger *log.Logger } func NewClient ¶ func NewClient(urlStr string, logger *log.Logger) (*Client, error) func (*Client) PostFile ¶ func (c *Client) PostFile(ctx context.Context, token string, param *PostFileParam) error func (*Client) PostText ¶ func (c *Client) PostText(ctx context.Context, param *PostTextParam) error type PostFileParam ¶ type PostFileParam struct { Channel string Content string Filename string Filetype string } type PostTextParam ¶ type PostTextParam struct { Channel string `json:"channel,omitempty"` Username string `json:"username,omitempty"` Text string `json:"text"` IconEmoji string `json:"icon_emoji,omitempty"` } type Slack ¶ added in v0.2.2 type Slack interface { PostText(ctx context.Context, param *PostTextParam) error PostFile(ctx context.Context, token string, param *PostFileParam) error } Source Files ¶ View all Source files client.go Click to show internal directories. Click to hide internal directories.