mongo

package
v0.13.1 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2023 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 vtuber mongodb.

func New

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

New to create new vtuber mongodb.

func (*Mongo) DeleteByID added in v0.9.0

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

DeleteByID to delete by id.

func (*Mongo) GetAll added in v0.5.0

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

GetAll to get all data.

func (*Mongo) GetAllForAgencyTree added in v0.4.0

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

GetAllForAgencyTree to get all data for agency tree.

func (*Mongo) GetAllForFamilyTree added in v0.4.0

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

GetAllForFamilyTree 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, _ bool, _ int) ([]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) GetCharacter2DModelers added in v0.6.0

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

GetCharacter2DModelers to get 2d modelers.

func (*Mongo) GetCharacter3DModelers added in v0.6.0

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

GetCharacter3DModelers to get 3d modelers.

func (*Mongo) GetCharacterDesigners added in v0.6.0

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

GetCharacterDesigners to get character designers.

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