slack

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2021 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NewOptions

type NewOptions struct {
	ProviderGitHubToken  string
	ProviderGitHubURL    string
	ProviderGitHubOrgs   []string
	ProviderGitLabToken  string
	ProviderGitLabURL    string
	ProviderGitLabGroups []string
	SigningSecret        string
	Token                string
}

NewOptions holds configuration parameters to create a new and operational Slack object

type Slack

type Slack struct {
	Client        *slack.Client
	SigningSecret string
	Providers     providers.Providers
	Storage       storage.Storage
}

Slack holds clients and configuration to perform operations upon the Slack API, git providers and storage/cache endpoints

func New

func New(ctx context.Context, opts NewOptions) (s Slack, err error)

New creates and configures a new Slack object

func (Slack) ModalHandler

func (s Slack) ModalHandler(w http.ResponseWriter, r *http.Request)

ModalHandler handlers slack modal payloads

func (Slack) SelectHandler

func (s Slack) SelectHandler(w http.ResponseWriter, r *http.Request)

SelectHandler handles slack selector payloads

func (Slack) SlashHandler

func (s Slack) SlashHandler(w http.ResponseWriter, r *http.Request)

SlashHandler handles slash command payloads

Jump to

Keyboard shortcuts

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