db

package
v0.0.0-...-848d9b0 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	LinkTableName = os.Getenv("LINK_TABLE")
	Region        = os.Getenv("REGION")
)

Functions

This section is empty.

Types

type DB

type DB struct {
	Instance *dynamodb.DynamoDB
}

func New

func New() DB

func TestNew

func TestNew() DB

func (DB) CreateLinkTable

func (d DB) CreateLinkTable() error

func (DB) DeleteLinkTable

func (d DB) DeleteLinkTable() error

func (DB) GetItem

func (d DB) GetItem(i interface{}) (string, error)

func (DB) PutItem

func (d DB) PutItem(i interface{}) (interface{}, error)
type Link struct {
	ShortenResource string `json:"shorten_resource"`
	OriginalURL     string `json:"original_url"`
}

Jump to

Keyboard shortcuts

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