forum

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2017 License: MIT Imports: 12 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 Plugin

type Plugin struct {
	Db       *gorm.DB           `inject:""`
	Jwt      *auth.Jwt          `inject:""`
	I18n     *i18n.I18n         `inject:""`
	Settings *settings.Settings `inject:""`
	Server   *job.Server        `inject:""`
}

Plugin plugin

func (*Plugin) Atom

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

Atom rss.atom

func (*Plugin) Console

func (p *Plugin) Console() []cli.Command

Console console commands

func (*Plugin) Init

func (p *Plugin) Init()

Init load config

func (*Plugin) Mount

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

Mount web mount-points

func (*Plugin) Open

func (p *Plugin) Open(*inject.Graph) error

Open open beans

func (*Plugin) Sitemap

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

Sitemap sitemap.xml.gz

func (*Plugin) Workers

func (p *Plugin) Workers() map[string]job.Handler

Workers job handler

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