slackmux

package module
v0.0.0-...-474c971 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2022 License: MIT Imports: 6 Imported by: 0

README

slackmux

Interaction routing for Slack App

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrCommandNotFound = errors.New("command not found")
)

Functions

This section is empty.

Types

type BlockActionHandlerFunc

type BlockActionHandlerFunc func(interactionCallback slack.InteractionCallback, blockAction *slack.BlockAction) (*slack.WebhookMessage, error)

type BlockActionID

type BlockActionID string

type ErrorHandlerFunc

type ErrorHandlerFunc func(http.ResponseWriter, *http.Request, error)

type InteractionMux

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

func NewInteractionMux

func NewInteractionMux(httpClient *http.Client) *InteractionMux

func (*InteractionMux) BlockActionsHandlerFunc

func (mux *InteractionMux) BlockActionsHandlerFunc(actionID BlockActionID) (BlockActionHandlerFunc, bool)

func (*InteractionMux) HandleBlockAction

func (mux *InteractionMux) HandleBlockAction(actionID BlockActionID, handler BlockActionHandlerFunc)

func (*InteractionMux) HandleCommandError

func (mux *InteractionMux) HandleCommandError(handler ErrorHandlerFunc)

func (*InteractionMux) HandleParseError

func (mux *InteractionMux) HandleParseError(handler ErrorHandlerFunc)

func (*InteractionMux) HandleVerificationError

func (mux *InteractionMux) HandleVerificationError(handler ErrorHandlerFunc)

func (*InteractionMux) HandleViewSubmission

func (mux *InteractionMux) HandleViewSubmission(interactionType slack.InteractionType, callbackID string, handler ViewSubmissionHandlerFunc)

func (*InteractionMux) ServeHTTP

func (mux *InteractionMux) ServeHTTP(w http.ResponseWriter, r *http.Request)

func (*InteractionMux) ViewSubmissionHandlerFunc

func (mux *InteractionMux) ViewSubmissionHandlerFunc(payload slack.InteractionCallback) (ViewSubmissionHandlerFunc, bool)

type ViewSubmissionHandlerFunc

type ViewSubmissionHandlerFunc func(interactionCallback slack.InteractionCallback) (*slack.ViewSubmissionResponse, error)

Jump to

Keyboard shortcuts

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