db

package
v1.2.13 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client added in v1.1.0

type Client dynamodb.DynamoDB

Client is a dynamodb client with some convenience receiver functions added.

func NewClient added in v1.1.0

func NewClient() *Client

NewClient returns a new Client

func (*Client) Put added in v1.1.0

func (client *Client) Put(tablename string, c *closures.Closure) (*closures.Closure, error)

Put will insert a road and/or beach closure notice in to the db.

If the closure already exists in the db but something has changed (e.g. 'Status' has changed from 'Scheduled' to 'Cancelled'), then the new closure overwrites existing. The existing closure is returned in this case, otherwise nil.

Closures are automatically deleted from the db table when their 'Expires' attribute becomes older than the current time (See DynamoDB Managed TTL).

type ItemUnchangedError

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

ItemUnchangedError is an implementation of the error interface used to signify items in the db exist and have no changes.

func NewItemUnchangedError

func NewItemUnchangedError() *ItemUnchangedError

NewItemUnchangedError returns a new instance of ItemUnchangedError.

func (*ItemUnchangedError) Error

func (e *ItemUnchangedError) Error() string

Jump to

Keyboard shortcuts

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