Documentation ¶
Index ¶
Constants ¶
View Source
const ( ConfigEnv = "GOBY_CONFIG" ConfigFile = "config.yaml" )
View Source
const (
HTTP_STATUS = "HTTP_STATUS"
)
Variables ¶
View Source
var ( GOBY_CONFIG conf.Server GOBY_VIPER *viper.Viper GOBY_LOG *zap.Logger GOBY_DB *gorm.DB GOBY_REDIS *redis.Client GOBY_BlackCache local_cache.Cache GOBY_Concurrency_Control = &singleflight.Group{} )
Functions ¶
func ErrorHandler ¶
func ErrorHandler() gin.HandlerFunc
Types ¶
type Goby ¶
type Goby struct { *gin.Engine //我们把 engine放到 主类里 RouteGroup *gin.RouterGroup //这里就是保存 group对象 }
func MakeGin ¶
func MakeGin(middlewares ...gin.HandlerFunc) *Goby
func (*Goby) RouterMount ¶
func (ain *Goby) RouterMount(groupName string, middlebrows ...gin.HandlerFunc) func(opts ...func(*gin.RouterGroup)) *Goby
type RouteGroupOption ¶
type RouteGroupOption struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.