pb

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthRelay        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowRelay          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupRelay = fmt.Errorf("proto: unexpected end of group")
)
View Source
var RelayMsg_Status_name = map[int32]string{
	0:  "SUCCESS",
	1:  "HOP_SRC_ADDR_TOO_LONG",
	2:  "HOP_DST_ADDR_TOO_LONG",
	3:  "HOP_SRC_MULTIADDR_INVALID",
	4:  "HOP_DST_MULTIADDR_INVALID",
	5:  "HOP_NO_CONN_TO_DST",
	6:  "HOP_CANT_DIAL_DST",
	7:  "HOP_CANT_OPEN_DST_STREAM",
	8:  "HOP_CANT_SPEAK_RELAY",
	9:  "HOP_CANT_RELAY_TO_SELF",
	10: "STOP_SRC_ADDR_TOO_LONG",
	11: "STOP_DST_ADDR_TOO_LONG",
	12: "STOP_SRC_MULTIADDR_INVALID",
	13: "STOP_DST_MULTIADDR_INVALID",
	14: "STOP_RELAY_REFUSED",
	15: "MALFORMED_MESSAGE",
}
View Source
var RelayMsg_Status_value = map[string]int32{
	"SUCCESS":                    0,
	"HOP_SRC_ADDR_TOO_LONG":      1,
	"HOP_DST_ADDR_TOO_LONG":      2,
	"HOP_SRC_MULTIADDR_INVALID":  3,
	"HOP_DST_MULTIADDR_INVALID":  4,
	"HOP_NO_CONN_TO_DST":         5,
	"HOP_CANT_DIAL_DST":          6,
	"HOP_CANT_OPEN_DST_STREAM":   7,
	"HOP_CANT_SPEAK_RELAY":       8,
	"HOP_CANT_RELAY_TO_SELF":     9,
	"STOP_SRC_ADDR_TOO_LONG":     10,
	"STOP_DST_ADDR_TOO_LONG":     11,
	"STOP_SRC_MULTIADDR_INVALID": 12,
	"STOP_DST_MULTIADDR_INVALID": 13,
	"STOP_RELAY_REFUSED":         14,
	"MALFORMED_MESSAGE":          15,
}
View Source
var RelayMsg_Type_name = map[int32]string{
	0: "HOP",
	1: "STOP",
	2: "STATUS",
}
View Source
var RelayMsg_Type_value = map[string]int32{
	"HOP":    0,
	"STOP":   1,
	"STATUS": 2,
}

Functions

This section is empty.

Types

type RelayMsg

type RelayMsg struct {
	Type    RelayMsg_Type   `protobuf:"varint,1,opt,name=type,proto3,enum=relay.RelayMsg_Type" json:"type,omitempty"`
	SrcPeer *RelayMsg_Peer  `protobuf:"bytes,2,opt,name=srcPeer,proto3" json:"srcPeer,omitempty"`
	DstPeer *RelayMsg_Peer  `protobuf:"bytes,3,opt,name=dstPeer,proto3" json:"dstPeer,omitempty"`
	Code    RelayMsg_Status `protobuf:"varint,4,opt,name=code,proto3,enum=relay.RelayMsg_Status" json:"code,omitempty"`
}

func (*RelayMsg) Descriptor

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

func (*RelayMsg) GetCode

func (m *RelayMsg) GetCode() RelayMsg_Status

func (*RelayMsg) GetDstPeer

func (m *RelayMsg) GetDstPeer() *RelayMsg_Peer

func (*RelayMsg) GetSrcPeer

func (m *RelayMsg) GetSrcPeer() *RelayMsg_Peer

func (*RelayMsg) GetType

func (m *RelayMsg) GetType() RelayMsg_Type

func (*RelayMsg) Marshal

func (m *RelayMsg) Marshal() (dAtA []byte, err error)

func (*RelayMsg) MarshalTo

func (m *RelayMsg) MarshalTo(dAtA []byte) (int, error)

func (*RelayMsg) MarshalToSizedBuffer

func (m *RelayMsg) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*RelayMsg) ProtoMessage

func (*RelayMsg) ProtoMessage()

func (*RelayMsg) Reset

func (m *RelayMsg) Reset()

func (*RelayMsg) Size

func (m *RelayMsg) Size() (n int)

func (*RelayMsg) String

func (m *RelayMsg) String() string

func (*RelayMsg) Unmarshal

func (m *RelayMsg) Unmarshal(dAtA []byte) error

func (*RelayMsg) XXX_DiscardUnknown

func (m *RelayMsg) XXX_DiscardUnknown()

func (*RelayMsg) XXX_Marshal

func (m *RelayMsg) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*RelayMsg) XXX_Merge

