dmxdef

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: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client makes requests to this service

func NewClient

func NewClient(dispatcher taxi.Dispatcher) *Client

NewClient returns a new client

func (*Client) GetMegaParProfile

func (c *Client) GetMegaParProfile(ctx context.Context, body *GetMegaParProfileRequest) *GetMegaParProfileFuture

GetMegaParProfile dispatches an RPC to the service

func (*Client) UpdateMegaParProfile

func (c *Client) UpdateMegaParProfile(ctx context.Context, body *UpdateMegaParProfileRequest) *UpdateMegaParProfileFuture

UpdateMegaParProfile dispatches an RPC to the service

type DMXService

type DMXService interface {
	GetMegaParProfile(ctx context.Context, body *GetMegaParProfileRequest) *GetMegaParProfileFuture
	UpdateMegaParProfile(ctx context.Context, body *UpdateMegaParProfileRequest) *UpdateMegaParProfileFuture
}

DMXService is the public interface of this service

type GetMegaParProfileFuture

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

GetMegaParProfileFuture represents an in-flight GetMegaParProfile request

func (*GetMegaParProfileFuture) Wait

Wait blocks until the response is ready

type GetMegaParProfileRequest

type GetMegaParProfileRequest struct {
	DeviceId *string `json:"device_id,omitempty"`
}

GetMegaParProfileRequest is defined in the .def file

func (*GetMegaParProfileRequest) GetDeviceId

func (m *GetMegaParProfileRequest) GetDeviceId() (val string)

GetDeviceId returns the de-referenced value of DeviceId. If the field is nil, the function panics because device_id is marked as required.

func (*GetMegaParProfileRequest) SetDeviceId

SetDeviceId sets the value of DeviceId

func (*GetMegaParProfileRequest) Validate

func (m *GetMegaParProfileRequest) Validate() error

Validate returns an error if any of the fields have bad values

type MegaParProfileResponse

type MegaParProfileResponse struct {
	Header     *def.Header              `json:"header,omitempty"`
	Properties map[string]*def.Property `json:"properties,omitempty"`
	State      *MegaParProfileState     `json:"state,omitempty"`
}

MegaParProfileResponse is defined in the .def file

func (*MegaParProfileResponse) GetHeader

func (m *MegaParProfileResponse) GetHeader() (val def.Header, set bool)

GetHeader returns the de-referenced value of Header. The second return value states whether the field was set.

func (*MegaParProfileResponse) GetProperties

func (m *MegaParProfileResponse) GetProperties() (val map[string]*def.Property, set bool)

GetProperties returns the de-referenced value of Properties. The second return value states whether the field was set.

func (*MegaParProfileResponse) GetState

func (m *MegaParProfileResponse) GetState() (val MegaParProfileState, set bool)

GetState returns the de-referenced value of State. The second return value states whether the field was set.

func (*MegaParProfileResponse) SetHeader

SetHeader sets the value of Header

func (*MegaParProfileResponse) SetProperties

SetProperties sets the value of Properties

func (*MegaParProfileResponse) SetState

SetState sets the value of State

func (*MegaParProfileResponse) Validate

func (m *MegaParProfileResponse) Validate() error

Validate returns an error if any of the fields have bad values

type MegaParProfileState

type MegaParProfileState struct {
	Power      *bool     `json:"power,omitempty"`
	Brightness *byte     `json:"brightness,omitempty"`
	Color      *util.RGB `json:"color,omitempty"`
	Strobe     *byte     `json:"strobe,omitempty"`
}

MegaParProfileState is defined in the .def file

func (*MegaParProfileState) GetBrightness

func (m *MegaParProfileState) GetBrightness() (val byte, set bool)

GetBrightness returns the de-referenced value of Brightness. The second return value states whether the field was set.

func (*MegaParProfileState) GetColor

func (m *MegaParProfileState) GetColor() (val util.RGB, set bool)

GetColor returns the de-referenced value of Color. The second return value states whether the field was set.

func (*MegaParProfileState) GetPower

func (m *MegaParProfileState) GetPower() (val bool, set bool)

GetPower returns the de-referenced value of Power. The second return value states whether the field was set.

func (*MegaParProfileState) GetStrobe

func (m *MegaParProfileState) GetStrobe() (val byte, set bool)

GetStrobe returns the de-referenced value of Strobe. The second return value states whether the field was set.

func (*MegaParProfileState) SetBrightness

func (m *MegaParProfileState) SetBrightness(v byte) *MegaParProfileState

SetBrightness sets the value of Brightness

func (*MegaParProfileState) SetColor

SetColor sets the value of Color

func (*MegaParProfileState) SetPower

SetPower sets the value of Power

func (*MegaParProfileState) SetStrobe

func (m *MegaParProfileState) SetStrobe(v byte) *MegaParProfileState

SetStrobe sets the value of Strobe

func (*MegaParProfileState) Validate

func (m *MegaParProfileState) Validate() error

Validate returns an error if any of the fields have bad values

type MockClient

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

MockClient can be used in tests

func NewMockClient

func NewMockClient(ctx context.Context, t *testing.T) *MockClient

NewMockClient returns a new mock client

func (*MockClient) GetMegaParProfile

GetMegaParProfile dispatches an RPC to the mock client

func (*MockClient) UpdateMegaParProfile

UpdateMegaParProfile dispatches an RPC to the mock client

type UpdateMegaParProfileFuture

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

UpdateMegaParProfileFuture represents an in-flight UpdateMegaParProfile request

func (*UpdateMegaParProfileFuture) Wait

Wait blocks until the response is ready

type UpdateMegaParProfileRequest

type UpdateMegaParProfileRequest struct {
	DeviceId *string              `json:"device_id,omitempty"`
	State    *MegaParProfileState `json:"state,omitempty"`
}

UpdateMegaParProfileRequest is defined in the .def file

func (*UpdateMegaParProfileRequest) GetDeviceId

func (m *UpdateMegaParProfileRequest) GetDeviceId() (val string)

GetDeviceId returns the de-referenced value of DeviceId. If the field is nil, the function panics because device_id is marked as required.

func (*UpdateMegaParProfileRequest) GetState

func (m *UpdateMegaParProfileRequest) GetState() (val MegaParProfileState, set bool)

GetState returns the de-referenced value of State. The second return value states whether the field was set.

func (*UpdateMegaParProfileRequest) SetDeviceId

SetDeviceId sets the value of DeviceId

func (*UpdateMegaParProfileRequest) SetState

SetState sets the value of State

func (*UpdateMegaParProfileRequest) Validate

func (m *UpdateMegaParProfileRequest) Validate() error

Validate returns an error if any of the fields have bad values

Jump to

Keyboard shortcuts

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