Documentation ¶
Overview ¶
Package memory implements foodtinder.Server using on-memory maps.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewServer ¶
func NewServer(state State) foodtinder.Server
NewServer creates a new on-memory data server using the given store.
Types ¶
type Session ¶
type Session struct { Username string Metadata foodtinder.LoginMetadata }
type State ¶
type State struct { Users []User Posts []foodtinder.Post Sessions []foodtinder.Session AssetURLs []string }
State describes the initial state of the memory store.
type User ¶
type User struct { foodtinder.Self Password string Preferences foodtinder.FoodPreferences LikedPosts []foodtinder.ID }
User describes an on-memory user.
Click to show internal directories.
Click to hide internal directories.