lirc

package
v0.2.11 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrInvalidReplies because lircd replies invalid format data
	ErrInvalidReplies = errors.New("invalid replies")
)

Functions

This section is empty.

Types

type Client

type Client struct {
	sync.Mutex

	Verbose bool
	// contains filtered or unexported fields
}

Client for lircd

func (*Client) Close

func (cli *Client) Close() error

Close connection

func (*Client) List

func (cli *Client) List(remote string, code ...string) (replies []string, err error)

List command

func (*Client) SendOnce

func (cli *Client) SendOnce(remote string, code ...string) (err error)

SendOnce command

func (*Client) SendStart

func (cli *Client) SendStart(remote string, code string) (err error)

SendStart command

func (*Client) SendStop

func (cli *Client) SendStop(remote string, code string) (err error)

SendStop command

func (*Client) Version added in v0.2.3

func (cli *Client) Version() (version string, err error)

Version command

type ClientAPI added in v0.2.11

type ClientAPI interface {
	Version() (version string, err error)
	List(remote string, code ...string) (replies []string, err error)
	SendOnce(remote string, code ...string) (err error)
	SendStart(remote string, code string) (err error)
	SendStop(remote string, code string) (err error)
	Close() error
	// contains filtered or unexported methods
}

ClientAPI represents LIRC Client

func New

func New(socketPath string, path ...string) (client ClientAPI, err error)

New construct Client instance

type MockClientAPI added in v0.2.11

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

Mock of ClientAPI interface

func NewMockClientAPI added in v0.2.11

func NewMockClientAPI(ctrl *gomock.Controller) *MockClientAPI

func (*MockClientAPI) Close added in v0.2.11

func (_m *MockClientAPI) Close() error

func (*MockClientAPI) EXPECT added in v0.2.11

func (_m *MockClientAPI) EXPECT() *_MockClientAPIRecorder

func (*MockClientAPI) List added in v0.2.11

func (_m *MockClientAPI) List(remote string, code ...string) ([]string, error)

func (*MockClientAPI) SendOnce added in v0.2.11

func (_m *MockClientAPI) SendOnce(remote string, code ...string) error

func (*MockClientAPI) SendStart added in v0.2.11

func (_m *MockClientAPI) SendStart(remote string, code string) error

func (*MockClientAPI) SendStop added in v0.2.11

func (_m *MockClientAPI) SendStop(remote string, code string) error

func (*MockClientAPI) Version added in v0.2.11

func (_m *MockClientAPI) Version() (string, error)

type Reply

type Reply struct {
	Command string
	Success bool
	Data    []string
}

Reply from lircd

Jump to

Keyboard shortcuts

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