# Packages
No description provided by the author
# Constants
Clear mode represents the DELETE method on a collection URL.
Create mode represents the POST method on a collection URL or the PUT method on a _non-existing_ item URL.
Delete mode represents the DELETE method on an item URL.
List mode represents the GET method on a collection URL.
Log levels.
Log levels.
Log levels.
Log levels.
Log levels.
Read mode represents the GET method on an item URL.
Replace mode represents the PUT methods on an existing item URL.
TotalAlways always force the total number of items on list requests.
TotalDenied disallows forcing of the total count, and returns an error if total=1 is supplied, and the total count is not provided by the Storer's Find method.
TotalOptIn allows the end-user to opt-in to forcing the total count by adding the total=1 query-string parameter.
Update mode represents the PATCH on an item URL.
# Variables
DefaultConf defines a configuration with some sensible default parameters.
ErrConflict happens when another thread or node modified the data concurrently with our own thread in such a way we can't securely apply the requested changes.
ErrForbidden is returned when the requested resource can not be accessed by the requestor for security reason.
ErrNoStorage is returned when not storage handler has been set on the resource.
ErrNotFound is returned when the requested resource can't be found.
ErrNotImplemented happens when a used filter is not implemented by the storage handler.
Logger is the function used by rest-layer to log messages.
LoggerLevel sets the logging level of the framework.
ReadOnly is a shortcut for Read and List modes.
ReadWrite is a shortcut for all modes.
WriteOnly is a shortcut for Create, Update, Delete modes.
# Interfaces
ClearedEventHandler is an interface to be implemented by an event handler that want to be called after a resource has been cleared.
ClearEventHandler is an interface to be implemented by an event handler that want to be called before a resource is cleared.
Compiler is an optional interface for Index that's task is to prepare the index for usage.
Counter is an optional interface a Storer can implement to provide a way to explicitly count the total number of elements a given query would return.
DeletedEventHandler is an interface to be implemented by an event handler that want to be called before an item has been deleted on a resource.
DeleteEventHandler is an interface to be implemented by an event handler that want to be called before an item is deleted on a resource.
FindEventHandler is an interface to be implemented by an event handler that want to be called before a find is performed on a resource.
FoundEventHandler is an interface to be implemented by an event handler that want to be called after a find has been performed on a resource.
GetEventHandler is an interface to be implemented by an event handler that want to be called before a get is performed on a resource.
GotEventHandler is an interface to be implemented by an event handler that want to be called after a get has been performed on a resource.
Index is an interface defining a type able to bind and retrieve resources from a resource graph.
InsertedEventHandler is an interface to be implemented by an event handler that want to be called before an item has been inserted on a resource.
InsertEventHandler is an interface to be implemented by an event handler that want to be called before an item is inserted on a resource.
MultiGetter is an optional interface a Storer can implement when the storage engine is able to perform optimized multi gets.
Storer defines the interface of an handler able to store and retrieve resources.
UpdatedEventHandler is an interface to be implemented by an event handler that want to be called before an item has been updated for a resource.
UpdateEventHandler is an interface to be implemented by an event handler that want to be called before an item is updated for a resource.
# Type aliases
ClearedEventHandlerFunc converts a function into a FoundEventHandler.
ClearEventHandlerFunc converts a function into a GetEventHandler.
DeletedEventHandlerFunc converts a function into a FoundEventHandler.
DeleteEventHandlerFunc converts a function into a GetEventHandler.
FindEventHandlerFunc converts a function into a FindEventHandler.
ForceTotalMode defines Conf.ForceTotal modes.
FoundEventHandlerFunc converts a function into a FoundEventHandler.
GetEventHandlerFunc converts a function into a GetEventHandler.
GotEventHandlerFunc converts a function into a FoundEventHandler.
InsertedEventHandlerFunc converts a function into a FoundEventHandler.
InsertEventHandlerFunc converts a function into a GetEventHandler.
LogLevel defines log levels.
Mode defines CRUDL modes to be used with Conf.AllowedModes.
UpdatedEventHandlerFunc converts a function into a FoundEventHandler.
UpdateEventHandlerFunc converts a function into a GetEventHandler.