Documentation
¶
Index ¶
- type ControllerDetail
- type DeviceDetail
- type MockController
- func (c *MockController) Disable(_ context.Context, opts devices.OperationArgs) (any, error)
- func (c *MockController) Enable(_ context.Context, opts devices.OperationArgs) (any, error)
- func (c *MockController) Implementation() any
- func (c *MockController) Operations() map[string]devices.Operation
- func (c *MockController) OperationsHelp() map[string]string
- type MockDevice
- func (d *MockDevice) AddCondition(name string, outcome bool)
- func (d *MockDevice) Conditions() map[string]devices.Condition
- func (d *MockDevice) ConditionsHelp() map[string]string
- func (d *MockDevice) ControlledBy() devices.Controller
- func (d *MockDevice) Implementation() any
- func (d *MockDevice) Operations() map[string]devices.Operation
- func (d *MockDevice) OperationsHelp() map[string]string
- func (d *MockDevice) SetController(c devices.Controller)
- func (d *MockDevice) SetOutput(writer bool)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ControllerDetail ¶
type DeviceDetail ¶
type DeviceDetail struct {
Detail string `yaml:"detail"`
}
type MockController ¶
type MockController struct { devices.ControllerBase[ControllerDetail] }
func (*MockController) Disable ¶
func (c *MockController) Disable(_ context.Context, opts devices.OperationArgs) (any, error)
func (*MockController) Enable ¶
func (c *MockController) Enable(_ context.Context, opts devices.OperationArgs) (any, error)
func (*MockController) Implementation ¶
func (c *MockController) Implementation() any
func (*MockController) Operations ¶
func (c *MockController) Operations() map[string]devices.Operation
func (*MockController) OperationsHelp ¶
func (c *MockController) OperationsHelp() map[string]string
type MockDevice ¶
type MockDevice struct { devices.DeviceBase[DeviceDetail] // contains filtered or unexported fields }
func NewMockDevice ¶
func NewMockDevice(operations ...string) *MockDevice
func (*MockDevice) AddCondition ¶
func (d *MockDevice) AddCondition(name string, outcome bool)
func (*MockDevice) Conditions ¶
func (d *MockDevice) Conditions() map[string]devices.Condition
func (*MockDevice) ConditionsHelp ¶
func (d *MockDevice) ConditionsHelp() map[string]string
func (*MockDevice) ControlledBy ¶
func (d *MockDevice) ControlledBy() devices.Controller
func (*MockDevice) Implementation ¶
func (d *MockDevice) Implementation() any
func (*MockDevice) Operations ¶
func (d *MockDevice) Operations() map[string]devices.Operation
func (*MockDevice) OperationsHelp ¶
func (d *MockDevice) OperationsHelp() map[string]string
func (*MockDevice) SetController ¶
func (d *MockDevice) SetController(c devices.Controller)
func (*MockDevice) SetOutput ¶
func (d *MockDevice) SetOutput(writer bool)
Click to show internal directories.
Click to hide internal directories.