dbi

package
v0.0.0-...-bfefed7 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2018 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 interface {
	CreateTable(input *dynamodb.CreateTableInput) (*dynamodb.CreateTableOutput, error)
	PutItem(input *dynamodb.PutItemInput) (*dynamodb.PutItemOutput, error)
	ScanPages(input *dynamodb.ScanInput, fn func(*dynamodb.ScanOutput, bool) bool) error
}

Client minimal dynamodb client

type Database

type Database struct {
	Client Client
}

Database standard Interface implementation

func (*Database) CreateTable

func (db *Database) CreateTable(name string) error

func (*Database) Index

func (db *Database) Index(tableName string) (map[string]string, error)

func (*Database) Insert

func (db *Database) Insert(tableName string, document map[string]string) error

type Interface

type Interface interface {
	CreateTable(name string) error
	Index(tableName string) (map[string]string, error)
	Insert(tableName string, document map[string]string) error
}

Interface minimal database interface

Jump to

Keyboard shortcuts

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