table

package
v0.0.0-...-0dea507 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client implements the Table interface

func (*Client) Add

func (c *Client) Add(table string, items ...string) error

Add puts a new item into DynamoDB

func (*Client) Get

func (c *Client) Get(table, key, attribute string) ([]string, error)

Get retrieves an item or items from DynamoDB

Functionality: for a given table and primary key element, return all attributes that match the provided attribute name

func (*Client) Remove

func (c *Client) Remove(table, key, attribute string) error

Remove deletes an item from DynamoDB

type Table

type Table interface {
	Add(table string, items ...string) error
	Get(table, key, attribute string) ([]string, error)
	Remove(table, key, attribute string) error
}

Table provides helper methods for persisting/retrieving/deleting items

func New

func New() Table

New generates a Table implementation with an active client

Jump to

Keyboard shortcuts

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