store

package
v0.0.0-...-36387be Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MetaStore

type MetaStore struct {
	DynamoDBClient *dynamodb.Client
	TableName      string
}

func NewMetaStore

func NewMetaStore(dynamoDBClient *dynamodb.Client, tableName string) (*MetaStore, error)

NewMetaStore creates a new instance of MetaStore.

func (*MetaStore) CreateTableIfNotExists

func (s *MetaStore) CreateTableIfNotExists(ctx context.Context) error

CreateTableIfNotExists checks if a DynamoDB table exists, and if not, creates it.

func (*MetaStore) RetrieveMaterial

func (s *MetaStore) RetrieveMaterial(ctx context.Context, materialName string, version int64) (map[string]string, string, error)

RetrieveMaterial retrieves a material and its encryption context by materialName and version.

func (*MetaStore) StoreNewMaterial

func (s *MetaStore) StoreNewMaterial(ctx context.Context, materialName string, material materials.CryptographicMaterials) error

StoreNewMaterial stores a new material along with its encryption context serialized as JSON.

Jump to

Keyboard shortcuts

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