mongodb

package
v1.16.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 30, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

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(_ context.Context) error

func (*OperationLogColl) Find

func (*OperationLogColl) GetCollectionName

func (c *OperationLogColl) GetCollectionName() string

func (*OperationLogColl) Insert

func (c *OperationLogColl) Insert(args *models2.OperationLog) error

func (*OperationLogColl) Update

func (c *OperationLogColl) Update(id string, status int) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL