api

package
v0.0.0-...-2ee0f01 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2020 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddAlbum

func AddAlbum(c *gin.Context)

@tags Album @Summary add album @description Create album, check example for details on payload. @description Example payload: @description { @description "name":"myAlbumName" @description } @Param request body map[string]string true "refer to example" @success 201 {object} map[string]string "Status Created." @failure 500 {object} map[string]string "on internal server error" @Router /album [POST]

func AddImage

func AddImage(c *gin.Context)

@tags Image @summary add an image @Param image body multipart.Form true "Image that needs to be uploaded" @success 201 {object} map[string]string "Status Accepted." @failure 500 {object} map[string]string "on internal server error" @Router /album/{albumname} [POST]

func DeleteImage

func DeleteImage(c *gin.Context)

@tags Image @summary delete an image @Param albumname path string true "enter albumname in which image is present" @Param imagename path string true "enter imagename which needs to be deleted" @success 201 {object} map[string]string "Status OK." @failure 500 {object} map[string]string "on internal server error" @Router /album/{albumname}/image/{imagename} [DELETE]

func DeleteSingleAlbum

func DeleteSingleAlbum(c *gin.Context)

@tags Album @summary delete album @Param albumname path string true "enter album name that needs to be deleted." @success 200 {object} map[string]string "Status OK." @failure 500 {object} map[string]string "on internal server error" @Router /album/{albumname} [DELETE]

func GetAlbum

func GetAlbum(c *gin.Context)

@tags Album @Summary list all the albums @description Returns dictionary object of all albums, use query string parameters to narrow down searching. @description example: /album?name=myAlbum1&name=myAlbum2 @success 200 {object} map[string]string "returns json data of the album." @failure 404 {object} map[string]string "if album is not present." @failure 500 {object} map[string]string "on internal server error" @Router /album [get]

func GetAllImagesInAlbum

func GetAllImagesInAlbum(c *gin.Context)

@tags Image @summary get all images in album @Param albumname path string true "enter album name whose images are to be returned." @success 200 {object} map[string]string "Status OK." @failure 500 {object} map[string]string "on internal server error" @Router /album/{albumname}/image [GET]

func GetImage

func GetImage(c *gin.Context)

@tags Image @summary get Image @Param albumname path string true "enter album name whose image is to be returned." @Param imagename path string true "enter image name which needs to be returned." @success 200 {object} multipart.Form "Status OK." @failure 500 {object} map[string]string "on internal server error" @Router /album/{albumname}/image/{imagename} [GET]

func GetSingleAlbum

func GetSingleAlbum(c *gin.Context)

@tags Album @Summary get details of an album @description returns dictionary object of album @Param albumname path string true "Album Name" @success 200 {object} map[string]string "returns json data of the album." @failure 404 {object} map[string]string "if album is not present." @failure 500 {object} map[string]string "on internal server error" @Router /album/{albumname} [get]

Types

This section is empty.

Jump to

Keyboard shortcuts

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