Documentation ¶
Index ¶
- type Redis
- func (db *Redis) AddHMObject(ctx context.Context, entity, key string, value interface{}) error
- func (db *Redis) AddObject(ctx context.Context, key string, value interface{}, duration time.Duration) error
- func (db *Redis) DeleteHMObject(ctx context.Context, entity, key string) error
- func (db *Redis) DeleteObject(ctx context.Context, key string) error
- func (db *Redis) GetAllHMObjects(ctx context.Context, entity string) (map[string]string, error)
- func (db *Redis) GetHMObject(ctx context.Context, entity, key string, value interface{}) error
- func (db *Redis) GetObject(ctx context.Context, key string, value interface{}) error
- func (db *Redis) IsReady(ctx context.Context) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Redis ¶
type Redis struct {
// contains filtered or unexported fields
}
func (*Redis) AddHMObject ¶
AddHMObject add an object to a hash map table. It returns an error if occurs.
func (*Redis) AddObject ¶
func (db *Redis) AddObject(ctx context.Context, key string, value interface{}, duration time.Duration) error
AddObject add object for a key. It returns an error if occurs.
func (*Redis) DeleteHMObject ¶
DeleteHMObject delete an object from a hash map table. It returns an error if occurs.
func (*Redis) DeleteObject ¶
DeleteObject delete object from key. It returns an error if occurs.
func (*Redis) GetAllHMObjects ¶
GetAllHMObjects get all objects from a hash map table. It returns the objects and an error if occurs.
func (*Redis) GetHMObject ¶
GetHMObject get an object from a hash map table. It returns an error if occurs.
Click to show internal directories.
Click to hide internal directories.