pb

package
v0.36.3 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2024 License: MIT Imports: 4 Imported by: 32

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Status_name = map[int32]string{
		0:   "UNUSED",
		100: "OK",
		200: "RESERVATION_REFUSED",
		201: "RESOURCE_LIMIT_EXCEEDED",
		202: "PERMISSION_DENIED",
		203: "CONNECTION_FAILED",
		204: "NO_RESERVATION",
		400: "MALFORMED_MESSAGE",
		401: "UNEXPECTED_MESSAGE",
	}
	Status_value = map[string]int32{
		"UNUSED":                  0,
		"OK":                      100,
		"RESERVATION_REFUSED":     200,
		"RESOURCE_LIMIT_EXCEEDED": 201,
		"PERMISSION_DENIED":       202,
		"CONNECTION_FAILED":       203,
		"NO_RESERVATION":          204,
		"MALFORMED_MESSAGE":       400,
		"UNEXPECTED_MESSAGE":      401,
	}
)

Enum value maps for Status.

View Source
var (
	HopMessage_Type_name = map[int32]string{
		0: "RESERVE",
		1: "CONNECT",
		2: "STATUS",
	}
	HopMessage_Type_value = map[string]int32{
		"RESERVE": 0,
		"CONNECT": 1,
		"STATUS":  2,
	}
)

Enum value maps for HopMessage_Type.

View Source
var (
	StopMessage_Type_name = map[int32]string{
		0: "CONNECT",
		1: "STATUS",
	}
	StopMessage_Type_value = map[string]int32{
		"CONNECT": 0,
		"STATUS":  1,
	}
)

Enum value maps for StopMessage_Type.

View Source
var File_p2p_protocol_circuitv2_pb_circuit_proto protoreflect.FileDescriptor
View Source
var File_p2p_protocol_circuitv2_pb_voucher_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type HopMessage

type HopMessage struct {

	// This field is marked optional for backwards compatibility with proto2.
	// Users should make sure to always set this.
	Type        *HopMessage_Type `protobuf:"varint,1,opt,name=type,proto3,enum=circuit.pb.HopMessage_Type,oneof" json:"type,omitempty"`
	Peer        *Peer            `protobuf:"bytes,2,opt,name=peer,proto3,oneof" json:"peer,omitempty"`
	Reservation *Reservation     `protobuf:"bytes,3,opt,name=reservation,proto3,oneof" json:"reservation,omitempty"`
	Limit       *Limit           `protobuf:"bytes,4,opt,name=limit,proto3,oneof" json:"limit,omitempty"`
	Status      *Status          `protobuf:"varint,5,opt,name=status,proto3,enum=circuit.pb.Status,oneof" json:"status,omitempty"`
	// contains filtered or unexported fields
}

func (*HopMessage) Descriptor deprecated

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

Deprecated: Use HopMessage.ProtoReflect.Descriptor instead.

func (*HopMessage) GetLimit

func (x *HopMessage) GetLimit() *Limit

func (*HopMessage) GetPeer

func (x *HopMessage) GetPeer() *Peer

func (*HopMessage) GetReservation

func (x *HopMessage) GetReservation() *Reservation

func (*HopMessage) GetStatus

func (x *HopMessage) GetStatus() Status

func (*HopMessage) GetType

func (x *HopMessage) GetType() HopMessage_Type

func (*HopMessage) ProtoMessage

func (*HopMessage) ProtoMessage()

func (*HopMessage) ProtoReflect added in v0.25.0

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

func (*HopMessage) Reset

func (x *HopMessage) Reset()

func (*HopMessage) String

func (x *HopMessage) String() string

type HopMessage_Type

type HopMessage_Type int32
const (
	HopMessage_RESERVE HopMessage_Type = 0
	HopMessage_CONNECT HopMessage_Type = 1
	HopMessage_STATUS  HopMessage_Type = 2
)

func (HopMessage_Type) Descriptor added in v0.25.0

func (HopMessage_Type) Enum

func (x HopMessage_Type) Enum() *HopMessage_Type

