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 HelloConfig ¶
type HelloConfig struct {
Hello string `json:"hello"`
}
type IsRequestHandled ¶
type IsRequestHandled bool
type LoadFunc ¶
type LoadFunc func(json.RawMessage) interface{}
type OnRequestData ¶
type OnRequestData struct { Data W http.ResponseWriter R *http.Request }
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 StartupData ¶
type StartupData struct {
Data
}
type StartupFunc ¶
type StartupFunc func(d StartupData)
Click to show internal directories.
Click to hide internal directories.