slackapps

package
v0.0.0-...-d5669e0 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ChannelLink(channelID, teamID string) string

func DatePicker

func DatePicker(title string) *slack.InputBlock

func MultiSelectBlock

func MultiSelectBlock(title string, placeholder string, options ...string) *slack.InputBlock

func NewSlackHTTPMiddleware

func NewSlackHTTPMiddleware(signingSecret string, next http.Handler) http.Handler

func PlainText

func PlainText(text string) *slack.TextBlockObject

func SelectInputBlock

func SelectInputBlock(title, placeholder string, initialOptionIndex int, options ...string) *slack.InputBlock

func SingleCheckboxBlock

func SingleCheckboxBlock(title string) *slack.InputBlock

func TextInputBlockWithInitialValue

func TextInputBlockWithInitialValue(title, initialValue string) *slack.InputBlock

func TextInputBlockWithPlaceholder

func TextInputBlockWithPlaceholder(title, placeholder string) *slack.InputBlock

Types

type EchoSlashCommand

type EchoSlashCommand struct{}

func (*EchoSlashCommand) Handle

func (s *EchoSlashCommand) Handle(
	event *instrumentation.Event, commandName string, command slack.SlashCommand,
	w http.ResponseWriter, req *http.Request,
)

type HelpSlashCommand

type HelpSlashCommand struct {
	GlobalCommandName string
	Subcommands       []string
}

func (*HelpSlashCommand) Handle

func (s *HelpSlashCommand) Handle(
	event *instrumentation.Event, commandName string, command slack.SlashCommand,
	w http.ResponseWriter, req *http.Request,
)

type InteractionHandler

type InteractionHandler interface {
	Validate(
		event *instrumentation.Event, command slack.InteractionCallback,
		w http.ResponseWriter, req *http.Request,
	) *slack.ViewSubmissionResponse
	Handle(
		event *instrumentation.Event, command slack.InteractionCallback,
		w http.ResponseWriter, req *http.Request,
	)
}

type InteractivityHandler

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

func NewInteractivityHandler

func NewInteractivityHandler() *InteractivityHandler

func (*InteractivityHandler) HandleInteraction

func (i *InteractivityHandler) HandleInteraction(callbackID string, handler InteractionHandler)

func (*InteractivityHandler) ServeHTTP

func (i *InteractivityHandler) ServeHTTP(w http.ResponseWriter, req *http.Request)

type SlashCommand

type SlashCommand interface {
	Handle(
		event *instrumentation.Event, commandName string, command slack.SlashCommand,
		w http.ResponseWriter, req *http.Request,
	)
}

type SlashCommandHandler

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

func NewSlashCommandHandler

func NewSlashCommandHandler(monoCommandNamespace string) *SlashCommandHandler

func (*SlashCommandHandler) HandleSlashCommand

func (s *SlashCommandHandler) HandleSlashCommand(command string, handler SlashCommand)

func (*SlashCommandHandler) ServeHTTP

func (s *SlashCommandHandler) ServeHTTP(w http.ResponseWriter, req *http.Request)

Jump to

Keyboard shortcuts

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