package api import ( "net/http" "github.com/gin-gonic/gin" ) var photoIconSvg = []byte(` `) var rawIconSvg = []byte(` `) var fileIconSvg = []byte(` `) var videoIconSvg = []byte(` `) var folderIconSvg = []byte(``) var albumIconSvg = folderIconSvg var labelIconSvg = []byte(` `) var brokenIconSvg = []byte(` `) var uncachedIconSvg = []byte(` `) // GET /api/v1/svg/* func GetSvg(router *gin.RouterGroup) { router.GET("/svg/photo", func(c *gin.Context) { c.Data(http.StatusOK, "image/svg+xml", photoIconSvg) }) router.GET("/svg/raw", func(c *gin.Context) { c.Data(http.StatusOK, "image/svg+xml", rawIconSvg) }) router.GET("/svg/file", func(c *gin.Context) { c.Data(http.StatusOK, "image/svg+xml", fileIconSvg) }) router.GET("/svg/video", func(c *gin.Context) { c.Data(http.StatusOK, "image/svg+xml", videoIconSvg) }) router.GET("/svg/label", func(c *gin.Context) { c.Data(http.StatusOK, "image/svg+xml", labelIconSvg) }) router.GET("/svg/folder", func(c *gin.Context) { c.Data(http.StatusOK, "image/svg+xml", folderIconSvg) }) router.GET("/svg/album", func(c *gin.Context) { c.Data(http.StatusOK, "image/svg+xml", albumIconSvg) }) router.GET("/svg/broken", func(c *gin.Context) { c.Data(http.StatusOK, "image/svg+xml", brokenIconSvg) }) router.GET("/svg/uncached", func(c *gin.Context) { c.Data(http.StatusOK, "image/svg+xml", uncachedIconSvg) }) }