couch

package
v0.7.3-0...-e81e75e Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AudioConfig

type AudioConfig struct {
}

type AudioDevice

type AudioDevice struct {
	Name   string             `json:"name"`
	Volume StateControlConfig `json:"volume"`
	Mute   StateControlConfig `json:"mute"`
	Unmute StateControlConfig `json:"unmute"`
}

type AudioGroup

type AudioGroup struct {
	Name         string        `json:"name"`
	AudioDevices []AudioDevice `json:"audioDevices"`
}

type CameraConfig

type CameraConfig struct {
	Name        string             `json:"name"`
	TiltUp      StateControlConfig `json:"tiltUp"`
	TiltDown    StateControlConfig `json:"tiltDown"`
	PanLeft     StateControlConfig `json:"panLeft"`
	PanRight    StateControlConfig `json:"panRight"`
	PanTiltStop StateControlConfig `json:"panTiltStop"`
	ZoomIn      StateControlConfig `json:"zoomIn"`
	ZoomOut     StateControlConfig `json:"zoomOut"`
	ZoomStop    StateControlConfig `json:"zoomStop"`

	Presets []CameraPresetConfig `json:"presets"`
}

type CameraPresetConfig

type CameraPresetConfig struct {
	Name      string             `json:"name"`
	SetPreset StateControlConfig `json:"setPreset"`
}

type Config

type Config struct {
	ID            string                  `json:"_id"`
	ControlGroups map[string]ControlGroup `json:"controlGroups"`
	States        map[string]State        `json:"states"`
}

type ControlGroup

type ControlGroup struct {
	PowerOff StateControlConfig `json:"powerOff"`
	PowerOn  StateControlConfig `json:"powerOn"`

	Displays    []Display      `json:"displays"`
	MediaAudio  AudioDevice    `json:"mediaAudio"`
	AudioGroups []AudioGroup   `json:"audioGroups"`
	Cameras     []CameraConfig `json:"cameras"`
}

type DataService

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

func New

func New(ctx context.Context, url string, opts ...Option) (*DataService, error)

func NewWithClient

func NewWithClient(ctx context.Context, client *kivik.Client, opts ...Option) (*DataService, error)

func (*DataService) Config

func (d *DataService) Config(ctx context.Context, room string) (ui.Config, error)

func (*DataService) ControlGroup

func (d *DataService) ControlGroup(ctx context.Context, room, id string) (string, error)

func (*DataService) RoomAndControlGroup

func (d *DataService) RoomAndControlGroup(ctx context.Context, key string) (string, string, error)

func (*DataService) UIForDevice

func (d *DataService) UIForDevice(ctx context.Context, room, id string) (string, error)

type Display

type Display struct {
	Name    string             `json:"name"`
	Icon    string             `json:"icon"`
	Blank   StateControlConfig `json:"blank"`
	Unblank StateControlConfig `json:"unblank"`

	Sources []Source `json:"sources"`
}

type GenericRequest

type GenericRequest struct {
	URL    string          `json:"url"`
	Method string          `json:"method"`
	Body   json.RawMessage `json:"body"`
}

type Option

type Option interface {
	// contains filtered or unexported methods
}

Option configures how we create the DataService.

func WithBasicAuth

func WithBasicAuth(username, password string) Option

func WithDatabase

func WithDatabase(database string) Option

type Source

type Source struct {
	Name    string `json:"name"`
	Icon    string `json:"icon"`
	Visible bool   `json:"visible"`
	StateControlConfig

	Sources []Source `json:"sources"`
}

type State

type State avcontrol.StateRequest

type StateControlConfig

type StateControlConfig struct {
	MatchStates      []string          `json:"matchStates"`
	StateTransitions []StateTransition `json:"stateTransitions"`
}

type StateTransition

type StateTransition struct {
	MatchStates []string              `json:"matchStates"`
	Action      StateTransitionAction `json:"action"`
}

type StateTransitionAction

type StateTransitionAction struct {
	SetStates []string         `json:"setStates"`
	Requests  []GenericRequest `json:"requests"`
}

Jump to

Keyboard shortcuts

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