Documentation ¶
Index ¶
- func Execute(f func(sess *mgo.Session) error) error
- func GetRedis() *redis.ClusterClient
- func GormDB() *gorm.DB
- func InitGorm(addr string, maxIdle, maxOpen int) (err error)
- func InitMongo(hosts string, dur time.Duration, concurrent int)
- func InitRedis(hosts []string, pass string, poolsize int)
- func IsNilReply(err error) bool
- func RedisGet(key string) (reply *redis.StringCmd, err error)
- func RedisHGet(hKey, key string) (value string, err error)
- func RedisHIncr(hKey, key string, num int64) (err error)
- func RedisHMGet(hKey string, keys ...string) (values []interface{}, err error)
- func RedisHSet(hKey, key, data string) (success bool, err error)
- func RedisHash(hKey string) (hash map[string]string, err error)
- func RedisSet(key string, data interface{}) (err error)
- func SelectOne(object interface{}, wheres map[string]interface{}) error
- func Upsert(object interface{}, fields, wheres map[string]interface{}) error
- type Database
- type ProtoByte
- type ProtoHash
- func (p *ProtoHash) Bind(o interface{}, key string)
- func (p *ProtoHash) Load() (err error, desc string)
- func (p *ProtoHash) LoadField(name string) (err error)
- func (p *ProtoHash) LoadFields(names ...string) (err error)
- func (p *ProtoHash) Save() (err error, desc string)
- func (p *ProtoHash) SaveField(name string) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsNilReply ¶
func RedisHIncr ¶
func RedisHMGet ¶
Types ¶
type ProtoHash ¶
type ProtoHash struct {
// contains filtered or unexported fields
}
func (*ProtoHash) LoadFields ¶
Click to show internal directories.
Click to hide internal directories.