Documentation
¶
Index ¶
- type DirectoryStorage
- func (a *DirectoryStorage) Delete(ctx context.Context, id string) error
- func (a *DirectoryStorage) List(ctx context.Context, deleted bool) ([]*directory.Directory, error)
- func (a *DirectoryStorage) Read(ctx context.Context, id string, showDeleted bool) (*directory.Directory, error)
- func (a *DirectoryStorage) SetDelete(ctx context.Context, id string, isDeleted bool) error
- func (a *DirectoryStorage) Write(ctx context.Context, d *directory.Directory) error
- type KeySets
- type MonitorStorage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DirectoryStorage ¶
type DirectoryStorage struct {
// contains filtered or unexported fields
}
DirectoryStorage implements directory.Storage
func NewDirectoryStorage ¶
func NewDirectoryStorage() *DirectoryStorage
NewDirectoryStorage returns a fake dominstorage.Storage
func (*DirectoryStorage) Delete ¶
func (a *DirectoryStorage) Delete(ctx context.Context, id string) error
Delete permanently deletes a directory.
func (*DirectoryStorage) Read ¶
func (a *DirectoryStorage) Read(ctx context.Context, id string, showDeleted bool) (*directory.Directory, error)
Read returns existing directories.
type KeySets ¶
type KeySets struct {
// contains filtered or unexported fields
}
KeySets implements storage.UserManagerTable in memory.
func NewKeySets ¶
func NewKeySets() *KeySets
NewKeySets produces a fake implementation of storage.UserManagerTable.
type MonitorStorage ¶
type MonitorStorage struct {
// contains filtered or unexported fields
}
MonitorStorage is an in-memory store for the monitoring results.
func NewMonitorStorage ¶
func NewMonitorStorage() *MonitorStorage
NewMonitorStorage returns an in-memory implementation of monitorstorage.Interface.
func (*MonitorStorage) Get ¶
func (s *MonitorStorage) Get(revision int64) (*monitorstorage.Result, error)
Get returns the Result for the given revision. It returns ErrNotFound if the revision does not exist.
func (*MonitorStorage) LatestRevision ¶
func (s *MonitorStorage) LatestRevision() int64
LatestRevision is a convenience method to retrieve the latest stored revision.
func (*MonitorStorage) Set ¶
func (s *MonitorStorage) Set(revision int64, r *monitorstorage.Result) error
Set stores the given data as a MonitoringResult which can be retrieved by Get.