Documentation ¶
Index ¶
Constants ¶
View Source
const ( BlogMgoFieldID = "_id" BlogMgoFieldTitle = "title" BlogMgoFieldHits = "Hits" BlogMgoFieldSlug = "Slug" BlogMgoFieldBody = "Body" BlogMgoFieldCreateDate = "createDate" BlogMgoFieldUser = "User" BlogMgoFieldIsPublished = "IsPublished" )
View Source
const ( TimeRangeMgoFieldFrom = "From" TimeRangeMgoFieldTo = "To" )
Variables ¶
View Source
var BlogMgr *_BlogMgr
View Source
var CategoryMgr *_CategoryMgr
View Source
var ErrOperaBeforeInit = errors.New("please set db.SetOnFinishInit when needed operating db in init()")
View Source
var TimeRangeMgr *_TimeRangeMgr
Functions ¶
func BlogAddInsertCallback ¶
func BlogAddInsertCallback(cb func(obj EzOrmObj))
func BlogAddUpdateCallback ¶
func BlogAddUpdateCallback(cb func(obj EzOrmObj))
func BlogInsertCallback ¶
func BlogInsertCallback(o *Blog)
func BlogUpdateCallback ¶
func BlogUpdateCallback(o *Blog)
func Get_BlogMgr ¶
func Get_BlogMgr() *_BlogMgr
Get_BlogMgr returns the orm manager in case of its name starts with lower letter
func MgoSetup ¶
func MgoSetup(config *db.MongoConfig)
Types ¶
type Blog ¶
type Blog struct { ID bson.ObjectId `json:"id" bson:"_id,omitempty"` Title string `bson:"title" json:"title"` Hits int32 `bson:"Hits" json:"Hits"` Slug string `bson:"Slug" json:"Slug"` Body string `bson:"Body" json:"Body"` CreateDate time.Time `bson:"createDate" json:"createDate"` User int32 `bson:"User" json:"User"` IsPublished bool `bson:"IsPublished" json:"IsPublished"` // contains filtered or unexported fields }
func (*Blog) GetClassName ¶
func (*Blog) GetNameSpace ¶
func (*Blog) InsertUnique ¶
func (*Blog) IsSearchEnabled ¶
Click to show internal directories.
Click to hide internal directories.