Documentation ¶
Index ¶
- func InitDB(conf config.Config) (*gorm.DB, error)
- func InitMysql(conf config.Config) (*gorm.DB, error)
- func InitRedis(config config.Config) (client redisx.IRedis, err error)
- type DB
- type Redis
- func (rs Redis) Clear(key string) error
- func (rs Redis) DecrInt(key string, value int64) (int64, error)
- func (rs Redis) Del(key string) int64
- func (rs Redis) Dequeue(key string, item interface{}) error
- func (rs Redis) Enqueue(key string, item interface{}) error
- func (rs Redis) EnqueueWithTTL(key string, item interface{}, ttl time.Duration) error
- func (rs Redis) Exists(key string) (bool, error)
- func (rs Redis) Get(key string) string
- func (rs Redis) GetFloat(key string) (float64, error)
- func (rs Redis) GetInt(key string) (int, error)
- func (rs Redis) GetInt64(key string) (int64, error)
- func (rs Redis) GetObject(key string, v interface{}) error
- func (rs Redis) GetTTL(key string) float64
- func (rs Redis) Incr(key string, value interface{}) (interface{}, error)
- func (rs Redis) IncrFloat(key string, value float64) (float64, error)
- func (rs Redis) IncrInt(key string, value int64) (int64, error)
- func (rs Redis) Length(key string) (int64, error)
- func (rs Redis) Peek(key string, item interface{}) error
- func (rs Redis) Publish(data []byte, channel string) error
- func (rs Redis) Scan(key string, count int64) []string
- func (rs Redis) Set(key string, value interface{}, ex time.Duration)
- func (rs Redis) SetEx(key string, t time.Duration)
- func (rs Redis) SetFloat(key string, value float64, expiration time.Duration) error
- func (rs Redis) SetInt(key string, value int64, expiration time.Duration) error
- func (rs Redis) SetNX(key string, value interface{}, expiration time.Duration) error
- func (rs Redis) SetObject(key string, value any, expiration time.Duration) error
- func (rs Redis) Subscribe(channel string) *redis.PubSub
- func (rs Redis) UserSign(userID string) error
- func (rs Redis) ZAdd(key string, data interface{}) error
- func (rs Redis) ZRange(key string) []string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Redis ¶
type Redis struct { Client *redis.Client // contains filtered or unexported fields }
func (Redis) EnqueueWithTTL ¶
EnqueueWithTTL adds an item to the end of the queue with a TTL (time-to-live) value.
Click to show internal directories.
Click to hide internal directories.