tmo

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultTimeout = 15 * time.Second

	HeaderUserAgent      = "Mozilla/5.0 (Windows NT 10.0; rv:111.0) Gecko/20100101 Firefox/111.0"
	HeaderAccept         = "application/json"
	HeaderAcceptLanguage = "en-US,en;q=0.5"
	HeaderAcceptEncoding = "gzip, deflate"
	HeaderContentType    = "application/x-www-form-urlencoded"
	HeaderConnection     = "keep-alive"

	URIFastmile = "fastmile_radio_status_web_app.cgi"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Trashcan added in v0.0.3

type Trashcan struct {
	Hostname string
	// contains filtered or unexported fields
}

Trashcan defines some methods for interacting with the tmo trashcan

func NewTrashcan added in v0.0.3

func NewTrashcan(hostname string, timeout time.Duration) (*Trashcan, error)

NewTrashcan returns a configured Trashcan client

func (*Trashcan) FetchRadioStatus added in v0.0.3

func (t *Trashcan) FetchRadioStatus() (*models.FastmileRadioStatus, error)

FetchRadioStatus fetches the radio status cgi page and returns a payload of radio data

func (*Trashcan) FetchRadioStatusAsync added in v0.0.3

func (t *Trashcan) FetchRadioStatusAsync(wg *sync.WaitGroup, ret chan<- *models.FastmileReturn)

FetchRadioStatusAsync is for running in a goroutine, calls FetchRadioStatus

Jump to

Keyboard shortcuts

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