Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handler ¶
type Handler interface { List(ctx *gin.Context) Find(ctx *gin.Context) Config(ctx *gin.Context) Templates(ctx *gin.Context) Layouts(ctx *gin.Context) Update(ctx *gin.Context) }
Handler defines methods for the themes to interact with the server.
type Themes ¶
Themes defines the handler for all site routes.
func (*Themes) Find ¶
Find
Returns http.StatusOK if the theme config was obtained. Returns http.StatusBadRequest if the name wasn't passed. Returns http.StatusInternalServerError if there as an error obtaining the config.
func (*Themes) Layouts ¶
Layouts
Returns http.StatusInternalServerError if there was an error getting the layouts. Returns http.StatusOK if the layouts were obtained successfully or there were none found.
func (*Themes) List ¶
List
Returns http.StatusInternalServerError if there was an error getting the themes. Returns http.StatusOK if the themes were obtained successfully or there were none found.
func (*Themes) Templates ¶
Templates
Returns http.StatusInternalServerError if there was an error getting the templates. Returns http.StatusOK if the templates were obtained successfully or there were none found.
type UpdateTheme ¶
type UpdateTheme struct {
Theme string `json:"theme" binding:"required"`
}
UpdateTheme defines the data to be validated when a theme is switched.