Documentation ¶
Index ¶
Constants ¶
View Source
const ( OnStart event.Event = "OnStart" OnShutdown event.Event = "OnShutdown" OnPanic event.Event = "OnPanic" )
View Source
const SIGNAL = "signal"
Variables ¶
View Source
var Injecter *inject.Injecter
View Source
var ResponderList = []Responder{ (JsonResponder)(nil), (TextResponder)(nil), (XmlResponder)(nil), (VoidResponder)(nil), }
Functions ¶
func RecoverHandler ¶
func RecoverHandler() gin.HandlerFunc
Types ¶
type Bingo ¶
type Bingo struct { Router // contains filtered or unexported fields }
func (*Bingo) InjectCtl ¶
func (bingo *Bingo) InjectCtl(ctls ...Controller) *Bingo
InjectCtl 注入控制器 会对控制器进行依赖注入,并且调用 Controller.BuildHandle 注册路由
type BingoEvent ¶
type Controller ¶
type Controller interface {
BuildHandle(g *Bingo)
}
type JsonResponder ¶
func (JsonResponder) Handle ¶
func (jsonFunc JsonResponder) Handle(context *gin.Context)
type Router ¶
type Router struct { *gin.RouterGroup // contains filtered or unexported fields }
type TextResponder ¶
func (TextResponder) Handle ¶
func (TextFunc TextResponder) Handle(context *gin.Context)
type VoidResponder ¶
func (VoidResponder) Handle ¶
func (voidFunc VoidResponder) Handle(context *gin.Context)
Click to show internal directories.
Click to hide internal directories.