cli

package
v0.0.0-...-531a2f0 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2022 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Up byte = 65 + iota
	Down
	Right
	Left
)

Arrows

Variables

This section is empty.

Functions

func ConnectedClient

func ConnectedClient(ctx context.Context, addr string, logger chromecast.Logger) (*client.Client, error)

ConnectedClient will create a client and keep it connected

func FirstClientWithStatus

func FirstClientWithStatus(ctx context.Context, logger chromecast.Logger, matchers ...discovery.DeviceMatcher) (chromecast.Client, chromecast.Status, error)

FirstClientWithStatus find a device, connects a client and get its status (and is verbose)

func ReadStdinKeyPresses

func ReadStdinKeyPresses(ctx context.Context, out chan<- KeyPress)

Types

type KeyPress

type KeyPress struct {
	Type KeyType
	Key  byte
}

KeyPress represents a typed key

type KeyType

type KeyType int

KeyType represent a class of keypress

const (
	LowerCaseLetter KeyType = iota
	UpperCaseLetter
	Arrow
	SpaceBar
	Escape
	Unsupported
)

KeyTypes

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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