slacksource

package
v1.27.0 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2023 License: Apache-2.0 Imports: 18 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAdapter

NewAdapter satisfies pkgadapter.AdapterConstructor.

func NewEnvConfig

func NewEnvConfig() adapter.EnvConfigAccessor

NewEnvConfig satisfies pkgadapter.EnvConfigConstructor.

Types

type SlackChallenge

type SlackChallenge struct {
	Category  string `json:"type"`
	Token     string `json:"token"`
	Challenge string `json:"challenge"`
}

SlackChallenge contains the handshake challenge for the Slack events API.

type SlackChallengeResponse

type SlackChallengeResponse struct {
	Challenge string `json:"challenge"`
}

SlackChallengeResponse is the handshake response for a challenge.

type SlackEvent

type SlackEvent map[string]interface{}

SlackEvent contains the event payload

func (SlackEvent) Type

func (e SlackEvent) Type() string

Type for the event

type SlackEventAPIHandler

type SlackEventAPIHandler interface {
	Start(ctx context.Context) error
}

SlackEventAPIHandler listen for Slack API Events

func NewSlackEventAPIHandler

func NewSlackEventAPIHandler(ceClient cloudevents.Client, port int, signingSecret, appID string, tw timeWrap, logger *zap.SugaredLogger) SlackEventAPIHandler

NewSlackEventAPIHandler creates the default implementation of the Slack API Events handler

type SlackEventWrapper

type SlackEventWrapper struct {
	AdditionalProperties map[string]interface{} `json:"-,omitempty"`

	APIAppID    string     `json:"api_app_id"`
	AuthedUsers []string   `json:"authed_users"`
	Event       SlackEvent `json:"event"`
	EventID     string     `json:"event_id"`
	EventTime   int        `json:"event_time"`
	TeamID      string     `json:"team_id"`
	Token       string     `json:"token"`
	Type        string     `json:"type"`
}

SlackEventWrapper contains a common wrapper for all events. See https://api.slack.com/types/event for reference.

Jump to

Keyboard shortcuts

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