Documentation ¶
Index ¶
Constants ¶
const ( HOOK_BEFORE_SERVE = "HOOK_BEFORE_SERVE" // Deprecated, use HookBeforeServe instead. HOOK_AFTER_SERVE = "HOOK_AFTER_SERVE" // Deprecated, use HookAfterServe instead. HOOK_BEFORE_OUTPUT = "HOOK_BEFORE_OUTPUT" // Deprecated, use HookBeforeOutput instead. HOOK_AFTER_OUTPUT = "HOOK_AFTER_OUTPUT" // Deprecated, use HookAfterOutput instead. HookBeforeServe = "HOOK_BEFORE_SERVE" HookAfterServe = "HOOK_AFTER_SERVE" HookBeforeOutput = "HOOK_BEFORE_OUTPUT" HookAfterOutput = "HOOK_AFTER_OUTPUT" ServerStatusStopped = 0 ServerStatusRunning = 1 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HandlerFunc ¶
type HandlerFunc = ghttp.HandlerFunc
type Server ¶
func (*Server) BindObjectClass ¶
BindObject registers object to server routes with given pattern.
The optional parameter <method> is used to specify the method to be registered, which supports multiple method names, multiple methods are separated by char ',', case sensitive.
Note that the route method should be defined as ghttp.HandlerFunc.
func (*Server) BindObjectClassMethod ¶
BindObjectMethod registers specified method of object to server routes with given pattern.
The optional parameter <method> is used to specify the method to be registered, which does not supports multiple method names but only one, case sensitive.
Note that the route method should be defined as ghttp.HandlerFunc.
func (*Server) BindObjectClassRest ¶
BindObjectRest registers object in REST API style to server with specified pattern. Note that the route method should be defined as ghttp.HandlerFunc.