Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GetAuthorsRequest ¶ added in v0.2.0
type GetAuthorsRequest struct { Name string `validate:"omitempty,gte=3" mod:"trim,lcase"` Page int `validate:"required,gte=1" mod:"default=1"` Limit int `validate:"required,gte=-1" mod:"default=20"` }
GetAuthorsRequest is get authors request model.
type GetGenresRequest ¶ added in v0.2.0
type GetGenresRequest struct { Name string `validate:"omitempty,gte=3" mod:"trim,lcase"` Page int `validate:"required,gte=1" mod:"default=1"` Limit int `validate:"required,gte=-1" mod:"default=20"` }
GetGenresRequest is get genres request model.
type GetMagazinesRequest ¶ added in v0.2.0
type GetMagazinesRequest struct { Name string `validate:"omitempty,gte=3" mod:"trim,lcase"` Page int `validate:"required,gte=1" mod:"default=1"` Limit int `validate:"required,gte=-1" mod:"default=20"` }
GetMagazinesRequest is get magazines request model.
type GetMangaRequest ¶ added in v0.2.0
type GetMangaRequest struct { Mode entity.SearchMode `validate:"oneof=ALL SIMPLE" mod:"default=SIMPLE,trim,ucase"` Title string `validate:"omitempty,gte=3" mod:"trim,lcase"` Type entity.Type `validate:"omitempty,oneof=MANGA NOVEL ONE_SHOT DOUJINSHI MANHWA MANHUA OEL LIGHT_NOVEL" mod:"trim,ucase"` Status entity.Status `validate:"omitempty,oneof=FINISHED RELEASING NOT_YET HIATUS DISCONTINUED" mod:"trim,ucase"` StartDate string `validate:"omitempty,datetime=2006-01-02" mod:"trim"` EndDate string `validate:"omitempty,datetime=2006-01-02" mod:"trim"` AuthorID int64 `validate:"omitempty,gt=0"` MagazineID int64 `validate:"omitempty,gt=0"` GenreID int64 `validate:"omitempty,gt=0"` NSFW *bool `` Sort string `` /* 177-byte string literal not displayed */ Page int `validate:"required,gte=1" mod:"default=1"` Limit int `validate:"required,gte=-1" mod:"default=20"` }
GetMangaRequest is get manga request model.
type GetUserMangaRequest ¶
type GetUserMangaRequest struct { Username string `validate:"required" mod:"trim,lcase"` Page int `validate:"required,gte=1" mod:"default=1"` Limit int `validate:"required,gte=-1" mod:"default=20"` }
GetUserMangaRequest is get user manga request model.
type Service ¶
type Service interface { GetManga(ctx context.Context, data GetMangaRequest) ([]manga, *pagination, int, error) GetMangaByID(ctx context.Context, id int64) (*manga, int, error) GetAuthors(ctx context.Context, data GetAuthorsRequest) ([]author, *pagination, int, error) GetAuthorByID(ctx context.Context, id int64) (*author, int, error) GetGenres(ctx context.Context, data GetGenresRequest) ([]genre, *pagination, int, error) GetGenreByID(ctx context.Context, id int64) (*genre, int, error) GetMagazines(ctx context.Context, data GetMagazinesRequest) ([]magazine, *pagination, int, error) GetMagazineByID(ctx context.Context, id int64) (*magazine, int, error) GetUserManga(ctx context.Context, data GetUserMangaRequest) ([]userManga, *pagination, int, error) ConsumeMessage(ctx context.Context, msg entity.Message) error QueueOldReleasingManga(ctx context.Context, limit int) (int, int, error) QueueOldFinishedManga(ctx context.Context, limit int) (int, int, error) QueueOldNotYetManga(ctx context.Context, limit int) (int, int, error) QueueMissingManga(ctx context.Context, limit int) (int, int, error) QueueOldUserManga(ctx context.Context, limit int) (int, int, error) }
Service contains functions for service.
func New ¶
func New( manga mangaRepository.Repository, genre genreRepository.Repository, author authorRepository.Repository, magazine magazineRepository.Repository, userManga userMangaRepository.Repository, mangaStatsHistory mangaStatsHistoryRepository.Repository, emptyID emptyIDRepository.Repository, publisher publisherRepository.Repository, nagato nagatoRepository.Repository, ) Service
New to create new service.
Click to show internal directories.
Click to hide internal directories.