Documentation ¶
Index ¶
- Variables
- func ErrorHTML(w http.ResponseWriter, r *http.Request, status int)
- func Forbidden(w http.ResponseWriter, r *http.Request)
- func InternalServerError(w http.ResponseWriter, r *http.Request)
- func NewControllerHandler() http.Handler
- func NewForbiddenHandler() http.Handler
- func NewInternalServerErrorHandler() http.Handler
- func NewNotFoundHandler() http.Handler
- func NotFound(w http.ResponseWriter, r *http.Request)
- type ControllerHandler
- func (ch *ControllerHandler) GetControlManager(context *web.Context) (cm *controller.ControlManager)
- func (ch *ControllerHandler) ServeContextHTTP(ctxt *web.Context)
- func (ch *ControllerHandler) ServeContextOptions(ctxt *web.Context, origin map[string]string)
- func (ch *ControllerHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
- func (ch *ControllerHandler) ServeOptions(w http.ResponseWriter, r *http.Request, origin map[string]string)
- func (ch *ControllerHandler) SetAction(action string)
- func (ch *ControllerHandler) SetController(mod, ctrler string)
- func (ch *ControllerHandler) SetControllerMeta(controlmeta *controller.Meta)
- type DynamicHandler
- func (dh *DynamicHandler) Action() string
- func (dh *DynamicHandler) Controller() string
- func (dh *DynamicHandler) GetControlManager(context *web.Context) (cm *controller.ControlManager)
- func (dh *DynamicHandler) Module() string
- func (dh *DynamicHandler) ServeContextHTTP(context *web.Context)
- func (dh *DynamicHandler) ServeContextOptions(context *web.Context, origin map[string]string)
- func (dh *DynamicHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
- func (dh *DynamicHandler) ServeOptions(w http.ResponseWriter, r *http.Request, origin map[string]string)
- func (dh *DynamicHandler) SetAction(action string)
- func (dh *DynamicHandler) SetController(control string)
- func (dh *DynamicHandler) SetModule(mod string)
- type StaticFileHandler
- type WSArgs
- type WebSocketHandler
Constants ¶
This section is empty.
Variables ¶
View Source
var ( NotFoundHandler = http.HandlerFunc(NotFound) InternalServerErrorHandler = http.HandlerFunc(InternalServerError) ForbiddenHandler = http.HandlerFunc(Forbidden) )
Functions ¶
func InternalServerError ¶
func InternalServerError(w http.ResponseWriter, r *http.Request)
func NewControllerHandler ¶
func NewForbiddenHandler ¶
func NewNotFoundHandler ¶
Types ¶
type ControllerHandler ¶
type ControllerHandler struct {
// contains filtered or unexported fields
}
func NewDefaultControllerHandler ¶
func NewDefaultControllerHandler(controlmeta *controller.Meta, action string) *ControllerHandler
func NewNamedControllerHandler ¶
func NewNamedControllerHandler(mod, ctrler, action string) (chand *ControllerHandler)
func (*ControllerHandler) GetControlManager ¶
func (ch *ControllerHandler) GetControlManager(context *web.Context) (cm *controller.ControlManager)
func (*ControllerHandler) ServeContextHTTP ¶
func (ch *ControllerHandler) ServeContextHTTP(ctxt *web.Context)
func (*ControllerHandler) ServeContextOptions ¶
func (ch *ControllerHandler) ServeContextOptions(ctxt *web.Context, origin map[string]string)
func (*ControllerHandler) ServeHTTP ¶
func (ch *ControllerHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
func (*ControllerHandler) ServeOptions ¶
func (ch *ControllerHandler) ServeOptions(w http.ResponseWriter, r *http.Request, origin map[string]string)
func (*ControllerHandler) SetAction ¶
func (ch *ControllerHandler) SetAction(action string)
func (*ControllerHandler) SetController ¶
func (ch *ControllerHandler) SetController(mod, ctrler string)
func (*ControllerHandler) SetControllerMeta ¶
func (ch *ControllerHandler) SetControllerMeta(controlmeta *controller.Meta)
type DynamicHandler ¶
type DynamicHandler struct {
// contains filtered or unexported fields
}
func NewDefaultDynamicHandler ¶
func NewDefaultDynamicHandler(ctrlgroup *controller.Group, action, control, mod string) *DynamicHandler
func NewDynamicHandler ¶
func NewDynamicHandler(ctrlgroup *controller.Group) *DynamicHandler
func (*DynamicHandler) Action ¶
func (dh *DynamicHandler) Action() string
func (*DynamicHandler) Controller ¶
func (dh *DynamicHandler) Controller() string
func (*DynamicHandler) GetControlManager ¶
func (dh *DynamicHandler) GetControlManager(context *web.Context) (cm *controller.ControlManager)
func (*DynamicHandler) Module ¶
func (dh *DynamicHandler) Module() string
func (*DynamicHandler) ServeContextHTTP ¶
func (dh *DynamicHandler) ServeContextHTTP(context *web.Context)
func (*DynamicHandler) ServeContextOptions ¶
func (dh *DynamicHandler) ServeContextOptions(context *web.Context, origin map[string]string)
func (*DynamicHandler) ServeHTTP ¶
func (dh *DynamicHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
func (*DynamicHandler) ServeOptions ¶
func (dh *DynamicHandler) ServeOptions(w http.ResponseWriter, r *http.Request, origin map[string]string)
func (*DynamicHandler) SetAction ¶
func (dh *DynamicHandler) SetAction(action string)
func (*DynamicHandler) SetController ¶
func (dh *DynamicHandler) SetController(control string)
func (*DynamicHandler) SetModule ¶
func (dh *DynamicHandler) SetModule(mod string)
type StaticFileHandler ¶
type StaticFileHandler struct { BasePath string // relative path from application or absolute path BaseURL string // relative path of domain DefaultType string Cache int Gzip []string GzippedFile bool GzipMinSize int64 }
func NewStaticFileHandler ¶
func NewStaticFileHandler() *StaticFileHandler
func NewStaticFileHandlerPath ¶
func NewStaticFileHandlerPath(basepath string, baseurl string) *StaticFileHandler
func (*StaticFileHandler) ServeHTTP ¶
func (sh *StaticFileHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
func (*StaticFileHandler) ServeOptions ¶
func (sh *StaticFileHandler) ServeOptions(w http.ResponseWriter, _ *http.Request, _ map[string]string)
type WebSocketHandler ¶
type WebSocketHandler struct {
// contains filtered or unexported fields
}
func NewWebSocketHandler ¶
func NewWebSocketHandler(ctrler interface{}, allowcmd bool) *WebSocketHandler
func (*WebSocketHandler) ServeContextHTTP ¶
func (wh *WebSocketHandler) ServeContextHTTP(context *web.Context)
func (*WebSocketHandler) ServeHTTP ¶
func (wh *WebSocketHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
Click to show internal directories.
Click to hide internal directories.