Documentation ¶
Index ¶
- type MemoryStorage
- func (m *MemoryStorage) Delete(ctx context.Context, id secretstorage.SecretID) error
- func (m *MemoryStorage) Examine(ctx context.Context) error
- func (m *MemoryStorage) Get(ctx context.Context, id secretstorage.SecretID) ([]byte, error)
- func (m *MemoryStorage) Initialize(ctx context.Context) error
- func (m *MemoryStorage) Len() int
- func (m *MemoryStorage) Reset()
- func (m *MemoryStorage) Store(ctx context.Context, id secretstorage.SecretID, data []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MemoryStorage ¶
type MemoryStorage struct { // Data is the map of stored data. Data map[secretstorage.SecretID][]byte // ErrorOnInitialize if not nil, the error is thrown when the Initialize method is called. ErrorOnInitialize error // ErrorOnStore if not nil, the error is thrown when the Store method is called. ErrorOnStore error // ErrorOnGet if not nil, the error is thrown when the Get method is called. ErrorOnGet error // ErrorOnDelete if not nil, the error is thrown when the Delete method is called. ErrorOnDelete error // contains filtered or unexported fields }
func (*MemoryStorage) Delete ¶
func (m *MemoryStorage) Delete(ctx context.Context, id secretstorage.SecretID) error
Delete implements secretstorage.SecretStorage
func (*MemoryStorage) Get ¶
func (m *MemoryStorage) Get(ctx context.Context, id secretstorage.SecretID) ([]byte, error)
Get implements secretstorage.SecretStorage
func (*MemoryStorage) Initialize ¶
func (m *MemoryStorage) Initialize(ctx context.Context) error
Initialize implements secretstorage.SecretStorage
func (*MemoryStorage) Len ¶
func (m *MemoryStorage) Len() int
func (*MemoryStorage) Reset ¶
func (m *MemoryStorage) Reset()
func (*MemoryStorage) Store ¶
func (m *MemoryStorage) Store(ctx context.Context, id secretstorage.SecretID, data []byte) error
Store implements secretstorage.SecretStorage
Click to show internal directories.
Click to hide internal directories.