Documentation
¶
Index ¶
- type Client
- func (c Client) ClearPriority(priority int) error
- func (c Client) ComponentState(name string, enable bool) error
- func (c Client) Instance(instance int, command model.InstanceCmd) error
- func (c Client) LEDMode(mode model.LEDMode) error
- func (c *Client) ServerInfo() (*model.Information, error)
- func (c Client) SetAdjustment(adj model.Adjustment) error
- func (c Client) SetColor(color []int, priority int, origin string, duration *int) error
- func (c Client) SetEffect(effect model.Effect, priority int, origin string, duration *int) error
- func (c Client) SetImage(image model.Image, priority int, origin string, duration *int) error
- func (c Client) SetSource(priority int) error
- func (c Client) SetSourceAuto() error
- func (c *Client) SystemInfo() (*model.System, error)
- func (c Client) VideoMode(mode model.VideoMode) error
- type ClientOption
- type Config
- type Connection
- type ConnectionType
- type Logger
- type StdLogger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client instance for Hyperion.
func NewClient ¶
func NewClient(conf Config, opt ...ClientOption) *Client
NewClient creates new client.
func (Client) ClearPriority ¶
ClearPriority used to revert SetColor, SetEffect or SetImage.
func (Client) ComponentState ¶
ComponentState enabled or disabled at runtime.
func (Client) Instance ¶
func (c Client) Instance(instance int, command model.InstanceCmd) error
Instance controlling.
func (*Client) ServerInfo ¶
func (c *Client) ServerInfo() (*model.Information, error)
ServerInfo retrieve live state of Hyperion.
func (Client) SetAdjustment ¶
func (c Client) SetAdjustment(adj model.Adjustment) error
SetAdjustment to color calibration.
func (Client) SetSourceAuto ¶
SetSourceAuto visible source is determined by priority.
func (*Client) SystemInfo ¶
SystemInfo retrieve basic system information about Hyperion server.
type ClientOption ¶
type ClientOption func(c *Client)
ClientOption available options.
func WithHeader ¶
func WithHeader(headers map[string]string) ClientOption
WithHeader set custom headers.
type Config ¶ added in v1.3.0
type Config struct { VerboseLog bool `json:"verbose_log"` // Enable verbose logging Connection Connection `json:"connection"` }
Config for client.
func (Config) GetTimeout ¶ added in v1.3.0
GetTimeout returns custom or default timeout.
type Connection ¶ added in v1.3.0
type Connection struct { Token string `json:"token"` Type ConnectionType `json:"type"` Host string `json:"host"` Port int `json:"port"` SSL bool `json:"ssl"` Timeout int `json:"timeout"` // Time to wait for a server response in seconds (default 30 sec) }
Connection configuration.
type ConnectionType ¶ added in v1.3.0
type ConnectionType string
ConnectionType mechanism.
const ( // ConnectTCP ConnectionType = "TCP" // TCP Socket // ConnectWebSocket ConnectionType = "WS" // WebSocket ConnectHTTP ConnectionType = "HTTP" // HTTP/S )
List of Hyperion connection mechanisms.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.