arieskmsstore

package
v1.8.1 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

type Store struct {
	// contains filtered or unexported fields
}

Store provides local KMS storage using mongodb.

func NewStore

func NewStore(mongoClient *mongodb.Client) *Store

NewStore initializes a Store.

func (*Store) Delete

func (s *Store) Delete(keysetID string) error

Delete deletes the key stored under the given keysetID. A KeyManager will assume that attempting to delete a non-existent key will not return an error.

func (*Store) Get

func (s *Store) Get(keysetID string) ([]byte, error)

Get retrieves the key stored under the given keysetID. If no key is found, the returned error is expected to wrap ErrKeyNotFound. KMS implementations may check to see if the error wraps that error type for certain operations.

func (*Store) Put

func (s *Store) Put(keysetID string, key []byte) error

Put stores the given key under the given keysetID. Overwrites silently.

Jump to

Keyboard shortcuts

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