racingboard

package
v0.0.86 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 25, 2022 License: GPL-3.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API interface {
	LeagueShortName() string
	GetScheduledEvents(ctx context.Context) ([]*Event, error)
	HTTPPathPrefix() string
}

API ...

type Config

type Config struct {
	TodayFunc Todayer

	Enabled            *atomic.Bool `json:"enabled"`
	BoardDelay         string       `json:"boardDelay"`
	ScrollMode         *atomic.Bool `json:"scrollMode"`
	ScrollDelay        string       `json:"scrollDelay"`
	OnTimes            []string     `json:"onTimes"`
	OffTimes           []string     `json:"offTimes"`
	TightScrollPadding int          `json:"tightScrollPadding"`
	// contains filtered or unexported fields
}

Config ...

func (*Config) SetDefaults

func (c *Config) SetDefaults()

SetDefaults sets config defaults

type Event

type Event struct {
	Date time.Time
	Name string
}

Event ...

type RacingBoard

type RacingBoard struct {
	// contains filtered or unexported fields
}

RacingBoard implements board.Board

func New

func New(api API, logger *zap.Logger, config *Config) (*RacingBoard, error)

New ...

func (*RacingBoard) Disable

func (s *RacingBoard) Disable() bool

Disable ...

func (*RacingBoard) Enable

func (s *RacingBoard) Enable() bool

Enable ...

func (*RacingBoard) Enabled

func (s *RacingBoard) Enabled() bool

Enabled ...

func (*RacingBoard) GetHTTPHandlers

func (s *RacingBoard) GetHTTPHandlers() ([]*board.HTTPHandler, error)

GetHTTPHandlers ...

func (*RacingBoard) GetRPCHandler

func (s *RacingBoard) GetRPCHandler() (string, http.Handler)

GetRPCHandler ...

func (*RacingBoard) HasPriority

func (s *RacingBoard) HasPriority() bool

HasPriority ...

func (*RacingBoard) InBetween

func (s *RacingBoard) InBetween() bool

InBetween ...

func (*RacingBoard) Name

func (s *RacingBoard) Name() string

Name ...

func (*RacingBoard) Render

func (s *RacingBoard) Render(ctx context.Context, canvas board.Canvas) error

Render ...

func (*RacingBoard) ScrollMode

func (s *RacingBoard) ScrollMode() bool

ScrollMode ...

func (*RacingBoard) ScrollRender added in v0.0.83

func (s *RacingBoard) ScrollRender(ctx context.Context, canvas board.Canvas, padding int) (board.Canvas, error)

ScrollRender ...

func (*RacingBoard) SetStateChangeNotifier added in v0.0.83

func (s *RacingBoard) SetStateChangeNotifier(st board.StateChangeNotifier)

SetStateChangeNotifier ...

type Server

type Server struct {
	// contains filtered or unexported fields
}

Server ...

func (*Server) GetStatus

func (s *Server) GetStatus(ctx context.Context, req *emptypb.Empty) (*pb.StatusResp, error)

GetStatus ...

func (*Server) SetStatus

func (s *Server) SetStatus(ctx context.Context, req *pb.SetStatusReq) (*emptypb.Empty, error)

SetStatus ...

type Todayer

type Todayer func() []time.Time

Todayer is a func that returns a string representing a date that will be used for determining "Today's" games. This is useful in testing what past days looked like

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL