lircproxydef

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: 4 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) SendOnce

func (c *Client) SendOnce(ctx context.Context, body *SendOnceRequest) *SendOnceFuture

SendOnce dispatches an RPC to the service

type LircProxyService

type LircProxyService interface {
	SendOnce(ctx context.Context, body *SendOnceRequest) *SendOnceFuture
}

LircProxyService is the public interface of this service

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) SendOnce

func (c *MockClient) SendOnce(ctx context.Context, body *SendOnceRequest) *SendOnceFuture

SendOnce dispatches an RPC to the mock client

type SendOnceFuture

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

SendOnceFuture represents an in-flight SendOnce request

func (*SendOnceFuture) Wait

func (f *SendOnceFuture) Wait() (*SendOnceResponse, error)

Wait blocks until the response is ready

type SendOnceRequest

type SendOnceRequest struct {
	Device *string `json:"device,omitempty"`
	Key    *string `json:"key,omitempty"`
}

SendOnceRequest is defined in the .def file

func (*SendOnceRequest) GetDevice

func (m *SendOnceRequest) GetDevice() (val string)

GetDevice returns the de-referenced value of Device. If the field is nil, the function panics because device is marked as required.

func (*SendOnceRequest) GetKey

func (m *SendOnceRequest) GetKey() (val string)

GetKey returns the de-referenced value of Key. If the field is nil, the function panics because key is marked as required.

func (*SendOnceRequest) SetDevice

func (m *SendOnceRequest) SetDevice(v string) *SendOnceRequest

SetDevice sets the value of Device

func (*SendOnceRequest) SetKey

func (m *SendOnceRequest) SetKey(v string) *SendOnceRequest

SetKey sets the value of Key

func (*SendOnceRequest) Validate

func (m *SendOnceRequest) Validate() error

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

type SendOnceResponse

type SendOnceResponse struct {
}

SendOnceResponse is defined in the .def file

func (*SendOnceResponse) Validate

func (m *SendOnceResponse) 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