Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrNotFound - No result found ErrNotFound = errors.New("No result found") ErrExist = errors.New("Already exist") // CategoryService expose serviceProvider CategoryService *categoryServiceProvider )
View Source
var (
// ArticleService expose serviceProvider.
ArticleService *articleServiceProvider
)
View Source
var (
//CollectionService expose serviceProvider.
CollectionService *collectionServiceProvider
)
View Source
var (
// ArticleService expose serviceProvider.
CommentService *commentServiceProvider
)
Functions ¶
Types ¶
type Article ¶
type Article struct { Id bson.ObjectId `bson:"_id,omitempty"` Title string `bson:"title"` Brief string `bson:"brief"` Content string `bson:"content"` AuthorID uint32 `bson:"authorID"` CategoryID bson.ObjectId `bson:"categoryID"` TagID bson.ObjectId `bson:"tagID"` VisitNum int64 `bson:"visitNum"` Created string `bson:"created"` Image string `bson:"image"` Active bool `bson:"active"` }
Article represents the article information.
type Category ¶
type Category struct { Id bson.ObjectId `bson:"_id,omitempty" json:"id"` Name string `bson:"name" json:"name"` ArtNum int64 `bson:"artNum" json:"artNum"` VisitNum int64 `bson:"visitNum" json:"visitnum"` Tags []Tag `bson:"tags" json:"tags"` Recommend int32 `bson:"recommend" json:"recommend"` Active bool `bson:"active" json:"active"` }
Category represents the category information.
type Collection ¶
type Collection struct { Id bson.ObjectId `bson:"_id,omitempty" json:"id"` UserID uint32 `bson:"userID" json:"userid"` ArtID []bson.ObjectId `bson:"artID" json:"artid"` }
Collection represents someone's collection.
type Comment ¶
type Comment struct { Id bson.ObjectId `bson:"_id,omitempty" json:"id"` ArtID bson.ObjectId `bson:"artID" json:"artid"` Content string `bson:"content" json:"content"` CreatorID uint32 `bson:"creatorID" json:"creatorid"` Creator string `bson:"creator" json:"creator"` RepliedID uint32 `bson:"repliedID" json:"repliedid"` Replier string `bson:"replier" json:"replier"` ParentID bson.ObjectId `bson:"parentID" json:"parentid"` Created string `bson:"created" json:"created"` Status int8 `bson:"status" json:"status"` }
Comment represents the comment information.
Click to show internal directories.
Click to hide internal directories.