Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AnimeRanking ¶
type AnimeRanking struct {
Completed int `json:"completed"`
Dropped int `json:"dropped"`
TotalDays float64 `json:"totalDays"`
Episodes int `json:"episodes"`
}
AnimeRanking contains anime ranking information for single user. To be used in API response.
type Cache ¶
type Cache struct {
// contains filtered or unexported fields
}
Cache is a main cache container
type Handlers ¶
Handlers contains reference to the database and all handlers
func (*Handlers) GetGlobalStats ¶
func (h *Handlers) GetGlobalStats(w http.ResponseWriter, r *http.Request)
GetGlobalStats returns JSON info about global stats
func (*Handlers) GetUserStats ¶
func (h *Handlers) GetUserStats(w http.ResponseWriter, r *http.Request)
GetUserStats returns JSON info about single user
type MangaRanking ¶
type MangaRanking struct {
Completed int `json:"completed"`
Dropped int `json:"dropped"`
TotalDays float64 `json:"totalDays"`
Chapters int `json:"chapters"`
Volumes int `json:"volumes"`
}
MangaRanking contains manga ranking information for single user. To be used in API response.
type Ranking ¶
type Ranking struct {
Anime AnimeRanking `json:"anime"`
Manga MangaRanking `json:"manga"`
}
Ranking contains ranking information for single user. To be used in API response.
func DBRankingToSchema ¶
DBRankingToSchema maps DB structure into API, JSONable structure
type UserStats ¶
type UserStats struct {
Username string `json:"username"`
Age int `json:"age"`
LastUpdate time.Time `json:"lastUpdate"`
AnimeStats core.AnimeStats `json:"animeStats"`
MangaStats core.MangaStats `json:"mangaStats"`
Ranking Ranking `json:"ranking"`
TotalUsersCount int `json:"totalUsers"`
}
UserStats contains response structure for single user
Click to show internal directories.
Click to hide internal directories.