Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GetVtubersRequest ¶ added in v0.5.0
type GetVtubersRequest struct { Mode entity.SearchMode `validate:"oneof=all stats" mod:"default=all,trim,lcase"` Names string `validate:"omitempty,gte=3" mod:"trim,lcase"` Name string `validate:"omitempty,gte=3" mod:"trim,lcase"` OriginalName string `validate:"omitempty,gte=3" mod:"trim,lcase"` Nickname string `validate:"omitempty,gte=3" mod:"trim,lcase"` ExcludeActive bool `` ExcludeRetired bool `` StartDebutMonth int `validate:"omitempty,gte=1"` EndDebutMonth int `validate:"omitempty,gte=1"` StartDebutYear int `validate:"omitempty,gte=1"` EndDebutYear int `validate:"omitempty,gte=1"` StartRetiredMonth int `validate:"omitempty,gte=1"` EndRetiredMonth int `validate:"omitempty,gte=1"` StartRetiredYear int `validate:"omitempty,gte=1"` EndRetiredYear int `validate:"omitempty,gte=1"` Has2D *bool `` Has3D *bool `` CharacterDesigner string `mod:"trim"` Character2DModeler string `mod:"trim"` Character3DModeler string `mod:"trim"` InAgency *bool `` Agency string `mod:"trim"` AgencyID int64 `validate:"omitempty,gte=1"` ChannelTypes []entity.ChannelType `validate:"dive,gte=1" mod:"dive,trim"` BirthdayDay int `validate:"omitempty,gte=1"` StartBirthdayMonth int `validate:"omitempty,gte=1"` EndBirthdayMonth int `validate:"omitempty,gte=1"` BloodTypes []string `validate:"dive,gte=1" mod:"dive,trim"` Genders []string `validate:"dive,gte=1" mod:"dive,trim"` Zodiacs []string `validate:"dive,gte=1" mod:"dive,trim"` Sort string `validate:"oneof=name -name debut_date -debut_date retirement_date -retirement_date" mod:"default=name,trim,lcase"` Page int `validate:"required,gte=1" mod:"default=1"` Limit int `validate:"required,gte=-1" mod:"default=20"` }
GetVtubersRequest is get vtubers request model.
type Service ¶
type Service interface { GetVtubers(ctx context.Context, params GetVtubersRequest) ([]vtuber, *pagination, int, error) GetVtuberByID(ctx context.Context, id int64) (*vtuber, int, error) GetVtuberImages(ctx context.Context, shuffle bool, limit int) ([]vtuberImage, int, error) GetVtuberFamilyTrees(ctx context.Context) (*vtuberFamilyTree, int, error) GetVtuberAgencyTrees(ctx context.Context) (*vtuberAgencyTree, int, error) GetVtuberCharacterDesigners(ctx context.Context) ([]string, int, error) GetVtuberCharacter2DModelers(ctx context.Context) ([]string, int, error) GetVtuberCharacter3DModelers(ctx context.Context) ([]string, int, error) GetAgencies(ctx context.Context) ([]agency, int, error) GetAgencyByID(ctx context.Context, id int64) (*agency, int, error) GetWikiaImage(ctx context.Context, path string) ([]byte, int, error) ConsumeMessage(ctx context.Context, msg entity.Message) error QueueMissingAgency(ctx context.Context) (int, int, error) QueueMissingVtuber(ctx context.Context) (int, int, error) QueueOldAgency(ctx context.Context) (int, int, error) QueueOldVtuber(ctx context.Context) (int, int, error) }
Service contains functions for service.
func New ¶
func New( wikia wikiaRepository.Repository, vtuber vtuberRepository.Repository, nonVtuber nonVtuberRepository.Repository, agency agencyRepository.Repository, publisher publisherRepository.Repository, youtube youtubeRepository.Repository, ) Service
New to create new service.
Click to show internal directories.
Click to hide internal directories.