Versions in this module Expand all Collapse all v0 v0.5.1 Jun 7, 2024 v0.5.0 Apr 28, 2024 Changes in this version + type Client struct + HTTPClient *http.Client + Logger *slog.Logger + Token string + URL *url.URL + func NewClient(urlStr string, logger *slog.Logger) (*Client, error) + func NewClientForPostFile(token string, logger *slog.Logger) (*Client, error) + func (c *Client) CompleteUploadExternal(ctx context.Context, params *CompleteUploadExternalParam) error + func (c *Client) GetUploadURLExternalURL(ctx context.Context, param *GetUploadURLExternalResParam) (uploadURL string, fileID string, err error) + func (c *Client) PostFile(ctx context.Context, param *PostFileParam, content []byte) error + func (c *Client) PostText(ctx context.Context, param *PostTextParam) error + func (c *Client) UploadToURL(ctx context.Context, filename, uploadURL string, content []byte) error + type CompleteUploadExternalParam struct + ChannelID string + FileID string + Title string + type CompleteUploadExternalRes struct + Files []struct{ ... } + OK bool + type FileSummary struct + ID string + Title string + type GetUploadURLExternalRes struct + FileID string + OK bool + UploadURL string + type GetUploadURLExternalResParam struct + AltText string + Filename string + Length int + SnippetType string + type PostFileParam struct + AltText string + ChannelID string + Filename string + SnippetType string + Title string + type PostTextParam struct + Channel string + IconEmoji string + Text string + Username string + type Slack interface + PostFile func(ctx context.Context, param *PostFileParam, content []byte) error + PostText func(ctx context.Context, param *PostTextParam) error