adapter

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2020 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnvAccesor

func EnvAccesor() adapter.EnvConfigAccessor

EnvAccesor for configuration parameters

func New

New adapter implementation

Types

type SlackChallenge added in v0.2.0

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 added in v0.2.0

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

SlackChallengeResponse is the handshake response for a challenge.

type SlackEvent added in v0.2.0

type SlackEvent map[string]interface{}

SlackEvent contains the event payload

func (SlackEvent) Type added in v0.2.0

func (e SlackEvent) Type() string

Type for the event

type SlackEventAPIHandler added in v0.2.0

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

SlackEventAPIHandler listen for Slack API Events

func NewSlackEventAPIHandler added in v0.2.0

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 added in v0.2.0

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