Documentation ¶
Index ¶
- type API
- type Config
- type OptionFunc
- type Player
- type Server
- type Sorter
- type StatBoard
- func (s *StatBoard) Clear() error
- func (s *StatBoard) Close() error
- func (s *StatBoard) Disable()
- func (s *StatBoard) Enable()
- func (s *StatBoard) Enabled() bool
- func (s *StatBoard) GetHTTPHandlers() ([]*board.HTTPHandler, error)
- func (s *StatBoard) GetRPCHandler() (string, http.Handler)
- func (s *StatBoard) InBetween() bool
- func (s *StatBoard) Name() string
- func (s *StatBoard) Render(ctx context.Context, canvas board.Canvas) error
- func (s *StatBoard) ScrollMode() bool
- type StringMeasurer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type API ¶
type API interface { FindPlayer(ctx context.Context, firstName string, lastName string) (Player, error) GetPlayer(ctx context.Context, id string) (Player, error) AvailableStats(ctx context.Context, playerCategory string) ([]string, error) StatShortName(stat string) string ListPlayers(ctx context.Context, teamAbbreviation string) ([]Player, error) LeagueShortName() string HTTPPathPrefix() string PlayerCategories() []string }
API ...
type Config ¶
type Config struct { BoardDelay string `json:"boardDelay"` Enabled *atomic.Bool `json:"enabled"` Players []string `json:"players"` Teams []string `json:"teams"` StatOverride map[string][]string `json:"statOverride"` LimitPlayers int `json:"limitPlayers"` UpdateInterval string `json:"updateInterval"` OnTimes []string `json:"onTimes"` OffTimes []string `json:"offTimes"` ScrollMode *atomic.Bool `json:"scrollMode"` // contains filtered or unexported fields }
Config ...
type OptionFunc ¶ added in v0.0.20
OptionFunc provides options to the StatBoard that are not exposed in a Config
func WithPrefixCol ¶ added in v0.0.20
func WithPrefixCol(with bool) OptionFunc
WithPrefixCol enables/disables the prefix column in the statboard
func WithTitleRow ¶ added in v0.0.20
func WithTitleRow(with bool) OptionFunc
WithTitleRow enables/disables the stats title row
type Player ¶
type Player interface { FirstName() string LastName() string GetStat(stat string) string StatColor(stat string) color.Color Position() string GetCategory() string UpdateStats(ctx context.Context) error PrefixCol() string }
Player ...
type Server ¶ added in v0.0.63
type Server struct {
// contains filtered or unexported fields
}
Server ...
type StatBoard ¶
StatBoard ...
func New ¶
func New(ctx context.Context, api API, config *Config, logger *zap.Logger, opts ...OptionFunc) (*StatBoard, error)
New ...
func (*StatBoard) GetHTTPHandlers ¶
func (s *StatBoard) GetHTTPHandlers() ([]*board.HTTPHandler, error)
GetHTTPHandlers ...
func (*StatBoard) GetRPCHandler ¶ added in v0.0.63
GetRPCHandler ...
func (*StatBoard) ScrollMode ¶ added in v0.0.29
ScrollMode ...
Click to show internal directories.
Click to hide internal directories.