Documentation
¶
Index ¶
- Constants
- func AddPlugin(priority uint64, funcs Funcs, description, version string)
- func List() []string
- type Data
- type Funcs
- type HelloConfig
- type Info
- type IsRequestHandled
- type LoadFunc
- type OnRequestData
- type OnRequestFunc
- type Plugins
- type ProxyConfig
- type ProxyRemap
- type StartupData
- type StartupFunc
Constants ¶
View Source
const ( RequestHandled = IsRequestHandled(true) RequestUnhandled = IsRequestHandled(false) )
View Source
const HelloMiddlewarePath = "/_hello_middleware"
View Source
const HelloPath = "/_hello"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Data ¶
Data is the common plugin data, given to most plugin hooks. This is designed to be embedded in the data structs for specific hooks.
type Funcs ¶
type Funcs struct {
// contains filtered or unexported fields
}
type LoadFunc ¶
type LoadFunc func(json.RawMessage) interface{}
type OnRequestFunc ¶
type OnRequestFunc func(d OnRequestData) IsRequestHandled
type Plugins ¶
type Plugins interface {
OnStartup(d StartupData)
OnRequest(d OnRequestData) bool
GetInfo() []Info
}
type ProxyConfig ¶
type ProxyConfig []ProxyRemap
type ProxyRemap ¶
func (*ProxyRemap) UnmarshalJSON ¶
func (r *ProxyRemap) UnmarshalJSON(b []byte) error
type StartupFunc ¶
type StartupFunc func(d StartupData)
Source Files
¶
- hello_config.go
- hello_context.go
- hello_middleware.go
- hello_shared_config.go
- hello_startup.go
- hello_world.go
- plugin.go
- proxy.go
Click to show internal directories.
Click to hide internal directories.