service

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2023 License: MIT Imports: 19 Imported by: 0

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"`
	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)

	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

New to create new service.

Jump to

Keyboard shortcuts

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