dao

package
v0.0.0-...-cd52cd5 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AttachInsert

func AttachInsert(attachment *Attachment) error

func GetSession

func GetSession() *mgo.Session

Types

type ArticleDao

type ArticleDao struct {
}

func NewArticleDao

func NewArticleDao() *ArticleDao

func (*ArticleDao) Delete

func (this *ArticleDao) Delete(typeName, articleName string) error

func (*ArticleDao) DeleteByTypeName

func (this *ArticleDao) DeleteByTypeName(typeName string) (err error)

func (*ArticleDao) DeleteChapter

func (this *ArticleDao) DeleteChapter(typeName, articleName, chapterName string) error

func (*ArticleDao) Get

func (this *ArticleDao) Get(ty, article, chapter string) (a *domain.Article, err error)

func (*ArticleDao) Insert

func (this *ArticleDao) Insert(article string, chapter *domain.Article) (err error)

func (*ArticleDao) Select

func (this *ArticleDao) Select(page, pagesize int, condition bson.M, sorts []string) (t []domain.Article, err error)

func (*ArticleDao) SelectChapter

func (this *ArticleDao) SelectChapter(article string, page, pagesize int, condition bson.M, sorts []string) (t domain.Article, err error)

func (*ArticleDao) UpdateArticle

func (this *ArticleDao) UpdateArticle(oldType, oldArticle string, article *domain.Article) error

func (*ArticleDao) UpdateChapter

func (this *ArticleDao) UpdateChapter(oldType, oldArticle, oldChapter string, article *domain.Article) error

func (*ArticleDao) UpdateTypeName

func (this *ArticleDao) UpdateTypeName(oldName, newName string) (err error)

type ArticleTypeDao

type ArticleTypeDao struct {
}

article type

func NewArticleTypeDao

func NewArticleTypeDao() *ArticleTypeDao

func (*ArticleTypeDao) Delete

func (this *ArticleTypeDao) Delete(name string) error

func (*ArticleTypeDao) Get

func (this *ArticleTypeDao) Get(name string) (t *domain.ArticleType, err error)

func (*ArticleTypeDao) Insert

func (this *ArticleTypeDao) Insert(articleType *domain.ArticleType) error

func (*ArticleTypeDao) Select

func (this *ArticleTypeDao) Select(page, pagesize int, conditions []bson.M, sorts []string) (ts []domain.ArticleType, err error)

func (*ArticleTypeDao) Update

func (this *ArticleTypeDao) Update(name string, articleType *domain.ArticleType) error

type Attachment

type Attachment struct {
	Name     string `json:"name"`
	Path     string `json:"path"`
	Hash     string `json:"hash"`
	Size     int64  `json:"size"`
	Prefix   string `json:"prefix"`
	CreateAt time.Time
}

Jump to

Keyboard shortcuts

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