Documentation ¶
Index ¶
- type Saver
- func (s *Saver) Anime(id int)
- func (s *Saver) Character(id int)
- func (s *Saver) CreateSchema() error
- func (s *Saver) CreateTable(model interface{}) error
- func (s *Saver) FillGenre() error
- func (s *Saver) FillMaster() error
- func (s *Saver) FillProducerMagazine() error
- func (s *Saver) ForceAnime(id int)
- func (s *Saver) ForceCharacter(id int)
- func (s *Saver) ForceManga(id int)
- func (s *Saver) ForcePeople(id int)
- func (s *Saver) GetExistingTables() (tables []string)
- func (s *Saver) GetStructTableName(model interface{}) string
- func (s *Saver) GetTables() (tables []interface{})
- func (s *Saver) Init() error
- func (s *Saver) IsEmptyEntry(t string, id int) bool
- func (s *Saver) IsSchemaExist() (isExist bool)
- func (s *Saver) Log(logType string, text ...string)
- func (s *Saver) Manga(id int)
- func (s *Saver) People(id int)
- func (s *Saver) RunQueue(breakTime ...int)
- func (s *Saver) ValidateDB() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Saver ¶
type Saver struct { MalService *malscraper.MalService Config config.Config DB *gorm.DB // Cache master table values. // To prevent re-querying to db. Producer map[int]string Magazine map[int]string Genre map[string]map[int]string Status map[string]map[int]string Type map[string]map[int]string Language map[int]string Position map[int]string Rating map[int]string Related map[int]string Source map[int]string // Queued queue that will be inserted to queue table. // Value: `type-id`. Queue []string }
Saver is base model for malkeeper saver.
func (*Saver) Anime ¶
Anime to parse and save anime and its related entries (anime/manga/character/people).
func (*Saver) Character ¶
Character to parse and save character and its related entries (anime/manga/character/people).
func (*Saver) CreateSchema ¶
CreateSchema to create new schema.
func (*Saver) CreateTable ¶
CreateTable to create table.
func (*Saver) FillProducerMagazine ¶
FillProducerMagazine to re-fill producer_magazine master tables.
func (*Saver) ForceAnime ¶
ForceAnime to force re-parse and save anime and its related entries (anime/manga/character/people).
func (*Saver) ForceCharacter ¶
ForceCharacter to force re-parse and save character and its related entries (anime/manga/character/people).
func (*Saver) ForceManga ¶
ForceManga to force re-parse and save manga and its related entries (anime/manga/character/people).
func (*Saver) ForcePeople ¶
ForcePeople to force re-parse and save people and its related entries (anime/manga/character/people).
func (*Saver) GetExistingTables ¶
GetExistingTables to get existing tables.
func (*Saver) GetStructTableName ¶
GetStructTableName to get table name of the struct (model).
func (*Saver) GetTables ¶
func (s *Saver) GetTables() (tables []interface{})
GetTables to get all tables (model) used by malkeeper.
func (*Saver) IsEmptyEntry ¶
IsEmptyEntry to check if entry is an empty MyAnimeList entry.
func (*Saver) IsSchemaExist ¶
IsSchemaExist to check if schema exists.
func (*Saver) Manga ¶
Manga to parse and save manga and its related entries (anime/manga/character/people).
func (*Saver) People ¶
People to parse and save people and its related entries (anime/manga/character/people).
func (*Saver) ValidateDB ¶
ValidateDB to validate malkeeper database.