blog

package
v1.1.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DB        *sql.DB
	TokenAuth *jwtauth.JWTAuth
)

Functions

func Routes

func Routes() *chi.Mux

Types

type BlogPost

type BlogPost struct {
	ID            int       `json:"id",db:"id"`
	Title         string    `json:"title",db:"title"`
	Slug          string    `json:"slug",db:"slug"`
	Author        string    `json:"author",db:"author"`
	Content       string    `json:"content",db:"content"`
	TimePublished time.Time `json:"time_published", db:"time_published"`
	Modified      bool      `json:"modified", db:"modified"`
	TimeModified  time.Time `json:"last_modified", db:"last_modified"`
}

type BlogPosts

type BlogPosts []BlogPost

type Comment added in v1.1.0

type Comment struct {
	ID            int       `json:"id",db:"id"`
	Parent        string    `json:"post_id",db:"parent"`
	Author        string    `json:"author",db:"author"`
	Content       string    `json:"content",db:"content"`
	TimePublished time.Time `json:"time_published", db:"time_published"`
	Modified      bool      `json:"modified", db:"modified"`
	TimeModified  time.Time `json:"last_modified", db:"last_modified"`
}

type Comments added in v1.1.0

type Comments []Comment

type NewBlogPost

type NewBlogPost struct {
	Title   string `json:"title",db:"title"`
	Content string `json:"content",db:"content"`
	Tags    string `json:"tags"`
	Author  string `json:"author",db:"author"`
}

type ReferenceId added in v1.1.0

type ReferenceId struct {
	LastID int `json:"last_id"`
}

type ReturnMessage added in v1.1.0

type ReturnMessage struct {
	Message string `json:"msg"`
	Error   bool   `json:"error"`
}

type ReturnSuccess

type ReturnSuccess struct {
	Message string `json:"success"`
	ID      int    `json:"id"`
	Slug    string `json:"slug",db:"slug"`
}

type Tag

type Tag struct {
	TagList string `json:"tags"`
}

Jump to

Keyboard shortcuts

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