Documentation ¶
Index ¶
- type Manager
- type ManagerInterface
- type Repo
- func (r *Repo) AddToIndex(name string, id uuid.UUID) error
- func (r *Repo) CleanupInvalidKeys(dryRun bool) ([]uuid.UUID, error)
- func (r *Repo) ClearIndex(name string) error
- func (r *Repo) Delete(id uuid.UUID) error
- func (r *Repo) DeleteIndex(name string) error
- func (r *Repo) Get(id uuid.UUID) (interface{}, error)
- func (r *Repo) GetAll() ([]interface{}, error)
- func (r *Repo) GetIndex(name string) ([]uuid.UUID, error)
- func (r *Repo) List() ([]uuid.UUID, error)
- func (r *Repo) RemoveFromIndex(name string, id uuid.UUID) error
- func (r *Repo) Save(id uuid.UUID, value interface{}) error
- func (r *Repo) SaveWithExpiration(id uuid.UUID, value interface{}, expiration time.Duration) error
- func (r *Repo) SetCaching(cacheInstance cache.Cache) RepoInterface
- func (r *Repo) SetFactory(factory func() interface{})
- type RepoInterface
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func (*Manager) LoadDbRepo ¶ added in v0.1.7
func (m *Manager) LoadDbRepo(name string) RepoInterface
func (*Manager) LoadRepo ¶
func (m *Manager) LoadRepo(name string) RepoInterface
type ManagerInterface ¶
type ManagerInterface interface { LoadRepo(name string) RepoInterface LoadDbRepo(name string) RepoInterface // contains filtered or unexported methods }
func New ¶
func New() ManagerInterface
type Repo ¶
type Repo struct {
// contains filtered or unexported fields
}
func (*Repo) CleanupInvalidKeys ¶ added in v0.1.5
func (*Repo) ClearIndex ¶ added in v0.1.7
func (*Repo) DeleteIndex ¶ added in v0.1.8
func (*Repo) SaveWithExpiration ¶ added in v0.1.9
func (*Repo) SetCaching ¶ added in v0.1.2
func (r *Repo) SetCaching(cacheInstance cache.Cache) RepoInterface
func (*Repo) SetFactory ¶
func (r *Repo) SetFactory(factory func() interface{})
type RepoInterface ¶
type RepoInterface interface { SetCaching(cacheInstance cache.Cache) RepoInterface SetFactory(func() interface{}) List() ([]uuid.UUID, error) Get(id uuid.UUID) (interface{}, error) GetAll() ([]interface{}, error) GetIndex(name string) ([]uuid.UUID, error) AddToIndex(name string, id uuid.UUID) error RemoveFromIndex(name string, id uuid.UUID) error DeleteIndex(name string) error Save(id uuid.UUID, value interface{}) error SaveWithExpiration(id uuid.UUID, value interface{}, expiration time.Duration) error Delete(id uuid.UUID) error CleanupInvalidKeys(dryRun bool) ([]uuid.UUID, error) }
func NewRepo ¶
func NewRepo(name string, client *redis.Client) RepoInterface
Click to show internal directories.
Click to hide internal directories.