Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
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 Manga ¶
type Manga struct { ID int64 `json:"id"` Title string `json:"title"` AlternativeTitles alternativeTitles `json:"alternative_titles"` Picture string `json:"picture"` StartDate date `json:"start_date"` EndDate date `json:"end_date"` Synopsis string `json:"synopsis"` Background string `json:"background"` NSFW bool `json:"nsfw"` Type entity.Type `json:"type" swaggertype:"string"` Status entity.Status `json:"status" swaggertype:"string"` Chapter int `json:"chapter"` Volume int `json:"volume"` Mean float64 `json:"mean"` Rank int `json:"rank"` Popularity int `json:"popularity"` Member int `json:"member"` Voter int `json:"voter"` Genres []genre `json:"genres"` Pictures []string `json:"pictures"` Related []related `json:"related"` Authors []author `json:"authors"` Serialization []magazine `json:"serialization"` UpdatedAt time.Time `json:"updated_at"` }
Manga is manga model.
type Pagination ¶
Pagination is pagination model.
type Service ¶
type Service interface { GetMangaByID(ctx context.Context, id int64) (*Manga, 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.
type UserManga ¶
type UserManga struct { MangaID int64 `json:"manga_id"` Title string `json:"title"` Status entity.Status `json:"status" swaggertype:"string"` Score int `json:"score"` Chapter int `json:"chapter"` Volume int `json:"volume"` Tags []string `json:"tags"` Comment string `json:"comment"` UpdatedAt time.Time `json:"updated_at"` }
UserManga is user manga model.
Click to show internal directories.
Click to hide internal directories.