Documentation ¶
Index ¶
- Variables
- func DD(o ...interface{})
- func Err(msg ...interface{})
- func Inf(msg ...interface{})
- func PPP(msg ...interface{})
- func PackSize(v int, uint string) string
- func RegisterHandler(h interface{})
- func SS(msg ...interface{})
- func Wrn(msg ...interface{})
- type AfterCall
- type BeforeCall
- type MicroRequest
- type Middle
- type ROUTER
- type Response
- type SERVICE
- type TableInfo
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // V2 ActionFuncMap = make(map[string]func(*MicroRequest) int, 0) MiddleFuncMap = make(map[string]func(*MicroRequest) bool, 0) )
request method set
Functions ¶
func RegisterHandler ¶
func RegisterHandler(h interface{})
Types ¶
type BeforeCall ¶
type BeforeCall interface {
Before(*MicroRequest) bool
}
middle function call on before
type MicroRequest ¶
type MicroRequest struct { R *http.Request W http.ResponseWriter M *Middle }
func (*MicroRequest) Success ¶
func (m *MicroRequest) Success(msg string, result interface{}) int
type ROUTER ¶
type ROUTER struct{}
func (ROUTER) CrossHeader ¶
func (ROUTER) CrossHeader(w http.ResponseWriter)
type SERVICE ¶ added in v0.1.6
func (*SERVICE) After ¶ added in v1.0.0
func (s *SERVICE) After(f func(*MicroRequest) bool) *SERVICE
global after call
func (*SERVICE) Before ¶ added in v1.0.0
func (s *SERVICE) Before(f func(*MicroRequest) bool) *SERVICE
global before call
Click to show internal directories.
Click to hide internal directories.