Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HandlerChain ¶
type HandlerChain []HandlerFunc
type HandlerFunc ¶
type HttpAnser ¶
type HttpAnser struct { *Anser *Router // key1: Method(Get/Post); key2: path; value: []HandlerFunc Handlers map[string]map[string]HandlerChain // contains filtered or unexported fields }
func (*HttpAnser) GetContext ¶ added in v1.1.0
type IAnswer ¶
type IAnswer interface { // 開始監聽 Listen() // 執行一次主迴圈 Handler() // 數據寫出(寫到寫出緩存中) Write(int32, *[]byte, int32) error }
func NewHttpAnser ¶
type Router ¶
type Router struct { *HttpAnser Handlers HandlerChain // contains filtered or unexported fields }
==================================================================================================== Router ====================================================================================================
func (*Router) GET ¶
func (r *Router) GET(path string, handlers ...HandlerFunc)
func (*Router) NewRouter ¶
func (r *Router) NewRouter(relativePath string, handlers ...HandlerFunc) *Router
func (*Router) POST ¶
func (r *Router) POST(path string, handlers ...HandlerFunc)
Click to show internal directories.
Click to hide internal directories.