Documentation ¶
Index ¶
- Constants
- func HandleException(e interface{}, apiName, callName, body string, cb UrlResponseCallback)
- type ErrorDetail
- type ErrorInfo
- type ErrorResults
- type HttpPlugin
- func (h *HttpPlugin) AddHandler(url string, handler UrlHandler)
- func (h *HttpPlugin) Handler(ctx *fasthttp.RequestCtx)
- func (h *HttpPlugin) IsOnLoopBack() bool
- func (h *HttpPlugin) IsSecure() bool
- func (h *HttpPlugin) PluginInitialize(c *cli.Context)
- func (h *HttpPlugin) PluginShutdown()
- func (h *HttpPlugin) PluginStartup()
- func (h *HttpPlugin) SetProgramOptions(options *[]cli.Flag)
- func (h *HttpPlugin) VerboseErrors() bool
- type HttpPluginImpl
- type NextFunction
- type UrlHandler
- type UrlResponseCallback
Constants ¶
View Source
const (
HttpPlug = PluginTypeName("HttpPlugin")
)
Variables ¶
This section is empty.
Functions ¶
func HandleException ¶
func HandleException(e interface{}, apiName, callName, body string, cb UrlResponseCallback)
Types ¶
type ErrorDetail ¶
type ErrorResults ¶
type HttpPlugin ¶
type HttpPlugin struct { AbstractPlugin // contains filtered or unexported fields }
func NewHttpPlugin ¶
func NewHttpPlugin(io *asio.IoContext) *HttpPlugin
func (*HttpPlugin) AddHandler ¶
func (h *HttpPlugin) AddHandler(url string, handler UrlHandler)
func (*HttpPlugin) Handler ¶
func (h *HttpPlugin) Handler(ctx *fasthttp.RequestCtx)
func (*HttpPlugin) IsOnLoopBack ¶
func (h *HttpPlugin) IsOnLoopBack() bool
func (*HttpPlugin) IsSecure ¶
func (h *HttpPlugin) IsSecure() bool
func (*HttpPlugin) PluginInitialize ¶
func (h *HttpPlugin) PluginInitialize(c *cli.Context)
func (*HttpPlugin) PluginShutdown ¶
func (h *HttpPlugin) PluginShutdown()
func (*HttpPlugin) PluginStartup ¶
func (h *HttpPlugin) PluginStartup()
func (*HttpPlugin) SetProgramOptions ¶
func (h *HttpPlugin) SetProgramOptions(options *[]cli.Flag)
func (*HttpPlugin) VerboseErrors ¶
func (h *HttpPlugin) VerboseErrors() bool
type HttpPluginImpl ¶
type HttpPluginImpl struct { UrlHandlers map[string]UrlHandler AccessControlAllowOrigin string AccessControlAllowHeaders string AccessControlMaxAge string AccessControlAllowCredentials bool //default false MaxBodySize common.SizeT ListenEndpoint *http.ServeMux HttpsListenEndpoint *http.ServeMux Listener net.Listener // contains filtered or unexported fields }
func NewHttpPluginImpl ¶
func NewHttpPluginImpl(io *asio.IoContext) *HttpPluginImpl
type NextFunction ¶
type NextFunction = func(interface{})
type UrlHandler ¶
type UrlHandler = func(source string, body []byte, cb UrlResponseCallback)
type UrlResponseCallback ¶
Click to show internal directories.
Click to hide internal directories.