Documentation ¶
Index ¶
- type BsonM
- type MongoDBHandler
- func (h *MongoDBHandler) CheckID(id string) bool
- func (h *MongoDBHandler) Close()
- func (h *MongoDBHandler) Count(db, cName string, selector BsonM) (int, error)
- func (h *MongoDBHandler) CountByID(db, cName, id string) (int, error)
- func (h *MongoDBHandler) Distinct(db, cName, key string, selector BsonM, results interface{}) error
- func (h *MongoDBHandler) DropIndex(db, cName string, keys ...string) error
- func (h *MongoDBHandler) EnsureIndex(db, cName string, unique, dropDups, background, sparse bool, keys ...string) error
- func (h *MongoDBHandler) Exist(db, cName string, selector BsonM) (bool, error)
- func (h *MongoDBHandler) Find(db, cName string, selector BsonM, result interface{}) error
- func (h *MongoDBHandler) FindAll(db, cName string, selector BsonM, offset, limit int, sort []string, ...) error
- func (h *MongoDBHandler) FindAllAll(db, cName string, selector BsonM, sort []string, results interface{}) error
- func (h *MongoDBHandler) FindByID(db, cName, id string, result interface{}) error
- func (h *MongoDBHandler) FindOne(db, cName string, selector BsonM, offset, limit int, sort []string, ...) error
- func (h *MongoDBHandler) FindSelectAll(db, cName string, query BsonM, selector BsonM, offset, limit int, ...) error
- func (h *MongoDBHandler) Inc(db, cName string, selector BsonM, key string, value int, result interface{}) error
- func (h *MongoDBHandler) IncByID(db, cName, id, key string, value int, result interface{}) error
- func (h *MongoDBHandler) Indexes(db, cName string) ([]map[string]interface{}, error)
- func (h *MongoDBHandler) Insert(db, cName string, cObjects ...interface{}) error
- func (h *MongoDBHandler) NewID() string
- func (h *MongoDBHandler) Pipe(db, cName string, selectors []BsonM, results interface{}) error
- func (h *MongoDBHandler) Remove(db, cName string, selector BsonM) error
- func (h *MongoDBHandler) RemoveAll(db, cName string, selector BsonM) (int, error)
- func (h *MongoDBHandler) RemoveByID(db, cName, id string) error
- func (h *MongoDBHandler) Renew() (*MongoDBHandler, error)
- func (h *MongoDBHandler) Set(db, cName string, selector BsonM, key string, value interface{}, ...) error
- func (h *MongoDBHandler) SetByID(db, cName, id, key string, value interface{}, result interface{}) error
- func (h *MongoDBHandler) ToObjectID(id string) bson.ObjectId
- func (h *MongoDBHandler) Update(db, cName string, selector BsonM, cObject interface{}) error
- func (h *MongoDBHandler) UpdateAll(db, cName string, selector BsonM, cObject interface{}) (int, error)
- func (h *MongoDBHandler) UpdateByID(db, cName, id string, cObject interface{}) error
- func (h *MongoDBHandler) Upsert(db, cName string, selector BsonM, cObject interface{}) (int, error)
- func (h *MongoDBHandler) UpsertedId(db, cName, id string, cObject interface{}) (int, error)
- type PGMasterEngine
- func (pg *PGMasterEngine) EnableEngineStatusChecker(t time.Duration)
- func (pg *PGMasterEngine) GetAutoCloseSession() *xorm.Session
- func (pg *PGMasterEngine) Init(user, password, dbName, host, port string, ssl bool, level xormcore.LogLevel, ...) error
- func (pg *PGMasterEngine) NewSequence(sequence string) (int64, error)
- func (pg *PGMasterEngine) SyncModels(models ...interface{}) error
- type RedisHandler
- func (h *RedisHandler) Close()
- func (h *RedisHandler) Delete(key string) error
- func (h *RedisHandler) Exists(key string) (bool, error)
- func (h *RedisHandler) Expire(key string, seconds int64) error
- func (h *RedisHandler) Get(key string) (string, error)
- func (h *RedisHandler) GetKeys(pattern string) ([]string, error)
- func (h *RedisHandler) Incr(key string) (int, error)
- func (h *RedisHandler) Init(addr string)
- func (h *RedisHandler) Llen(key string) (int64, error)
- func (h *RedisHandler) Lpop(key string) (string, error)
- func (h *RedisHandler) Lrange(key string, offset, limit int) ([]string, error)
- func (h *RedisHandler) Ping() error
- func (h *RedisHandler) Rpush(key string, value string) error
- func (h *RedisHandler) Set(key string, value string) error
- func (h *RedisHandler) Ttl(key string) (int, error)
- func (h *RedisHandler) Zadd(key string, value string, score int64) error
- func (h *RedisHandler) Zcard(key string) (int, error)
- func (h *RedisHandler) Zcount(key string, min, max int64) (int, error)
- func (h *RedisHandler) ZcountInf(key string) (int, error)
- func (h *RedisHandler) Zincrby(key string, value string, score int64) error
- func (h *RedisHandler) Zrange(key string, offset, limit int) ([]map[string]int64, error)
- func (h *RedisHandler) Zrangebyscore(key string, min, max int64, offset, limit int) ([]map[string]int64, error)
- func (h *RedisHandler) ZrangebyscoreInf(key string, offset, limit int) ([]map[string]int64, error)
- func (h *RedisHandler) Zremrangebyrank(key string, start, stop int64) error
- func (h *RedisHandler) Zrevrangebyscore(key string, min, max int64, offset, limit int) ([]map[string]int64, error)
- func (h *RedisHandler) ZrevrangebyscoreInf(key string, offset, limit int) ([]map[string]int64, error)
- type SSDBHandler
- func (h *SSDBHandler) Del(key string) error
- func (h *SSDBHandler) Exists(key string) (bool, error)
- func (h *SSDBHandler) Expire(key string, exp time.Duration) error
- func (h *SSDBHandler) Get(key string) (string, error)
- func (h *SSDBHandler) HAllFields(key string) ([]string, error)
- func (h *SSDBHandler) HClear(key string) error
- func (h *SSDBHandler) HDel(key, field string) error
- func (h *SSDBHandler) HFields(key, fieldStart, fieldEnd string, limit int64) ([]string, error)
- func (h *SSDBHandler) HGet(key, field string) (string, error)
- func (h *SSDBHandler) HGetMap(key string) (map[string]string, error)
- func (h *SSDBHandler) HSet(key, field string, value string) error
- func (h *SSDBHandler) HSetMap(key string, values map[string]string) error
- func (h *SSDBHandler) HSetMapWithExp(key string, exp time.Duration, values map[string]string) error
- func (h *SSDBHandler) HSetWithExp(key string, exp time.Duration, field string, value string) error
- func (h *SSDBHandler) HSize(key string) (int64, error)
- func (h *SSDBHandler) QClear(key string) error
- func (h *SSDBHandler) QPushBack(key string, values ...string) (int64, error)
- func (h *SSDBHandler) QPushBackWithExpire(key string, exp time.Duration, values ...string) (int64, error)
- func (h *SSDBHandler) QRangeAll(key string) ([]string, error)
- func (h *SSDBHandler) Set(key string, value string) error
- func (h *SSDBHandler) SetWithExp(key string, value string, exp time.Duration) error
- func (h *SSDBHandler) ZClear(key string) error
- func (h *SSDBHandler) ZDel(key, field string) error
- func (h *SSDBHandler) ZExists(key, field string) (bool, error)
- func (h *SSDBHandler) ZGet(key, field string) (int64, error)
- func (h *SSDBHandler) ZMultiSet(key string, fieldScore map[string]int64) error
- func (h *SSDBHandler) ZMultiSetWithExp(key string, exp time.Duration, fieldScore map[string]int64) error
- func (h *SSDBHandler) ZRRange(key string, offset, limit int64) (map[string]int64, error)
- func (h *SSDBHandler) ZRRangeSlice(key string, offset, limit int64) ([]string, []int64, error)
- func (h *SSDBHandler) ZRScan(key, fieldStart string, start, end interface{}, limit int64) (keys []string, scores []int64, err error)
- func (h *SSDBHandler) ZRange(key string, offset, limit int64) (map[string]int64, error)
- func (h *SSDBHandler) ZRankX(key, keyStart string, start, limit int64) ([]string, []int64, error)
- func (h *SSDBHandler) ZScan(key, fieldStart string, start, end interface{}, limit int64) (keys []string, scores []int64, err error)
- func (h *SSDBHandler) ZSet(key string, field string, score int64) error
- func (h *SSDBHandler) ZSetWithExp(key string, exp time.Duration, field string, score int64) error
- func (h *SSDBHandler) ZSize(key string) (int64, error)
- func (h *SSDBHandler) ZTopX(key, keyStart string, start, limit int64) ([]string, []int64, error)
- type ZPair
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MongoDBHandler ¶
type MongoDBHandler struct { ErrNotFound error // contains filtered or unexported fields }
func MongoDBNewHandler ¶
func MongoDBNewHandler(username, password, db string, url ...string) (*MongoDBHandler, error)
func (*MongoDBHandler) CheckID ¶
func (h *MongoDBHandler) CheckID(id string) bool
func (*MongoDBHandler) Close ¶
func (h *MongoDBHandler) Close()
func (*MongoDBHandler) Count ¶
func (h *MongoDBHandler) Count(db, cName string, selector BsonM) (int, error)
func (*MongoDBHandler) CountByID ¶
func (h *MongoDBHandler) CountByID(db, cName, id string) (int, error)
func (*MongoDBHandler) Distinct ¶
func (h *MongoDBHandler) Distinct(db, cName, key string, selector BsonM, results interface{}) error
func (*MongoDBHandler) DropIndex ¶
func (h *MongoDBHandler) DropIndex(db, cName string, keys ...string) error
func (*MongoDBHandler) EnsureIndex ¶
func (h *MongoDBHandler) EnsureIndex(db, cName string, unique, dropDups, background, sparse bool, keys ...string) error
func (*MongoDBHandler) Exist ¶
func (h *MongoDBHandler) Exist(db, cName string, selector BsonM) (bool, error)
func (*MongoDBHandler) Find ¶
func (h *MongoDBHandler) Find(db, cName string, selector BsonM, result interface{}) error
func (*MongoDBHandler) FindAllAll ¶
func (h *MongoDBHandler) FindAllAll(db, cName string, selector BsonM, sort []string, results interface{}) error
func (*MongoDBHandler) FindByID ¶
func (h *MongoDBHandler) FindByID(db, cName, id string, result interface{}) error
func (*MongoDBHandler) FindSelectAll ¶
func (*MongoDBHandler) IncByID ¶
func (h *MongoDBHandler) IncByID(db, cName, id, key string, value int, result interface{}) error
func (*MongoDBHandler) Indexes ¶
func (h *MongoDBHandler) Indexes(db, cName string) ([]map[string]interface{}, error)
func (*MongoDBHandler) Insert ¶
func (h *MongoDBHandler) Insert(db, cName string, cObjects ...interface{}) error
func (*MongoDBHandler) NewID ¶
func (h *MongoDBHandler) NewID() string
func (*MongoDBHandler) Pipe ¶
func (h *MongoDBHandler) Pipe(db, cName string, selectors []BsonM, results interface{}) error
func (*MongoDBHandler) Remove ¶
func (h *MongoDBHandler) Remove(db, cName string, selector BsonM) error
func (*MongoDBHandler) RemoveAll ¶
func (h *MongoDBHandler) RemoveAll(db, cName string, selector BsonM) (int, error)
func (*MongoDBHandler) RemoveByID ¶
func (h *MongoDBHandler) RemoveByID(db, cName, id string) error
func (*MongoDBHandler) Renew ¶
func (h *MongoDBHandler) Renew() (*MongoDBHandler, error)
func (*MongoDBHandler) Set ¶
func (h *MongoDBHandler) Set(db, cName string, selector BsonM, key string, value interface{}, result interface{}) error
func (*MongoDBHandler) SetByID ¶
func (h *MongoDBHandler) SetByID(db, cName, id, key string, value interface{}, result interface{}) error
func (*MongoDBHandler) ToObjectID ¶
func (h *MongoDBHandler) ToObjectID(id string) bson.ObjectId
func (*MongoDBHandler) Update ¶
func (h *MongoDBHandler) Update(db, cName string, selector BsonM, cObject interface{}) error
func (*MongoDBHandler) UpdateAll ¶
func (h *MongoDBHandler) UpdateAll(db, cName string, selector BsonM, cObject interface{}) (int, error)
func (*MongoDBHandler) UpdateByID ¶
func (h *MongoDBHandler) UpdateByID(db, cName, id string, cObject interface{}) error
func (*MongoDBHandler) Upsert ¶
func (h *MongoDBHandler) Upsert(db, cName string, selector BsonM, cObject interface{}) (int, error)
func (*MongoDBHandler) UpsertedId ¶
func (h *MongoDBHandler) UpsertedId(db, cName, id string, cObject interface{}) (int, error)
type PGMasterEngine ¶
func (*PGMasterEngine) EnableEngineStatusChecker ¶
func (pg *PGMasterEngine) EnableEngineStatusChecker(t time.Duration)
func (*PGMasterEngine) GetAutoCloseSession ¶
func (pg *PGMasterEngine) GetAutoCloseSession() *xorm.Session
func (*PGMasterEngine) NewSequence ¶
func (pg *PGMasterEngine) NewSequence(sequence string) (int64, error)
func (*PGMasterEngine) SyncModels ¶
func (pg *PGMasterEngine) SyncModels(models ...interface{}) error
type RedisHandler ¶
func (*RedisHandler) Close ¶
func (h *RedisHandler) Close()
func (*RedisHandler) Delete ¶
func (h *RedisHandler) Delete(key string) error
func (*RedisHandler) Init ¶
func (h *RedisHandler) Init(addr string)
func (*RedisHandler) Lrange ¶
func (h *RedisHandler) Lrange(key string, offset, limit int) ([]string, error)
func (*RedisHandler) Ping ¶
func (h *RedisHandler) Ping() error
func (*RedisHandler) Zadd ¶
func (h *RedisHandler) Zadd(key string, value string, score int64) error
func (*RedisHandler) Zcount ¶
func (h *RedisHandler) Zcount(key string, min, max int64) (int, error)
func (*RedisHandler) Zincrby ¶
func (h *RedisHandler) Zincrby(key string, value string, score int64) error
func (*RedisHandler) Zrangebyscore ¶
func (*RedisHandler) ZrangebyscoreInf ¶
func (*RedisHandler) Zremrangebyrank ¶
func (h *RedisHandler) Zremrangebyrank(key string, start, stop int64) error
func (*RedisHandler) Zrevrangebyscore ¶
func (*RedisHandler) ZrevrangebyscoreInf ¶
type SSDBHandler ¶
type SSDBHandler struct {
// contains filtered or unexported fields
}
func SSDBNewHandler ¶
func SSDBNewHandler(conf *gossdb.Config) (*SSDBHandler, error)
func SSDBNewHandlerDefault ¶
func SSDBNewHandlerDefault(host string, port int) (*SSDBHandler, error)
func (*SSDBHandler) Del ¶
func (h *SSDBHandler) Del(key string) error
func (*SSDBHandler) HAllFields ¶
func (h *SSDBHandler) HAllFields(key string) ([]string, error)
func (*SSDBHandler) HClear ¶
func (h *SSDBHandler) HClear(key string) error
func (*SSDBHandler) HDel ¶
func (h *SSDBHandler) HDel(key, field string) error
func (*SSDBHandler) HFields ¶
func (h *SSDBHandler) HFields(key, fieldStart, fieldEnd string, limit int64) ([]string, error)
func (*SSDBHandler) HSet ¶
func (h *SSDBHandler) HSet(key, field string, value string) error
//////////////// SSDB Hashmap // ////////////////
func (*SSDBHandler) HSetMap ¶
func (h *SSDBHandler) HSetMap(key string, values map[string]string) error
func (*SSDBHandler) HSetMapWithExp ¶
func (*SSDBHandler) HSetWithExp ¶
func (*SSDBHandler) QClear ¶
func (h *SSDBHandler) QClear(key string) error
func (*SSDBHandler) QPushBack ¶
func (h *SSDBHandler) QPushBack(key string, values ...string) (int64, error)
////////////// SSDB Queue // //////////////
func (*SSDBHandler) QPushBackWithExpire ¶
func (*SSDBHandler) SetWithExp ¶
func (*SSDBHandler) ZClear ¶
func (h *SSDBHandler) ZClear(key string) error
func (*SSDBHandler) ZDel ¶
func (h *SSDBHandler) ZDel(key, field string) error
func (*SSDBHandler) ZMultiSet ¶
func (h *SSDBHandler) ZMultiSet(key string, fieldScore map[string]int64) error
func (*SSDBHandler) ZMultiSetWithExp ¶
func (*SSDBHandler) ZRRangeSlice ¶
func (*SSDBHandler) ZSet ¶
func (h *SSDBHandler) ZSet(key string, field string, score int64) error
//////////////////// SSDB Sorted Sets // ////////////////////
func (*SSDBHandler) ZSetWithExp ¶
Click to show internal directories.
Click to hide internal directories.