Versions in this module Expand all Collapse all v0 v0.1.0 Mar 19, 2026 Changes in this version + var ErrNotFoundActionValue = fmt.Errorf("not found action value") + var ErrNotFoundInteractionType = fmt.Errorf("not found interaction type") + var ErrPermissionDenied = errors.New("permission denied") + func BlockRetryRequest(header http.Header) error + func ConvertHeaders(headers map[string]string) http.Header + func HandleURLVerification(body string) (*slackevents.ChallengeResponse, error) + func MustJSONMarshal(v any) string + func MustJSONUnmarshal[T any](data string) T + func NewResponse(code int) events.APIGatewayProxyResponse + func RegisterHandler[T any](eh *EventHandler, handler EventHandlerFunc[T]) + func SlackVerificationMiddleware(getSigningSecret func(r *http.Request) (string, error)) func(http.Handler) http.Handler + func Verify(header http.Header, body []byte, signingSecret string) error + type BotError struct + Code Code + Err error + Message string + func NewBotError(code Code, message string, err error) *BotError + func (be *BotError) Error() string + func (be *BotError) Unwrap() error + type Code string + const CodeInternal + const CodeInvalidArgument + const CodeUnauthorized + type Command interface + Register func(app *kingpin.Application) + type DynamoDBLock struct + DynamoDBCli *dynamodb.Client + TableName string + func NewDynamoDBLock(dynamoDBCli *dynamodb.Client, tableName string) *DynamoDBLock + func (dl *DynamoDBLock) AcquireLock(ctx context.Context, userID string, ttl time.Duration) error + func (dl *DynamoDBLock) ReleaseLock(ctx context.Context, userID string) error + type EventHandler struct + func NewEventHandler(slackVerificationToken *SSMLoader) *EventHandler + func (eh *EventHandler) HandleEvent(ctx context.Context, request events.APIGatewayProxyRequest) (events.APIGatewayProxyResponse, error) + type EventHandlerFunc func(ctx context.Context, ev T) error + type EventRoutes map[slack.InteractionType]map[string]InteractionCallbackHandler + func (er EventRoutes) Register(kind slack.InteractionType, actionID string, ...) + func (er EventRoutes) Run(ctx context.Context, kind slack.InteractionType, action *slack.BlockAction, ...) error + type InteractionCallbackHandler func(ctx context.Context, action *slack.BlockAction, ...) error + type InteractionHandler struct + EventRoutes EventRoutes + func NewInteractionHandler() *InteractionHandler + func (ih *InteractionHandler) Handle(ctx context.Context, request events.APIGatewayProxyRequest) (events.APIGatewayProxyResponse, error) + type KingpinHandler struct + func NewKingpinHandler(slackCli *slack.Client, commandName, commandDesc string) *KingpinHandler + func (kh *KingpinHandler) AddCommand(cmd Command) + func (kh *KingpinHandler) HandleAppMention(ctx context.Context, ev *slackevents.AppMentionEvent) error + type LambdaHandler func(ctx context.Context, request events.APIGatewayProxyRequest) (events.APIGatewayProxyResponse, error) + type LambdaRouter struct + EventHandler LambdaHandler + InteractionHandler LambdaHandler + func NewRouter(eventHandler, interactionHandler LambdaHandler) *LambdaRouter + func (r *LambdaRouter) Handle(ctx context.Context, request events.APIGatewayProxyRequest) (events.APIGatewayProxyResponse, error) + type Message struct + Root Root + type Payload struct + Message Message + type Root struct + User string + type SSMLoader struct + Key string + SSMCli *ssm.Client + Value *string + func NewSSMLoader(ssmClient *ssm.Client, key string) *SSMLoader + func NewSSMLoaderMock(key string, value string) *SSMLoader + func (l *SSMLoader) Get(ctx context.Context) (string, error) + func (l *SSMLoader) MustGet(ctx context.Context) string + func (l *SSMLoader) SetValue(value string)