storage

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2020 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 DynamoDBTimestampStorage

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

DynamoDBTimestampStorage provides persistence and retrieval of last processed scan timestamps from a DynamoDB table.

func (*DynamoDBTimestampStorage) CheckDependencies added in v0.4.0

func (s *DynamoDBTimestampStorage) CheckDependencies(ctx context.Context) error

CheckDependencies tries to communicate to the DB by trying to retrieve its tables

func (*DynamoDBTimestampStorage) FetchTimestamp

func (s *DynamoDBTimestampStorage) FetchTimestamp(ctx context.Context) (time.Time, error)

FetchTimestamp queries a DynamoDB table with a static partition key for the last processed timestamp.

func (*DynamoDBTimestampStorage) StoreTimestamp

func (s *DynamoDBTimestampStorage) StoreTimestamp(ctx context.Context, ts time.Time) error

StoreTimestamp upserts a timestamp to a DynamoDB table with a static partition key.

type DynamoDBTimestampStorageComponent

type DynamoDBTimestampStorageComponent struct{}

DynamoDBTimestampStorageComponent satisfies the settings library Component API, and may be used by the settings.NewComponent function.

func (*DynamoDBTimestampStorageComponent) New

New constructs a DynamoDBTimestampStorage from a config.

func (*DynamoDBTimestampStorageComponent) Settings

Settings can be used to populate default values if there are any

type DynamoDBTimestampStorageConfig

type DynamoDBTimestampStorageConfig struct {
	TableName         string
	PartitionKeyName  string
	PartitionKeyValue string
	TimestampKeyName  string
	Region            string
	Endpoint          string
}

DynamoDBTimestampStorageConfig holds configuration required to send Nexpose assets to a queue via an HTTP Producer

func (*DynamoDBTimestampStorageConfig) Name

Name is used by the settings library and will add a "DYNAMODB" prefix to DynamoDBTimestampStorageConfig environment variables

Jump to

Keyboard shortcuts

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