pbmodel

package
v0.9.12 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Role_name = map[int32]string{
		0: "RoleUnknown",
		1: "RoleDestination",
		2: "RoleSource",
	}
	Role_value = map[string]int32{
		"RoleUnknown":     0,
		"RoleDestination": 1,
		"RoleSource":      2,
	}
)

Enum value maps for Role.

View Source
var File_model_proto protoreflect.FileDescriptor

Functions

func AsNetips

func AsNetips(pb []*AddrPort) []netip.AddrPort

Types

type Addr

type Addr struct {
	V4 []byte `protobuf:"bytes,1,opt,name=v4,proto3" json:"v4,omitempty"`
	V6 []byte `protobuf:"bytes,2,opt,name=v6,proto3" json:"v6,omitempty"`
	// contains filtered or unexported fields
}

func AddrFromNetip

func AddrFromNetip(addr netip.Addr) *Addr

func (*Addr) AsNetip

func (a *Addr) AsNetip() netip.Addr

func (*Addr) Descriptor deprecated

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

Deprecated: Use Addr.ProtoReflect.Descriptor instead.

func (*Addr) GetV4

func (x *Addr) GetV4() []byte

func (*Addr) GetV6

func (x *Addr) GetV6() []byte

func (*Addr) ProtoMessage

func (*Addr) ProtoMessage()

func (*Addr) ProtoReflect

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

func (*Addr) Reset

func (x *Addr) Reset()

func (*Addr) String

func (x *Addr) String() string

type AddrPort

type AddrPort struct {
	Addr *Addr  `protobuf:"bytes,1,opt,name=addr,proto3" json:"addr,omitempty"`
	Port uint32 `protobuf:"varint,2,opt,name=port,proto3" json:"port,omitempty"` // really uint16, but not a thing in protobuf
	// contains filtered or unexported fields
}

func AddrPortFromNet

func AddrPortFromNet(addr net.Addr) (*AddrPort, error)

func AddrPortFromNetip

func AddrPortFromNetip(addr netip.AddrPort) *AddrPort

func AsAddrPorts

func AsAddrPorts(addrs []netip.AddrPort) []*AddrPort

func (*AddrPort) AsNetip

func (a *AddrPort) AsNetip() netip.AddrPort

func (*AddrPort) Descriptor deprecated

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

Deprecated: Use AddrPort.ProtoReflect.Descriptor instead.

func (*AddrPort) GetAddr

func (x *AddrPort) GetAddr() *Addr

func (*AddrPort) GetPort

func (x *AddrPort) GetPort() uint32

func (*AddrPort) ProtoMessage

func (*AddrPort) ProtoMessage()

func (*AddrPort) ProtoReflect

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

func (*AddrPort) Reset

func (x *AddrPort) Reset()

func (*AddrPort) String

func (x *AddrPort) String() string

type Endpoint added in v0.9.0

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

func (*Endpoint) Descriptor deprecated added in v0.9.0

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

Deprecated: Use Endpoint.ProtoReflect.Descriptor instead.

func (*Endpoint) GetName added in v0.9.0

func (x *Endpoint) GetName() string

func (*Endpoint) ProtoMessage added in v0.9.0

func (*Endpoint) ProtoMessage()

func (*Endpoint) ProtoReflect added in v0.9.0

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

func (*Endpoint) Reset added in v0.9.0

func (x *Endpoint) Reset()

func (*Endpoint) String added in v0.9.0

func (x *Endpoint) String() string

type HostPort

type HostPort struct {
	Host string `protobuf:"bytes,1,opt,name=host,proto3" json:"host,omitempty"`
	Port uint32 `protobuf:"varint,2,opt,name=port,proto3" json:"port,omitempty"`
	// contains filtered or unexported fields
}

func (*HostPort) Descriptor deprecated

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

Deprecated: Use HostPort.ProtoReflect.Descriptor instead.

func (*HostPort) GetHost

func (x *HostPort) GetHost() string

func (*HostPort) GetPort

func (x *HostPort) GetPort() uint32

func (*HostPort) ProtoMessage

func (*HostPort) ProtoMessage()

func (*HostPort) ProtoReflect

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

func (*HostPort) Reset

func (x *HostPort) Reset()

func (*HostPort) String

func (x *HostPort) String() string

type Role

type Role int32
const (
	Role_RoleUnknown     Role = 0
	Role_RoleDestination Role = 1
	Role_RoleSource      Role = 2
)

func (Role) Descriptor

func (Role) Descriptor() protoreflect.EnumDescriptor

func (Role) Enum

func (x Role) Enum() *Role

func (Role) EnumDescriptor deprecated

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

Deprecated: Use Role.Descriptor instead.

func (Role) Number

func (x Role) Number() protoreflect.EnumNumber

func (Role) String

func (x Role) String() string

func (Role) Type

func (Role) Type() protoreflect.EnumType

Jump to

Keyboard shortcuts

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