Documentation ¶ Index ¶ Variables type Db type RedisDb func NewRedis(c config.Redis) (*RedisDb, error) func (rdb *RedisDb) Close(_ context.Context) error func (rdb *RedisDb) Get(ctx context.Context, key string) (string, error) func (rdb *RedisDb) Set(ctx context.Context, key string, value string) error Constants ¶ This section is empty. Variables ¶ View Source var ( NotFoundError = errors.New("key not found") InternalError = errors.New("internal error") ) Functions ¶ This section is empty. Types ¶ type Db ¶ type Db interface { Get(ctx context.Context, key string) (string, error) Set(ctx context.Context, key string, value string) error Close(ctx context.Context) error } type RedisDb ¶ type RedisDb struct { // contains filtered or unexported fields } func NewRedis ¶ func NewRedis(c config.Redis) (*RedisDb, error) func (*RedisDb) Close ¶ func (rdb *RedisDb) Close(_ context.Context) error func (*RedisDb) Get ¶ func (rdb *RedisDb) Get(ctx context.Context, key string) (string, error) func (*RedisDb) Set ¶ func (rdb *RedisDb) Set(ctx context.Context, key string, value string) error Source Files ¶ View all Source files redis.go Click to show internal directories. Click to hide internal directories.