sl

package
v0.0.0-...-81c14df Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func New

func New(token, signingSecret, botUserID string) *Client

func (*Client) HandleEvent

func (client *Client) HandleEvent() func(http.ResponseWriter, *http.Request)

HandleEvent returns handlerFunc for slack webhook event requests.

func (*Client) RegisterHandleSub

func (Client *Client) RegisterHandleSub(f HandleSubFunc)

func (*Client) RegisterHandleSummary

func (Client *Client) RegisterHandleSummary(f HandleSummaryFunc)

func (*Client) RegisterHandleUnsub

func (Client *Client) RegisterHandleUnsub(f HandleUnsubFunc)

func (*Client) RegisterOnMsgSent

func (Client *Client) RegisterOnMsgSent(f OnMsgSentFunc)

func (*Client) SendMsg

func (client *Client) SendMsg(thread *Thread, text string) error

type HandleSubFunc

type HandleSubFunc func(client *Client, thread *Thread, rawURL string)

type HandleSummaryFunc

type HandleSummaryFunc func(client *Client, thread *Thread)

type HandleUnsubFunc

type HandleUnsubFunc func(client *Client, thread *Thread)

type OnMsgSentFunc

type OnMsgSentFunc func(client *Client, thread *Thread, text string)

It is impossible to determine from the event whether the message is a reply or not. If ThreadTS is "", go through, but the registrant should determine if the message is a reply to the bot.

type Thread

type Thread struct {
	Channel string
	TS      string
}

Thread is info to designate slack thread.

Jump to

Keyboard shortcuts

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