service

package
v0.0.0-...-78c8ba0 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActionExecutor

type ActionExecutor interface {
	Do(ctx context.Context, name string) ([]byte, error)
}

type ActionService

type ActionService interface {
	Execute(ctx context.Context, name string) ([]byte, error)
}

func NewActionService

func NewActionService(executor ActionExecutor) ActionService

type InteractionResponder

type InteractionResponder interface {
	Execute(ctx context.Context, response SlackInteractionResponse) error
}

type InteractionService

type InteractionService interface {
	Respond(ctx context.Context, action slack.AttachmentAction, interaction slack.InteractionCallback) error
	Fail(ctx context.Context, action slack.AttachmentAction, interaction slack.InteractionCallback, body []byte, err error) error
}

func NewInteractionService

func NewInteractionService(responder InteractionResponder) InteractionService

type SlackAction

type SlackAction struct {
	Name           string
	AttachmentText string
	Command        string
}

type SlackInteractionResponse

type SlackInteractionResponse struct {
	ActionName  string
	ResponseURL string
	Message     slack.Message
	Body        []byte
	Error       error
}

Jump to

Keyboard shortcuts

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