reading

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2016 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 Book

type Book struct {
	web.Model

	Author      string `json:"author"`
	Publisher   string `json:"publisher"`
	Title       string `json:"title"`
	Type        string `json:"type"`
	Lang        string `json:"lang"`
	File        string `json:"file"`
	Subject     string `json:"subject"`
	Description string `json:"description"`
	Vote        int    `json:"vote"`
	PublishedAt string `json:"publish_at"`

	Notes []Note `json:"notes"`
}

Book book

func (*Book) TableName

func (p *Book) TableName() string

TableName table name

type Engine added in v0.2.1

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

Engine reading engine

func (*Engine) Home added in v0.2.1

func (p *Engine) Home() gin.HandlerFunc

Home home

func (*Engine) Init added in v0.2.1

func (p *Engine) Init(*inject.Graph) error

Init init ioc objects

func (*Engine) Mount added in v0.2.1

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

Mount web points

func (*Engine) Shell added in v0.2.1

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

Shell command line

func (*Engine) Worker added in v0.2.1

func (p *Engine) Worker()

Worker register worker

type Note

type Note struct {
	web.Model

	Body string `json:"body"`
	Type string `json:"type"`
	Vote int    `json:"vote"`

	UserID uint      `json:"user_id"`
	User   auth.User `json:"user"`
	BookID uint      `json:"book_id"`
	Book   Book      `json:"book"`
}

Note note

func (*Note) TableName

func (p *Note) TableName() string

TableName table name

Jump to

Keyboard shortcuts

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