message

package
v0.1.20 Latest Latest
Warning

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

Go to latest
Published: May 16, 2019 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateModuleListAllRequest

func CreateModuleListAllRequest() ([]byte, error)

func CreateModuleListAllResponse

func CreateModuleListAllResponse(data []byte) (*pb.ModuleListReply, error)

func CreateModuleListRequest

func CreateModuleListRequest() ([]byte, error)

func CreateModuleListResponse

func CreateModuleListResponse(data []byte) (*pb.ModuleListReply, error)

func CreateSettingsRequest

func CreateSettingsRequest(request string) ([]byte, error)

func CreateSettingsResponse

func CreateSettingsResponse(data []byte) (*pb.Settings, error)

func CreateStatusRequest

func CreateStatusRequest(request string) ([]byte, error)

Create a request message using `request` as the type of status check, eg. read

XXX: should this receive a protobuf message? if so the type could come from it XXX: should this return a []byte?

func CreateStatusResponse

func CreateStatusResponse(data []byte) (*pb.Status, error)

Types

type Message

type Message interface {
	Name() string
	Body() map[string]interface{}
}

type ReadStatus

type ReadStatus struct{}

type StatusRequest

type StatusRequest struct{}

func (*StatusRequest) FromJSON

func (s *StatusRequest) FromJSON(bytes []byte) (err error)

func (*StatusRequest) ToJSON

func (s *StatusRequest) ToJSON() (bytes []byte, err error)

type StatusRequestMessage

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

func NewStatusRequest

func NewStatusRequest() (req StatusRequestMessage)

func (StatusRequestMessage) Body

func (s StatusRequestMessage) Body() map[string]interface{}

func (StatusRequestMessage) Name

func (s StatusRequestMessage) Name() string

Jump to

Keyboard shortcuts

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