domain

package
v0.0.0-...-34c5bf1 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2020 License: MIT Imports: 7 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 {
	SceneID  int
	Stage    int
	Sequence int

	Func           string
	ControllerName string
	DeviceID       string
	Command        string
	Property       string
	PropertyValue  string
	PropertyType   string

	CreatedAt time.Time
	UpdatedAt time.Time
}

Action is a single step in a scene

func (*Action) Perform

func (a *Action) Perform(ctx context.Context) error

Perform does the action

func (*Action) ToProto

func (a *Action) ToProto() *scenedef.Action

ToProto marshals to the proto type

func (*Action) Validate

func (a *Action) Validate() error

Validate checks that the action makes sense

type Scene

type Scene struct {
	ID        uint32
	Name      string
	OwnerID   uint32
	Actions   []*Action
	CreatedAt time.Time
	UpdatedAt time.Time
}

Scene represents a set of actions

func (*Scene) ToProto

func (s *Scene) ToProto() *scenedef.Scene

ToProto marshals to the proto type

Jump to

Keyboard shortcuts

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