api_trigger

package
v0.0.0-...-f514c2e Latest Latest
Warning

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

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

README

Readme

http-api implements the pipeline interfaces.

Supported features

  • consume json request
  • consume other request
  • token authentication

Testing

Run make test from the package root to run the tests.

Configuration

item description
apiKeys list of api keys
CORS Allow CORS (bool)

Configuration of api keys is optional. If you don't configure any, the api is public.

Example configuration
apiKeys = ["foo", "bar"]
CORS = false
Outputs
key description
header map of string to list of strings
body string

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Trigger

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

func (*Trigger) Close

func (t *Trigger) Close() error

func (*Trigger) Init

func (t *Trigger) Init(stub domain.Stub, cfg []byte) error

func (*Trigger) NextMessage

func (t *Trigger) NextMessage() (tag string, request map[string]interface{}, err error)

func (*Trigger) Respond

func (t *Trigger) Respond(tag string, response map[string]interface{}, err error) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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