Version: v0.0.0-...-bb98bc8 Latest Latest

This package is not in the latest version of its module.

Go to latest
Published: Apr 20, 2021 License: GPL-3.0 Imports: 11 Imported by: 0




This section is empty.


This section is empty.


This section is empty.


type Handlers

type Handlers struct {
	DB     *sql.DB
	Config config.Config

Handlers provides common data for our handlers

func (*Handlers) APILogin

func (hs *Handlers) APILogin(c echo.Context) error

APILogin logs in a user to the admin panel

func (Handlers) APIPagesCreate

func (hs Handlers) APIPagesCreate(c echo.Context) error

APIPagesCreate creates a new page binding

func (Handlers) APIPagesDelete

func (hs Handlers) APIPagesDelete(c echo.Context) error

APIPagesDelete deletes a page binding

func (Handlers) APIPagesIndex

func (hs Handlers) APIPagesIndex(c echo.Context) error

APIPagesIndex shows all pages

func (Handlers) APIPagesUpdate

func (hs Handlers) APIPagesUpdate(c echo.Context) error

APIPagesUpdate updates a page

func (Handlers) APIPostsCreate

func (hs Handlers) APIPostsCreate(c echo.Context) error

APIPostsCreate adds a new post for the website

func (Handlers) APIPostsDelete

func (hs Handlers) APIPostsDelete(c echo.Context) error

APIPostsDelete deletes a post

func (Handlers) APIPostsGet

func (hs Handlers) APIPostsGet(c echo.Context) error

APIPostsGet fetches a single post by its id

func (Handlers) APIPostsIndex

func (hs Handlers) APIPostsIndex(c echo.Context) error

APIPostsIndex fetches all posts that were added

func (Handlers) APIPostsTitles

func (hs Handlers) APIPostsTitles(c echo.Context) error

APIPostsTitles gets titles of posts for select elements

func (Handlers) APIPostsUpdate

func (hs Handlers) APIPostsUpdate(c echo.Context) error

APIPostsUpdate updates a post over JSON

func (Handlers) Homepage

func (hs Handlers) Homepage(c echo.Context) error

Homepage renders the index page

func (Handlers) Page

func (hs Handlers) Page(c echo.Context) error

Page renders a navigable page that's not just a post

func (Handlers) Post

func (hs Handlers) Post(c echo.Context) error

Post renders a page with a post

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto