# README
Examples
This directory contains standalone examples demonstrating the use of buckets for persistence in a web server context.
-
post.go
- sets up an http server that stores raw json payloads sent via http POST requests. -
roundtrip.go
- extends the previous example by appropriately handling http requests sent to the same route with different methods (GET or POST). -
prefix.go
- extends the previous example to demonstrate prefix scanning. -
range.go
- extends the previous example to demonstrate range scanning. -
items.go
- variant of the previous example, demonstrating another way to get items with a given key prefix: viz., usingBucket.PrefixItems
andBucket.RangeItems
.
# Functions
NewController initializes a new instance of our controller.
NewController initializes a new instance of our controller.
NewController initializes a new instance of our controller.
NewService initializes a new instance of our service.
# Structs
Client is our http client for sending requests.
Client is our http client for sending requests.
Client is our http client for sending requests.
Client is our http client for sending requests.
Controller handles requests for todo items.
Controller handles requests for todo items.
Controller handles requests for todo items.
Service handles requests for todo items.
A TaskList is a list of tasks for a particular day.
A TaskList is a list of tasks for a particular day.
A TaskList is a list of tasks for a particular day.
A Todo models a daily task.
Todo holds a task description and the day of week in which to do it.
A Todo models a daily task.
A Todo models a daily task.
Todo holds a task description and the day of week in which to do it.