output

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Unknown = "unknown"
)

Variables

View Source
var ErrUnmarshalNil = errors.New("can't unmarshal a nil value")

Functions

This section is empty.

Types

type Component

type Component int8
const (
	ComponentUnknown Component = iota
	ComponentEventInfo
	ComponentEventCars
	ComponentEventCarLaps
)

func ParseComponent

func ParseComponent(text string) (Component, error)

func (Component) MarshalText

func (c Component) MarshalText() ([]byte, error)

func (Component) String

func (c Component) String() string

func (*Component) UnmarshalText

func (c *Component) UnmarshalText(text []byte) error

type EventOutput

type EventOutput interface {
	Output()
}

func NewEventOutput

func NewEventOutput(eventData *eventv1.GetEventResponse, opts ...Option) EventOutput

type EventOutputConfig

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

type Format

type Format int8
const (
	FormatText Format = iota
	FormatJSON
)

func ParseFormat

func ParseFormat(text string) (Format, error)

func (Format) MarshalText

func (f Format) MarshalText() ([]byte, error)

func (Format) String

func (f Format) String() string

func (*Format) UnmarshalText

func (f *Format) UnmarshalText(text []byte) error

type Option

type Option func(*EventOutputConfig)

func WithCarNumFilter

func WithCarNumFilter(carNumFilter []string) Option

func WithComponents

func WithComponents(comps []Component) Option

func WithFormat

func WithFormat(f Format) Option

Jump to

Keyboard shortcuts

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