domain

package
v0.0.0-...-2387267 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Action

type Action struct {
	Controller string    `json:"controller"`
	Device     string    `json:"device"`
	Property   *Property `json:"property"`
}

Action is a single step in a scene

func (*Action) Validate

func (a *Action) Validate() error

Validate checks that the action makes sense

type Property

type Property struct {
	Name  string      `json:"name"`
	Value interface{} `json:"value"`
}

Property defines an action property. The value is going to be stored as a string, it's type will be stored accoringly

func (*Property) Validate

func (p *Property) Validate() error

Validate checks that the action makes sense

type Scene

type Scene struct {
	ID      string    `json:"id"`
	Name    string    `json:"name"`
	Owner   string    `json:"owner"`
	Actions []*Action `json:"actions"`
}

Scene represents a set of actions

func (*Scene) Validate

func (s *Scene) Validate() error

Validate checks that the scene makes sense

Jump to

Keyboard shortcuts

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