dynamodb

package
v0.0.0-...-e5c234f Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2022 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 Attributes

type Attributes map[string]interface{}

func (Attributes) ToItem

func (a Attributes) ToItem() Item

type Item

type Item map[string]*dynamodb.AttributeValue

func (Item) Merge

func (i Item) Merge(i2 Item)

type ItemBase

type ItemBase struct {
	TableName    string
	HashKeyName  string
	HashKeyValue interface{}
	SortKeyName  string
	SortKeyValue interface{}
	ItemTypeName string
	Attributes   Attributes
}

func (*ItemBase) GetKey

func (i *ItemBase) GetKey() Item

func (*ItemBase) GetPuttableItem

func (i *ItemBase) GetPuttableItem() Item

type ItemCreateInput

type ItemCreateInput struct {
	ItemBase
}

type ItemReaderInput

type ItemReaderInput struct {
	IndexName string
	ItemBase
}

func NewItemReaderInput

func NewItemReaderInput(itemTypeName, tableName, hashKeyName, sortKeyName string, hashKeyValue, sortKeyValue interface{}) *ItemReaderInput

func (*ItemReaderInput) Get

func (*ItemReaderInput) List

func (i *ItemReaderInput) List(sess *session.Session, limit int64, reverse bool) (*dynamodb.QueryOutput, error)

func (*ItemReaderInput) Scan

func (i *ItemReaderInput) Scan(sess *session.Session, limit int64) (*dynamodb.ScanOutput, error)

type ItemWriterInput

type ItemWriterInput struct {
	ItemBase
}

func NewItemWriterInput

func NewItemWriterInput(itemTypeName, tableName, hashKeyName, sortKeyName string, hashKeyValue, sortKeyValue interface{}) *ItemWriterInput

func (*ItemWriterInput) Create

func (*ItemWriterInput) CreateWithItem

func (i *ItemWriterInput) CreateWithItem(sess *session.Session,
	item Item) (*dynamodb.PutItemOutput, error)

func (*ItemWriterInput) Delete

func (*ItemWriterInput) Update

func (*ItemWriterInput) UpdateWithBuilder

func (i *ItemWriterInput) UpdateWithBuilder(sess *session.Session, builder *expression.UpdateBuilder) (*dynamodb.UpdateItemOutput, error)

func (*ItemWriterInput) Upsert

type Items

type Items []map[string]*dynamodb.AttributeValue

type RecordParamHelper

type RecordParamHelper struct {
	Params  url.Values
	Builder *expression.UpdateBuilder
	Changed bool
}

func (*RecordParamHelper) AddToBuilder

func (rph *RecordParamHelper) AddToBuilder(key, val string)

func (*RecordParamHelper) SetBoolFromParam

func (rph *RecordParamHelper) SetBoolFromParam(loc *bool, key string)

func (*RecordParamHelper) SetFloatFromParam

func (rph *RecordParamHelper) SetFloatFromParam(loc *float64, key string)

func (*RecordParamHelper) SetInt64FromParam

func (rph *RecordParamHelper) SetInt64FromParam(loc *int64, key string)

func (*RecordParamHelper) SetIntFromParam

func (rph *RecordParamHelper) SetIntFromParam(loc *int, key string)

func (*RecordParamHelper) SetStringFromParam

func (rph *RecordParamHelper) SetStringFromParam(loc *string, key string)

Jump to

Keyboard shortcuts

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