Documentation ¶
Index ¶
- type API
- type Config
- type FontConfig
- type Game
- type SportBoard
- func (s *SportBoard) Disable()
- func (s *SportBoard) Enable()
- func (s *SportBoard) Enabled() bool
- func (s *SportBoard) GetHTTPHandlers() ([]*board.HTTPHandler, error)
- func (s *SportBoard) GridSize(bounds image.Rectangle) (int, int)
- func (s *SportBoard) HasPriority() bool
- func (s *SportBoard) Name() string
- func (s *SportBoard) Render(ctx context.Context, canvas board.Canvas) error
- func (s *SportBoard) RenderGameCounter(canvas board.Canvas, numGames int, activeIndex int) (image.Image, error)
- func (s *SportBoard) RenderLeftLogo(ctx context.Context, canvasBounds image.Rectangle, abbreviation string) (image.Image, error)
- func (s *SportBoard) RenderRightLogo(ctx context.Context, canvasBounds image.Rectangle, abbreviation string) (image.Image, error)
- func (s *SportBoard) ScrollMode() bool
- type Team
- type Todayer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type API ¶
type API interface { GetTeams(ctx context.Context) ([]Team, error) TeamFromAbbreviation(ctx context.Context, abbreviation string) (Team, error) GetScheduledGames(ctx context.Context, date time.Time) ([]Game, error) DateStr(d time.Time) string League() string HTTPPathPrefix() string GetLogo(ctx context.Context, logoKey string, logoConf *logo.Config, bounds image.Rectangle) (*logo.Logo, error) AllTeamAbbreviations() []string GetWatchTeams(teams []string) []string TeamRecord(ctx context.Context, team Team) string TeamRank(ctx context.Context, team Team) string CacheClear(ctx context.Context) }
API ...
type Config ¶
type Config struct { TodayFunc Todayer TimeColor color.Color ScoreColor color.Color Enabled *atomic.Bool `json:"enabled"` BoardDelay string `json:"boardDelay"` FavoriteSticky *atomic.Bool `json:"favoriteSticky"` ScoreFont *FontConfig `json:"scoreFont"` TimeFont *FontConfig `json:"timeFont"` LogoConfigs []*logo.Config `json:"logoConfigs"` WatchTeams []string `json:"watchTeams"` FavoriteTeams []string `json:"favoriteTeams"` HideFavoriteScore *atomic.Bool `json:"hideFavoriteScore"` ShowRecord *atomic.Bool `json:"showRecord"` GridCols int `json:"gridCols"` GridRows int `json:"gridRows"` GridPadRatio float64 `json:"gridPadRatio"` MinimumGridWidth int `json:"minimumGridWidth"` MinimumGridHeight int `json:"minimumGridHeight"` Stats *statboard.Config `json:"stats"` ScrollMode *atomic.Bool `json:"scrollMode"` TightScroll *atomic.Bool `json:"tightScroll"` TightScrollPadding int `json:"tightScrollPadding"` ScrollDelay string `json:"scrollDelay"` // contains filtered or unexported fields }
Config ...
type FontConfig ¶
FontConfig ...
type Game ¶
type Game interface { GetID() int GetLink() (string, error) IsLive() (bool, error) IsComplete() (bool, error) IsPostponed() (bool, error) HomeTeam() (Team, error) AwayTeam() (Team, error) GetQuarter() (string, error) // Or a period, inning GetClock() (string, error) GetUpdate(ctx context.Context) (Game, error) GetStartTime(ctx context.Context) (time.Time, error) }
Game ...
type SportBoard ¶
SportBoard implements board.Board
func New ¶
func New(ctx context.Context, api API, bounds image.Rectangle, logger *zap.Logger, config *Config) (*SportBoard, error)
New ...
func (*SportBoard) GetHTTPHandlers ¶
func (s *SportBoard) GetHTTPHandlers() ([]*board.HTTPHandler, error)
GetHTTPHandlers ...
func (*SportBoard) GridSize ¶ added in v0.0.14
func (s *SportBoard) GridSize(bounds image.Rectangle) (int, int)
GridSize returns the column width and row height for a grid layout. 0 is returned for both if the canvas is too small for a grid.
func (*SportBoard) RenderGameCounter ¶
func (s *SportBoard) RenderGameCounter(canvas board.Canvas, numGames int, activeIndex int) (image.Image, error)
RenderGameCounter ...
func (*SportBoard) RenderLeftLogo ¶ added in v0.0.36
func (s *SportBoard) RenderLeftLogo(ctx context.Context, canvasBounds image.Rectangle, abbreviation string) (image.Image, error)
RenderLeftLogo ...
func (*SportBoard) RenderRightLogo ¶ added in v0.0.36
func (s *SportBoard) RenderRightLogo(ctx context.Context, canvasBounds image.Rectangle, abbreviation string) (image.Image, error)
RenderRightLogo ...
func (*SportBoard) ScrollMode ¶ added in v0.0.29
func (s *SportBoard) ScrollMode() bool
ScrollMode ...
Source Files ¶
Click to show internal directories.
Click to hide internal directories.