dynamite

package module
v0.0.0-...-8b8e06d Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2013 License: MIT Imports: 4 Imported by: 0

README

dynamite

Repository based Amazon DynamoDB management

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteEntities

func DeleteEntities(entities ...*Entity) (success bool, err error)

func Setup

func Setup(auth aws.Auth, region aws.Region)

func StoreEntities

func StoreEntities(entities ...*Entity) (success bool, err error)

Store one ore more entities on Dynamo

Types

type Entity

type Entity struct {
	PrimaryKey dynamodb.PrimaryKey
	TableName  string
	Attributes map[string]dynamodb.Attribute
	Related    map[string]*Entity
}

func LoadEntities

func LoadEntities(template Entity) (entities []Entity, err error)

Load one ore more Entities defined by template

func NewEntity

func NewEntity(tableName string, hashKey *dynamodb.Attribute, rangeKey *dynamodb.Attribute) (e Entity)

func (*Entity) Add

func (e *Entity) Add(attrType string, attrName string, attrValue string)

Add a new Attribute

func (*Entity) Delete

func (e *Entity) Delete() (success bool, err error)

func (*Entity) Get

func (e *Entity) Get(attrName string) string

Return an Attributes value by name

func (*Entity) GetHashKeyValue

func (e *Entity) GetHashKeyValue() string

Return the HashKey's value

func (*Entity) GetRangeKeyValue

func (e *Entity) GetRangeKeyValue() string

Return the RangeKey's value

func (*Entity) Read

func (e *Entity) Read() (err error)

func (*Entity) Set

func (e *Entity) Set(attrName string, attrValue string) error

Set an Attribute value by name Returns an error if the Attribute does not exist

func (*Entity) SetHashKeyValue

func (e *Entity) SetHashKeyValue(value string)

Set the HashKey's value

func (*Entity) SetRangeKeyValue

func (e *Entity) SetRangeKeyValue(value string)

Set the RangeKey's value If the RangeKey is not defined this silently does nothing

func (*Entity) Store

func (e *Entity) Store() (bool, error)

Jump to

Keyboard shortcuts

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