controller

package
v0.1.6-0...-5c25bcb Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2021 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCommandHandlers

func GetCommandHandlers(ctx *context.Provider, opts ...Opt) ([]command.Handler, error)

GetCommandHandlers returns all command handlers provided by controller.

func GetRESTHandlers

func GetRESTHandlers(ctx *context.Provider, opts ...Opt) ([]rest.Handler, error)

GetRESTHandlers returns all REST handlers provided by controller.

Types

type Opt

type Opt func(opts *allOpts)

Opt represents a controller option.

func WithAutoAccept

func WithAutoAccept(autoAccept bool) Opt

WithAutoAccept is an option allowing for the auto accept to be set.

func WithDefaultLabel

func WithDefaultLabel(defaultLabel string) Opt

WithDefaultLabel is an option allowing for the defaultLabel to be set.

func WithMessageHandler

func WithMessageHandler(handler command.MessageHandler) Opt

WithMessageHandler is an option allowing for the message handler to be set.

func WithNotifier

func WithNotifier(notifier command.Notifier) Opt

WithNotifier is an option for setting up a notifier which will notify clients of events.

func WithWebhookURLs

func WithWebhookURLs(webhookURLs ...string) Opt

WithWebhookURLs is an option for setting up a webhook dispatcher which will notify clients of events.

Jump to

Keyboard shortcuts

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