snapcast

package
v1.9.1 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2023 License: GPL-3.0 Imports: 11 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New() chik.Handler

Types

type Client

type Client struct {
	Config     Config      `json:"config" mapstructure:"config"`
	Connected  bool        `json:"connected" mapstructure:"connected"`
	Host       interface{} `json:"host" mapstructure:"host"`
	ID         string      `json:"id" mapstructure:"id"`
	LastSeen   interface{}
	Snapclient interface{}
}

Client is a snapcast client

type ClientVolume

type ClientVolume struct {
	ID     string `json:"id" mapstructure:"id"`
	Volume Volume `json:"volume" mapstructure:"volume"`
}

type Config

type Config struct {
	Instance int    `json:"instance" mapstructure:"instance"`
	Latency  int    `json:"latency" mapstructure:"latency"`
	Name     string `json:"name" mapstructure:"name"`
	Volume   Volume `json:"volume" mapstructure:"volume"`
}

Config is the snapcast config

type Group

type Group struct {
	Clients  []Client `json:"clients" mapstructure:"clients"`
	ID       string   `json:"id" mapstructure:"id"`
	Muted    bool     `json:"muted" mapstructure:"muted"`
	Name     string   `json:"name" mapstructure:"name"`
	StreamID string   `json:"stream_id" mapstructure:"stream_id"`
}

type GroupStreamChanged

type GroupStreamChanged struct {
	ID       string `json:"id,omitempty" mapstructure:"id"`
	StreamID string `json:"stream_id" mapstructure:"stream_id"`
}

type ServerStatus

type ServerStatus struct {
	Groups  []Group
	Streams []Stream
}

type SimplifiedClient added in v1.8.1

type SimplifiedClient struct {
	ID string `json:"id" mapstructure:"id"`
}

type SimplifiedGroup added in v1.8.1

type SimplifiedGroup struct {
	Clients  []SimplifiedClient `json:"clients" mapstructure:"clients"`
	ID       string             `json:"id" mapstructure:"id"`
	Name     string             `json:"name" mapstructure:"name"`
	StreamID string             `json:"stream_id" mapstructure:"stream_id"`
}

type SimplifiedServerStatus added in v1.8.1

type SimplifiedServerStatus struct {
	Groups  []SimplifiedGroup
	Streams []Stream
}

type SimplifiedStatus added in v1.8.1

type SimplifiedStatus struct {
	Server SimplifiedServerStatus
}

type SnapcastClientCommand

type SnapcastClientCommand struct {
	ClientID string       `json:"client_id"`       // client id
	Action   types.Action `json:"action"`          // SET sets a value or unmutes it, RESET mutes the volume
	Value    int          `json:"value,omitempty"` // optional value
}

type SnapcastGroupCommand

type SnapcastGroupCommand struct {
	GroupID string       `json:"group_id"`
	Action  types.Action `json:"action"`            // SET sets given options GET gets the group description
	Stream  string       `json:"stream,omitempty"`  // stream to set (valid only for SET)
	Clients []string     `json:"clients,omitempty"` // clients to group into this one (valid only for SET)
}

type Status

type Status struct {
	Server ServerStatus
}

type Stream

type Stream struct {
	ID     string
	Status string
	URI    URL
}

type URL

type URL struct {
	Raw string
}

type Volume

type Volume struct {
	Muted   bool `json:"muted" mapstructure:"muted"`
	Percent int  `json:"percent" mapstructure:"percent"`
}

Volume rapresents the volume of a device

Jump to

Keyboard shortcuts

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