router

package
v1.69.0 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const Domain_Attribute_BoolValue_case case_Domain_Attribute_TypedValue = 2
View Source
const Domain_Attribute_IntValue_case case_Domain_Attribute_TypedValue = 3
View Source
const Domain_Attribute_TypedValue_not_set_case case_Domain_Attribute_TypedValue = 0

Variables

View Source
var (
	Domain_Type_name = map[int32]string{
		0: "Plain",
		1: "Regex",
		2: "Domain",
		3: "Full",
	}
	Domain_Type_value = map[string]int32{
		"Plain":  0,
		"Regex":  1,
		"Domain": 2,
		"Full":   3,
	}
)

Enum value maps for Domain_Type.

View Source
var File_component_geodata_router_config_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type CIDR

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

IP for routing decision, in CIDR form.

func (*CIDR) GetIp

func (x *CIDR) GetIp() []byte

func (*CIDR) GetPrefix

func (x *CIDR) GetPrefix() uint32

func (*CIDR) ProtoMessage

func (*CIDR) ProtoMessage()

func (*CIDR) ProtoReflect

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

func (*CIDR) Reset

func (x *CIDR) Reset()

func (*CIDR) SetIp added in v1.66.0

func (x *CIDR) SetIp(v []byte)

func (*CIDR) SetPrefix added in v1.66.0

func (x *CIDR) SetPrefix(v uint32)

func (*CIDR) String

func (x *CIDR) String() string

type CIDR_builder added in v1.66.0

type CIDR_builder struct {

	// IP address, should be either 4 or 16 bytes.
	Ip []byte
	// Number of leading ones in the network mask.
	Prefix uint32
	// contains filtered or unexported fields
}

func (CIDR_builder) Build added in v1.66.0

func (b0 CIDR_builder) Build() *CIDR

type Domain

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

Domain for routing decision.

func (*Domain) GetAttribute

func (x *Domain) GetAttribute() []*Domain_Attribute

func (*Domain) GetType

func (x *Domain) GetType() Domain_Type

func (*Domain) GetValue

func (x *Domain) GetValue() string

func (*Domain) ProtoMessage

func (*Domain) ProtoMessage()

func (*Domain) ProtoReflect

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

func (*Domain) Reset

func (x *Domain) Reset()

func (*Domain) SetAttribute added in v1.66.0

func (x *Domain) SetAttribute(v []*Domain_Attribute)

func (*Domain) SetType added in v1.66.0

func (x *Domain) SetType(v Domain_Type)

func (*Domain) SetValue added in v1.66.0

func (x *Domain) SetValue(v string)

func (*Domain) String

func (x *Domain) String() string

type DomainMatcher

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

func NewDomainMatcher

func NewDomainMatcher(domains []*Domain, not bool) (*DomainMatcher, error)

NewDomainMatcher new domain matcher.

func NewMphMatcherGroup

func NewMphMatcherGroup(domains []*Domain, not bool) (*DomainMatcher, error)

func (*DomainMatcher) ApplyDomain

func (m *DomainMatcher) ApplyDomain(domain string) bool

type Domain_Attribute

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

func (*Domain_Attribute) ClearBoolValue added in v1.66.0

func (x *Domain_Attribute) ClearBoolValue()

func (*Domain_Attribute) ClearIntValue added in v1.66.0

func (x *Domain_Attribute) ClearIntValue()

func (*Domain_Attribute) ClearTypedValue added in v1.66.0

func (x *Domain_Attribute) ClearTypedValue()

func (*Domain_Attribute) GetBoolValue

func (x *Domain_Attribute) GetBoolValue() bool

func (*Domain_Attribute) GetIntValue

func (x *Domain_Attribute) GetIntValue() int64

func (*Domain_Attribute) GetKey

func (x *Domain_Attribute) GetKey() string

func (*Domain_Attribute) HasBoolValue added in v1.66.0

func (x *Domain_Attribute) HasBoolValue() bool

func (*Domain_Attribute) HasIntValue added in v1.66.0

func (x *Domain_Attribute) HasIntValue() bool

func (*Domain_Attribute) HasTypedValue added in v1.66.0

func (x *Domain_Attribute) HasTypedValue() bool

func (*Domain_Attribute) ProtoMessage

func (*Domain_Attribute) ProtoMessage()

func (*Domain_Attribute) ProtoReflect

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

func (*Domain_Attribute) Reset

func (x *Domain_Attribute) Reset()

func (*Domain_Attribute) SetBoolValue added in v1.66.0

func (x *Domain_Attribute) SetBoolValue(v bool)

func (*Domain_Attribute) SetIntValue added in v1.66.0

func (x *Domain_Attribute) SetIntValue(v int64)

func (*Domain_Attribute) SetKey added in v1.66.0

func (x *Domain_Attribute) SetKey(v string)

func (*Domain_Attribute) String

func (x *Domain_Attribute) String() string

func (*Domain_Attribute) WhichTypedValue added in v1.66.0

func (x *Domain_Attribute) WhichTypedValue() case_Domain_Attribute_TypedValue

type Domain_Attribute_builder added in v1.66.0

