apis

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 6, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateList

func CreateList(writer http.ResponseWriter, request *http.Request)

CreateList godoc @Summary Creates a list @Description Creates a list @Accept json @Produce json @Param userId path string true "The user id of the user" @Param list body models.List true "The value of the list" @Success 201 {object} models.List "The created list" @Router /user/{userId}/lists [post]

func DeleteList

func DeleteList(writer http.ResponseWriter, request *http.Request)

DeleteList godoc @Summary Deletes a specific list of a user @Description Deletes a specific list of a user @Param userId path string true "The user id of the user" @Param listId path string true "The id of the list to update" @Success 204 "deleted successfully" @Failure 404 "list with the specified id does not exist" @Router /user/{userId}/lists/{listId} [delete]

func GetHealth

func GetHealth(writer http.ResponseWriter, request *http.Request)

func GetList

func GetList(writer http.ResponseWriter, request *http.Request)

GetList godoc @Summary Gets a specific list of a user @Description Gets a specific list of a user @Produce json @Param userId path string true "The user id of the user" @Param listId path string true "The id of the list to get" @Success 200 {object} models.List @Failure 404 "list with the specified id does not exist" @Router /user/{userId}/lists/{listId} [get]

func GetLists

func GetLists(writer http.ResponseWriter, request *http.Request)

GetLists godoc @Summary Gets all lists for a user @Description Gets all lists for a user @Produce json @Param userId path string true "The user id of the user" @Success 200 {array} models.List @Failure 404 "The user does not have any lists" @Router /user/{userId}/lists [get]

func UpdateList

func UpdateList(writer http.ResponseWriter, request *http.Request)

UpdateList godoc @Summary Updates a specific list of a user @Description Updates a specific list of a user @Accept json @Param userId path string true "The user id of the user" @Param listId path string true "The id of the list to update" @Param list body models.List true "The new value of the list" @Success 202 "updated successfully" @Failure 404 "list with the specified id does not exist" @Router /user/{userId}/lists/{listId} [put]

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL