Documentation ¶
Index ¶
- type CurrentDb
- type CurrentElastic
- type CurrentRedis
- func (d *CurrentRedis) Expire(ctx context.Context, key string, time time.Duration)
- func (d *CurrentRedis) ExpireAt(ctx context.Context, key string, time time.Time)
- func (d *CurrentRedis) Get(ctx context.Context, key string) (string, error)
- func (d *CurrentRedis) GetInt(ctx context.Context, key string) (int, error)
- func (d *CurrentRedis) HDel(ctx context.Context, key, field string) (int64, error)
- func (d *CurrentRedis) HGet(ctx context.Context, key, field string) (string, error)
- func (d *CurrentRedis) HGetAll(ctx context.Context, key string) (map[string]string, error)
- func (d *CurrentRedis) HGetInt(ctx context.Context, key, field string) (int, error)
- func (d *CurrentRedis) HInc(ctx context.Context, key, field string, value int64) (int64, error)
- func (d *CurrentRedis) HSet(ctx context.Context, key, field string, value interface{}) (int64, error)
- func (d *CurrentRedis) HSetNX(ctx context.Context, key, field string, value interface{}) (bool, error)
- func (d *CurrentRedis) Inc(ctx context.Context, key string, value int64) (int64, error)
- func (d *CurrentRedis) OK() bool
- func (d *CurrentRedis) Set(ctx context.Context, key string, value interface{}, expiration time.Duration) (string, error)
- func (d *CurrentRedis) SetEX(ctx context.Context, key string, value interface{}, expiration time.Duration) (string, error)
- func (d *CurrentRedis) SetNX(ctx context.Context, key string, value interface{}, expiration time.Duration) (bool, error)
- func (d *CurrentRedis) Warning(r *perf.RunTime, err error)
- type Dao
- func (d *Dao) ClusterRedisClient(opts ...option.Option) (*goredis.ClusterClient, error)
- func (d *Dao) Condition(ctx context.Context, data interface{}, call db.ConditionCallback, ...) result.Result
- func (d *Dao) DBClient(opts ...option.Option) (*gorm.DB, error)
- func (d *Dao) ElasticClient(opts ...option.Option) (*elastic.Client, error)
- func (d *Dao) IsNotFound(db *gorm.DB) int
- func (d *Dao) RedisClient(opts ...option.Option) (*goredis.Client, error)
- func (d *Dao) SentinelRedisClient(opts ...option.Option) (*goredis.SentinelClient, error)
- func (d *Dao) UseDB(opts ...option.Option) CurrentDb
- func (d *Dao) UseElastic(opts ...option.Option) CurrentElastic
- func (d *Dao) UseRedis(opts ...option.Option) CurrentRedis
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CurrentElastic ¶ added in v1.8.26
type CurrentElastic struct {
*elastic.Client
}
func (*CurrentElastic) OK ¶ added in v1.8.26
func (d *CurrentElastic) OK() bool
type CurrentRedis ¶ added in v1.8.26
func (*CurrentRedis) OK ¶ added in v1.8.26
func (d *CurrentRedis) OK() bool
type Dao ¶
type Dao struct { Sql db.SqlDatabase Redis redis.Client Elastic db.EsDatabase }
Dao https://gorm.io/docs/query.html
func (*Dao) ClusterRedisClient ¶ added in v1.1.23
func (*Dao) ElasticClient ¶ added in v1.0.60
func (*Dao) RedisClient ¶ added in v1.0.60
func (*Dao) SentinelRedisClient ¶ added in v1.1.23
func (*Dao) UseElastic ¶ added in v1.8.26
func (d *Dao) UseElastic(opts ...option.Option) CurrentElastic
Click to show internal directories.
Click to hide internal directories.