norn

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MarshalError

func MarshalError(err error) string

Types

type Command

type Command struct {
	Channel uint        `json:"channel"`
	Type    CommandType `json:"type"`
	Status  bool        `json:"status"`
}

func (*Command) Marshal

func (command *Command) Marshal() []byte

func (*Command) Parse

func (command *Command) Parse(reader *bufio.Reader) error

type CommandType

type CommandType uint
const (
	Nil         CommandType = 0
	Get         CommandType = 1
	Set         CommandType = 2
	Version     CommandType = 3
	Bootloader  CommandType = 4
	MaxChannels CommandType = 5
)

type Response

type Response struct {
	Success    bool   `json:"isOk"`
	Message    string `json:"message"`
	Channel    uint   `json:"channel"`
	MaxChannel int    `json:"max_channel"`
	Status     bool   `json:"status"`
}

func (*Response) Marshal

func (response *Response) Marshal() []byte

func (*Response) Parse

func (response *Response) Parse(reader *bufio.Reader) error

Jump to

Keyboard shortcuts

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