dynamodb

package
v0.0.0-...-1eb86f4 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2019 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DynamoDB

type DynamoDB struct {
	Client    dynamodbiface.ClientAPI
	TableName string
	Registry  Registry
}

DynamoDB stores data in AWS DynamoDB

func New

func New(cfg aws.Config, tableName string, registry Registry) *DynamoDB

New creates a new DynamoDB client.

func (*DynamoDB) CreateTable

func (d *DynamoDB) CreateTable(ctx context.Context, rcu, wcu int64) error

CreateTable creates the DynamoDB table.

func (*DynamoDB) DeleteResource

func (d *DynamoDB) DeleteResource(ctx context.Context, project string, res *resource.Deployed) error

DeleteResource deletes a resource. Returns an error if the resource does not exist.

func (*DynamoDB) GetGraph

func (d *DynamoDB) GetGraph(ctx context.Context, project string) (*resource.Graph, error)

GetGraph returns a graph for a project. Returns nil if the project does not have a graph.

func (*DynamoDB) ListResources

func (d *DynamoDB) ListResources(ctx context.Context, project string) ([]*resource.Deployed, error)

ListResources lists all resources in a project. The order of the results is not guaranteed.

func (*DynamoDB) PutGraph

func (d *DynamoDB) PutGraph(ctx context.Context, project string, g *resource.Graph) error

PutGraph creates or updates a graph.

func (*DynamoDB) PutResource

func (d *DynamoDB) PutResource(ctx context.Context, project string, res *resource.Deployed) error

PutResource creates or updates a resource.

type Registry

type Registry interface {
	Type(typename string) reflect.Type
}

The Registry returns types for unmarshalling resource inputs/outputs.

Directories

Path Synopsis
internal
attr
Package attr provides utilities for converting between go and DynamoDB attribute values.
Package attr provides utilities for converting between go and DynamoDB attribute values.

Jump to

Keyboard shortcuts

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