types

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: May 25, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type JsonDuration

type JsonDuration time.Duration

func (*JsonDuration) MarshalJSON

func (j *JsonDuration) MarshalJSON() ([]byte, error)

func (*JsonDuration) UnmarshalJSON

func (j *JsonDuration) UnmarshalJSON(bytes []byte) error

type JsonStringSet

type JsonStringSet map[string]bool

func (*JsonStringSet) Del

func (s *JsonStringSet) Del(key string)

func (*JsonStringSet) Has

func (s *JsonStringSet) Has(key string) bool

func (*JsonStringSet) MarshalJSON

func (s *JsonStringSet) MarshalJSON() ([]byte, error)

func (*JsonStringSet) Set

func (s *JsonStringSet) Set(key string)

func (*JsonStringSet) UnmarshalJSON

func (s *JsonStringSet) UnmarshalJSON(bytes []byte) error

type Manifest

type Manifest struct {
	Name           string            `json:"name"`                      // information field
	Description    string            `json:"description"`               // information field
	Run            []string          `json:"run"`                       // command to run
	OutputHeaders  map[string]string `json:"output_headers"`            // output headers
	InputHeaders   map[string]string `json:"input_headers,omitempty"`   // headers to map from request to environment
	Query          map[string]string `json:"query,omitempty"`           // map query or form parameters to environment
	Environment    map[string]string `json:"environment,omitempty"`     // custom environment
	Method         string            `json:"method,omitempty"`          // restrict invoke only to the HTTP method
	MethodEnv      string            `json:"method_env,omitempty"`      // map method name to environment
	PathEnv        string            `json:"path_env,omitempty"`        // map requested path to environment
	TimeLimit      JsonDuration      `json:"time_limit,omitempty"`      // time limit to run (zero is infinity)
	MaximumPayload int64             `json:"maximum_payload,omitempty"` // limit incoming payload (zero is unlimited)
	AllowedIP      JsonStringSet     `json:"allowed_ip,omitempty"`      // limit incoming connections from list of IP
	AllowedOrigin  JsonStringSet     `json:"allowed_origin,omitempty"`  // limit incoming connections by origin header
	Public         bool              `json:"public"`                    // if public, tokens are ignores
	Tokens         map[string]string `json:"tokens,omitempty"`          // limit request by value in Authorization header (token => title)
}

func ExampleManifest

func ExampleManifest() Manifest

func (*Manifest) LoadFrom

func (mf *Manifest) LoadFrom(filename string) error

func (*Manifest) SaveAs

func (mf *Manifest) SaveAs(filename string) error

Jump to

Keyboard shortcuts

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