func (HopMessage_Type) EnumDescriptor deprecated

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

Deprecated: Use HopMessage_Type.Descriptor instead.

func (HopMessage_Type) Number added in v0.25.0

func (HopMessage_Type) String

func (x HopMessage_Type) String() string

func (HopMessage_Type) Type added in v0.25.0

type Limit

type Limit struct {
	Duration *uint32 `protobuf:"varint,1,opt,name=duration,proto3,oneof" json:"duration,omitempty"` // seconds
	Data     *uint64 `protobuf:"varint,2,opt,name=data,proto3,oneof" json:"data,omitempty"`         // bytes
	// contains filtered or unexported fields
}

func (*Limit) Descriptor deprecated

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

Deprecated: Use Limit.ProtoReflect.Descriptor instead.

func (*Limit) GetData

func (x *Limit) GetData() uint64

func (*Limit) GetDuration

func (x *Limit) GetDuration() uint32

func (*Limit) ProtoMessage

func (*Limit) ProtoMessage()

func (*Limit) ProtoReflect added in v0.25.0

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

func (*Limit) Reset

func (x *Limit) Reset()

func (*Limit) String

func (x *Limit) String() string

type Peer

type Peer struct {

	// This field is marked optional for backwards compatibility with proto2.
	// Users should make sure to always set this.
	Id    []byte   `protobuf:"bytes,1,opt,name=id,proto3,oneof" json:"id,omitempty"`
	Addrs [][]byte `protobuf:"bytes,2,rep,name=addrs,proto3" json:"addrs,omitempty"`
	// contains filtered or unexported fields
}

func (*Peer) Descriptor deprecated

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

Deprecated: Use Peer.ProtoReflect.Descriptor instead.

func (*Peer) GetAddrs

func (x *Peer) GetAddrs() [][]byte

func (*Peer) GetId

func (x *Peer) GetId() []byte

func (*Peer) ProtoMessage

func (*Peer) ProtoMessage()

func (*Peer) ProtoReflect added in v0.25.0

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

func (*Peer) Reset

func (x *Peer) Reset()

func (*Peer) String

func (x *Peer) String() string

type Reservation

type Reservation struct {

	// This field is marked optional for backwards compatibility with proto2.
	// Users should make sure to always set this.
	Expire  *uint64  `protobuf:"varint,1,opt,name=expire,proto3,oneof" json:"expire,omitempty"`  // Unix expiration time (UTC)
	Addrs   [][]byte `protobuf:"bytes,2,rep,name=addrs,proto3" json:"addrs,omitempty"`           // relay addrs for reserving peer
	Voucher []byte   `protobuf:"bytes,3,opt,name=voucher,proto3,oneof" json:"voucher,omitempty"` // reservation voucher
	// contains filtered or unexported fields
}

func (*Reservation) Descriptor deprecated

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

Deprecated: Use Reservation.ProtoReflect.Descriptor instead.

func (*Reservation) GetAddrs

func (x *Reservation) GetAddrs() [][]byte

func (*Reservation) GetExpire

func (x *Reservation) GetExpire() uint64

func (*Reservation) GetVoucher

func (x *Reservation) GetVoucher() []byte

func (*Reservation) ProtoMessage

func (*Reservation) ProtoMessage()

func (*Reservation) ProtoReflect added in v0.25.0

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

func (*Reservation) Reset

func (x *Reservation) Reset()

func (*Reservation) String

func (x *Reservation) String() string

type ReservationVoucher

type ReservationVoucher struct {

	// These fields are marked optional for backwards compatibility with proto2.
	// Users should make sure to always set these.
	Relay      []byte  `protobuf:"bytes,1,opt,name=relay,proto3,oneof" json:"relay,omitempty"`
	Peer       []byte  `protobuf:"bytes,2,opt,name=peer,proto3,oneof" json:"peer,omitempty"`
	Expiration *uint64 `protobuf:"varint,3,opt,name=expiration,proto3,oneof" json:"expiration,omitempty"`
	// contains filtered or unexported fields
}

func (*ReservationVoucher) Descriptor deprecated

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

