Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrOption = errors.New("Must set NewModel when use PostFunc/PutFunc")
)
error(s)
View Source
var ErrResponse = &Response{
Code: -1,
Msg: "FAIL",
}
ErrResponse Common
Functions ¶
Types ¶
type Option ¶
type Option struct { Root *router.Router UseNotFound bool NewModel func() interface{} // Optional DefaultPageSize int Path string GetFunc func(id string) interface{} ListFunc func(page, size int) interface{} PostFunc func(interface{}) error PutFunc func(interface{}) error DeleteFunc func(id string) error }
Option of RESTful Middleware
Click to show internal directories.
Click to hide internal directories.