Documentation ¶
Index ¶
- Constants
- func Download(w http.ResponseWriter, r *http.Request, params httprouter.Params)
- func FixMeta(w http.ResponseWriter, r *http.Request, params httprouter.Params)
- func GetImage(w http.ResponseWriter, r *http.Request, params httprouter.Params)
- func Handler(w http.ResponseWriter, r *http.Request, params httprouter.Params)
- func PopulateTagsHandler(w http.ResponseWriter, r *http.Request, params httprouter.Params)
- func Register(router *httprouter.Router)
- func SetFavoriteHandler(w http.ResponseWriter, r *http.Request, params httprouter.Params)
- func UpdateCover(w http.ResponseWriter, r *http.Request, params httprouter.Params)
Constants ¶
const (
PathDownload = "/view/download"
)
const (
PathFavorite = "/view/set_favorite"
)
const (
PathFixMeta = "/view/fix_meta"
)
const (
PathGetImage = "/view/get_image"
)
const (
PathPopulateTags = "/view/populate_tags"
)
const (
PathUpdateCover = "/view/update_cover"
)
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.