model

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MsgTypeInit    byte = 0
	MsgTypeControl byte = 1
	MsgTypeData    byte = 2
	MsgTypeEnd     byte = 3
)
View Source
const (
	ShipProtocolId = "ee1.0"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AccessMethods

type AccessMethods struct {
	AccessMethods AccessMethodsType `json:"accessMethods"`
}

type AccessMethodsRequest

type AccessMethodsRequest struct {
	AccessMethodsRequest AccessMethodsRequestType `json:"accessMethodsRequest"`
}

type AccessMethodsRequestType

type AccessMethodsRequestType struct{}

type AccessMethodsType

type AccessMethodsType struct {
	Id        *string    `json:"id"`
	DnsSdMDns *DnsSdMDns `json:"dnsSd_mDns,omitempty"`
	// According to the Spec Dns should be of type *Dns, but the SHM 2.0 only uses a string and would cause a crash
	Dns *string `json:"dns,omitempty"`
}

type ConnectionClose

type ConnectionClose struct {
	ConnectionClose ConnectionCloseType `json:"connectionClose"`
}

type ConnectionClosePhaseType

type ConnectionClosePhaseType string
const (
	ConnectionClosePhaseTypeAnnounce ConnectionClosePhaseType = "announce"
	ConnectionClosePhaseTypeConfirm  ConnectionClosePhaseType = "confirm"
)

type ConnectionCloseReasonType

type ConnectionCloseReasonType string
const (
	ConnectionCloseReasonTypeUnspecific        ConnectionCloseReasonType = "unspecific"
	ConnectionCloseReasonTypeRemovedconnection ConnectionCloseReasonType = "removedConnection"
)

type ConnectionCloseType

type ConnectionCloseType struct {
	Phase   ConnectionClosePhaseType   `json:"phase"`
	MaxTime *uint                      `json:"maxTime,omitempty"`
	Reason  *ConnectionCloseReasonType `json:"reason,omitempty"`
}

type ConnectionHello

type ConnectionHello struct {
	ConnectionHello ConnectionHelloType `json:"connectionHello"`
}

type ConnectionHelloPhaseType

type ConnectionHelloPhaseType string
const (
	ConnectionHelloPhaseTypePending ConnectionHelloPhaseType = "pending"
	ConnectionHelloPhaseTypeReady   ConnectionHelloPhaseType = "ready"
	ConnectionHelloPhaseTypeAborted ConnectionHelloPhaseType = "aborted"
)

type ConnectionHelloType

type ConnectionHelloType struct {
	Phase               ConnectionHelloPhaseType `json:"phase"`
	Waiting             *uint                    `json:"waiting,omitempty"`
	ProlongationRequest *bool                    `json:"prolongationRequest,omitempty"`
}

type ConnectionPinErrorErrorType

type ConnectionPinErrorErrorType uint8

type ConnectionPinErrorType

type ConnectionPinErrorType struct {
	Error ConnectionPinErrorErrorType `json:"error"`
}

type ConnectionPinInputType

type ConnectionPinInputType struct {
	Pin PinValueType `json:"pin"`
}

type ConnectionPinState

type ConnectionPinState struct {
	ConnectionPinState ConnectionPinStateType `json:"connectionPinState"`
}

type ConnectionPinStateType

type ConnectionPinStateType struct {
	PinState        PinStateType            `json:"pinState"`
	InputPermission *PinInputPermissionType `json:"inputPermission,omitempty"`
}

type DataType

type DataType struct {
	Header    HeaderType      `json:"header"`
	Payload   json.RawMessage `json:"payload"`
	Extension *ExtensionType  `json:"extension,omitempty"`
}

type Dns

type Dns struct {
	Uri string `json:"uri"`
}

type DnsSdMDns

type DnsSdMDns struct {
}

type ExtensionType

type ExtensionType struct {
	ExtensionId *string `json:"extensionId,omitempty"`
	Binary      *byte   `json:"binary,omitempty"` // HexBinary
	String      *string `json:"string,omitempty"`
}

type HeaderType

type HeaderType struct {
	ProtocolId ProtocolIdType `json:"protocolId"`
}

type MessageProtocolFormatType

type MessageProtocolFormatType string
const (
	MessageProtocolFormatTypeUTF8  MessageProtocolFormatType = "JSON-UTF8"
	MessageProtocolFormatTypeUTF16 MessageProtocolFormatType = "JSON-UTF16"
)

type MessageProtocolFormatsType

type MessageProtocolFormatsType struct {
	Format []MessageProtocolFormatType `json:"format"`
}

type MessageProtocolHandshake

type MessageProtocolHandshake struct {
	MessageProtocolHandshake MessageProtocolHandshakeType `json:"messageProtocolHandshake"`
}

type MessageProtocolHandshakeError

type MessageProtocolHandshakeError struct {
	Error MessageProtocolHandshakeErrorErrorType `json:"error"`
}

type MessageProtocolHandshakeErrorErrorType

type MessageProtocolHandshakeErrorErrorType uint8
const (
	MessageProtocolHandshakeErrorErrorTypeRFU               MessageProtocolHandshakeErrorErrorType = 0
	MessageProtocolHandshakeErrorErrorTypeTimeout           MessageProtocolHandshakeErrorErrorType = 1
	MessageProtocolHandshakeErrorErrorTypeUnexpectedMessage MessageProtocolHandshakeErrorErrorType = 2
	MessageProtocolHandshakeErrorErrorTypeSelectionMismatch MessageProtocolHandshakeErrorErrorType = 3
)

type MessageProtocolHandshakeErrorType

type MessageProtocolHandshakeErrorType struct {
	Error MessageProtocolHandshakeErrorErrorType `json:"error"`
}

type MessageProtocolHandshakeType

type MessageProtocolHandshakeType struct {
	HandshakeType ProtocolHandshakeTypeType  `json:"handshakeType"`
	Version       Version                    `json:"version"`
	Formats       MessageProtocolFormatsType `json:"formats"`
}

type PinInputPermissionType

type PinInputPermissionType string
const (
	PinInputPermissionTypeBusy PinInputPermissionType = "busy"
	PinInputPermissionTypeOk   PinInputPermissionType = "ok"
)

type PinStateType

type PinStateType string
const (
	PinStateTypeRequired PinStateType = "required"
	PinStateTypeOptional PinStateType = "optional"
	PinStateTypePinOk    PinStateType = "pinOk"
	PinStateTypeNone     PinStateType = "none"
)

type PinValueType

type PinValueType string

type ProtocolHandshakeTypeType

type ProtocolHandshakeTypeType string
const (
	ProtocolHandshakeTypeTypeAnnounceMax ProtocolHandshakeTypeType = "announceMax"
	ProtocolHandshakeTypeTypeSelect      ProtocolHandshakeTypeType = "select"
)

type ProtocolIdType

type ProtocolIdType string

type ShipData

type ShipData struct {
	Data DataType `json:"data"`
}

type Version

type Version struct {
	Major uint8 `json:"major"`
	Minor uint8 `json:"minor"`
}

Jump to

Keyboard shortcuts

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