Documentation ¶
Index ¶
- type SlackClient
- func (client SlackClient) AttachFileTo(channel string, pathToFile string, filename string) ([]byte, int, error)
- func (client SlackClient) Get(endpoint string) ([]byte, int, error)
- func (client SlackClient) GetConversationsList() (dto.SlackResponseConversationsList, int, error)
- func (client SlackClient) GetUsersList() (dto.SlackResponseUsersList, int, error)
- func (client SlackClient) Post(endpoint string, body []byte) ([]byte, int, error)
- func (client SlackClient) Put(endpoint string, body []byte) ([]byte, int, error)
- func (client SlackClient) Request(method string, url string, body []byte) ([]byte, int, error)
- func (client SlackClient) SendMessage(message dto.SlackRequestChatPostMessage) (dto.SlackResponseChatPostMessage, int, error)
- func (client SlackClient) SendMessageToWs(ws *websocket.Conn, m dto.SlackRequestEventMessage) error
- type SlackClientInterface
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SlackClient ¶
SlackClient client for slack api calls
func (SlackClient) AttachFileTo ¶
func (client SlackClient) AttachFileTo(channel string, pathToFile string, filename string) ([]byte, int, error)
AttachFileTo method for attachment file send to specific channel
func (SlackClient) Get ¶
func (client SlackClient) Get(endpoint string) ([]byte, int, error)
Get method for GET http requests
func (SlackClient) GetConversationsList ¶
func (client SlackClient) GetConversationsList() (dto.SlackResponseConversationsList, int, error)
GetConversationsList method which returns the conversations list of current workspace
func (SlackClient) GetUsersList ¶
func (client SlackClient) GetUsersList() (dto.SlackResponseUsersList, int, error)
GetUsersList method which returns the users list of current workspace
func (SlackClient) SendMessage ¶
func (client SlackClient) SendMessage(message dto.SlackRequestChatPostMessage) (dto.SlackResponseChatPostMessage, int, error)
SendMessage method for post message send through simple API request
func (SlackClient) SendMessageToWs ¶
func (client SlackClient) SendMessageToWs(ws *websocket.Conn, m dto.SlackRequestEventMessage) error
SendMessageToWs sends message to selected WebSocket EventsAPI
type SlackClientInterface ¶
type SlackClientInterface interface { //Http methods Request(string, string, []byte) ([]byte, int, error) Post(string, []byte) ([]byte, int, error) Get(string) ([]byte, int, error) Put(string, []byte) ([]byte, int, error) //Methods for slackAPI endpoints GetConversationsList() (dto.SlackResponseConversationsList, int, error) GetUsersList() (dto.SlackResponseUsersList, int, error) SendMessageToWs(*websocket.Conn, dto.SlackRequestEventMessage) error //PM messages SendMessage(dto.SlackRequestChatPostMessage) (dto.SlackResponseChatPostMessage, int, error) //Send attachment AttachFileTo(channel string, pathToFile string, filename string) ([]byte, int, error) }
SlackClientInterface interface for slack client
Click to show internal directories.
Click to hide internal directories.