forum

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2017 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Article

type Article struct {
	web.Model
	Title   string `json:"title"`
	Summary string `json:"summary"`
	Body    string `json:"body"`
	Type    string `json:"type"`

	UserID   uint      `json:"userId"`
	User     auth.User `json:"user"`
	Tags     []Tag     `json:"tags" gorm:"many2many:forum_articles_tags;"`
	Comments []Comment `json:"comments"`
}

Article article

func (Article) TableName

func (Article) TableName() string

TableName table name

type Comment

type Comment struct {
	web.Model
	Body string `json:"body"`
	Type string `json:"type"`

	UserID    uint      `json:"userId"`
	User      auth.User `json:"user"`
	ArticleID uint      `json:"articleId"`
	Article   Article   `json:"article"`
}

Comment comment

func (Comment) TableName

func (Comment) TableName() string

TableName table name

type Engine added in v0.3.0

type Engine struct {
	Db   *gorm.DB  `inject:""`
	I18n *web.I18n `inject:""`
	Jwt  *auth.Jwt `inject:""`
}

Engine engine

func (*Engine) Atom added in v0.3.0

func (p *Engine) Atom(lang string) ([]*atom.Entry, error)

Atom rss.atom

func (*Engine) Mount added in v0.3.0

func (p *Engine) Mount(rt *gin.Engine)

Mount web mount-points

func (*Engine) RegisterWorker added in v0.3.0

func (p *Engine) RegisterWorker()

RegisterWorker register worker

func (*Engine) Shell added in v0.3.0

func (p *Engine) Shell() []cli.Command

Shell shell commands

func (*Engine) Sitemap added in v0.3.0

func (p *Engine) Sitemap() ([]stm.URL, error)

Sitemap sitemap.xml.gz

type Tag

type Tag struct {
	web.Model
	Name     string    `json:"name"`
	Articles []Article `json:"articles" gorm:"many2many:forum_articles_tags;"`
}

Tag tag

func (Tag) TableName

func (Tag) TableName() string

TableName table name

Jump to

Keyboard shortcuts

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