storage

package
v0.0.0-...-f56aa01 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ServerKnowledgeDocument

type ServerKnowledgeDocument struct {
	LastServerKnowledge int `dynamodbav:"lastServerKnowledge"`
}

type StorageAdapter

type StorageAdapter interface {
	GetLastServerKnowledge(ctx context.Context, budgetId uuid.UUID) (int64, error)
	SetLastServerKnowledge(ctx context.Context, budgetId uuid.UUID, serverKnowledge int64) error
}

func NewDynamoDbStorageAdapter

func NewDynamoDbStorageAdapter(logger *zap.Logger, awsConfig *aws.Config, tableName string) (StorageAdapter, error)

func NewLocalStorageAdapter

func NewLocalStorageAdapter() StorageAdapter

Creates a StorageAdapter which stores data in a yaml file. Intended mostly for prototyping or running in environments without "proper" KV storage mechanisms.

Jump to

Keyboard shortcuts

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