Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Comment ¶
type Comment struct { ID bson.ObjectId `bson:"_id"` UserID bson.ObjectId `bson:"user_id"` PostID bson.ObjectId `bson:"post_id"` Title string `bson:"title"` Body string `bson:"body"` CreatedAt time.Time `bson:"created_at"` UpdatedAt time.Time `bson:"updated_at"` Favourites int64 `bson:"favourites"` }
type Post ¶
type Post struct { ID bson.ObjectId `bson:"_id"` Title string `bson:"title"` Body string `bson:"body"` Categories []string `bson:"categories"` Tags []string `bson:"tags"` UserID bson.ObjectId `bson:"user_id"` CreatedAt time.Time `bson:"created_at"` UpdatedAt time.Time `bson:"updated_at"` Status Status `bson:"status"` Views int64 `bson:"views"` Favourites int64 `bson:"favourites"` }
func (*Post) ToPostStatus ¶
func (*Post) ValidateStatus ¶
type User ¶
type User struct { ID bson.ObjectId `bson:"_id"` Name string `bson:"name"` Username string `bson:"username"` Email string `bson:"email"` Password string `bson:"password"` Details string `bson:"details"` UserType UserType `bson:"user_type"` UserStatus UserStatus `bson:"user_status"` CreatedAt time.Time `bson:"created_at"` UpdatedAt time.Time `bson:"updated_at"` }
type UserStatus ¶
type UserStatus string
const ( UserStatusRegistered UserStatus = "registered" UserStatusVerified UserStatus = "verified" UserStatusBlocked UserStatus = "blocked" )
Click to show internal directories.
Click to hide internal directories.