service

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrBadSignal because signal not found in lircd.conf
	ErrBadSignal = errors.New("signal not found")
)

Functions

func SendSignal

func SendSignal(socketPath string, s *SendSignalParam) (err error)

SendSignal .

Types

type SendSignalParam

type SendSignalParam struct {
	*Signal
	Duration int64 `json:"duration,omitempty"`
}

SendSignalParam .

func (*SendSignalParam) GetDuration

func (s *SendSignalParam) GetDuration() time.Duration

GetDuration convert int64[msec] to time.Duration

type Signal

type Signal struct {
	Remote string `json:"remote"`
	Name   string `json:"name"`
}

Signal .

func FetchSignals

func FetchSignals(socketPath, remote string) (signals []Signal, err error)

FetchSignals .

Jump to

Keyboard shortcuts

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