Documentation ¶
Index ¶
- func RegisterHandler(hg HandlerGenerator, opts ...MuxOption)
- func RegisterHandlerFunc(hg HandlerFuncGenerator, opts ...MuxOption)
- func Start(ctx context.Context, token string, opts ...Option) error
- type Got
- func (got *Got) AddHandler(h Handler, opts ...MuxOption)
- func (got *Got) AddHandlerFunc(f HandlerFunc, opts ...MuxOption)
- func (got *Got) ID() string
- func (got *Got) Logger() *zap.SugaredLogger
- func (got *Got) Name() string
- func (got *Got) NewMux() *Mux
- func (got *Got) RegisterHandler(hgen HandlerGenerator, opts ...MuxOption) error
- func (got *Got) RegisterHandlerFunc(hgen HandlerFuncGenerator, opts ...MuxOption) error
- func (got *Got) Start(ctx context.Context) error
- func (got *Got) Store(namespace string) store.Store
- type Handler
- type HandlerFunc
- type HandlerFuncGenerator
- type HandlerGenerator
- type Message
- type Mux
- type MuxOption
- type Option
- type Slack
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterHandler ¶
func RegisterHandler(hg HandlerGenerator, opts ...MuxOption)
func RegisterHandlerFunc ¶
func RegisterHandlerFunc(hg HandlerFuncGenerator, opts ...MuxOption)
Types ¶
type Got ¶
type Got struct {
// contains filtered or unexported fields
}
func NewWithSlack ¶
func (*Got) AddHandler ¶
func (*Got) AddHandlerFunc ¶
func (got *Got) AddHandlerFunc(f HandlerFunc, opts ...MuxOption)
func (*Got) Logger ¶
func (got *Got) Logger() *zap.SugaredLogger
func (*Got) RegisterHandler ¶
func (got *Got) RegisterHandler(hgen HandlerGenerator, opts ...MuxOption) error
func (*Got) RegisterHandlerFunc ¶
func (got *Got) RegisterHandlerFunc(hgen HandlerFuncGenerator, opts ...MuxOption) error
type HandlerFunc ¶
type HandlerFuncGenerator ¶
type HandlerFuncGenerator func(*Got) (HandlerFunc, error)
type HandlerGenerator ¶
type Message ¶
type Message struct {
// contains filtered or unexported fields
}
func (*Message) RawMessageEvent ¶
func (m *Message) RawMessageEvent() *slack.MessageEvent
type Mux ¶
type Mux struct {
// contains filtered or unexported fields
}
func (*Mux) AddHandler ¶
func (*Mux) AddHandlerFunc ¶
func (m *Mux) AddHandlerFunc(f HandlerFunc, opts ...MuxOption)
type MuxOption ¶
type MuxOption interface {
// contains filtered or unexported methods
}
func HandleAllMessages ¶
func HandleAllMessages() MuxOption
func HandleOnlyMention ¶
func HandleOnlyMention() MuxOption
func HandleWithRegexp ¶
func HandleWithRegexpRaw ¶
type Option ¶
type Option interface {
// contains filtered or unexported methods
}
func WithLogger ¶
func WithLogger(l *zap.SugaredLogger) Option
Source Files ¶
Click to show internal directories.
Click to hide internal directories.