controllers

package
v0.0.0-...-86d02d2 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2024 License: MIT Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AdminGet

func AdminGet(c *gin.Context)

AdminGet handles GET /admin/ route

func ArchiveGet

func ArchiveGet(c *gin.Context)

ArchiveGet handles GET /archives/:year/:month route

func AuthRequired

func AuthRequired() gin.HandlerFunc

AuthRequired grants access to authenticated users, requires SharedData middleware

func CommentCreate

func CommentCreate(c *gin.Context)

CommentCreate handles POST /admin/new_comment route

func CommentDelete

func CommentDelete(c *gin.Context)

CommentDelete handles POST /admin/comments/:id/delete route

func CommentEdit

func CommentEdit(c *gin.Context)

CommentEdit handles GET /admin/comments/:id/edit route

func CommentGet

func CommentGet(c *gin.Context)

CommentGet handles GET /comments/:id route

func CommentIndex

func CommentIndex(c *gin.Context)

CommentIndex handles GET /admin/comments route

func CommentNew

func CommentNew(c *gin.Context)

CommentNew handles GET /admin/new_comment route

func CommentPublicCreate

func CommentPublicCreate(c *gin.Context)

CommentPublicCreate handles POST /new_comment route

func CommentUpdate

func CommentUpdate(c *gin.Context)

CommentUpdate handles POST /admin/comments/:id/edit route

func ContextData

func ContextData() gin.HandlerFunc

ContextData stores in gin context the common data, such as user info...

func CreateXMLSitemap

func CreateXMLSitemap()

CreateXMLSitemap creates xml sitemap for search engines, and saves in public/sitemap folder

func DefaultH

func DefaultH(c *gin.Context) gin.H

DefaultH returns common to all pages template data

func GetTemplates

func GetTemplates() *template.Template

GetTemplates returns preloaded templates

func HomeGet

func HomeGet(c *gin.Context)

HomeGet handles GET / route

func LoadTemplates

func LoadTemplates()

LoadTemplates loads templates from views directory

func LogoutGet

func LogoutGet(c *gin.Context)

LogoutGet handles GET /logout route

func MethodNotAllowed

func MethodNotAllowed(c *gin.Context)

MethodNotAllowed handles gin MethodNotAllowed error

func NotFound

func NotFound(c *gin.Context)

NotFound handles gin NotFound error

func OauthCallback

func OauthCallback(c *gin.Context)

OauthCallback handles authentication of a user and initiates a session.

func OauthGoogleLogin

func OauthGoogleLogin(c *gin.Context)

OauthGoogleLogin handles the google oauth login procedure.

func PageCreate

func PageCreate(c *gin.Context)

PageCreate handles POST /admin/new_page route

func PageDelete

func PageDelete(c *gin.Context)

PageDelete handles POST /admin/pages/:id/delete route

func PageEdit

func PageEdit(c *gin.Context)

PageEdit handles GET /admin/pages/:id/edit route

func PageGet

func PageGet(c *gin.Context)

PageGet handles GET /pages/:id route

func PageIndex

func PageIndex(c *gin.Context)

PageIndex handles GET /admin/pages route

func PageNew

func PageNew(c *gin.Context)

PageNew handles GET /admin/new_page route

func PageUpdate

func PageUpdate(c *gin.Context)

PageUpdate handles POST /admin/pages/:id/edit route

func PostCreate

func PostCreate(c *gin.Context)

PostCreate handles POST /admin/new_post route

func PostDelete

func PostDelete(c *gin.Context)

PostDelete handles POST /admin/posts/:id/delete route

func PostEdit

func PostEdit(c *gin.Context)

PostEdit handles GET /admin/posts/:id/edit route

func PostGet

func PostGet(c *gin.Context)

PostGet handles GET /posts/:id route

func PostIndex

func PostIndex(c *gin.Context)

PostIndex handles GET /admin/posts route

func PostNew

func PostNew(c *gin.Context)

PostNew handles GET /admin/new_post route

func PostUpdate

func PostUpdate(c *gin.Context)

PostUpdate handles POST /admin/posts/:id/edit route

func RssGet

func RssGet(c *gin.Context)

RssGet handles GET /rss route

func ShowErrorPage

func ShowErrorPage(c *gin.Context, code int, err error)

ShowErrorPage executes error template given its code

func SignInGet

func SignInGet(c *gin.Context)

SignInGet handles GET /signin route

func SignInPost

func SignInPost(c *gin.Context)

SignInPost handles POST /signin route, authenticates user

func SignUpGet

func SignUpGet(c *gin.Context)

SignUpGet handles GET /signup route

func SignUpPost

func SignUpPost(c *gin.Context)

SignUpPost handles POST /signup route, creates new user

func TagCreate

func TagCreate(c *gin.Context)

TagCreate handles POST /admin/new_tag route

func TagDelete

func TagDelete(c *gin.Context)

TagDelete handles POST /admin/tags/:title/delete route

func TagGet

func TagGet(c *gin.Context)

TagGet handles GET /tags/:title route

func TagIndex

func TagIndex(c *gin.Context)

TagIndex handles GET /admin/tags route

func TagNew

func TagNew(c *gin.Context)

TagNew handles GET /admin/new_tag route

func UploadPost

func UploadPost(c *gin.Context)

UploadPost handles POST /upload route

func UserCreate

func UserCreate(c *gin.Context)

UserCreate handles POST /admin/new_user route

func UserDelete

func UserDelete(c *gin.Context)

UserDelete handles POST /admin/users/:id/delete route

func UserEdit

func UserEdit(c *gin.Context)

UserEdit handles GET /admin/users/:id/edit route

func UserIndex

func UserIndex(c *gin.Context)

UserIndex handles GET /admin/users route

func UserNew

func UserNew(c *gin.Context)

UserNew handles GET /admin/new_user route

func UserUpdate

func UserUpdate(c *gin.Context)

UserUpdate handles POST /admin/users/:id/edit route

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL