Documentation ¶
Index ¶
- Variables
- func Auth(w http.ResponseWriter, r *http.Request)
- func Blogchad(w http.ResponseWriter, r *http.Request)
- func BlogchadArticle(w http.ResponseWriter, r *http.Request)
- func BlogchadWrite(w http.ResponseWriter, r *http.Request)
- func Chad(w http.ResponseWriter, r *http.Request)
- func Chatchad(w http.ResponseWriter, r *http.Request)
- func Header(w http.ResponseWriter, r *http.Request)
- func Home(w http.ResponseWriter, r *http.Request)
- func LoadTemplate(filename string, data any, w http.ResponseWriter)
- type ArticlePageData
- type PageLoadData
- type ProfileData
- type User
Constants ¶
This section is empty.
Variables ¶
View Source
var TemplateCache = make(map[string]*template.Template)
Functions ¶
func LoadTemplate ¶
func LoadTemplate(filename string, data any, w http.ResponseWriter)
load template func
Types ¶
type ArticlePageData ¶
type ArticlePageData struct { Article blogchad.Article Comments []blogchad.Comment UserID string ArticleVote int // 0 - none, -1 - downvote, 1 - upvote }
all data needed for article page
type PageLoadData ¶
type ProfileData ¶
Click to show internal directories.
Click to hide internal directories.