pkg

package
v0.0.0-...-6e3278d Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2023 License: Unlicense Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	LGTVShutDowner struct {
		TVInfos struct {
			Ip        string `yaml:"ip"`
			Mac       string `yaml:"mac"`
			ClientKey string `yaml:"clientKey"`
		} `yaml:"TVInfos"`
	} `yaml:"LGTVShutDowner"`
}

type Lsd

type Lsd struct {
	Config         *Config
	ConfigPath     string
	TrayMenu       *TrayMenu
	Ws             *Ws
	TVConnected    bool
	SigChann       chan os.Signal
	ExitChann      chan bool
	ConfigFilePath string
}

func CreateLsd

func CreateLsd(cmd string, cfg string) *Lsd

func (*Lsd) Close

func (lsd *Lsd) Close()

func (*Lsd) ConnectScreen

func (lsd *Lsd) ConnectScreen()

func (*Lsd) CreateWs

func (lsd *Lsd) CreateWs() error

func (*Lsd) GetAPIList

func (lsd *Lsd) GetAPIList()

func (*Lsd) GetIcon

func (lsd *Lsd) GetIcon() []byte

func (*Lsd) GetTrayMenuItems

func (lsd *Lsd) GetTrayMenuItems() *TrayMenu

func (*Lsd) HandleSig

func (lsd *Lsd) HandleSig(sig os.Signal)

func (*Lsd) HandleWsMsg

func (lsd *Lsd) HandleWsMsg(b []byte)

func (*Lsd) InitTray

func (lsd *Lsd) InitTray(cmd string) func()

func (*Lsd) ListenClick

func (lsd *Lsd) ListenClick()

func (*Lsd) ListenSig

func (lsd *Lsd) ListenSig()

func (*Lsd) ListenWs

func (lsd *Lsd) ListenWs()

func (*Lsd) LoadConfig

func (lsd *Lsd) LoadConfig()

func (*Lsd) PingScreen

func (lsd *Lsd) PingScreen()

func (*Lsd) SaveConfig

func (lsd *Lsd) SaveConfig()

func (*Lsd) SendWs

func (lsd *Lsd) SendWs(m *Message)

func (*Lsd) TurnOffScreen

func (lsd *Lsd) TurnOffScreen()

func (*Lsd) TurnOnScreen

func (lsd *Lsd) TurnOnScreen()

func (*Lsd) VerifyConnect

func (lsd *Lsd) VerifyConnect()

type Manifest

type Manifest struct {
	ManifestVersion int         `json:"manifestVersion"`
	AppVersion      string      `json:"appVersion"`
	Signed          Signed      `json:"signed"`
	Permissions     []string    `json:"permissions"`
	Signatures      []Signature `json:"signatures"`
}

type Message

type Message struct {
	Type    string  `json:"type"`
	ID      string  `json:"id"`
	Uri     string  `json:"uri"`
	Payload Payload `json:"payload"`
}

type Payload

type Payload struct {
	ForcePairing bool     `json:"forcePairing"`
	Volume       int      `json:"volume"`
	PairingType  string   `json:"pairingType"`
	Manifest     Manifest `json:"manifest"`
	ClientKey    string   `json:"client-key"`
	Message      string   `json:"message"`
}

type Signature

type Signature struct {
	SignatureVersion int    `json:"signatureVersion"`
	Signature        string `json:"signature"`
}

type Signed

type Signed struct {
	Created              string            `json:"created"`
	AppId                string            `json:"appId"`
	VendorId             string            `json:"vendorId"`
	LocalizedAppNames    map[string]string `json:"localizedAppNames"`
	LocalizedVendorNames map[string]string `json:"localizedVendorNames"`
	Permissions          []string          `json:"permissions"`
	Serial               string            `json:"serial"`
}

type TrayMenu

type TrayMenu struct {
	ConnectMenuItem *systray.MenuItem
	PingMenuItem    *systray.MenuItem
	QuitMenuItem    *systray.MenuItem
	OnMenuItem      *systray.MenuItem
	APIMenuItem     *systray.MenuItem
	OffMenuItem     *systray.MenuItem
}

type Ws

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

Jump to

Keyboard shortcuts

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