dynamo

package
v0.0.0-...-e008a93 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2024 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 DB

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

DB is a DynamoDB service for a particular table.

func New

func New(region string, table string) (*DB, error)

New creates a new DynamoDB session.

func (*DB) PutFood

func (d *DB) PutFood(c string, specdiet bool, f []food.Food, t time.Time) error

PutFood puts one food item into the DynamoDB table.

type DBEntry

type DBEntry struct {
	Canteen  string      `json:"canteen"`
	SpecDiet bool        `json:"spec_diet"`
	Date     string      `json:"date"`
	Items    []food.Food `json:"items"`
}

DBEntry is the entry in our DynamoDB table for a particular day.

func GetFood

func GetFood(region string, table string) ([]DBEntry, error)

Jump to

Keyboard shortcuts

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