Documentation ¶
Index ¶
- Constants
- func AddJob(spec string, job cron.Job, options ...JobOption) (int, error)
- func Convert(handler interface{}) gin.HandlerFunc
- func GetBeanByName(name string) (interface{}, error)
- func InitFlags()
- func MidFactory(h IMidHandler) gin.HandlerFunc
- func OpenCors(engine *gin.Engine)
- func RemoveJob(id int)
- func Throw(err error)
- func ThrowWithErr(err, base error)
- func WarnWordSepNormalizeFunc(f *pflag.FlagSet, name string) pflag.NormalizedName
- func WordSepNormalizeFunc(f *pflag.FlagSet, name string) pflag.NormalizedName
- type BeforeFunc
- type CloseContext
- type Context
- type File
- type FileResponder
- type Gallop
- func (g *Gallop) Actions(acts ...IAction) *Gallop
- func (g *Gallop) Banner(banner string)
- func (g *Gallop) Beans(configs ...interface{}) *Gallop
- func (g *Gallop) Before(funcs ...BeforeFunc) *Gallop
- func (g *Gallop) Job(spec string, job cron.Job, options ...JobOption) *Gallop
- func (g *Gallop) Launch(addr ...string)
- func (g *Gallop) Modular(name string, routers ...IRouter) *Gallop
- func (g *Gallop) Preload()
- func (g *Gallop) Use(middes ...IMidHandler) *Gallop
- func (g *Gallop) Validate(validators ...IValidator) *Gallop
- type Group
- func (group *Group) Any(relativePath string, handlers ...interface{}) *Group
- func (group *Group) DELETE(relativePath string, handlers ...interface{}) *Group
- func (group *Group) GET(relativePath string, handlers ...interface{}) *Group
- func (group *Group) Group(name string, handlers ...interface{}) *Group
- func (group *Group) HEAD(relativePath string, handlers ...interface{}) *Group
- func (group *Group) Handle(httpMethod, relativePath string, handlers ...interface{}) *Group
- func (group *Group) Native() *gin.RouterGroup
- func (group *Group) OPTIONS(relativePath string, handlers ...interface{}) *Group
- func (group *Group) PATCH(relativePath string, handlers ...interface{}) *Group
- func (group *Group) POST(relativePath string, handlers ...interface{}) *Group
- func (group *Group) PUT(relativePath string, handlers ...interface{}) *Group
- func (group *Group) Use(middleware ...IMidHandler) *Group
- type IAction
- type IActionClose
- type IClose
- type IMidHandler
- type IRouter
- type IValidator
- type JobOption
- type Json
- type JsonResponder
- type Options
- type Responder
- type StringResponder
- type XML
- type XMLResponder
Constants ¶
View Source
const RspBodyKey = "gallop_rsp_key"
Variables ¶
This section is empty.
Functions ¶
func Convert ¶
func Convert(handler interface{}) gin.HandlerFunc
func GetBeanByName ¶
func ThrowWithErr ¶
func ThrowWithErr(err, base error)
func WarnWordSepNormalizeFunc ¶
func WarnWordSepNormalizeFunc(f *pflag.FlagSet, name string) pflag.NormalizedName
WarnWordSepNormalizeFunc changes and warns for flags that contain "_" separators
func WordSepNormalizeFunc ¶
func WordSepNormalizeFunc(f *pflag.FlagSet, name string) pflag.NormalizedName
WordSepNormalizeFunc changes all flags that contain "_" separators
Types ¶
type BeforeFunc ¶ added in v1.0.0
type CloseContext ¶ added in v0.1.1
type Context ¶
func (*Context) ShouldBind ¶
func (*Context) ShouldBindHeader ¶
func (*Context) ShouldBindUri ¶
type FileResponder ¶
func (FileResponder) RespondTo ¶
func (f FileResponder) RespondTo() gin.HandlerFunc
type Gallop ¶
type Gallop struct {
// contains filtered or unexported fields
}
func (*Gallop) Before ¶ added in v1.0.0
func (g *Gallop) Before(funcs ...BeforeFunc) *Gallop
func (*Gallop) Use ¶
func (g *Gallop) Use(middes ...IMidHandler) *Gallop
func (*Gallop) Validate ¶
func (g *Gallop) Validate(validators ...IValidator) *Gallop
type Group ¶
type Group struct {
*gin.RouterGroup
}
func (*Group) Any ¶
Any registers a route that matches all the HTTP methods. GET, POST, PUT, PATCH, HEAD, OPTIONS, DELETE, CONNECT, TRACE.
func (*Group) Native ¶
func (group *Group) Native() *gin.RouterGroup
HEAD is a shortcut for router.Handle("HEAD", path, handle).
func (*Group) Use ¶
func (group *Group) Use(middleware ...IMidHandler) *Group
type IActionClose ¶ added in v0.1.1
type IActionClose interface { }
type IClose ¶ added in v0.1.1
type IClose interface {
Shutdown(CloseContext)
}
type IMidHandler ¶
type IMidHandler func(*Context)
type IValidator ¶
type IValidator interface {
Validate() (f validator.Func, name string)
}
type JsonResponder ¶
func (JsonResponder) RespondTo ¶
func (j JsonResponder) RespondTo() gin.HandlerFunc
type Responder ¶
type Responder interface {
RespondTo() gin.HandlerFunc
}
type StringResponder ¶
func (StringResponder) RespondTo ¶
func (s StringResponder) RespondTo() gin.HandlerFunc
type XMLResponder ¶
func (XMLResponder) RespondTo ¶
func (s XMLResponder) RespondTo() gin.HandlerFunc
Source Files ¶
Click to show internal directories.
Click to hide internal directories.