Documentation
¶
Index ¶
- type Memory
- func (m *Memory) Decrease(_ context.Context, key string) error
- func (m *Memory) Del(_ context.Context, key string) error
- func (m *Memory) Exists(_ context.Context, key string) (bool, error)
- func (m *Memory) Expire(_ context.Context, key string, dur time.Duration) error
- func (m *Memory) Get(_ context.Context, key string) (string, error)
- func (m *Memory) HashDel(_ context.Context, hk, key string) error
- func (m *Memory) HashGet(_ context.Context, hk, key string) (string, error)
- func (m *Memory) HashSet(_ context.Context, hk, key string, val interface{}) error
- func (m *Memory) IncrBy(_ context.Context, key string, n int64) (int64, error)
- func (m *Memory) Increase(_ context.Context, key string) error
- func (m *Memory) RunScript(_ context.Context, script interface{}, keys []string, args ...interface{}) (interface{}, error)
- func (m *Memory) Set(_ context.Context, key string, val interface{}, expire int) error
- func (m *Memory) SetNX(_ context.Context, key string, val interface{}, expire int) (bool, error)
- func (*Memory) String() string
- func (m *Memory) TTL(_ context.Context, key string) (time.Duration, error)
- type Redis
- func (r *Redis) Close() error
- func (r *Redis) Decrease(ctx context.Context, key string) error
- func (r *Redis) Del(ctx context.Context, key string) error
- func (r *Redis) Exists(ctx context.Context, key string) (bool, error)
- func (r *Redis) Expire(ctx context.Context, key string, dur time.Duration) error
- func (r *Redis) Get(ctx context.Context, key string) (string, error)
- func (r *Redis) GetClient() *redis.Client
- func (r *Redis) HashDel(ctx context.Context, hk, key string) error
- func (r *Redis) HashGet(ctx context.Context, hk, key string) (string, error)
- func (r *Redis) HashSet(ctx context.Context, hk, key string, val interface{}) error
- func (r *Redis) IncrBy(ctx context.Context, key string, n int64) (int64, error)
- func (r *Redis) Increase(ctx context.Context, key string) error
- func (r *Redis) RunScript(ctx context.Context, script interface{}, keys []string, args ...interface{}) (interface{}, error)
- func (r *Redis) Set(ctx context.Context, key string, val interface{}, expire int) error
- func (r *Redis) SetNX(ctx context.Context, key string, val interface{}, expire int) (bool, error)
- func (*Redis) String() string
- func (r *Redis) TTL(ctx context.Context, key string) (time.Duration, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Memory ¶
type Memory struct {
// contains filtered or unexported fields
}
type Redis ¶
type Redis struct {
// contains filtered or unexported fields
}
Redis cache implement
Click to show internal directories.
Click to hide internal directories.