Documentation ¶
Index ¶
- type Client
- type DMXService
- type GetMegaParProfileFuture
- type GetMegaParProfileRequest
- type MegaParProfileResponse
- func (m *MegaParProfileResponse) GetHeader() (val def.Header, set bool)
- func (m *MegaParProfileResponse) GetProperties() (val map[string]*def.Property, set bool)
- func (m *MegaParProfileResponse) GetState() (val MegaParProfileState, set bool)
- func (m *MegaParProfileResponse) SetHeader(v def.Header) *MegaParProfileResponse
- func (m *MegaParProfileResponse) SetProperties(v map[string]*def.Property) *MegaParProfileResponse
- func (m *MegaParProfileResponse) SetState(v MegaParProfileState) *MegaParProfileResponse
- func (m *MegaParProfileResponse) Validate() error
- type MegaParProfileState
- func (m *MegaParProfileState) GetBrightness() (val byte, set bool)
- func (m *MegaParProfileState) GetColor() (val util.RGB, set bool)
- func (m *MegaParProfileState) GetPower() (val bool, set bool)
- func (m *MegaParProfileState) GetStrobe() (val byte, set bool)
- func (m *MegaParProfileState) SetBrightness(v byte) *MegaParProfileState
- func (m *MegaParProfileState) SetColor(v util.RGB) *MegaParProfileState
- func (m *MegaParProfileState) SetPower(v bool) *MegaParProfileState
- func (m *MegaParProfileState) SetStrobe(v byte) *MegaParProfileState
- func (m *MegaParProfileState) Validate() error
- type MockClient
- type UpdateMegaParProfileFuture
- type UpdateMegaParProfileRequest
- func (m *UpdateMegaParProfileRequest) GetDeviceId() (val string)
- func (m *UpdateMegaParProfileRequest) GetState() (val MegaParProfileState, set bool)
- func (m *UpdateMegaParProfileRequest) SetDeviceId(v string) *UpdateMegaParProfileRequest
- func (m *UpdateMegaParProfileRequest) SetState(v MegaParProfileState) *UpdateMegaParProfileRequest
- func (m *UpdateMegaParProfileRequest) Validate() error
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 (*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 ¶
func (f *GetMegaParProfileFuture) Wait() (*MegaParProfileResponse, error)
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 ¶
func (m *GetMegaParProfileRequest) SetDeviceId(v string) *GetMegaParProfileRequest
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 ¶
func (m *MegaParProfileResponse) SetHeader(v def.Header) *MegaParProfileResponse
SetHeader sets the value of Header
func (*MegaParProfileResponse) SetProperties ¶
func (m *MegaParProfileResponse) SetProperties(v map[string]*def.Property) *MegaParProfileResponse
SetProperties sets the value of Properties
func (*MegaParProfileResponse) SetState ¶
func (m *MegaParProfileResponse) SetState(v MegaParProfileState) *MegaParProfileResponse
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 ¶
func (m *MegaParProfileState) SetColor(v util.RGB) *MegaParProfileState
SetColor sets the value of Color
func (*MegaParProfileState) SetPower ¶
func (m *MegaParProfileState) SetPower(v bool) *MegaParProfileState
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 ¶
func (c *MockClient) GetMegaParProfile(ctx context.Context, body *GetMegaParProfileRequest) *GetMegaParProfileFuture
GetMegaParProfile dispatches an RPC to the mock client
func (*MockClient) UpdateMegaParProfile ¶
func (c *MockClient) UpdateMegaParProfile(ctx context.Context, body *UpdateMegaParProfileRequest) *UpdateMegaParProfileFuture
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 ¶
func (f *UpdateMegaParProfileFuture) Wait() (*MegaParProfileResponse, error)
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 ¶
func (m *UpdateMegaParProfileRequest) SetDeviceId(v string) *UpdateMegaParProfileRequest
SetDeviceId sets the value of DeviceId
func (*UpdateMegaParProfileRequest) SetState ¶
func (m *UpdateMegaParProfileRequest) SetState(v MegaParProfileState) *UpdateMegaParProfileRequest
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