dynamo

package
v0.0.0-...-1cc0687 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2019 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateClient

func CreateClient() (svc *dynamodb.DynamoDB, ok bool)

CreateClient Creates a client for quering dynamodb

func PutRecord

func PutRecord(svc *dynamodb.DynamoDB, key string, value string) bool

PutRecord inserts a new url shortening

Types

type Record

type Record struct {
	ShortURL string
	URL      string
}

Record A returned record

func GetAllMappings

func GetAllMappings(svc *dynamodb.DynamoDB) []Record

GetAllMappings Returns all mappings

func GetRecord

func GetRecord(svc *dynamodb.DynamoDB, key string) (Record, bool)

GetRecord returns one record with the given key

Jump to

Keyboard shortcuts

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