restapi

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

type Controller struct {
	// contains filtered or unexported fields
}

Controller contains handlers for controller REST API

func New

func New(ctx *context.Provider, opts ...Opt) (*Controller, error)

New returns new controller REST API instance.

func (*Controller) GetOperations

func (c *Controller) GetOperations() []operation.Handler

GetOperations returns all controller REST API endpoints

type Opt

type Opt func(opts *allOpts)

Opt represents a REST Api option.

func WithAutoAccept added in v0.1.1

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

func WithMessageHandler(handler operation.MessageHandler) Opt

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

func WithWebhookURLs

func WithWebhookURLs(webhookURLs ...string) Opt

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

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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