func (m *RelayMsg) XXX_Merge(src proto.Message)

func (*RelayMsg) XXX_Size

func (m *RelayMsg) XXX_Size() int

func (*RelayMsg) XXX_Unmarshal

func (m *RelayMsg) XXX_Unmarshal(b []byte) error

type RelayMsg_Peer

type RelayMsg_Peer struct {
	Id    []byte   `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Addrs [][]byte `protobuf:"bytes,2,rep,name=addrs,proto3" json:"addrs,omitempty"`
}

func (*RelayMsg_Peer) Descriptor

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

func (*RelayMsg_Peer) GetAddrs

func (m *RelayMsg_Peer) GetAddrs() [][]byte

func (*RelayMsg_Peer) GetId

func (m *RelayMsg_Peer) GetId() []byte

func (*RelayMsg_Peer) Marshal

func (m *RelayMsg_Peer) Marshal() (dAtA []byte, err error)

func (*RelayMsg_Peer) MarshalTo

func (m *RelayMsg_Peer) MarshalTo(dAtA []byte) (int, error)

func (*RelayMsg_Peer) MarshalToSizedBuffer

func (m *RelayMsg_Peer) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*RelayMsg_Peer) ProtoMessage

func (*RelayMsg_Peer) ProtoMessage()

func (*RelayMsg_Peer) Reset

func (m *RelayMsg_Peer) Reset()

func (*RelayMsg_Peer) Size

func (m *RelayMsg_Peer) Size() (n int)

func (*RelayMsg_Peer) String

func (m *RelayMsg_Peer) String() string

func (*RelayMsg_Peer) Unmarshal

func (m *RelayMsg_Peer) Unmarshal(dAtA []byte) error

func (*RelayMsg_Peer) XXX_DiscardUnknown

func (m *RelayMsg_Peer) XXX_DiscardUnknown()

func (*RelayMsg_Peer) XXX_Marshal

func (m *RelayMsg_Peer) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*RelayMsg_Peer) XXX_Merge

func (m *RelayMsg_Peer) XXX_Merge(src proto.Message)

func (*RelayMsg_Peer) XXX_Size

func (m *RelayMsg_Peer) XXX_Size() int

func (*RelayMsg_Peer) XXX_Unmarshal

func (m *RelayMsg_Peer) XXX_Unmarshal(b []byte) error

type RelayMsg_Status

type RelayMsg_Status int32
const (
	RelayMsg_SUCCESS                    RelayMsg_Status = 0
	RelayMsg_HOP_SRC_ADDR_TOO_LONG      RelayMsg_Status = 1
	RelayMsg_HOP_DST_ADDR_TOO_LONG      RelayMsg_Status = 2
	RelayMsg_HOP_SRC_MULTIADDR_INVALID  RelayMsg_Status = 3
	RelayMsg_HOP_DST_MULTIADDR_INVALID  RelayMsg_Status = 4
	RelayMsg_HOP_NO_CONN_TO_DST         RelayMsg_Status = 5
	RelayMsg_HOP_CANT_DIAL_DST          RelayMsg_Status = 6
	RelayMsg_HOP_CANT_OPEN_DST_STREAM   RelayMsg_Status = 7
	RelayMsg_HOP_CANT_SPEAK_RELAY       RelayMsg_Status = 8
	RelayMsg_HOP_CANT_RELAY_TO_SELF     RelayMsg_Status = 9
	RelayMsg_STOP_SRC_ADDR_TOO_LONG     RelayMsg_Status = 10
	RelayMsg_STOP_DST_ADDR_TOO_LONG     RelayMsg_Status = 11
	RelayMsg_STOP_SRC_MULTIADDR_INVALID RelayMsg_Status = 12
	RelayMsg_STOP_DST_MULTIADDR_INVALID RelayMsg_Status = 13
	RelayMsg_STOP_RELAY_REFUSED         RelayMsg_Status = 14
	RelayMsg_MALFORMED_MESSAGE          RelayMsg_Status = 15
)

func (RelayMsg_Status) EnumDescriptor

func (RelayMsg_Status) EnumDescriptor() ([]byte, []int)

func (RelayMsg_Status) String

func (x RelayMsg_Status) String() string

type RelayMsg_Type

type RelayMsg_Type int32
const (
	RelayMsg_HOP    RelayMsg_Type = 0
	RelayMsg_STOP   RelayMsg_Type = 1
	RelayMsg_STATUS RelayMsg_Type = 2
)

func (RelayMsg_Type) EnumDescriptor

func (RelayMsg_Type) EnumDescriptor() ([]byte, []int)

func (RelayMsg_Type) String

func (x RelayMsg_Type) String() string

Jump to

Keyboard shortcuts

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