Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Channel ¶
type Channel struct { Name string `json:"name"` Status Status `json:"status"` Description string `json:"description,omitempty"` Puzzle PuzzleSource `json:"puzzle"` }
Channel is a representation of a channel and the puzzle that is being solved. It can be marshalled to/from JSON.
type Duration ¶
Duration is an aliasing of time.Duration that supports marshalling to/from JSON.
func (Duration) MarshalJSON ¶
func (*Duration) UnmarshalJSON ¶
type FontSize ¶
type FontSize int
FontSize is an enumeration representing the supported sizes of a font. It can be marshalled to/from JSON as well as implements the fmt.Stringer interface for human readability.
func (FontSize) MarshalJSON ¶
func (*FontSize) UnmarshalJSON ¶
type PuzzleSource ¶
type PuzzleSource struct { Publisher string `json:"publisher"` PublishedDate time.Time `json:"published"` }
PuzzleSource is a representation of the source of a puzzle that's being solved. It can be marshalled to/from JSON.
type Status ¶
type Status int
Status is an enumeration representing the supported statuses a channel can be in with respect to solving a puzzle. It can be marshalled to/from JSON as well as implements the fmt.Stringer interface for human readability.
const ( // The channel exists, but a puzzle hasn't yet been selected. StatusCreated Status = iota // A puzzle has been selected, but not yet started. StatusSelected // The channel has a puzzle selected but is paused in its attempt to solve it. StatusPaused // The channel is actively trying to solve the puzzle. StatusSolving // The puzzle that was being solved is complete. StatusComplete )