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) Enabler() board.Enabler
- 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
- 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"` StartEnabled *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"` // contains filtered or unexported fields }
Config ...
type OptionFunc ¶
OptionFunc provides options to the StatBoard that are not exposed in a Config
func WithPrefixCol ¶
func WithPrefixCol(with bool) OptionFunc
WithPrefixCol enables/disables the prefix column in the statboard
func WithTitleRow ¶
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 ¶
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 ¶
GetRPCHandler ...
Click to show internal directories.
Click to hide internal directories.