Documentation
¶
Index ¶
- func NewPlugin(logger *logger.Logger) types.Plugin
- type DemoPlugin
- func (p *DemoPlugin) Destroy()
- func (p *DemoPlugin) GetConfig() types.PluginConf
- func (p *DemoPlugin) HandleRequest(req *http.Request, _ http.ResponseWriter) (bool, error)
- func (p *DemoPlugin) HandleResponse(_ *http.Request, w http.ResponseWriter) http.ResponseWriter
- func (p *DemoPlugin) Priority() int
- func (p *DemoPlugin) ValidateAndSetConfig(conf types.PluginConf) error
- type DemoResponseWriter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DemoPlugin ¶
type DemoPlugin struct {
// contains filtered or unexported fields
}
func (*DemoPlugin) Destroy ¶
func (p *DemoPlugin) Destroy()
func (*DemoPlugin) GetConfig ¶
func (p *DemoPlugin) GetConfig() types.PluginConf
func (*DemoPlugin) HandleRequest ¶
func (p *DemoPlugin) HandleRequest(req *http.Request, _ http.ResponseWriter) (bool, error)
func (*DemoPlugin) HandleResponse ¶
func (p *DemoPlugin) HandleResponse(_ *http.Request, w http.ResponseWriter) http.ResponseWriter
func (*DemoPlugin) Priority ¶
func (p *DemoPlugin) Priority() int
func (*DemoPlugin) ValidateAndSetConfig ¶
func (p *DemoPlugin) ValidateAndSetConfig(conf types.PluginConf) error
type DemoResponseWriter ¶
type DemoResponseWriter struct {
*types.BaseResponseWriter
// contains filtered or unexported fields
}
func (*DemoResponseWriter) Hijack ¶
func (w *DemoResponseWriter) Hijack() (net.Conn, *bufio.ReadWriter, error)
To make sure the plugin works with websocket
func (*DemoResponseWriter) Write ¶
func (w *DemoResponseWriter) Write(data []byte) (int, error)
Override Write to modify response body if needed
func (*DemoResponseWriter) WriteHeader ¶
func (w *DemoResponseWriter) WriteHeader(statusCode int)
Override WriteHeader to modify response headers
Click to show internal directories.
Click to hide internal directories.