Version: v0.17.0 Latest Latest

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

Go to latest
Published: Oct 22, 2020 License: MIT Imports: 2 Imported by: 0




View Source
const (
	// OpeningSong is opening song type.
	OpeningSong = 1
	// EndingSong is ending song type.
	EndingSong = 2


View Source
var DefaultLanguage = map[int]string{
	1:  "Japanese",
	2:  "English",
	3:  "Korean",
	4:  "Spanish",
	5:  "German",
	6:  "French",
	7:  "Brazilian",
	8:  "Italian",
	9:  "Hungarian",
	10: "Hebrew",
	11: "Mandarin",

DefaultLanguage is list of voice actor language options.

View Source
var DefaultPosition = map[int]string{
	2:  "Director",
	3:  "Script",
	4:  "Storyboard",
	5:  "Episode Director",
	6:  "Music",
	7:  "Original Creator",
	8:  "Original Character Design",
	9:  "Creator",
	10: "Character Design",
	11: "Art Director",
	12: "Chief Animation Director",
	13: "Animation Director",
	14: "Mechanical Design",
	15: "Director of Photography",
	16: "Executive Producer",
	17: "2nd Key Animation",
	18: "Animation Check",
	19: "Assistant Director",
	20: "Associate Producer",
	21: "Background Art",
	22: "Color Design",
	23: "Color Setting",
	24: "Digital Paint",
	25: "Editing",
	26: "In-Between Animation",
	27: "Key Animation",
	28: "Online Editing Supervision",
	29: "Online Editor",
	30: "Planning",
	31: "Planning Producer",
	32: "Production Manager",
	33: "Publicity",
	34: "Recording",
	35: "Recording Assistant",
	36: "Series Production Director",
	37: "Setting",
	38: "Setting Manager",
	39: "Sound Director",
	40: "Sound Effects",
	41: "Sound Manager",
	42: "Special Effects",
	43: "Theme Song Arrangement",
	44: "Theme Song Composition",
	45: "Theme Song Lyrics",
	46: "Theme Song Performance",
	47: "ADR Director",
	48: "Co-Director",
	50: "Assistant Producer",
	51: "Producer",
	52: "Assistant Engineer",
	53: "Assistant Production Coordinat",
	54: "Associate Casting Director",
	55: "Casting Director",
	56: "Chief Producer",
	57: "Co-Producer",
	58: "Dialogue Editing",
	59: "Inserted Song Performance",
	60: "Post-Production Assistant",
	61: "Production Assistant",
	62: "Production Coordination",
	64: "Re-Recording Mixing",
	65: "Recording Engineer",
	66: "Sound Supervisor",
	67: "Spotting",
	68: "Assistant Animation Director",
	69: "Principle Drawing",
	70: "Layout",
	71: "Screenplay",
	72: "Series Composition",

	101: "Story & Art",
	102: "Story",
	103: "Art",

DefaultPosition is list of anime staff position options.

View Source
var DefaultRating = map[int]string{
	1: "G - All Ages",
	2: "PG - Children",
	3: "PG-13 - Teens 13 or Older",
	4: "R - 17+ (violence & profanity)",
	5: "R+ - Mild Nudity",
	6: "Rx - Hentai",

DefaultRating is list of anime rating options.

View Source
var DefaultRelated = map[int]string{
	1:  "sequel",
	2:  "prequel",
	3:  "alternative setting",
	4:  "alternative version",
	6:  "side story",
	7:  "summary",
	8:  "full story",
	9:  "parent story",
	10: "spin-off",
	11: "adaptation",
	12: "character",
	13: "other",

DefaultRelated is list of anime & mnaga related type options.

View Source
var DefaultSource = map[int]string{
	1:  "Original",
	2:  "Manga",
	3:  "4-koma Manga",
	4:  "Web Manga",
	5:  "Digital Manga",
	6:  "Novel",
	7:  "Light Novel",
	8:  "Visual Novel",
	9:  "Game",
	10: "Card Game",
	11: "Book",
	12: "Picture Book",
	13: "Radio",
	14: "Music",

DefaultSource is list of anime source options.

View Source
var DefaultStatus = map[string]map[int]string{
	constant.AnimeType: {
		1: "Currently Airing",
		2: "Finished Airing",
		3: "Not yet aired",
	constant.MangaType: {
		1: "Publishing",
		2: "Finished",
		3: "Not yet published",
		4: "On Hiatus",
		5: "Discontinued",

DefaultStatus is list of anime & manga status options.

View Source
var DefaultType = map[string]map[int]string{
	constant.AnimeType: {
		1: "TV",
		2: "OVA",
		3: "Movie",
		4: "Special",
		5: "ONA",
		6: "Music",
	constant.MangaType: {
		1: "Manga",
		2: "Novel",
		3: "One-shot",
		4: "Doujinshi",
		5: "Manhwa",
		6: "Manhua",
		7: "OEL",

DefaultType is list of anime & manga type options.


This section is empty.


type Anime

type Anime struct {
	ID            int       `gorm:"primary_key;type:serial"`
	MalID         int       `gorm:"primary_key;auto_increment:false"`
	Title         string    `gorm:"type:varchar;not null"`
	TitleEN       string    `gorm:"type:varchar"`
	TitleJP       string    `gorm:"type:varchar"`
	TitleSynonym  string    `gorm:"type:varchar"`
	CoverURL      string    `gorm:"type:varchar"`
	VideoURL      string    `gorm:"type:varchar"`
	Synopsis      string    `gorm:"type:text"`
	Score         float64   `gorm:"type:numeric"`
	Voter         int       `gorm:"type:int"`
	Rank          int       `gorm:"type:int"`
	Popularity    int       `gorm:"type:int"`
	Member        int       `gorm:"type:int"`
	Favorite      int       `gorm:"type:int"`
	AnimeTypeID   int       `gorm:"type:int"`
	Episode       int       `gorm:"type:int"`
	AnimeStatusID int       `gorm:"type:int"`
	AiringStart   time.Time `gorm:"type:date"`
	AiringEnd     time.Time `gorm:"type:date"`
	AiringDay     string    `gorm:"type:varchar"`
	AiringTime    time.Time `gorm:"type:time"`
	Premiered     string    `gorm:"type:varchar"`
	AnimeSourceID int       `gorm:"type:int"`
	Duration      int       `gorm:"type:int"`
	AnimeRatingID int       `gorm:"type:int"`
	CreatedAt     time.Time `gorm:"type:timestamp"`
	UpdatedAt     time.Time `gorm:"type:timestamp"`

Anime is model for anime table.

type AnimeCharacter

type AnimeCharacter struct {
	AnimeMalID     int    `gorm:"primary_key;type:int"`
	CharacterMalID int    `gorm:"primary_key;type:int"`
	PeopleMalID    int    `gorm:"primary_key;type:int"`
	Role           string `gorm:"type:varchar"` // Main/Supporting
	LanguageID     int    `gorm:"type:int"`

AnimeCharacter is model for anime_character table containing relation between anime, character, people (voice actor) and language.

type AnimeProducer

type AnimeProducer struct {
	AnimeMalID    int  `gorm:"primary_key;type:int"`
	ProducerMalID int  `gorm:"primary_key;type:int"`
	IsLicensor    bool `gorm:"type:bool;default:false"`
	IsStudio      bool `gorm:"type:bool;default:false"`

AnimeProducer is many-to-many relation model between anime and producer.

type AnimeStaff

type AnimeStaff struct {
	AnimeMalID  int `gorm:"primary_key;type:int"`
	PeopleMalID int `gorm:"primary_key;type:int"`
	PositionID  int `gorm:"primary_key;type:int"`

AnimeStaff is model for anime_staff table containing relation between anime, staff, and position.

type Character

type Character struct {
	ID        int       `gorm:"primary_key;type:serial"`
	MalID     int       `gorm:"primary_key;auto_increment:false"`
	Name      string    `gorm:"type:varchar;not null"`
	Nickname  string    `gorm:"type:varchar"`
	KanjiName string    `gorm:"type:varchar"`
	ImageURL  string    `gorm:"type:varchar"`
	Favorite  int       `gorm:"type:int"`
	About     string    `gorm:"type:text"`
	CreatedAt time.Time `gorm:"type:timestamp"`
	UpdatedAt time.Time `gorm:"type:timestamp"`

Character is model for character table.

type CharacterPeople

type CharacterPeople struct {
	CharacterMalID int `gorm:"primary_key;type:int"`
	PeopleMalID    int `gorm:"primary_key;type:int"`
	LanguageID     int `gorm:"primary_key;type:int"`

CharacterPeople is model for character_people table containing relation between character and voice actor.

type EmptyID

type EmptyID struct {
	Type  string `gorm:"primary_key;type:varchar"`
	MalID int    `gorm:"primary_key;type:int"`

EmptyID is model for empty_id table containing empty MyAnimeList entry id.

type Genre

type Genre struct {
	MalID int    `gorm:"primary_key;type:int"`
	Type  string `gorm:"primary_key;type:varchar"`
	Genre string `gorm:"type:varchar"`

Genre is model for genre table containing anime & manga complete genre list.

type Language

type Language struct {
	ID       int    `gorm:"primary_key"`
	Language string `gorm:"type:varchar"`

Language is model for language table containing voice actor language constant values.

type Manga

type Manga struct {
	ID              int       `gorm:"primary_key;type:serial"`
	MalID           int       `gorm:"primary_key;auto_increment:false"`
	Title           string    `gorm:"type:varchar;not null"`
	TitleEN         string    `gorm:"type:varchar"`
	TitleJP         string    `gorm:"type:varchar"`
	TitleSynonym    string    `gorm:"type:varchar"`
	CoverURL        string    `gorm:"type:varchar"`
	Synopsis        string    `gorm:"type:text"`
	Score           float64   `gorm:"type:numeric"`
	Voter           int       `gorm:"type:int"`
	Rank            int       `gorm:"type:int"`
	Popularity      int       `gorm:"type:int"`
	Member          int       `gorm:"type:int"`
	Favorite        int       `gorm:"type:int"`
	MangaTypeID     int       `gorm:"type:int"`
	Volume          int       `gorm:"type:int"`
	Chapter         int       `gorm:"type:int"`
	MangaStatusID   int       `gorm:"type:int"`
	PublishingStart time.Time `gorm:"type:date"`
	PublishingEnd   time.Time `gorm:"type:date"`
	CreatedAt       time.Time `gorm:"type:timestamp"`
	UpdatedAt       time.Time `gorm:"type:timestamp"`

Manga is model for manga table.

type MangaCharacter

type MangaCharacter struct {
	MangaMalID     int    `gorm:"primary_key;type:int"`
	CharacterMalID int    `gorm:"primary_key;type:int"`
	Role           string `gorm:"type:varchar"`

MangaCharacter is model for manga_character table containing manga and character relation.

type MangaMagazine

type MangaMagazine struct {
	MangaMalID    int `gorm:"primary_key;type:int"`
	MagazineMalID int `gorm:"primary_key;type:int"`

MangaMagazine is model for manga_magazine table containing manga and magazine (serialization) relation.

type MediaGenre

type MediaGenre struct {
	MediaMalID int    `gorm:"primary_key;type:int"`
	GenreMalID int    `gorm:"primary_key;type:int"`
	Type       string `gorm:"primary_key;type:varchar"`

MediaGenre is model for media_genre table containing relation between anime/manga and genre.

type MediaRelated

type MediaRelated struct {
	MalID         int    `gorm:"primary_key;type:int"`
	Type          string `gorm:"primary_key;type:varchar"`
	RelatedTypeID int    `gorm:"primary_key;type:int"`
	RelatedMalID  int    `gorm:"primary_key;type:int"`
	RelatedType   string `gorm:"primary_key;type:varchar"`

MediaRelated is model for related table containing relation between related anime & manga.

type People

type People struct {
	ID              int       `gorm:"primary_key;type:serial"`
	MalID           int       `gorm:"primary_key;auto_increment:false"`
	Name            string    `gorm:"type:varchar;not null"`
	GivenName       string    `gorm:"type:varchar"`
	FamilyName      string    `gorm:"type:varchar"`
	AlternativeName string    `gorm:"type:varchar"`
	ImageURL        string    `gorm:"type:varchar"`
	Birthday        time.Time `gorm:"type:date"`
	Website         string    `gorm:"type:varchar"`
	Favorite        int       `gorm:"type:int"`
	More            string    `gorm:"type:text"`
	CreatedAt       time.Time `gorm:"type:timestamp"`
	UpdatedAt       time.Time `gorm:"type:timestamp"`

People is model for people table.

type PeopleManga

type PeopleManga struct {
	PeopleMalID int `gorm:"primary_key;type:int"`
	MangaMalID  int `gorm:"primary_key;type:int"`
	PositionID  int `gorm:"primary_key;type:int"`

PeopleManga is model for people_manga table.

type Position

type Position struct {
	ID       int    `gorm:"primary_key"`
	Position string `gorm:"type:varchar"`

Position is model for position table containing anime staff position constant values.

type ProducerMagazine

type ProducerMagazine struct {
	MalID int    `gorm:"primary_key;type:int"`
	Name  string `gorm:"type:varchar"`
	Type  string `gorm:"primary_key;type:varchar"`

ProducerMagazine is model for producer_magazine table containing all anime producers and manga magazines.

type Queue

type Queue struct {
	ID    int    `gorm:"primary_type"`
	MalID int    `gorm:"primary_type;type:int"`
	Type  string `gorm:"primary_type;type:varchar"`

Queue is model for queue table containing queued entry that will be parsed and saved to db.

type Rating

type Rating struct {
	ID          int    `gorm:"primary_key"`
	Rating      string `gorm:"type:varchar"`
	Description string `gorm:"type:varchar"`

Rating is model for anime_rating table containing anime rating constant values.

type Related struct {
	ID      int    `gorm:"primary_key"`
	Related string `gorm:"type:varchar"`

Related is model for related_type table containing anime && manga related type constant values.

type Song

type Song struct {
	ID         int    `gorm:"primary_key"`
	AnimeMalID int    `gorm:"primary_key;type:int"`
	Type       int    `gorm:"primary_key;type:int"`
	Song       string `gorm:"type:varchar"`

Song is model for song table.

type Source

type Source struct {
	ID     int    `gorm:"primary_key"`
	Source string `gorm:"type:varchar"`

Source is model for anime_source table containing anime source constant values.

type Stats

type Stats struct {
	MalID     int    `gorm:"primary_key;type:int"`
	Type      string `gorm:"primary_key;type:varchar"`
	Current   int    `gorm:"type:int"`
	Completed int    `gorm:"type:int"`
	OnHold    int    `gorm:"type:int"`
	Dropped   int    `gorm:"type:int"`
	Planned   int    `gorm:"type:int"`
	Score1    int    `gorm:"column:score_1"`
	Score2    int    `gorm:"column:score_2"`
	Score3    int    `gorm:"column:score_3"`
	Score4    int    `gorm:"column:score_4"`
	Score5    int    `gorm:"column:score_5"`
	Score6    int    `gorm:"column:score_6"`
	Score7    int    `gorm:"column:score_7"`
	Score8    int    `gorm:"column:score_8"`
	Score9    int    `gorm:"column:score_9"`
	Score10   int    `gorm:"column:score_10"`

Stats is model for stats table containing anime & manga progress count and score.

type StatsHistory added in v0.17.0

type StatsHistory struct {
	ID         int       `gorm:"primary_key;type:serial"`
	MalID      int       `gorm:"primary_key;type:int;auto_increment:false"`
	Type       string    `gorm:"primary_key;type:varchar"`
	Score      float64   `gorm:"type:numeric"`
	Voter      int       `gorm:"type:int"`
	Rank       int       `gorm:"type:int"`
	Popularity int       `gorm:"type:int"`
	Member     int       `gorm:"type:int"`
	Favorite   int       `gorm:"type:int"`
	CreatedAt  time.Time `gorm:"type:timestamp"`

StatsHistory is model for history of entries stats.

type Status

type Status struct {
	ID   int    `gorm:"primary_key;type:int"`
	Name string `gorm:"type:varchar"`
	Type string `gorm:"primary_key;type:varchar"` // anime/manga

Status is model for status table containing anime & manga status constant value.

type Type

type Type struct {
	ID   int    `gorm:"primary_key;type:int"`
	Name string `gorm:"type:varchar"`
	Type string `gorm:"primary_key;type:varchar"` // anime/manga

Type is model for type table containing anime & manga type constant value.

type User added in v0.17.0

type User struct {
	Username  string    `gorm:"type:varchar;primary_key"`
	Image     string    `gorm:"type:varchar"`
	Queue     bool      `gorm:"type:bool;default:false"`
	CreatedAt time.Time `gorm:"type:timestamp"`
	UpdatedAt time.Time `gorm:"type:timestamp"`

User is model for user table.

type UserMedia added in v0.17.0

type UserMedia struct {
	Username string    `gorm:"type:varchar"`
	MalID    int       `gorm:"type:int"`
	Type     string    `gorm:"type:varchar"`
	Status   int       `gorm:"type:int"`
	Score    int       `gorm:"type:int"`
	Progress int       `gorm:"type:int"`
	Start    time.Time `gorm:"type:timestamp"`
	End      time.Time `gorm:"type:timestamp"`

UserMedia is model for user_media table.

Jump to

Keyboard shortcuts

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