package types

import "github.com/threefoldtech/tfgrid-sdk-go/rmb-sdk-go/peer/types"

Index

Variables

var File_types_proto protoreflect.FileDescriptor

Types

type Address

type Address struct {
	Twin       uint32  `protobuf:"varint,1,opt,name=twin,proto3" json:"twin,omitempty"`
	Connection *string `protobuf:"bytes,2,opt,name=connection,proto3,oneof" json:"connection,omitempty"`
	// contains filtered or unexported fields
}

func (*Address) Descriptor

func (*Address) Descriptor() ([]byte, []int)

Deprecated: Use Address.ProtoReflect.Descriptor instead.

func (*Address) GetConnection

func (x *Address) GetConnection() string

func (*Address) GetTwin

func (x *Address) GetTwin() uint32

func (*Address) ProtoMessage

func (*Address) ProtoMessage()

func (*Address) ProtoReflect

func (x *Address) ProtoReflect() protoreflect.Message

func (*Address) Reset

func (x *Address) Reset()

func (*Address) String

func (x *Address) String() string

type Envelope

type Envelope struct {

	// uid is auto generated by rmb.
	Uid string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid,omitempty"`
	// client specific tags
	Tags *string `protobuf:"bytes,2,opt,name=tags,proto3,oneof" json:"tags,omitempty"`
	// timestamp of sending the envlope
	Timestamp uint64 `protobuf:"varint,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	// message TTL from the time of send
	Expiration uint64 `protobuf:"varint,4,opt,name=expiration,proto3" json:"expiration,omitempty"`
	// sender id
	Source *Address `protobuf:"bytes,5,opt,name=source,proto3" json:"source,omitempty"`
	// destination of the envlope
	Destination *Address `protobuf:"bytes,6,opt,name=destination,proto3" json:"destination,omitempty"`
	// message inside the envlope
	//
	// Types that are assignable to Message:
	//
	//	*Envelope_Request
	//	*Envelope_Response
	//	*Envelope_Error
	//	*Envelope_Ping
	//	*Envelope_Pong
	Message isEnvelope_Message `protobuf_oneof:"message"`
	// signature
	Signature []byte `protobuf:"bytes,9,opt,name=signature,proto3,oneof" json:"signature,omitempty"`
	// schema of the payload of either the request or the resposne message.
	Schema *string `protobuf:"bytes,10,opt,name=schema,proto3,oneof" json:"schema,omitempty"`
	// a federation url (domain)
	// if not provided the relay assumes it's a local twin
	// but if provided it can be checked against the relay
	// domain, and hence decided if message need federation
	// or local.
	Federation *string `protobuf:"bytes,11,opt,name=federation,proto3,oneof" json:"federation,omitempty"`
	// pyload of the message is interpreted differently based
	// on the message filed
	//
	// Types that are assignable to Payload:
	//
	//	*Envelope_Plain
	//	*Envelope_Cipher
	Payload isEnvelope_Payload `protobuf_oneof:"payload"`
	Relays  []string           `protobuf:"bytes,17,rep,name=relays,proto3" json:"relays,omitempty"`
	// contains filtered or unexported fields
}

func (*Envelope) Descriptor

func (*Envelope) Descriptor() ([]byte, []int)

Deprecated: Use Envelope.ProtoReflect.Descriptor instead.

func (*Envelope) GetCipher

func (x *Envelope) GetCipher() []byte

func (*Envelope) GetDestination

func (x *Envelope) GetDestination() *Address

func (*Envelope) GetError

func (x *Envelope) GetError() *Error

func (*Envelope) GetExpiration

func (x *Envelope) GetExpiration() uint64

func (*Envelope) GetFederation

func (x *Envelope) GetFederation() string

func (*Envelope) GetMessage

func (m *Envelope) GetMessage() isEnvelope_Message

func (*Envelope) GetPayload

func (m *Envelope) GetPayload() isEnvelope_Payload

func (*Envelope) GetPing

func (x *Envelope) GetPing() *Ping

func (*Envelope) GetPlain

func (x *Envelope) GetPlain() []byte

func (*Envelope) GetPong

func (x *Envelope) GetPong() *Pong

func (*Envelope) GetRelays

func (x *Envelope) GetRelays() []string

func (*Envelope) GetRequest

func (x *Envelope) GetRequest() *Request

func (*Envelope) GetResponse

func (x *Envelope) GetResponse() *Response

func (*Envelope) GetSchema

func (x *Envelope) GetSchema() string

func (*Envelope) GetSignature

func (x *Envelope) GetSignature() []byte

func (*Envelope) GetSource

func (x *Envelope) GetSource() *Address

func (*Envelope) GetTags

func (x *Envelope) GetTags() string

func (*Envelope) GetTimestamp

func (x *Envelope) GetTimestamp() uint64

func (*Envelope) GetUid

func (x *Envelope) GetUid() string

func (*Envelope) ProtoMessage

func (*Envelope) ProtoMessage()

func (*Envelope) ProtoReflect

func (x *Envelope) ProtoReflect() protoreflect.Message

func (*Envelope) Reset

func (x *Envelope) Reset()

func (*Envelope) String

func (x *Envelope) String() string

type Envelope_Cipher

type Envelope_Cipher struct {
	Cipher []byte `protobuf:"bytes,14,opt,name=cipher,proto3,oneof"`
}

type Envelope_Error

type Envelope_Error struct {
	Error *Error `protobuf:"bytes,12,opt,name=error,proto3,oneof"`
}

type Envelope_Ping

type Envelope_Ping struct {
	Ping *Ping `protobuf:"bytes,15,opt,name=ping,proto3,oneof"`
}

type Envelope_Plain

type Envelope_Plain struct {
	Plain []byte `protobuf:"bytes,13,opt,name=plain,proto3,oneof"`
}

type Envelope_Pong

type Envelope_Pong struct {
	Pong *Pong `protobuf:"bytes,16,opt,name=pong,proto3,oneof"`
}

type Envelope_Request

type Envelope_Request struct {
	Request *Request `protobuf:"bytes,7,opt,name=request,proto3,oneof"`
}

type Envelope_Response

type Envelope_Response struct {
	Response *Response `protobuf:"bytes,8,opt,name=response,proto3,oneof"`
}

type Error

type Error struct {

	// error code (app specific)
	Code uint32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
	// error message
	Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
	// contains filtered or unexported fields
}

A Error annotiate this message as an error message

func (*Error) Descriptor

func (*Error) Descriptor() ([]byte, []int)

Deprecated: Use Error.ProtoReflect.Descriptor instead.

func (*Error) GetCode

func (x *Error) GetCode() uint32

func (*Error) GetMessage

func (x *Error) GetMessage() string

func (*Error) ProtoMessage

func (*Error) ProtoMessage()

func (*Error) ProtoReflect

func (x *Error) ProtoReflect() protoreflect.Message

func (*Error) Reset

func (x *Error) Reset()

func (*Error) String

func (x *Error) String() string

type Ping

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

an app level ping pong in case you are using javascript and cant send ping messages when sending Pings, both signature and destination are ignored

func (*Ping) Descriptor

func (*Ping) Descriptor() ([]byte, []int)

Deprecated: Use Ping.ProtoReflect.Descriptor instead.

func (*Ping) ProtoMessage

func (*Ping) ProtoMessage()

func (*Ping) ProtoReflect

func (x *Ping) ProtoReflect() protoreflect.Message

func (*Ping) Reset

func (x *Ping) Reset()

func (*Ping) String

func (x *Ping) String() string

type Pong

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

if the relay received an envelope ping, an envelope pong will be sent back to the client

func (*Pong) Descriptor

func (*Pong) Descriptor() ([]byte, []int)

Deprecated: Use Pong.ProtoReflect.Descriptor instead.

func (*Pong) ProtoMessage

func (*Pong) ProtoMessage()

func (*Pong) ProtoReflect

func (x *Pong) ProtoReflect() protoreflect.Message

func (*Pong) Reset

func (x *Pong) Reset()

func (*Pong) String

func (x *Pong) String() string

type Request

type Request struct {
	Command string `protobuf:"bytes,1,opt,name=command,proto3" json:"command,omitempty"`
	// contains filtered or unexported fields
}

A Request annotate this message as a request message with proper command

func (*Request) Descriptor

func (*Request) Descriptor() ([]byte, []int)

Deprecated: Use Request.ProtoReflect.Descriptor instead.

func (*Request) GetCommand

func (x *Request) GetCommand() string

func (*Request) ProtoMessage

func (*Request) ProtoMessage()

func (*Request) ProtoReflect

func (x *Request) ProtoReflect() protoreflect.Message

func (*Request) Reset

func (x *Request) Reset()

func (*Request) String

func (x *Request) String() string

type Response

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

A Response annotate this message as a response message

func (*Response) Descriptor

func (*Response) Descriptor() ([]byte, []int)

Deprecated: Use Response.ProtoReflect.Descriptor instead.

func (*Response) ProtoMessage

func (*Response) ProtoMessage()

func (*Response) ProtoReflect

func (x *Response) ProtoReflect() protoreflect.Message

func (*Response) Reset

func (x *Response) Reset()

func (*Response) String

func (x *Response) String() string

Source Files

types.pb.go

Version
v0.16.6 (latest)
Published
Mar 17, 2025
Platform
linux/amd64
Imports
4 packages
Last checked
19 hours ago

Tools for package owners.