Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handler ¶
type Handler interface { Uploads(ctx *gin.Context) Assets(ctx *gin.Context) Serve(ctx *gin.Context) Screenshot(ctx *gin.Context) }
Handler defines methods for the frontend to interact with the server.
type Public ¶
Public defines the handler for all public routes.
func (*Public) Assets ¶
Assets
Returns assets from the theme path and returns webp file if the browser accepts it.
Returns a http.StatusNotFound if the asset was not found.
func (*Public) Screenshot ¶
Screenshot
Retrieves the screenshot of the theme passed.
Returns http.StatusInternalServerError if there was an error getting the layouts. Returns http.StatusOK if the themes were obtained successfully or there were none found.
func (*Public) Serve ¶
Serve
Serves the front end website by obtaining the post from the store. If the error code is anything but errors.NOTFOUND, a http.StatusInternalServerError response will be sent.
Returns a http.StatusNotFound if the post was not found. Returns a http.StatusInternalServerError if the template file failed to execute.