mongo

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2023 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 functions for vtuber mongodb.

func New

func New(db *mongo.Database, oldAge int) *Mongo

New to create new vtuber mongodb.

func (*Mongo) GetAllForTree added in v0.2.0

func (m *Mongo) GetAllForTree(ctx context.Context) ([]entity.Vtuber, int, error)

GetAllForTree to get all data for tree.

func (*Mongo) GetAllIDs

func (m *Mongo) GetAllIDs(ctx context.Context) ([]int64, int, error)

GetAllIDs to get all ids.

func (*Mongo) GetAllImages added in v0.2.0

func (m *Mongo) GetAllImages(ctx context.Context) ([]entity.Vtuber, int, error)

GetAllImages to get all images.

func (*Mongo) GetByID added in v0.2.0

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

GetByID to get by id.

func (*Mongo) GetOldIDs

func (m *Mongo) GetOldIDs(ctx context.Context) ([]int64, int, error)

GetOldIDs to get old ids.

func (*Mongo) IsOld

func (m *Mongo) IsOld(ctx context.Context, id int64) (bool, int, error)

IsOld to check if old data.

func (*Mongo) UpdateByID

func (m *Mongo) UpdateByID(ctx context.Context, id int64, data entity.Vtuber) (int, error)

UpdateByID to update by id.

Jump to

Keyboard shortcuts

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