# Functions
EntranceAndCheckout finds the entrance and checkout zones for the layout, returning nil if they are not found.
GenerateSecret generates a random string which is cryptographically unpredictable.
HumanizeError turns an error message into a more user-friendly message.
IsAPIRequest checks if a request is an API request (versus a user-facing page).
LoadStoreSources creates a map of supported store sources.
No description provided by the author
No description provided by the author
NewStoreCache creates a StoreCache that will used the named collection of store sources.
RateLimitMux wraps a ServeMux to rate-limit requests for all APIs.
RoutePaths finds the optimal route and returns all of the path segments of it, as well as the sorted list of entries for convenience.
ServeFormError redirects the user to an error page when a form POST results in an error.
ServeObject responds to an API request with a JSON serialized object.
SetAuthCookie sets a user cookie for a request.
SignData mixes a piece of data with a secret that prevents a user from modifying the data while still producing the same signature.
SignInventoryItem generates a unique signature for an inventory search result.
SignStore generates a unique signature for a store search result.
SortEntries finds the optimal route and returns the list entries sorted by this route.
UncachedMux wraps a ServeMux to prevent caching on API endpoints and certain dynamic pages.
ZonesToPoints converts a slice of zones to a slice of floor-point pairs, suitable for passing to a connector.
# Constants
No description provided by the author
SecretKey is the user metadata field used to store the user secret in the database.
SignatureKey is the user metadata field which stores a secret key used to sign data on behalf of a user.
# Variables
StoreIDKey is the context key used for a db.StoreID.
StoreKey is the context key used for an optishop.Store.
UserKey is the context key used to store a db.UserID.
# Structs
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
A StoreCache uses a cache to quickly retrieve Store objects for serialized store descriptions.
# Type aliases
No description provided by the author
No description provided by the author
No description provided by the author