note

package
v0.0.0-...-4953d41 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2015 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BookMap

func BookMap(r render.Render)

所有书籍列表

func BookNew

func BookNew(l web.Log, s web.Session, b Book, r render.Render)

书籍新增

func BookQuery

func BookQuery(params base.Params, r render.Render)

书籍查询

func BookRemove

func BookRemove(l web.Log, params martini.Params, r render.Render)

书籍删除

func BookTop

func BookTop(r render.Render)

置顶的图书

func BookUpdate

func BookUpdate(l web.Log, b Book, r render.Render)

书籍修改

func Path

func Path(m *martini.ClassicMartini, p string)

注释网址

func SectionNew

func SectionNew(l web.Log, s web.Session, e Section, r render.Render)

章节新增

func SectionQuery

func SectionQuery(params base.Params, r render.Render)

章节查询

func SectionRemove

func SectionRemove(l web.Log, params martini.Params, r render.Render)

书籍删除

func SectionUpdate

func SectionUpdate(l web.Log, s Section, r render.Render)

章节修改

Types

type Book

type Book struct {
	Id bson.ObjectId `bson:"_id,omitempty" json:"id" table:"book"`
	// 标题
	Title string `bson:"title" json:"title"`
	// 作者
	Author string `bson:"author,omitempty" json:"author"`
	//简介
	Summary string `bson:"summary,omitempty" json:"summary"`
	// 状态
	Status string `bson:"status,omitempty" json:"status"`
	// 注释数量
	Size rune `bson:"size,omitempty" json:"size"`
	// 创建时间
	Ca time.Time `bson:"ca,omitempty" json:"ca"`
	// 修改时间
	Ua time.Time `bson:"ua,omitempty" json:"ua"`
}

书籍

func (*Book) Find

func (p *Book) Find() error

查找

func (*Book) New

func (b *Book) New() error

创建

func (*Book) Query

func (b *Book) Query(p base.Params) (books []Book, count int, err error)

查询

func (*Book) Remove

func (p *Book) Remove() error

删除

func (*Book) Save

func (b *Book) Save() error

保存

type Part

type Part struct {
	Id bson.ObjectId `bson:"_id,omitempty" json:"id" table:"part"`
	// 章节
	Section bson.ObjectId `bson:"section" json:"section"`
	// 元素
	Span []string `bson:"span" json:"span"`
	// 顺序
	Order int `bson:"order" json:"order"`
	// 创建时间
	Ca time.Time `bson:"ca,omitempty" json:"ca"`
	// 修改时间
	Ua time.Time `bson:"ua,omitempty" json:"ua"`
}

段落

func (*Part) Find

func (o *Part) Find() error

查找

func (*Part) New

func (o *Part) New() error

创建

func (*Part) Remove

func (o *Part) Remove() error

删除

func (*Part) Save

func (o *Part) Save() error

保存

func (*Part) SetSpan

func (o *Part) SetSpan(str string)

设置span

func (*Part) Update

func (o *Part) Update() error

修改

type Section

type Section struct {
	Id bson.ObjectId `bson:"_id,omitempty" json:"id" table:"section"`
	// 书籍
	Book bson.ObjectId `bson:"book" json:"book"`
	// 标题
	Title string `bson:"title" json:"title"`
	// 顺序
	Order int `bson:"order" json:"order"`
	// 内容
	Content string `bson:"content,omitempty" json:"content"`
	// 创建时间
	Ca time.Time `bson:"ca,omitempty" json:"ca"`
	// 修改时间
	Ua time.Time `bson:"ua,omitempty" json:"ua"`
}

章节

func (*Section) CreateParts

func (o *Section) CreateParts() error

创建段落

func (*Section) Find

func (s *Section) Find() error

查找

func (*Section) New

func (s *Section) New() error

创建

func (*Section) Query

func (s *Section) Query(p base.Params) (sections []Section, count int, err error)

查询

func (*Section) Remove

func (s *Section) Remove() error

删除

func (*Section) Save

func (s *Section) Save() error

保存

func (*Section) Update

func (s *Section) Update() error

修改

Jump to

Keyboard shortcuts

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