Documentation
¶
Index ¶
- func RandString(n int) string
- type Plugin
- func (this *Plugin) AddApp(app ...*apps.App)
- func (this *Plugin) AppWithId(appId string) *apps.App
- func (this *Plugin) FilterRequest(request *http.Request) bool
- func (this *Plugin) FilterResponse(response *http.Response) bool
- func (this *Plugin) OnReload(f func())
- func (this *Plugin) OnReloadApps(f func())
- func (this *Plugin) OnReloadedApps(f func())
- func (this *Plugin) OnRequest(f func(request *http.Request) bool)
- func (this *Plugin) OnResponse(f func(response *http.Response) bool)
- func (this *Plugin) OnStart(f func())
- func (this *Plugin) OnStop(f func())
- func (this *Plugin) Reload()
- func (this *Plugin) ReloadApps()
- func (this *Plugin) ResetApps()
- func (this *Plugin) Start()
- func (this *Plugin) Stop()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Plugin ¶
type Plugin struct { Name string Code string Site string Version string Date string Developer string Description string Apps []*apps.App HasRequestFilter bool HasResponseFilter bool // contains filtered or unexported fields }
插件定义
func (*Plugin) FilterRequest ¶
调用请求时的回调函数
func (*Plugin) FilterResponse ¶
调用发送响应时的回调函数
func (*Plugin) OnResponse ¶
设置发送响应时的回调函数,如果返回false,则不会往下执行
Click to show internal directories.
Click to hide internal directories.