Documentation
¶
Index ¶
- func Close() error
- func CloseAll() error
- func CloseDB(bunDB *bun.DB) error
- func Connect(config Config) (*bun.DB, error)
- func CreateKey(s1 string, s2 string) string
- func GetDB() *bun.DB
- func GetOrConnect(config Config) (*bun.DB, error)
- func GetRedis() *redis.Client
- func RedisGet(ctx context.Context, key string) (string, error)
- func RedisHDel(ctx context.Context, key string, fields ...string) (int64, error)
- func RedisHExists(ctx context.Context, key string, field string) (bool, error)
- func RedisHGet(ctx context.Context, key string, field string) (string, error)
- func RedisHGetAll(ctx context.Context, key string) (map[string]string, error)
- func RedisHSet(ctx context.Context, key string, fields interface{}, expiration time.Duration) error
- func RedisRemoveKey(ctx context.Context, key string) (int64, error)
- func RedisSet(ctx context.Context, key string, value interface{}, expiration time.Duration) error
- type Config
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetOrConnect ¶
GetOrConnect returns an existing connection or creates a new one.
func RedisHExists ¶
RedisHExists checks if a hash field exists in Redis
func RedisHGetAll ¶
RedisHGetAll retrieves all fields and values of a hash from Redis
Types ¶
Click to show internal directories.
Click to hide internal directories.