Versions in this module Expand all Collapse all v0 v0.1.0 Mar 10, 2024 Changes in this version + const DefaultRedactedLength + const DefaultRedactedToken + const DefaultRedisConnectionString + const DefaultTTL + const DefaultUnredactedLength + const ErrTokenTypeNotString + const RedisStatusOkay + var ErrWithOperation = "operation completed with error: %s\n" + var OperationSuccessful = "operation successful" + func InterfaceIsString(a any) (bool, string) + func IsValidFile(loc string, log *zerolog.Logger) error + func Redact(s string) string + type File struct + func NewFile(loc string, logger *vlog.Logger) *File + func (f *File) Close(ctx context.Context) error + func (f *File) Connect(ctx context.Context) (bool, error) + func (f *File) Delete(ctx context.Context, id string) (bool, error) + func (f *File) Flush(ctx context.Context) (bool, error) + func (f *File) Loop() + func (f *File) Patch(ctx context.Context, id string, token any) (bool, error) + func (f *File) Retrieve(ctx context.Context, id string) (string, error) + func (f *File) RetrieveAll(ctx context.Context) (map[string]string, error) + func (f *File) Store(ctx context.Context, id string, token any) error + func (f *File) Write(m map[string]string) error + type FileChannels struct + type Gob struct + func NewGob(ctx context.Context, loc string, logger *vlog.Logger, trunc bool) (*Gob, error) + func (g *Gob) Close(ctx context.Context) error + func (g *Gob) Connect(ctx context.Context) (bool, error) + func (g *Gob) Delete(ctx context.Context, id string) (bool, error) + func (g *Gob) Flush(ctx context.Context) (bool, error) + func (g *Gob) MapDump(ctx context.Context) error + func (g *Gob) MapRefresh(ctx context.Context) error + func (g *Gob) Patch(ctx context.Context, id string, token any) (bool, error) + func (g *Gob) Retrieve(ctx context.Context, id string) (string, error) + func (g *Gob) RetrieveAll(ctx context.Context) (map[string]string, error) + func (g *Gob) Store(ctx context.Context, id string, token any) error + type Map struct + func NewSyncMap(ctx context.Context, logger *vlog.Logger) *Map + func (m *Map) Close(ctx context.Context) error + func (m *Map) Connect(ctx context.Context) (bool, error) + func (m *Map) Delete(ctx context.Context, id string) (bool, error) + func (m *Map) Flush(ctx context.Context) (bool, error) + func (m *Map) IsExist(key string) bool + func (m *Map) Map() *sync.Map + func (m *Map) Patch(ctx context.Context, id string, token any) (bool, error) + func (m *Map) Retrieve(ctx context.Context, id string) (string, error) + func (m *Map) RetrieveAll(ctx context.Context) (map[string]string, error) + func (m *Map) Store(ctx context.Context, id string, token any) error + type Options func(*Redis) error + func WithConnectionString(s string) Options + type Redis struct + func NewRedis(connectionString string, logger *vlog.Logger) (*Redis, error) + func (r *Redis) Client() *redis.Client + func (r *Redis) Close(ctx context.Context) error + func (r *Redis) Connect(ctx context.Context) (bool, error) + func (r *Redis) Delete(ctx context.Context, id string) (bool, error) + func (r *Redis) Flush(ctx context.Context) (bool, error) + func (r *Redis) IsExists(ctx context.Context, key string) bool + func (r *Redis) Patch(ctx context.Context, id string, token any) (bool, error) + func (r *Redis) Ping(ctx context.Context) (bool, error) + func (r *Redis) Retrieve(ctx context.Context, id string) (string, error) + func (r *Redis) RetrieveAll(ctx context.Context) (map[string]string, error) + func (r *Redis) Store(ctx context.Context, id string, token any) (err error) + type Store interface + Close func(ctx context.Context) error + Connect func(ctx context.Context) (bool, error) + Delete func(ctx context.Context, id string) (bool, error) + Flush func(ctx context.Context) (bool, error) + Patch func(ctx context.Context, id string, token any) (bool, error) + Retrieve func(ctx context.Context, id string) (string, error) + RetrieveAll func(ctx context.Context) (map[string]string, error) + Store func(ctx context.Context, id string, token any) error