Documentation ¶
Index ¶
- Variables
- func DbConnect()
- func DbDisconnect()
- func Deserialization(byt []byte, ptr interface{}) (err error)
- func NewRedisPool()
- func ParseConfig(file string) (err error)
- func RdsDisConnect()
- func Serialization(value interface{}) ([]byte, error)
- type AlertCfg
- type Cache
- func (cache *Cache) Del(name string) (err error)
- func (cache *Cache) Exist(name string) (bool, error)
- func (cache *Cache) HExists(name, field string) (bool, error)
- func (cache *Cache) HGet(name, field string) (v interface{}, ok bool, err error)
- func (cache *Cache) HGetAll(name string) (data map[string]string, err error)
- func (cache *Cache) HGetString(name, field string) (v interface{}, ok bool, err error)
- func (cache *Cache) HIncrby(name, field string) (ok bool, err error)
- func (cache *Cache) HMSet(name string, kv map[string]interface{}) (err error)
- func (cache *Cache) HSet(name string, key string, value interface{}) (err error)
- func (cache *Cache) Hdel(name, key string) (bool, error)
- func (cache *Cache) StringGet(name string) (v interface{}, err error)
- func (cache *Cache) StringSet(name string, v interface{}) error
- type DatabaseConfig
- type DingDingConfig
- type GlobalConfig
- type GopsAPICfg
- type LogConfig
- type ModifyConfig
- type NotifyConfig
- type RedisConfig
- type TicketConfig
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Config Params Config GlobalConfig // ConfigFile FileName ConfigFile string )
View Source
var (
Db *gorm.DB
)
Functions ¶
func Deserialization ¶
Deserialization 反序列化
Types ¶
type Cache ¶
var (
RedisCache Cache
)
func (*Cache) HGetString ¶
HGetString 获取单个hash中的值string
type DatabaseConfig ¶
type DatabaseConfig struct { Dialect string `yaml:"dialect"` Addr string `yaml:"addr"` AutoMigrate bool `yaml:"automigrate"` }
DatabaseConfig Struct
type DingDingConfig ¶
type DingDingConfig struct {
API string `yaml:"api"`
}
type GlobalConfig ¶
type GlobalConfig struct {
GopsAPI GopsAPICfg `yaml:"gops_api"`
}
GlobalConfig Struct
type GopsAPICfg ¶
type GopsAPICfg struct { EncryptKey string `yaml:"encrypt_key"` Enable bool `yaml:"enable"` MaxRequest string `yaml:"max_request"` Deadline int `yaml:"deadline"` Database DatabaseConfig `yaml:"database"` Redis RedisConfig `yaml:"redis"` ServerPort int `yaml:"server_port"` Log LogConfig `yaml:"log"` Notify NotifyConfig `yaml:"notify"` Ticket TicketConfig `yaml:"ticket"` Modify ModifyConfig `yaml:"modify"` Alert AlertCfg `yaml:"alert"` }
GopsAPICfg Struct
type ModifyConfig ¶
type NotifyConfig ¶
type NotifyConfig struct {
DingDing DingDingConfig `yaml:"dingding"`
}
type RedisConfig ¶
type RedisConfig struct { MaxIdle int `yaml:"max_idle"` IdleTimeoutSec int `yaml:"idle_timeout_sec"` DefaultExpried int `yaml:"expried_sec"` Addr string `yaml:"addr"` Password string `yaml:"password"` LoopSec int `yaml:"loop_sec"` Expried int `yaml:"expried"` }
RedisConfig Struct
type TicketConfig ¶
Click to show internal directories.
Click to hide internal directories.