package
Version:
v0.0.0-...-0fda810
Opens a new window with list of versions in this module.
Published: Jul 11, 2022
License: Apache-2.0
Opens a new window with license information.
Imports: 11
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
-
func Delete(ctx context.Context, deleterFunc deleteItem, r *mux.Router, log logger.Logger)
-
func Get(ctx context.Context, getterFunc get, r *mux.Router, log logger.Logger)
-
func List(ctx context.Context, listFunc list, r *mux.Router, log logger.Logger)
-
func Post(ctx context.Context, createFunc create, getUser extractUserName, r *mux.Router, ...)
-
func Put(ctx context.Context, updateFunc updateItem, getUser extractUserName, ...)
-
type ItemList
Delete provides an API endpoint used to delete an intem
Get returns a single instance of an item based on the ID in the path
List reponds to a HTTP Get request for a collection
Post reponds to a HTTP Post request to a collection
Put provides an API endpoint used to update an intem
type ItemList struct {
Count int `json:"count"`
Items []interface{} `json:"items"`
}
ItemList formats the collection get response to a list
Source Files
¶
Click to show internal directories.
Click to hide internal directories.