models

package
v0.0.0-...-f3e3514 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2023 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Overview

Package models describes models.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CommandError

type CommandError struct {
	Message string `json:"message"`
	Code    int    `json:"code,omitempty"`
	Type    int    `json:"type,omitempty"`
}

CommandError contains a basic command Error.

type RequestEnvelope

type RequestEnvelope struct {
	Payload []byte `json:"payload"`
}

RequestEnvelope contains a payload representing parameters for each operation on a protocol.

func NewRequestEnvelope

func NewRequestEnvelope(data []byte) *RequestEnvelope

NewRequestEnvelope will return an instance of RequestEnvelope.

type ResponseEnvelope

type ResponseEnvelope struct {
	Payload []byte        `json:"payload"`
	Error   *CommandError `json:"error,omitempty"`
}

ResponseEnvelope contains a payload and an error from performing an operation on a protocol.

func NewResponseEnvelope

func NewResponseEnvelope() *ResponseEnvelope

NewResponseEnvelope will return an instance of ResponseEnvelope.

Jump to

Keyboard shortcuts

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