Versions in this module Expand all Collapse all v0 v0.0.2 Feb 22, 2024 v0.0.1 Dec 1, 2023 Changes in this version + const B64JSONPrefix + const HashSha256 + var ErrKeyNotFound = errors.New("key not found") + func HashKey(in string) string + func HashStr(in string) string + func InitInstance(ctx context.Context, opts *Options) error + func TokenHashAlgo(token string) string + func TokenOrg(token string) string + type Option func(*store) + func WithKeyHash() Option + func WithKeyPrefix(prefix string) Option + type Options struct + Addrs []string + Database int + DialTimeout time.Duration + EnableCluster bool + MasterName string + Password string + PoolSize int + RequestTimeout time.Duration + TLS TLSOptions + Username string + func NewOptions() *Options + func (o *Options) AddFlags(fs *pflag.FlagSet) + func (o *Options) Validate() []error + type Store interface + AddToSet func(string, string) + AddToSortedSet func(string, string, float64) + AppendToSet func(string, string) + Decrement func(string) + DeleteAllKeys func() bool + DeleteKey func(string) bool + DeleteKeys func([]string) bool + DeleteRawKey func(string) bool + DeleteScanMatch func(string) bool + Exists func(string) (bool, error) + GetAndDeleteSet func(string) []interface{} + GetExp func(string) (time.Duration, error) + GetKey func(string) (string, error) + GetKeyPrefix func() string + GetKeys func(string) []string + GetKeysAndValues func() map[string]string + GetKeysAndValuesWithFilter func(string) map[string]string + GetListRange func(string, int64, int64) ([]string, error) + GetMultiKey func([]string) ([]string, error) + GetRawKey func(string) (string, error) + GetRollingWindow func(key string, per int64, pipeline bool) (int, []interface{}) + GetSet func(string) (map[string]string, error) + GetSortedSetRange func(string, string, string) ([]string, []float64, error) + IncrememntWithExpire func(string, time.Duration) int64 + RemoveFromList func(string, string) error + RemoveFromSet func(string, string) + RemoveSortedSetRange func(string, string, string) error + SetExp func(string, time.Duration) error + SetKey func(string, string, time.Duration) error + SetRawKey func(string, string, time.Duration) error + SetRollingWindow func(key string, per int64, val string, pipeline bool) (int, []interface{}) + func NewStore() Store + type TLSOptions struct + CertFile string + Enabled bool + KeyFile string