dynamodb

package
v0.0.0-...-71a3643 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2025 License: BSD-3-Clause Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrCannotDeleteRow      = errors.New("cannot delete row")
	ErrCollisionParentLabel = errors.New("a row with that parent and label already exists")
	ErrCollisionTypeLabel   = errors.New("a row with that type and label already exists")
	ErrNilQueryOutput       = errors.New("something went wrong: the query output was nil")
	ErrNotFoundRow          = errors.New("row not found")
	ErrTooManyFound         = errors.New("multiple exist where there must only be one")
)

Functions

func NewClient

func NewClient(ctx context.Context, profile, region, tableName, keyARN string) (storage.RowStorer, error)

Types

type Client

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

func (*Client) CreateChild

func (client *Client) CreateChild(ctx context.Context, rowType, label, parentType, parentID string, columns map[string]interface{}) (storage.Row, error)

func (*Client) CreateRow

func (client *Client) CreateRow(ctx context.Context, rowType, label string) (storage.Row, error)

func (*Client) DeleteRow

func (client *Client) DeleteRow(ctx context.Context, rowType, childType, id string) error

func (*Client) GetChild

func (client *Client) GetChild(ctx context.Context, label, parentID string) (storage.Row, error)

func (*Client) GetRow

func (client *Client) GetRow(ctx context.Context, rowType, label string) (storage.Row, error)

func (*Client) GetRowByID

func (client *Client) GetRowByID(ctx context.Context, rowType, id string) (storage.Row, error)

func (*Client) ListRows

func (client *Client) ListRows(ctx context.Context, rowType, labelFilter, parentIDFilter string) ([]storage.Row, error)

func (*Client) UpdateChild

func (client *Client) UpdateChild(ctx context.Context, childType, childID, newChildLabel, parentType, newParentID string) (storage.Row, error)

func (*Client) UpdateColumn

func (client *Client) UpdateColumn(ctx context.Context, rowType, rowID, columnName string, columnValue interface{}) error

func (*Client) UpdateColumns

func (client *Client) UpdateColumns(ctx context.Context, rowType, rowID string, columns map[string]interface{}) error

func (*Client) UpdateRow

func (client *Client) UpdateRow(ctx context.Context, rowType, id, newLabel string) (storage.Row, error)

Jump to

Keyboard shortcuts

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