dynamodb

package
v0.3.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(p client.ConfigProvider, opts ...*aws.Config) api.Endpoint

New implements api.ServiceFunc

Types

type API

type API interface {
	ListTablesPagesWithContext(context.Context, *dynamodb.ListTablesInput, func(*dynamodb.ListTablesOutput, bool) bool, ...request.Option) error
	DescribeTableWithContext(context.Context, *dynamodb.DescribeTableInput, ...request.Option) (*dynamodb.DescribeTableOutput, error)
	ScanPagesWithContext(context.Context, *dynamodb.ScanInput, func(*dynamodb.ScanOutput, bool) bool, ...request.Option) error
}

API documents the subset of AWS API we actually call

type AttributeValue

type AttributeValue struct {
	B    []byte                     `json:"B,omitempty"`
	BOOL *bool                      `json:"BOOL,omitempty"`
	BS   [][]byte                   `json:"BS,omitempty"`
	L    []*AttributeValue          `json:"L,omitempty"`
	M    map[string]*AttributeValue `json:"M,omitempty"`
	N    *string                    `json:"N,omitempty"`
	NS   []*string                  `json:"NS,omitempty"`
	NULL *bool                      `json:"NULL,omitempty"`
	S    *string                    `json:"S,omitempty"`
	SS   []*string                  `json:"SS,omitempty"`
}

AttributeValue is used to marshal dynamodb.AttributeValue with omitempty

func (*AttributeValue) UnmarshalDynamoDBAttributeValue

func (a *AttributeValue) UnmarshalDynamoDBAttributeValue(av *dynamodb.AttributeValue) error

type DescribeTable

type DescribeTable struct {
	API
}

func (*DescribeTable) New

func (fn *DescribeTable) New(name string, config interface{}) ([]api.Request, error)

New implements api.RequestBuilder

type DescribeTableOutput

type DescribeTableOutput struct {
	*dynamodb.DescribeTableOutput
}

func (*DescribeTableOutput) Records

func (o *DescribeTableOutput) Records() (records []*api.Record)

type Scan

type Scan struct {
	API
}

func (*Scan) New

func (fn *Scan) New(name string, config interface{}) ([]api.Request, error)

New implements api.RequestBuilder

type ScanOutput

type ScanOutput struct {
	*dynamodb.ScanOutput
	TableArn  *string
	TableKeys []*string
}

func (*ScanOutput) Records

func (o *ScanOutput) Records() (records []*api.Record)

Records constructs valid observations from which we can build a resource Scan gives us individual items, but we need to know the key in order to makeresource. This leads to some additional bloat, but still simpler than stitching things back together from the table resource in OPAL

Jump to

Keyboard shortcuts

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