Switch

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2021 License: MIT Imports: 0 Imported by: 10

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Device

type Device struct {
	Name  string `json:"name,omitempty"`
	Index int    `json:"index,omitempty"`
	Ports []Port `json:"ports,omitempty"`
}

type Port

type Port struct {
	Name      string     `json:"name,omitempty"`
	Index     int        `json:"index,omitempty"`
	Terminals []Terminal `json:"terminals,omitempty"`
}

type Switcher

type Switcher interface {
	Name() string
	GetPort(portName string) (port Port, err error)
	SetPort(port Port) error
	Serialize() Device
	Close()
}

type Terminal

type Terminal struct {
	Name  string `json:"name,omitempty"`
	Index int    `json:"index,omitempty"`
	State bool   `json:"state,omitempty"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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