content

package
v0.12.4 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MarkdownSanitize

func MarkdownSanitize(s string) template.HTML

func SanitizeTitle

func SanitizeTitle(s string) template.HTML

Types

type Article

type Article struct {
	Id      int       `sql:"id,pk" json:"id" form:"id"`
	Title   string    `sql:"title,notnull" json:"title" form:"title" binding:"required"`
	Content string    `sql:"content,notnull" json:"content" form:"content" binding:"required"`
	Author  string    `sql:"author" json:"author"`
	Created time.Time `sql:"created" json:"created"`
	Updated time.Time `sql:"updated,nullempty" json:"updated,omitempty"`
}

Article ...

func (*Article) HtmlContent

func (a *Article) HtmlContent() template.HTML

func (*Article) HtmlTitle

func (a *Article) HtmlTitle() template.HTML

func (*Article) StyleName

func (a *Article) StyleName() string
type Link struct {
	Id       int          `sql:"id,pk" json:"id" form:"id"`
	Title    string       `sql:"title,notnull" json:"title" form:"title" binding:"required"`
	Url      template.URL `sql:"url,unique,notnull" json:"url" form:"url" binding:"required"`
	Position int          `sql:"position" json:"position" form:"position"`
	Author   string       `sql:"author" json:"author"`
	Created  time.Time    `sql:"created" json:"created"`
}

func (*Link) HtmlTitle

func (a *Link) HtmlTitle() template.HTML

func (*Link) SetUrl

func (a *Link) SetUrl(href string)

Jump to

Keyboard shortcuts

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