Documentation ¶
Index ¶
- type RedisStore
- func (r *RedisStore) Append(ctx context.Context, key string, value interface{}) error
- func (r *RedisStore) Del(ctx context.Context, key string) error
- func (r *RedisStore) Get(ctx context.Context, key string) (string, error)
- func (r *RedisStore) GetRedisPayload(ctx context.Context, key string, payload interface{}) error
- func (r *RedisStore) Set(ctx context.Context, key string, value interface{}, duration time.Duration) error
- func (r *RedisStore) SetOne(ctx context.Context, key string, value interface{}, duration time.Duration) error
- type Store
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RedisStore ¶
type RedisStore struct {
// contains filtered or unexported fields
}
func (*RedisStore) Append ¶
func (r *RedisStore) Append(ctx context.Context, key string, value interface{}) error
func (*RedisStore) GetRedisPayload ¶
func (r *RedisStore) GetRedisPayload(ctx context.Context, key string, payload interface{}) error
type Store ¶
type Store interface { // in set we marshal the value to json Set(ctx context.Context, key string, value interface{}, duration time.Duration) error // in setOne we don't marshal the value to json SetOne(ctx context.Context, key string, value interface{}, duration time.Duration) error // need to unmarshal the value from json Get(ctx context.Context, key string) (string, error) // append to the key Append(ctx context.Context, key string, value interface{}) error // get the value and delete the key GetRedisPayload(ctx context.Context, key string, payload interface{}) error Del(ctx context.Context, key string) error }
Click to show internal directories.
Click to hide internal directories.