site

package
v0.0.0-...-a0045c4 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2017 License: MIT Imports: 51 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateCertificate

func CreateCertificate(ca bool, subject pkix.Name, years int) ([]byte, []byte, error)

CreateCertificate create certs

func WritePemFile

func WritePemFile(file, _type string, buf []byte, mode os.FileMode) error

WritePemFile wirte to a pem format file

Types

type LeaveWord

type LeaveWord struct {
	ID        uint      `gorm:"primary_key" json:"id"`
	CreatedAt time.Time `json:"createdAt"`
	Body      string    `json:"body"`
	Type      string    `json:"type"`
}

LeaveWord leave-word

func (LeaveWord) TableName

func (LeaveWord) TableName() string

TableName table name

type Link struct {
	web.Model
	Lang  string `json:"lang"`
	Loc   string `json:"loc"`
	Href  string `json:"href"`
	Label string `json:"label"`
	Sort  int    `json:"sort"`
}

Link link

type Notice

type Notice struct {
	web.Model
	Lang string `json:"lang"`
	Body string `json:"body"`
	Type string `json:"type"`
}

Notice notice

func (Notice) TableName

func (Notice) TableName() string

TableName table name

type Page

type Page struct {
	web.Model
	Lang    string `json:"lang"`
	Loc     string `json:"loc"`
	Title   string `json:"title"`
	Summary string `json:"summary"`
	Href    string `json:"href"`
	Sort    int    `json:"sort"`
}

Page page

type Plugin

type Plugin struct {
	Db       *gorm.DB           `inject:""`
	Jwt      *auth.Jwt          `inject:""`
	Dao      *auth.Dao          `inject:""`
	I18n     *i18n.I18n         `inject:""`
	Settings *settings.Settings `inject:""`
	Server   *job.Server        `inject:""`
	Cache    *cache.Cache       `inject:""`
	Wrap     *web.Wrap          `inject:""`
	Matcher  language.Matcher   `inject:""`
	Render   *render.Render     `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 init config

func (*Plugin) Mount

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

Mount mount web points

func (*Plugin) Open

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

Open init beans

func (*Plugin) Sitemap

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

Sitemap sitemap.xml.gz

func (*Plugin) Workers

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

Workers job handler

type Post

type Post struct {
	web.Model
	Name  string `json:"name"`
	Lang  string `json:"lang"`
	Title string `json:"title"`
	Body  string `json:"body"`
	Type  string `json:"type"`
}

Post post

func (Post) TableName

func (Post) TableName() string

TableName table name

Jump to

Keyboard shortcuts

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