client

package
v0.0.0-...-8479bec Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 21, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Chat

type Chat Client

func (*Chat) PostMessage

func (c *Chat) PostMessage(req PostMessageRequest) (*PostMessageResponse, error)

type Client

type Client struct {
	// contains filtered or unexported fields
}

func New

func New(token string, options ...Option) *Client

func (*Client) Chat

func (c *Client) Chat() *Chat

type Option

type Option func(*Client)

func OptionAPIURL

func OptionAPIURL(url string) Option

func OptionHttpClient

func OptionHttpClient(httpClient *http.Client) Option

func OptionLogger

func OptionLogger(logger log.Logger) Option

type PostMessageRequest

type PostMessageRequest struct {
	Channel  string
	Text     string
	Username string
}

type PostMessageResponse

type PostMessageResponse struct {
	Ok    bool   `json:"ok"`
	Error string `json:"error"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL