Documentation
¶
Index ¶
- type RedisRepository
- func (r *RedisRepository) Add(ctx context.Context, user entity.User) error
- func (r *RedisRepository) CheckDuplicate(ctx context.Context, userQuota string, dataQuota string) (bool, error)
- func (r *RedisRepository) FlushRedis() error
- func (r *RedisRepository) GetData(ctx context.Context, dataQuota string) (entity.User, error)
- func (r *RedisRepository) GetUser(ctx context.Context, userQuota string) (entity.User, error)
- func (r *RedisRepository) Pull(ctx context.Context) (entity.User, error)
- func (r *RedisRepository) Push(ctx context.Context, user entity.User) error
- func (r *RedisRepository) RemoveAllFromList(ctx context.Context) error
- func (r *RedisRepository) SetUserData(ctx context.Context, key string, val any) error
- func (r *RedisRepository) Update(ctx context.Context, user entity.User) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RedisRepository ¶
type RedisRepository struct {
// contains filtered or unexported fields
}
func NewRedisRepository ¶
func NewRedisRepository(redis *redis.Client) *RedisRepository
func (*RedisRepository) CheckDuplicate ¶
func (*RedisRepository) FlushRedis ¶
func (r *RedisRepository) FlushRedis() error
func (*RedisRepository) RemoveAllFromList ¶
func (r *RedisRepository) RemoveAllFromList(ctx context.Context) error
remove all from redis list
func (*RedisRepository) SetUserData ¶
Click to show internal directories.
Click to hide internal directories.