mongo

package
v0.4.15 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Mongo

type Mongo struct {
	// contains filtered or unexported fields
}

Mongo contains functions for user_manga mongodb.

func New

func New(mdb *mongo.Database, age int) *Mongo

New to create new user_manga database.

func (*Mongo) BatchUpdate

func (m *Mongo) BatchUpdate(ctx context.Context, data []entity.UserManga) (int, error)

BatchUpdate to batch update.

func (*Mongo) DeleteByMangaID

func (m *Mongo) DeleteByMangaID(ctx context.Context, mangaID int64) (int, error)

DeleteByMangaID to delete by manga id.

func (*Mongo) DeleteNotInList

func (m *Mongo) DeleteNotInList(ctx context.Context, username string, ids []int64) (int, error)

DeleteNotInList to delete not in list.

func (*Mongo) Get

Get to get user manga.

func (*Mongo) GetOldUsernames

func (m *Mongo) GetOldUsernames(ctx context.Context) ([]string, int, error)

GetOldUsernames to get old usernames.

func (*Mongo) IsOld

func (m *Mongo) IsOld(ctx context.Context, username string) (bool, int, error)

IsOld to check if old.

Jump to

Keyboard shortcuts

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