view

package
v0.0.0-...-0707337 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2024 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PathDownload = "/view/download"
)
View Source
const (
	PathFavorite = "/view/set_favorite"
)
View Source
const (
	PathFixMeta = "/view/fix_meta"
)
View Source
const (
	PathGetImage = "/view/get_image"
)
View Source
const (
	PathPopulateTags = "/view/populate_tags"
)
View Source
const (
	PathUpdateCover = "/view/update_cover"
)
View Source
const (
	PathView = "/view"
)

Variables

This section is empty.

Functions

func Download

func Download(w http.ResponseWriter, r *http.Request, params httprouter.Params)

@Param name query string true "name of the file" @Success 200 {body} file @Failure 500 {object} errors.Error @Router /view/download [get]

func FixMeta

func FixMeta(w http.ResponseWriter, r *http.Request, params httprouter.Params)

@accept json @Param request body view.fixMetaRequest true "request" @Success 200 {object} view.fixMetaResponse @Failure 500 {object} errors.Error @Router /view/fix_meta [post] Fix the input item metadata.

func GetImage

func GetImage(w http.ResponseWriter, r *http.Request, params httprouter.Params)

@Param name query string true "name of the item" @Param width query int false "width" @Param height query int false "height" @Param i query int true "index" @Success 200 {body} file @Failure 500 {object} errors.Error @Router /view/get_image [get] GetImage returns an image with specific width/height while retains aspect ratio.

func Handler

func Handler(w http.ResponseWriter, r *http.Request, params httprouter.Params)

@accept json @Param request body view.viewRequest true "request" @Success 200 {object} view.viewResponse @Failure 500 {object} errors.Error @Router /view [post]

func PopulateTagsHandler

func PopulateTagsHandler(w http.ResponseWriter, r *http.Request, params httprouter.Params)

@accept json @Param request body view.populateTagsRequest true "request" @Success 200 {object} view.populateTagsResponse @Failure 500 {object} errors.Error @Router /view/populate_tags [post]

func Register

func Register(router *httprouter.Router)

func SetFavoriteHandler

func SetFavoriteHandler(w http.ResponseWriter, r *http.Request, params httprouter.Params)

@accept json @Param request body view.setFavoriteRequest true "request" @Success 200 {object} view.setFavoriteResponse @Failure 500 {object} errors.Error @Router /view/set_favorite [post]

func UpdateCover

func UpdateCover(w http.ResponseWriter, r *http.Request, params httprouter.Params)

@accept json @Param request body view.updateCoverRequest true "request" @Success 200 {object} view.updateCoverResponse @Failure 500 {object} errors.Error @Router /view/update_cover [post] UpdateCover a handler to update the cover to specific image

Types

This section is empty.

Jump to

Keyboard shortcuts

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