Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SaveRelations ¶
SaveRelations stores multiple relation in the database
Types ¶
type AnimeStats ¶
type AnimeStats struct { UserID uint `gorm:"primary_key"` UpdatedAt time.Time `json:"-"` InProgress int `json:"inProgress"` Completed int `json:"completed"` OnHold int `json:"onHold"` Dropped int `json:"dropped"` Planned int `json:"planned"` Rewatched int `json:"rewatched"` Days float64 `json:"totalDays"` MeanScore float64 `json:"meanScore"` Episodes int `json:"totalEpisodes"` }
AnimeStats is structure for holding anime statistics
type Configuration ¶
type Configuration struct { Database dbConfig Scraper scraperConfig API apiConfig }
Configuration holds database settings
type GlobalStats ¶
type GlobalStats struct { ID uint `gorm:"primary_key"` UpdatedAt time.Time `json:"-"` Users int BirthYear int Gender string AnimeCompletedSum int AnimeCompletedAvg int AnimeDroppedSum int AnimeDroppedAvg int AnimeDaysSum int AnimeDaysAvg int MangaCompletedSum int MangaCompletedAvg int MangaDroppedSum int MangaDroppedAvg int MangaDaysSum int MangaDaysAvg int }
GlobalStats holds info about ranking for all users grouped by birth year and gender
type MangaStats ¶
type MangaStats struct { UserID uint `gorm:"primary_key"` UpdatedAt time.Time `json:"-"` InProgress int `json:"inProgress"` Completed int `json:"completed"` OnHold int `json:"onHold"` Dropped int `json:"dropped"` Planned int `json:"planned"` Rewatched int `json:"rewatched"` Days float64 `json:"totalDays"` MeanScore float64 `json:"meanScore"` Chapters int `json:"totalChapters"` Volumes int `json:"totalVolumes"` }
MangaStats is structure for holding manga statistics
type Relation ¶
Relation - `from` user having `to` as friend
func NewRelation ¶
NewRelation returns Relation where users are alphabetized
type TemporaryRanking ¶
type TemporaryRanking struct { UserID uint `gorm:"primary_key"` UpdatedAt time.Time `json:"-"` CompletedAnime int CompletedManga int DroppedAnime int DroppedManga int TotalDaysAnime float64 TotalDaysManga float64 EpisodesAnime int ChaptersManga int VolumesManga int }
TemporaryRanking holds info about user's ranking temporarily when table is recreated
type User ¶
type User struct { ID uint `gorm:"primary_key"` CreatedAt time.Time `json:"-"` UpdatedAt time.Time `json:"-"` Username string DisplayName string Birthday pq.NullTime `gorm:"type:date"` Gender string Location string Fetched bool `gorm:"index"` Fetching bool `gorm:"index"` AnimeStats AnimeStats MangaStats MangaStats Ranking Ranking }
User holds info about user and whether they were fetched
Click to show internal directories.
Click to hide internal directories.