mongo

package
v0.20.1 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2024 License: MIT Imports: 12 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, oldActiveAge, oldRetiredAge 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) Get2DModelerCount added in v0.14.0

func (m *Mongo) Get2DModelerCount(ctx context.Context, top int) ([]entity.DesignerCount, int, error)

Get2DModelerCount to get character 2d modeler count.

func (*Mongo) Get3DModelerCount added in v0.14.0

func (m *Mongo) Get3DModelerCount(ctx context.Context, top int) ([]entity.DesignerCount, int, error)

Get2DModelerCount to get character 3d modeler count.

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) GetAverageActiveTime added in v0.14.0

func (m *Mongo) GetAverageActiveTime(ctx context.Context) (float64, int, error)

GetAverageActiveTime to get average active time.

func (*Mongo) GetAverageHeight added in v0.14.0

func (m *Mongo) GetAverageHeight(ctx context.Context) (float64, int, error)

GetAverageHeight to get average height.

func (*Mongo) GetAverageVideoCount added in v0.14.0

func (m *Mongo) GetAverageVideoCount(ctx context.Context) (float64, int, error)

GetAverageVideoCount to get average video count.

func (*Mongo) GetAverageVideoDuration added in v0.14.0

func (m *Mongo) GetAverageVideoDuration(ctx context.Context) (float64, int, error)

GetAverageVideoDuration to get average video duration.

func (*Mongo) GetAverageWeight added in v0.14.0

func (m *Mongo) GetAverageWeight(ctx context.Context) (float64, int, error)

GetAverageWeight to get average weight.

func (*Mongo) GetBirthdayCount added in v0.14.0

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

GetBirthdayCount to get birthday count.

func (*Mongo) GetBloodTypeCount added in v0.14.0

func (m *Mongo) GetBloodTypeCount(ctx context.Context, top int) ([]entity.BloodTypeCount, int, error)

GetBloodTypeCount to get blood type count.

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) GetChannelTypeCount added in v0.14.0

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

GetChannelTypeCount to get channel type count.

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) GetCount added in v0.14.0

func (m *Mongo) GetCount(ctx context.Context) (int, int, error)

GetCount to get count.

func (*Mongo) GetDebutRetireCountMonthly added in v0.14.0

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

GetDebutRetireCountMonthly to get debut & retire count monthly.

func (*Mongo) GetDebutRetireCountYearly added in v0.14.0

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

GetDebutRetireCountYearly to get debut & retire count yearly.

func (*Mongo) GetDesignerCount added in v0.14.0

func (m *Mongo) GetDesignerCount(ctx context.Context, top int) ([]entity.DesignerCount, int, error)

GetDesignerCount to get character designer count.

func (*Mongo) GetGenderCount added in v0.14.0

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

GetGenderCount to get gender count.

func (*Mongo) GetInAgencyCount added in v0.14.0

func (m *Mongo) GetInAgencyCount(ctx context.Context) (*entity.InAgencyCount, int, error)

GetInAgencyCount to get in agency count.

func (*Mongo) GetModelCount added in v0.14.0

func (m *Mongo) GetModelCount(ctx context.Context) (*entity.ModelCount, int, error)

GetModelCount to get 2d & 3d model count.

func (*Mongo) GetOldActiveIDs added in v0.15.0

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

GetOldActiveIDs to get old active ids.

func (*Mongo) GetOldRetiredIDs added in v0.15.0

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

GetOldRetiredIDs to get old retired ids.

func (*Mongo) GetStatusCount added in v0.14.0

func (m *Mongo) GetStatusCount(ctx context.Context) (*entity.StatusCount, int, error)

GetStatusCount to get status count.

func (*Mongo) GetSubscriberCount added in v0.14.0

func (m *Mongo) GetSubscriberCount(ctx context.Context, interval, max int) ([]entity.SubscriberCount, int, error)

GetSubscriberCount to get subscriber count.

func (*Mongo) GetVideoCount added in v0.14.0

func (m *Mongo) GetVideoCount(ctx context.Context, top int) ([]entity.VideoCount, int, error)

GetVideoCount to get video count. Unused.

func (*Mongo) GetVideoCountByDate added in v0.14.0

func (m *Mongo) GetVideoCountByDate(ctx context.Context, hourly, daily bool) ([]entity.VideoCountByDate, int, error)

GetVideoCountByDate to get video count by date.

func (*Mongo) GetVideoDuration added in v0.14.0

func (m *Mongo) GetVideoDuration(ctx context.Context, top int) ([]entity.VideoDuration, int, error)

GetVideoDuration to get video duration.

func (*Mongo) GetZodiacCount added in v0.14.0

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

GetZodiacCount to get zodiac count.

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.

func (*Mongo) UpdateOverriddenFieldByID added in v0.20.0

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

UpdateOverriddenFieldByID to update overriden field by id.

Jump to

Keyboard shortcuts

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