mongo

package
v0.24.0 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2024 License: MIT Imports: 10 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 function for tier list mongodb.

func New

func New(db *mongo.Database) *Mongo

New to create new tier list mongodb.

func (*Mongo) DeleteByID

func (m *Mongo) DeleteByID(ctx context.Context, id string, userID int64) (int, error)

DeleteByID to delete by id.

func (*Mongo) Get

func (m *Mongo) Get(ctx context.Context, data entity.GetRequest) ([]entity.TierList, int, int, error)

Get to get list.

func (*Mongo) GetByID

func (m *Mongo) GetByID(ctx context.Context, id string) (*entity.TierList, int, error)

GetByID to get by id.

func (*Mongo) UpsertByID

func (m *Mongo) UpsertByID(ctx context.Context, data entity.TierList) (*entity.TierList, int, error)

UpsertByID to upsert by id.

Jump to

Keyboard shortcuts

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