Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetListBackground ¶
func GetListBackground(c echo.Context) error
GetListBackground serves a previously set background from a list It has no knowledge of the provider that was responsible for setting the background. @Summary Get the list background @Description Get the list background of a specific list. **Returns json on error.** @tags list @Produce octet-stream @Param id path int true "List ID" @Security JWTKeyAuth @Success 200 {} string "The list background file." @Failure 403 {object} models.Message "No access to this list." @Failure 404 {object} models.Message "The list does not exist." @Failure 500 {object} models.Message "Internal error" @Router /lists/{id}/background [get]
Types ¶
type BackgroundProvider ¶
type BackgroundProvider struct {
Provider func() background.Provider
}
BackgroundProvider represents a thing which holds a background provider Lets us get a new fresh provider every time we need one.
func (*BackgroundProvider) SearchBackgrounds ¶
func (bp *BackgroundProvider) SearchBackgrounds(c echo.Context) error
SearchBackgrounds is the web handler to search for backgrounds
func (*BackgroundProvider) SetBackground ¶
func (bp *BackgroundProvider) SetBackground(c echo.Context) error
SetBackground sets an Image as list background
func (*BackgroundProvider) UploadBackground ¶
func (bp *BackgroundProvider) UploadBackground(c echo.Context) error
UploadBackground uploads a background and passes the id of the uploaded file as an Image to the Set function of the BackgroundProvider.