Documentation ¶
Index ¶
- Variables
- func GetAllProvider() []interface{}
- type Config
- func (c *Config) Get() map[interface{}]interface{}
- func (c *Config) GetBool(key string, def ...bool) bool
- func (c *Config) GetConfig(key string) *Config
- func (c *Config) GetInt(key string, def ...int) int
- func (c *Config) GetKey(key string) map[interface{}]interface{}
- func (c *Config) GetString(key string, def ...string) string
- type Container
- type HttpServer
- type Redis
- func (r Redis) Get(key string) *redis.StringCmd
- func (r Redis) GetBool(key string) (bool, bool)
- func (r Redis) GetFloat32(key string) (float32, bool)
- func (r Redis) GetFloat64(key string) (float64, bool)
- func (r Redis) GetInt(key string) (int, bool)
- func (r Redis) GetInt64(key string) (int64, bool)
- func (r Redis) GetString(key string) (string, bool)
- func (r Redis) Incr(key string) (int64, bool)
- func (r Redis) Set(key string, value interface{}, expiration time.Duration) *redis.StatusCmd
Constants ¶
This section is empty.
Variables ¶
View Source
var Init bool
Init 单元测试辅助 如果一个单元测试连配置都都不使用, 想来也无需初始化了
Functions ¶
func GetAllProvider ¶
func GetAllProvider() []interface{}
Types ¶
type HttpServer ¶
type HttpServer struct {
// contains filtered or unexported fields
}
HttpServer 封装一些被(工具生成的)代码调用的函数
func NewHttpServer ¶
func NewHttpServer() *HttpServer
func (*HttpServer) GetEngine ¶
func (receiver *HttpServer) GetEngine() *gin.Engine
func (*HttpServer) Init ¶
func (receiver *HttpServer) Init()
func (*HttpServer) RunListener ¶
func (receiver *HttpServer) RunListener()
func (*HttpServer) SetDebug ¶
func (receiver *HttpServer) SetDebug(isDebug bool)
func (*HttpServer) SetEngine ¶
func (receiver *HttpServer) SetEngine(engine *gin.Engine)
func (*HttpServer) SetPort ¶
func (receiver *HttpServer) SetPort(port int)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.