type Domain_Attribute_builder struct {
	Key string
	// Fields of oneof xxx_hidden_TypedValue:
	BoolValue *bool
	IntValue  *int64
	// contains filtered or unexported fields
}

func (Domain_Attribute_builder) Build added in v1.66.0

type Domain_Type

type Domain_Type int32

Type of domain value.

const (
	// The value is used as is.
	Domain_Plain Domain_Type = 0
	// The value is used as a regular expression.
	Domain_Regex Domain_Type = 1
	// The value is a root domain.
	Domain_Domain Domain_Type = 2
	// The value is a domain.
	Domain_Full Domain_Type = 3
)

func (Domain_Type) Descriptor

func (Domain_Type) Enum

func (x Domain_Type) Enum() *Domain_Type

func (Domain_Type) Number

func (x Domain_Type) Number() protoreflect.EnumNumber

func (Domain_Type) String

func (x Domain_Type) String() string

func (Domain_Type) Type

type Domain_builder added in v1.66.0

type Domain_builder struct {

	// Domain matching type.
	Type Domain_Type
	// Domain value.
	Value string
	// Attributes of this domain. May be used for filtering.
	Attribute []*Domain_Attribute
	// contains filtered or unexported fields
}

func (Domain_builder) Build added in v1.66.0

func (b0 Domain_builder) Build() *Domain

type GeoIP

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

func (*GeoIP) GetCidr

func (x *GeoIP) GetCidr() []*CIDR

func (*GeoIP) GetCountryCode

func (x *GeoIP) GetCountryCode() string

func (*GeoIP) GetReverseMatch

func (x *GeoIP) GetReverseMatch() bool

func (*GeoIP) ProtoMessage

func (*GeoIP) ProtoMessage()

func (*GeoIP) ProtoReflect

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

func (*GeoIP) Reset

func (x *GeoIP) Reset()

func (*GeoIP) SetCidr added in v1.66.0

func (x *GeoIP) SetCidr(v []*CIDR)

func (*GeoIP) SetCountryCode added in v1.66.0

func (x *GeoIP) SetCountryCode(v string)

func (*GeoIP) SetReverseMatch added in v1.66.0

func (x *GeoIP) SetReverseMatch(v bool)

func (*GeoIP) String

func (x *GeoIP) String() string

type GeoIPList

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

func (*GeoIPList) GetEntry

func (x *GeoIPList) GetEntry() []*GeoIP

func (*GeoIPList) ProtoMessage

func (*GeoIPList) ProtoMessage()

func (*GeoIPList) ProtoReflect

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

func (*GeoIPList) Reset

func (x *GeoIPList) Reset()

func (*GeoIPList) SetEntry added in v1.66.0

func (x *GeoIPList) SetEntry(v []*GeoIP)

func (*GeoIPList) String

func (x *GeoIPList) String() string

type GeoIPList_builder added in v1.66.0

type GeoIPList_builder struct {
	Entry []*GeoIP
	// contains filtered or unexported fields
}

func (GeoIPList_builder) Build added in v1.66.0

func (b0 GeoIPList_builder) Build() *GeoIPList

type GeoIP_builder added in v1.66.0

type GeoIP_builder struct {
	CountryCode  string
	Cidr         []*CIDR
	ReverseMatch bool
	// contains filtered or unexported fields
}

func (GeoIP_builder) Build added in v1.66.0

func (b0 GeoIP_builder) Build() *GeoIP

type GeoSite

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

func (*GeoSite) GetCountryCode

func (x *GeoSite) GetCountryCode() string

func (*GeoSite) GetDomain

func (x *GeoSite) GetDomain() []*Domain

func (*GeoSite) ProtoMessage

func (*GeoSite) ProtoMessage()

func (*GeoSite) ProtoReflect

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

func (*GeoSite) Reset

func (x *GeoSite) Reset()

func (*GeoSite) SetCountryCode added in v1.66.0

func (x *GeoSite) SetCountryCode(v string)

func (*GeoSite) SetDomain added in v1.66.0

func (x *GeoSite) SetDomain(v []*Domain)

func (*GeoSite) String

func (x *GeoSite) String() string

type GeoSiteList

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

func (*GeoSiteList) GetEntry

func (x *GeoSiteList) GetEntry() []*GeoSite

func (*GeoSiteList) ProtoMessage

func (*GeoSiteList) ProtoMessage()

func (*GeoSiteList) ProtoReflect

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

func (*GeoSiteList) Reset

func (x *GeoSiteList) Reset()

func (*GeoSiteList) SetEntry added in v1.66.0

func (x *GeoSiteList) SetEntry(v []*GeoSite)

func (*GeoSiteList) String

func (x *GeoSiteList) String() string

type GeoSiteList_builder added in v1.66.0

type GeoSiteList_builder struct {
	Entry []*GeoSite
	// contains filtered or unexported fields
}

func (GeoSiteList_builder) Build added in v1.66.0

func (b0 GeoSiteList_builder) Build() *GeoSiteList

type GeoSite_builder added in v1.66.0

type GeoSite_builder struct {
	CountryCode string
	Domain      []*Domain
	// contains filtered or unexported fields
}

func (GeoSite_builder) Build added in v1.66.0

func (b0 GeoSite_builder) Build() *GeoSite

Jump to

Keyboard shortcuts

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