util

package
v0.0.0-...-7be3ace Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MarshalKey

func MarshalKey(in interface{}, encoderOpts ...func(*KeyEncoder)) (map[string]*dynamodb.AttributeValue, error)

Types

type KeyEncoder

type KeyEncoder struct {
	TagName         string
	PartitionKeyTag string
	SortKeyTag      string
	// contains filtered or unexported fields
}

func NewKeyEncoder

func NewKeyEncoder(opts ...func(*KeyEncoder)) *KeyEncoder

func (*KeyEncoder) Encode

func (e *KeyEncoder) Encode(in interface{}) (map[string]*dynamodb.AttributeValue, error)

type SchemaEncoder

type SchemaEncoder struct {
	TagName         string
	PartitionKeyTag string
	SortKeyTag      string
	// contains filtered or unexported fields
}

func NewSchemaEncoder

func NewSchemaEncoder(opts ...func(e *SchemaEncoder)) *SchemaEncoder

func (*SchemaEncoder) AttributeDefinition

func (s *SchemaEncoder) AttributeDefinition() []*dynamodb.AttributeDefinition

func (*SchemaEncoder) Encode

func (s *SchemaEncoder) Encode(in interface{}) error

func (*SchemaEncoder) KeySchema

func (s *SchemaEncoder) KeySchema() []*dynamodb.KeySchemaElement

Jump to

Keyboard shortcuts

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