Deprecated: Use ReservationVoucher.ProtoReflect.Descriptor instead.

func (*ReservationVoucher) GetExpiration

func (x *ReservationVoucher) GetExpiration() uint64

func (*ReservationVoucher) GetPeer

func (x *ReservationVoucher) GetPeer() []byte

func (*ReservationVoucher) GetRelay

func (x *ReservationVoucher) GetRelay() []byte

func (*ReservationVoucher) ProtoMessage

func (*ReservationVoucher) ProtoMessage()

func (*ReservationVoucher) ProtoReflect added in v0.25.0

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

func (*ReservationVoucher) Reset

func (x *ReservationVoucher) Reset()

func (*ReservationVoucher) String

func (x *ReservationVoucher) String() string

type Status

type Status int32
const (
	// zero value field required for proto3 compatibility
	Status_UNUSED                  Status = 0
	Status_OK                      Status = 100
	Status_RESERVATION_REFUSED     Status = 200
	Status_RESOURCE_LIMIT_EXCEEDED Status = 201
	Status_PERMISSION_DENIED       Status = 202
	Status_CONNECTION_FAILED       Status = 203
	Status_NO_RESERVATION          Status = 204
	Status_MALFORMED_MESSAGE       Status = 400
	Status_UNEXPECTED_MESSAGE      Status = 401
)

func (Status) Descriptor added in v0.25.0

func (Status) Descriptor() protoreflect.EnumDescriptor

func (Status) Enum

func (x Status) Enum() *Status

func (Status) EnumDescriptor deprecated

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

Deprecated: Use Status.Descriptor instead.

func (Status) Number added in v0.25.0

func (x Status) Number() protoreflect.EnumNumber

func (Status) String

func (x Status) String() string

func (Status) Type added in v0.25.0

func (Status) Type() protoreflect.EnumType

type StopMessage

type StopMessage struct {

	// This field is marked optional for backwards compatibility with proto2.
	// Users should make sure to always set this.
	Type   *StopMessage_Type `protobuf:"varint,1,opt,name=type,proto3,enum=circuit.pb.StopMessage_Type,oneof" json:"type,omitempty"`
	Peer   *Peer             `protobuf:"bytes,2,opt,name=peer,proto3,oneof" json:"peer,omitempty"`
	Limit  *Limit            `protobuf:"bytes,3,opt,name=limit,proto3,oneof" json:"limit,omitempty"`
	Status *Status           `protobuf:"varint,4,opt,name=status,proto3,enum=circuit.pb.Status,oneof" json:"status,omitempty"`
	// contains filtered or unexported fields
}

func (*StopMessage) Descriptor deprecated

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

Deprecated: Use StopMessage.ProtoReflect.Descriptor instead.

func (*StopMessage) GetLimit

func (x *StopMessage) GetLimit() *Limit

func (*StopMessage) GetPeer

func (x *StopMessage) GetPeer() *Peer

func (*StopMessage) GetStatus

func (x *StopMessage) GetStatus() Status

func (*StopMessage) GetType

func (x *StopMessage) GetType() StopMessage_Type

func (*StopMessage) ProtoMessage

func (*StopMessage) ProtoMessage()

func (*StopMessage) ProtoReflect added in v0.25.0

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

func (*StopMessage) Reset

func (x *StopMessage) Reset()

func (*StopMessage) String

func (x *StopMessage) String() string

type StopMessage_Type

type StopMessage_Type int32
const (
	StopMessage_CONNECT StopMessage_Type = 0
	StopMessage_STATUS  StopMessage_Type = 1
)

func (StopMessage_Type) Descriptor added in v0.25.0

func (StopMessage_Type) Enum

func (StopMessage_Type) EnumDescriptor deprecated

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

Deprecated: Use StopMessage_Type.Descriptor instead.

func (StopMessage_Type) Number added in v0.25.0

func (StopMessage_Type) String

func (x StopMessage_Type) String() string

func (StopMessage_Type) Type added in v0.25.0

Jump to

Keyboard shortcuts

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