entity

package
v0.4.18 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AlternativeTitle

type AlternativeTitle struct {
	Synonyms []string
	English  string
	Japanese string
}

AlternativeTitle is entity for alternative title.

type Author

type Author struct {
	ID   int64
	Name string
	Role string
}

Author is entity for author.

type Date

type Date struct {
	Day   int
	Month int
	Year  int
}

Date is entity for date.

type Genre

type Genre struct {
	ID   int64
	Name string
}

Genre is entity for genre.

type GetAllRequest added in v0.2.0

type GetAllRequest struct {
	Mode       SearchMode
	Title      string
	Type       Type
	Status     Status
	StartDate  *time.Time
	EndDate    *time.Time
	AuthorID   int64
	MagazineID int64
	GenreID    int64
	NSFW       *bool
	Sort       string
	Page       int
	Limit      int
}

GetAllRequest is get all request model.

type Magazine

type Magazine struct {
	ID   int64
	Name string
}

Magazine is entity for magazine.

type Manga

type Manga struct {
	ID                int64
	Title             string
	AlternativeTitles AlternativeTitle
	Picture           string
	StartDate         Date
	EndDate           Date
	Synopsis          string
	Background        string
	NSFW              bool
	Type              Type
	Status            Status
	Chapter           int
	Volume            int
	Mean              float64
	Rank              int
	Popularity        int
	Member            int
	Voter             int
	Favorite          int
	Genres            []Genre
	Pictures          []string
	Related           []Related
	Authors           []Author
	Serialization     []Magazine
	UpdatedAt         time.Time
}

Manga is entity for manga.

func MangaFromNagato

func MangaFromNagato(ctx context.Context, manga *nagato.Manga) (*Manga, error)

MangaFromNagato to convert nagato to manga.

type Related struct {
	ID       int64
	Title    string
	Relation Relation
	Picture  string
}

Related is entity for related.

type Relation

type Relation string

Relation is manga relation type.

const (
	RelationSequel             Relation = "SEQUEL"
	RelationPrequel            Relation = "PREQUEL"
	RelationAlternativeSetting Relation = "ALTERNATIVE_SETTING"
	RelationAlternativeVersion Relation = "ALTERNATIVE_VERSION"
	RelationSideStory          Relation = "SIDE_STORY"
	RelationParentStory        Relation = "PARENT_STORY"
	RelationSummary            Relation = "SUMMARY"
	RelationFullStory          Relation = "FULL_STORY"
	RelationSpinOff            Relation = "SPIN_OFF"
	RelationAdaptation         Relation = "ADAPTATION"
	RelationCharacter          Relation = "CHARACTER"
	RelationOther              Relation = "OTHER"
)

Available manga relation.

type SearchMode added in v0.2.0

type SearchMode string

SearchMode is search mode.

const (
	SearchModeAll    SearchMode = "ALL"
	SearchModeSimple SearchMode = "SIMPLE"
)

Available search mode.

type Status

type Status string

Status is manga publishing status.

const (
	StatusFinished     Status = "FINISHED"
	StatusReleasing    Status = "RELEASING"
	StatusNotYet       Status = "NOT_YET"
	StatusHiatus       Status = "HIATUS"
	StatusDiscontinued Status = "DISCONTINUED"
)

Available manga publishing status.

type Type

type Type string

Type is manga type.

const (
	TypeManga      Type = "MANGA"
	TypeNovel      Type = "NOVEL"
	TypeOneShot    Type = "ONE_SHOT"
	TypeDoujinshi  Type = "DOUJINSHI"
	TypeManhwa     Type = "MANHWA"
	TypeManhua     Type = "MANHUA"
	TypeOEL        Type = "OEL"
	TypeLightNovel Type = "LIGHT_NOVEL"
)

Available manga type.

Jump to

Keyboard shortcuts

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