Documentation
¶
Index ¶
- Constants
- Variables
- func KeyGen(separator string, part ...string) (key string)
- type Key
- func (key *Key) ClientGet() *redis.Client
- func (key *Key) ClientSet(client *redis.Client)
- func (nKey *Key) Exists(ctx context.Context) (bool, error)
- func (key *Key) ExpirationSet(expiration time.Duration)
- func (nKey *Key) Get(ctx context.Context) (string, error)
- func (nKey *Key) GetStructJSON(ctx context.Context, data interface{}) error
- func (nKey *Key) HGetAll(ctx context.Context) (map[string]string, error)
- func (nKey *Key) HGetStruct(ctx context.Context, data interface{}) error
- func (nKey *Key) HSet(ctx context.Context, values ...interface{}) error
- func (nKey *Key) HSetStruct(ctx context.Context, data interface{}) error
- func (key *Key) LogDisable()
- func (key *Key) LogEnable()
- func (key *Key) NameGet() string
- func (nKey *Key) Set(ctx context.Context, data interface{}) error
- func (nKey *Key) SetStructJSON(ctx context.Context, value interface{}) error
- type NRedis
Constants ¶
Variables ¶
View Source
var ErrCannotConnectToMongoDb = errors.New("cannot connect to Redis")
Redis Errors
View Source
var ErrCannotConvertFromJSON = errors.New("error converting from json")
View Source
var ErrCannotConvertToJSON = errors.New("error converting to json")
Data convert Errors
View Source
var ErrRecordAlreadyExists = errors.New("record already exists")
Records errors
View Source
var ErrRecordInserting = errors.New("error inserting the record")
View Source
var ErrRecordNotFound = errors.New("data not found")
View Source
var ErrRecordSearching = errors.New("error searching for a record")
View Source
var ErrRecordUpdating = errors.New("error updating the record")
Functions ¶
Types ¶
type Key ¶
type Key struct {
// contains filtered or unexported fields
}
func (*Key) ExpirationSet ¶
func (*Key) GetStructJSON ¶
Чтение структуры по ключу. Хранение в виде JSON
func (*Key) HGetStruct ¶
Чтение структуры по ключу
func (*Key) HSetStruct ¶
Вставка структуры как Ключ -> Значение
func (*Key) LogDisable ¶
func (key *Key) LogDisable()
Click to show internal directories.
Click to hide internal directories.