Documentation ¶
Index ¶
- type AnnouncementColl
- func (c *AnnouncementColl) Create(args *models2.Announcement) error
- func (c *AnnouncementColl) DeleteAnnouncement(args *AnnouncementDeleteArgs) error
- func (c *AnnouncementColl) EnsureIndex(_ context.Context) error
- func (c *AnnouncementColl) GetCollectionName() string
- func (c *AnnouncementColl) List(receiver string) ([]*models2.Announcement, error)
- func (c *AnnouncementColl) ListValidAnnouncements(receiver string) ([]*models2.Announcement, error)
- func (c *AnnouncementColl) Update(id string, args *models2.Announcement) error
- type AnnouncementDeleteArgs
- type OperationLogArgs
- type OperationLogColl
- func (c *OperationLogColl) EnsureIndex(ctx context.Context) error
- func (c *OperationLogColl) Find(args *OperationLogArgs) ([]*models2.OperationLog, int, error)
- func (c *OperationLogColl) GetCollectionName() string
- func (c *OperationLogColl) Insert(args *models2.OperationLog) error
- func (c *OperationLogColl) Update(id string, status int) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AnnouncementColl ¶
type AnnouncementColl struct { *mongo.Collection // contains filtered or unexported fields }
func NewAnnouncementColl ¶
func NewAnnouncementColl() *AnnouncementColl
func (*AnnouncementColl) Create ¶
func (c *AnnouncementColl) Create(args *models2.Announcement) error
func (*AnnouncementColl) DeleteAnnouncement ¶
func (c *AnnouncementColl) DeleteAnnouncement(args *AnnouncementDeleteArgs) error
func (*AnnouncementColl) EnsureIndex ¶
func (c *AnnouncementColl) EnsureIndex(_ context.Context) error
func (*AnnouncementColl) GetCollectionName ¶
func (c *AnnouncementColl) GetCollectionName() string
func (*AnnouncementColl) List ¶
func (c *AnnouncementColl) List(receiver string) ([]*models2.Announcement, error)
func (*AnnouncementColl) ListValidAnnouncements ¶
func (c *AnnouncementColl) ListValidAnnouncements(receiver string) ([]*models2.Announcement, error)
func (*AnnouncementColl) Update ¶
func (c *AnnouncementColl) Update(id string, args *models2.Announcement) error
type AnnouncementDeleteArgs ¶
type AnnouncementDeleteArgs struct {
ID string
}
type OperationLogArgs ¶
type OperationLogArgs struct { Username string `json:"username"` ProductName string `json:"product_name"` ExactProduct string `json:"exact_product"` Function string `json:"function"` Status int `json:"status"` PerPage int `json:"per_page"` Page int `json:"page"` Scene string `json:"scene"` TargetID string `json:"target_id"` Detail string `json:"detail"` }
type OperationLogColl ¶
type OperationLogColl struct { *mongo.Collection // contains filtered or unexported fields }
func NewOperationLogColl ¶
func NewOperationLogColl() *OperationLogColl
func (*OperationLogColl) EnsureIndex ¶
func (c *OperationLogColl) EnsureIndex(ctx context.Context) error
func (*OperationLogColl) Find ¶
func (c *OperationLogColl) Find(args *OperationLogArgs) ([]*models2.OperationLog, int, error)
func (*OperationLogColl) GetCollectionName ¶
func (c *OperationLogColl) GetCollectionName() string
func (*OperationLogColl) Insert ¶
func (c *OperationLogColl) Insert(args *models2.OperationLog) error
Click to show internal directories.
Click to hide internal directories.