Documentation ¶
Index ¶
- Constants
- type Dao
- func (d *Dao) ClusterRedisClient() (*goredis.ClusterClient, error)
- func (d *Dao) Condition(ctx context.Context, data interface{}, call db.ConditionCallback) result.Result
- func (d *Dao) DBClient() (*gorm.DB, error)
- func (d *Dao) ElasticClient() (*elastic.Client, error)
- func (d *Dao) Expire(ctx context.Context, key string, time time.Duration)
- func (d *Dao) ExpireAt(ctx context.Context, key string, time time.Time)
- func (d *Dao) Get(ctx context.Context, key string) (string, error)
- func (d *Dao) GetInt(ctx context.Context, key string) (int, error)
- func (d *Dao) HDel(ctx context.Context, key, field string) (int64, error)
- func (d *Dao) HGet(ctx context.Context, key, field string) (string, error)
- func (d *Dao) HGetAll(ctx context.Context, key string) (map[string]string, error)
- func (d *Dao) HGetInt(ctx context.Context, key, field string) (int, error)
- func (d *Dao) HInc(ctx context.Context, key, field string, value int64) (int64, error)
- func (d *Dao) HSet(ctx context.Context, key, field string, value interface{}) (int64, error)
- func (d *Dao) HSetNX(ctx context.Context, key, field string, value interface{}) (bool, error)
- func (d *Dao) Inc(ctx context.Context, key string, value int64) (int64, error)
- func (d *Dao) IsNotFound(db *gorm.DB) int
- func (d *Dao) RedisClient() (*goredis.Client, error)
- func (d *Dao) ResetEsClient()
- func (d *Dao) ResetRdsClient()
- func (d *Dao) SentinelRedisClient() (*goredis.SentinelClient, error)
- func (d *Dao) Set(ctx context.Context, key string, value interface{}, expiration time.Duration) (string, error)
- func (d *Dao) SetEX(ctx context.Context, key string, value interface{}, expiration time.Duration) (string, error)
- func (d *Dao) SetNX(ctx context.Context, key string, value interface{}, expiration time.Duration) (bool, error)
Constants ¶
View Source
const KCreateDatabase = "CREATE DATABASE IF NOT EXISTS `%s` CHARACTER SET utf8mb4;"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Dao ¶
type Dao struct { Sql db.SqlDatabase Redis redis.Client Elastic db.EsDatabase // contains filtered or unexported fields }
Dao https://gorm.io/docs/query.html
func (*Dao) ClusterRedisClient ¶ added in v1.1.23
func (d *Dao) ClusterRedisClient() (*goredis.ClusterClient, error)
func (*Dao) ElasticClient ¶ added in v1.0.60
func (*Dao) ResetEsClient ¶ added in v1.0.60
func (d *Dao) ResetEsClient()
func (*Dao) ResetRdsClient ¶ added in v1.0.60
func (d *Dao) ResetRdsClient()
func (*Dao) SentinelRedisClient ¶ added in v1.1.23
func (d *Dao) SentinelRedisClient() (*goredis.SentinelClient, error)
Click to show internal directories.
Click to hide internal directories.