Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreatePage ¶
CreatePage inserts a new page to the database
func CreatePost ¶
CreatePost inserts a new post to the database
func DeletePost ¶
UpdatePost update an article exists in the database
func UpdatePage ¶
UpdatePage update a page exists in the database
func UpdatePost ¶
UpdatePost update an article exists in the database
Types ¶
type Page ¶
Page is a display struct for Page
func GetPageByID ¶
GetPageByID return an article matching the id
type PageDB ¶
type PageDB struct { ID string `firestore:"id,omitempty"` Content string `firestore:"content,omitempty"` HTML string `firestore:"html,omitempty"` }
PageDB is a database struct for Page
type Post ¶
type Post struct { ID string Title string Content string HTML template.HTML Slug string Created string }
func GetPostByID ¶
GetPostByID return an article matching the id
type PostDB ¶
type PostDB struct { ID string `firestore:"id,omitempty"` Title string `firestore:"title,omitempty"` Content string `firestore:"content,omitempty"` HTML string `firestore:"html,omitempty"` Slug string `firestore:"slug,omitempty"` Created string `firestore:"created,omitempty"` }
Article Struct
Click to show internal directories.
Click to hide internal directories.