Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Website ¶
type Website struct { ID primitive.ObjectID `json:"_id" bson:"_id,omitempty"` //bson是用来创建后返回,omitempty是可选 UserID primitive.ObjectID `json:"user_id" bson:"user_id,omitempty"` //用户id Name string `json:"name" bson:"name,omitempty"` //网站名 TDK title Description string `json:"description" bson:"description,omitempty"` //描述 TDK description Keywords string `json:"keywords" bson:"keywords,omitempty"` //关键字 TDK keywords Icon string `json:"icon" bson:"icon,omitempty"` //图标 Category string `json:"category" bson:"category,omitempty"` //网站分类 Status int `json:"status" bson:"status,omitempty"` //状态 CreatedAt time.Time `json:"created_at" bson:"created_at,omitempty"` UpdatedAt time.Time `json:"updated_at" bson:"updated_at,omitempty"` }
type WebsiteService ¶
type WebsiteService interface { GetWebsiteList(offset, limit int64, search Website) (website []Website, count int64, err error) GetWebsite(name, url string) (website Website, pageData page.Page, err error) CreateWebsite(website *Website) (err error) UpdateWebsite(website *Website) (err error) DeleteWebsite(userID primitive.ObjectID, websiteID primitive.ObjectID) (err error) }
func NewService ¶
func NewService(mongo *mongo.Database) WebsiteService
Click to show internal directories.
Click to hide internal directories.