Version: v0.3.0 Latest Latest

This package is not in the latest version of its module.

Go to latest
Published: Jul 3, 2020 License: Apache-2.0 Imports: 6 Imported by: 2




This section is empty.


This section is empty.


This section is empty.


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) List

func (a *DirectoryStorage) List(ctx context.Context, deleted bool) ([]*directory.Directory, error)

List returns a list of active directories

func (*DirectoryStorage) Read

func (a *DirectoryStorage) Read(ctx context.Context, id string, showDeleted bool) (*directory.Directory, error)

Read returns existing directories.

func (*DirectoryStorage) SetDelete

func (a *DirectoryStorage) SetDelete(ctx context.Context, id string, isDeleted bool) error

SetDelete deletes or undeletes a directory.

func (*DirectoryStorage) Write

Write adds a new directory.

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.

func (*KeySets) Get

func (k *KeySets) Get(ctx context.Context, instance int64, directoryID string) (*keyset.Handle, error)

Get returns the requested keyset.

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL