Documentation
¶
Index ¶
- Constants
- func AutoResizeImage(h uint, img image.Image) image.Image
- func DownloadImageFromUrl(name, folder, url string) (image.Image, error)
- func FindBoxArtUrl(title string, isBoxArt bool, serperAPIKey string) (string, error)
- func LoadFonts()
- func LoadIconForName(name string, isBoxArt bool, serperAPIKey string) (image.Image, error)
- func ResizeAndCropImage(w, h uint, img image.Image) image.Image
- func ResizeImage(w, h uint, img image.Image) image.Image
- type BarChartItem
- type MostPlayedByNumGames
- type MostPlayedByPlaytime
- type MostPlayedGame
- type Orientation
- type SaveableDrawing
Constants ¶
View Source
const ( Ratio = 2 W = 540 * Ratio H = 960 * Ratio //BarColor = "#B4F8C8" //BackgroundColor = "#000000" IconColor = "#FFF" BarColor = "#FCA311" BackgroundColor = "#14213D" TitleFontSize = 48 * Ratio BoldFontSize = 20 * Ratio RegularFontSize = 14 * Ratio )
View Source
const ( QueryMostPlayedConsoles = `` /* 270-byte string literal not displayed */ QueryMostPlayedPlatforms = `` /* 359-byte string literal not displayed */ QueryMostPlayedGames = `` /* 475-byte string literal not displayed */ QueryMostPlayedSeries = `` /* 346-byte string literal not displayed */ QueryGamesByStatus = `` /* 224-byte string literal not displayed */ QueryBusiestMonths = `` /* 391-byte string literal not displayed */ )
View Source
const (
AssetsFolder = "./assets/"
)
Variables ¶
This section is empty.
Functions ¶
func DownloadImageFromUrl ¶
func FindBoxArtUrl ¶
func LoadIconForName ¶
Types ¶
type BarChartItem ¶
type MostPlayedByNumGames ¶
type MostPlayedByNumGames struct {
Title string `db:"title" json:"title"`
Playtime float64 `db:"playtime" json:"playtime"`
Count int `db:"count" json:"count"`
}
func (MostPlayedByNumGames) GetMetric ¶
func (mp MostPlayedByNumGames) GetMetric() int
func (MostPlayedByNumGames) GetTitle ¶
func (mp MostPlayedByNumGames) GetTitle() string
func (MostPlayedByNumGames) RenderIcon ¶
func (mp MostPlayedByNumGames) RenderIcon(height uint, serperAPIKey string) image.Image
func (MostPlayedByNumGames) RenderMetric ¶
func (mp MostPlayedByNumGames) RenderMetric() string
type MostPlayedByPlaytime ¶
type MostPlayedByPlaytime struct {
Title string `db:"title" json:"title"`
Playtime float64 `db:"playtime" json:"playtime"`
Count int `db:"count" json:"count"`
NoIcon bool `json:"-"`
}
func (MostPlayedByPlaytime) GetMetric ¶
func (mp MostPlayedByPlaytime) GetMetric() int
func (MostPlayedByPlaytime) GetTitle ¶
func (mp MostPlayedByPlaytime) GetTitle() string
func (MostPlayedByPlaytime) RenderIcon ¶
func (mp MostPlayedByPlaytime) RenderIcon(height uint, serperAPIKey string) image.Image
func (MostPlayedByPlaytime) RenderMetric ¶
func (mp MostPlayedByPlaytime) RenderMetric() string
type MostPlayedGame ¶
type MostPlayedGame struct {
Title string `db:"title" json:"title"`
Platform string `db:"platform" json:"platform"`
Console string `db:"console" json:"console"`
Playtime float64 `db:"playtime" json:"playtime"`
}
func (MostPlayedGame) GetMetric ¶
func (mpg MostPlayedGame) GetMetric() int
func (MostPlayedGame) GetTitle ¶
func (mpg MostPlayedGame) GetTitle() string
func (MostPlayedGame) RenderIcon ¶
func (mpg MostPlayedGame) RenderIcon(height uint, serperAPIKey string) image.Image
func (MostPlayedGame) RenderMetric ¶
func (mpg MostPlayedGame) RenderMetric() string
type Orientation ¶
type Orientation int
const ( Horizontal Orientation = 0 Vertical Orientation = iota )
func (Orientation) String ¶
func (o Orientation) String() string
type SaveableDrawing ¶
func RenderMostPlayedWrapped ¶
func RenderMostPlayedWrapped(title string, data []BarChartItem, n int, orientation Orientation, serperAPIKey string) SaveableDrawing
Click to show internal directories.
Click to hide internal directories.