Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DB ¶
type DB interface { // Adds an item to the List AddListItem(ctx context.Context, i ListItem) error // Deletes and item from the List DeleteListItem(ctx context.Context, i ListItem) (int64, error) // Retrieve all items on the List GetList(ctx context.Context) ([]ListItem, error) }
DB is an interface to store and retrieve stateful data
type ListItem ¶
ListItem contains information necessary for adding and deleting items from 'The List'
type Mongo ¶
Mongo implements the DB interface
func (*Mongo) AddListItem ¶
AddListItem takes in a context and ListItem and returns an error if the item is not added to the list
func (*Mongo) DeleteListItem ¶
DeleteListItem takes in a context and ListItem, returns the number of items deleted and an error
Click to show internal directories.
Click to hide internal directories.