models

package
v0.0.0-...-074f972 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2024 License: MPL-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Address

type Address struct {
	AudioSource  URI `json:"audio_source" yaml:"audio_source"`
	AudioRepair  URI `json:"audio_repair" yaml:"audio_repair"`
	AudioControl URI `json:"audio_control" yaml:"audio_control"`

} // @name Address

func (*Address) Clone

func (a *Address) Clone() *Address

func (*Address) Compare

func (a *Address) Compare(ao *Address) int

func (*Address) Equal

func (a *Address) Equal(ao *Address) bool

func (*Address) Hash

func (a *Address) Hash() uint64

func (*Address) Validate

func (a *Address) Validate() error

type AddressList

type AddressList []Address

func (*AddressList) At

func (l *AddressList) At(index int) *Address

func (*AddressList) Clone

func (l *AddressList) Clone() *AddressList

func (*AddressList) Compare

func (l *AddressList) Compare(lo *AddressList) int

func (*AddressList) Equal

func (l *AddressList) Equal(lo *AddressList) bool

func (*AddressList) Hash

func (l *AddressList) Hash() uint64

func (*AddressList) Len

func (l *AddressList) Len() int

func (*AddressList) Validate

func (l *AddressList) Validate() error

type Device

type Device struct {
	UID string `json:"device_uid" yaml:"uid"`

	SystemName  string `json:"system_name" yaml:"system_name"`
	DisplayName string `json:"display_name" yaml:"display_name"`

	Type   DeviceType   `json:"type" yaml:"type"`
	Driver DeviceDriver `json:"driver" yaml:"driver"`

	IsHardware bool `json:"hardware_device" yaml:"hardware_device"`
	IsStream   bool `json:"stream_device" yaml:"stream_device"`

	Status  DeviceStatus `json:"status" yaml:"status"`
	IsMuted *bool        `json:"muted" yaml:"muted"`

	ToAddress   *AddressList `json:"to_address,omitempty" yaml:"to_address,omitempty"`
	FromAddress *AddressList `json:"from_address,omitempty" yaml:"from_address,omitempty"`

	NodeID   string `json:"-" yaml:"node_id,omitempty"`
	ModuleID string `json:"-" yaml:"module_id,omitempty"`

} // @name Device

func (*Device) Clone

func (d *Device) Clone() *Device

func (*Device) Compare

func (d *Device) Compare(do *Device) int

func (*Device) Dump

func (d *Device) Dump() string

func (*Device) Equal

func (d *Device) Equal(do *Device) bool

func (*Device) GetEnabled

func (d *Device) GetEnabled() bool

func (*Device) GetMuted

func (d *Device) GetMuted() bool

func (*Device) Hash

func (d *Device) Hash() uint64

func (*Device) SetDefaults

func (d *Device) SetDefaults()

func (*Device) SetMuted

func (d *Device) SetMuted(val bool)

type DeviceDriver

type DeviceDriver string // @name DeviceDriver
const (
	DriverPipewire   DeviceDriver = "pipewire"
	DriverPulseaudio DeviceDriver = "pulseaudio"
)

type DeviceMap

type DeviceMap map[string]*Device

func (*DeviceMap) Clone

func (m *DeviceMap) Clone() *DeviceMap

func (*DeviceMap) Compare

func (m *DeviceMap) Compare(mo *DeviceMap) int

func (*DeviceMap) Equal

func (m *DeviceMap) Equal(mo *DeviceMap) bool

func (*DeviceMap) Hash

func (m *DeviceMap) Hash() uint64

type DeviceStatus

type DeviceStatus string // @name DeviceStatus
const (
	StatusDisabled    DeviceStatus = "disabled"
	StatusEnabled     DeviceStatus = "enabled"
	StatusUnavailable DeviceStatus = "unavailable"
)

type DeviceType

type DeviceType string // @name DeviceType
const (
	Sink   DeviceType = "sink"
	Source DeviceType = "source"
)

type Event

type Event struct {
	Type      EventType `json:"type"`
	DeviceUID string    `json:"device_uid,omitempty"`

} // @name Stream

func (*Event) Clone

func (e *Event) Clone() *Event

func (*Event) Compare

func (e *Event) Compare(eo *Event) int

func (*Event) Dump

func (e *Event) Dump() string

func (*Event) Equal

func (e *Event) Equal(eo *Event) bool

func (*Event) Hash

func (e *Event) Hash() uint64

type EventType

type EventType string // @name EventType
const (
	EventDeviceAdded   EventType = "device_added"
	EventDeviceRemoved EventType = "device_removed"
	EventDeviceUpdated EventType = "device_updated"
)

type Fec

type Fec string
const (
	FecRs8m Fec = "rs8m"
	FecLdpc Fec = "ldpc"
)

type Interface

type Interface string
const (
	IfaceAudioSource  Interface = "audio_source"
	IfaceAudioRepair  Interface = "audio_repair"
	IfaceAudioControl Interface = "audio_control"
)

type Stream

type Stream struct {
	UID  string     `json:"stream_uid" yaml:"uid"`
	Type StreamType `json:"type" yaml:"type"`

	FromDevice string      `json:"from_device,omitempty" yaml:"from_device"`
	ToAddress  AddressList `json:"to_address,omitempty" yaml:"to_address"`

	ToDevice    string      `json:"to_device,omitempty" yaml:"to_device"`
	FromAddress AddressList `json:"from_address,omitempty" yaml:"from_address"`

} // @name Stream

func (*Stream) Clone

func (s *Stream) Clone() *Stream

func (*Stream) Compare

func (s *Stream) Compare(so *Stream) int

func (*Stream) Dump

func (s *Stream) Dump() string

func (*Stream) Equal

func (s *Stream) Equal(so *Stream) bool

func (*Stream) Hash

func (s *Stream) Hash() uint64

type StreamMap

type StreamMap map[string]*Stream

func (*StreamMap) Clone

func (m *StreamMap) Clone() *StreamMap

func (*StreamMap) Compare

func (m *StreamMap) Compare(mo *StreamMap) int

func (*StreamMap) Equal

func (m *StreamMap) Equal(mo *StreamMap) bool

func (*StreamMap) Hash

func (m *StreamMap) Hash() uint64

type StreamType

type StreamType string // @name StreamType
const (
	SendStream StreamType = "send"
	RecvStream StreamType = "recv"
)

type URI

type URI string

func (URI) Fec

func (s URI) Fec() Fec

func (URI) Host

func (s URI) Host() string

func (URI) IP

func (s URI) IP() string

func (URI) Port

func (s URI) Port() string

func (URI) Resource

func (s URI) Resource() string

func (URI) Scheme

func (s URI) Scheme() string

func (URI) User

func (s URI) User() string

func (URI) Validate

func (s URI) Validate(iface Interface) error

Jump to

Keyboard shortcuts

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