geoipv3

package
v0.11.3 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2023 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_envoy_extensions_filters_http_geoip_v3_geoip_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type Geoip

type Geoip struct {

	// If set, the :ref:`xff_num_trusted_hops <envoy_v3_api_field_extensions.filters.http.geoip.v3.Geoip.XffConfig.xff_num_trusted_hops>` field will be used to determine
	// trusted client address from `x-forwarded-for` header.
	// Otherwise, the immediate downstream connection source address will be used.
	// [#next-free-field: 2]
	XffConfig *Geoip_XffConfig `protobuf:"bytes,1,opt,name=xff_config,json=xffConfig,proto3" json:"xff_config,omitempty"`
	// Configuration for geolocation headers to add to request.
	GeoHeadersToAdd *Geoip_GeolocationHeadersToAdd `protobuf:"bytes,2,opt,name=geo_headers_to_add,json=geoHeadersToAdd,proto3" json:"geo_headers_to_add,omitempty"`
	// Geolocation provider specific configuration.
	Provider *v3.TypedExtensionConfig `protobuf:"bytes,3,opt,name=provider,proto3" json:"provider,omitempty"`
	// contains filtered or unexported fields
}

func (*Geoip) Descriptor deprecated

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

Deprecated: Use Geoip.ProtoReflect.Descriptor instead.

func (*Geoip) GetGeoHeadersToAdd

func (x *Geoip) GetGeoHeadersToAdd() *Geoip_GeolocationHeadersToAdd

func (*Geoip) GetProvider

func (x *Geoip) GetProvider() *v3.TypedExtensionConfig

func (*Geoip) GetXffConfig

func (x *Geoip) GetXffConfig() *Geoip_XffConfig

func (*Geoip) ProtoMessage

func (*Geoip) ProtoMessage()

func (*Geoip) ProtoReflect

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

func (*Geoip) Reset

func (x *Geoip) Reset()

func (*Geoip) String

func (x *Geoip) String() string

func (*Geoip) Validate

func (m *Geoip) Validate() error

Validate checks the field values on Geoip with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*Geoip) ValidateAll

func (m *Geoip) ValidateAll() error

ValidateAll checks the field values on Geoip with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in GeoipMultiError, or nil if none found.

type GeoipMultiError

type GeoipMultiError []error

GeoipMultiError is an error wrapping multiple validation errors returned by Geoip.ValidateAll() if the designated constraints aren't met.

func (GeoipMultiError) AllErrors

func (m GeoipMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (GeoipMultiError) Error

func (m GeoipMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type GeoipValidationError

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

GeoipValidationError is the validation error returned by Geoip.Validate if the designated constraints aren't met.

func (GeoipValidationError) Cause

func (e GeoipValidationError) Cause() error

Cause function returns cause value.

func (GeoipValidationError) Error

func (e GeoipValidationError) Error() string

Error satisfies the builtin error interface

func (GeoipValidationError) ErrorName

func (e GeoipValidationError) ErrorName() string

ErrorName returns error name.

func (GeoipValidationError) Field

func (e GeoipValidationError) Field() string

Field function returns field value.

func (GeoipValidationError) Key

func (e GeoipValidationError) Key() bool

Key function returns key value.

func (GeoipValidationError) Reason

func (e GeoipValidationError) Reason() string

Reason function returns reason value.

type Geoip_GeolocationHeadersToAdd

type Geoip_GeolocationHeadersToAdd struct {

	// If set, the header will be used to populate the country ISO code associated with the IP address.
	Country string `protobuf:"bytes,1,opt,name=country,proto3" json:"country,omitempty"`
	// If set, the header will be used to populate the city associated with the IP address.
	City string `protobuf:"bytes,2,opt,name=city,proto3" json:"city,omitempty"`
	// If set, the header will be used to populate the region ISO code associated with the IP address.
	Region string `protobuf:"bytes,3,opt,name=region,proto3" json:"region,omitempty"`
	// If set, the header will be used to populate the ASN associated with the IP address.
	Asn string `protobuf:"bytes,4,opt,name=asn,proto3" json:"asn,omitempty"`
	// If set, the IP address will be checked if it belongs to any type of anonymization network (e.g. VPN, public proxy etc)
	// and header will be populated with the check result. Header value will be set to either "true" or "false" depending on the check result.
	IsAnon string `protobuf:"bytes,5,opt,name=is_anon,json=isAnon,proto3" json:"is_anon,omitempty"`
	// If set, the IP address will be checked if it belongs to a VPN and header will be populated with the check result.
	// Header value will be set to either "true" or "false" depending on the check result.
	AnonVpn string `protobuf:"bytes,6,opt,name=anon_vpn,json=anonVpn,proto3" json:"anon_vpn,omitempty"`
	// If set, the IP address will be checked if it belongs to a hosting provider and header will be populated with the check result.
	// Header value will be set to either "true" or "false" depending on the check result.
	AnonHosting string `protobuf:"bytes,7,opt,name=anon_hosting,json=anonHosting,proto3" json:"anon_hosting,omitempty"`
	// If set, the IP address will be checked if it belongs to a TOR exit node and header will be populated with the check result.
	// Header value will be set to either "true" or "false" depending on the check result.
	AnonTor string `protobuf:"bytes,8,opt,name=anon_tor,json=anonTor,proto3" json:"anon_tor,omitempty"`
	// If set, the IP address will be checked if it belongs to a public proxy and header will be populated with the check result.
	// Header value will be set to either "true" or "false" depending on the check result.
	AnonProxy string `protobuf:"bytes,9,opt,name=anon_proxy,json=anonProxy,proto3" json:"anon_proxy,omitempty"`
	// contains filtered or unexported fields
}

The set of geolocation headers to add to request. If any of the configured headers is present in the incoming request, it will be overridden by Geoip filter. [#next-free-field: 10]

func (*Geoip_GeolocationHeadersToAdd) Descriptor deprecated

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

Deprecated: Use Geoip_GeolocationHeadersToAdd.ProtoReflect.Descriptor instead.

func (*Geoip_GeolocationHeadersToAdd) GetAnonHosting

func (x *Geoip_GeolocationHeadersToAdd) GetAnonHosting() string

func (*Geoip_GeolocationHeadersToAdd) GetAnonProxy

func (x *Geoip_GeolocationHeadersToAdd) GetAnonProxy() string

func (*Geoip_GeolocationHeadersToAdd) GetAnonTor

func (x *Geoip_GeolocationHeadersToAdd) GetAnonTor() string

func (*Geoip_GeolocationHeadersToAdd) GetAnonVpn

func (x *Geoip_GeolocationHeadersToAdd) GetAnonVpn() string

func (*Geoip_GeolocationHeadersToAdd) GetAsn

func (*Geoip_GeolocationHeadersToAdd) GetCity

func (*Geoip_GeolocationHeadersToAdd) GetCountry

func (x *Geoip_GeolocationHeadersToAdd) GetCountry() string

func (*Geoip_GeolocationHeadersToAdd) GetIsAnon

func (x *Geoip_GeolocationHeadersToAdd) GetIsAnon() string

func (*Geoip_GeolocationHeadersToAdd) GetRegion

func (x *Geoip_GeolocationHeadersToAdd) GetRegion() string

func (*Geoip_GeolocationHeadersToAdd) ProtoMessage

func (*Geoip_GeolocationHeadersToAdd) ProtoMessage()

func (*Geoip_GeolocationHeadersToAdd) ProtoReflect

func (*Geoip_GeolocationHeadersToAdd) Reset

func (x *Geoip_GeolocationHeadersToAdd) Reset()

func (*Geoip_GeolocationHeadersToAdd) String

func (*Geoip_GeolocationHeadersToAdd) Validate

func (m *Geoip_GeolocationHeadersToAdd) Validate() error

Validate checks the field values on Geoip_GeolocationHeadersToAdd with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*Geoip_GeolocationHeadersToAdd) ValidateAll

func (m *Geoip_GeolocationHeadersToAdd) ValidateAll() error

ValidateAll checks the field values on Geoip_GeolocationHeadersToAdd with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in Geoip_GeolocationHeadersToAddMultiError, or nil if none found.

type Geoip_GeolocationHeadersToAddMultiError

type Geoip_GeolocationHeadersToAddMultiError []error

Geoip_GeolocationHeadersToAddMultiError is an error wrapping multiple validation errors returned by Geoip_GeolocationHeadersToAdd.ValidateAll() if the designated constraints aren't met.

func (Geoip_GeolocationHeadersToAddMultiError) AllErrors

AllErrors returns a list of validation violation errors.

func (Geoip_GeolocationHeadersToAddMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type Geoip_GeolocationHeadersToAddValidationError

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

Geoip_GeolocationHeadersToAddValidationError is the validation error returned by Geoip_GeolocationHeadersToAdd.Validate if the designated constraints aren't met.

func (Geoip_GeolocationHeadersToAddValidationError) Cause

Cause function returns cause value.

func (Geoip_GeolocationHeadersToAddValidationError) Error

Error satisfies the builtin error interface

func (Geoip_GeolocationHeadersToAddValidationError) ErrorName

ErrorName returns error name.

func (Geoip_GeolocationHeadersToAddValidationError) Field

Field function returns field value.

func (Geoip_GeolocationHeadersToAddValidationError) Key

Key function returns key value.

func (Geoip_GeolocationHeadersToAddValidationError) Reason

Reason function returns reason value.

type Geoip_XffConfig

type Geoip_XffConfig struct {

	// The number of additional ingress proxy hops from the right side of the
	// :ref:`config_http_conn_man_headers_x-forwarded-for` HTTP header to trust when
	// determining the origin client's IP address. The default is zero if this option
	// is not specified. See the documentation for
	// :ref:`config_http_conn_man_headers_x-forwarded-for` for more information.
	XffNumTrustedHops uint32 `protobuf:"varint,1,opt,name=xff_num_trusted_hops,json=xffNumTrustedHops,proto3" json:"xff_num_trusted_hops,omitempty"`
	// contains filtered or unexported fields
}

func (*Geoip_XffConfig) Descriptor deprecated

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

Deprecated: Use Geoip_XffConfig.ProtoReflect.Descriptor instead.

func (*Geoip_XffConfig) GetXffNumTrustedHops

func (x *Geoip_XffConfig) GetXffNumTrustedHops() uint32

func (*Geoip_XffConfig) ProtoMessage

func (*Geoip_XffConfig) ProtoMessage()

func (*Geoip_XffConfig) ProtoReflect

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

func (*Geoip_XffConfig) Reset

func (x *Geoip_XffConfig) Reset()

func (*Geoip_XffConfig) String

func (x *Geoip_XffConfig) String() string

func (*Geoip_XffConfig) Validate

func (m *Geoip_XffConfig) Validate() error

Validate checks the field values on Geoip_XffConfig with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*Geoip_XffConfig) ValidateAll

func (m *Geoip_XffConfig) ValidateAll() error

ValidateAll checks the field values on Geoip_XffConfig with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in Geoip_XffConfigMultiError, or nil if none found.

type Geoip_XffConfigMultiError

type Geoip_XffConfigMultiError []error

Geoip_XffConfigMultiError is an error wrapping multiple validation errors returned by Geoip_XffConfig.ValidateAll() if the designated constraints aren't met.

func (Geoip_XffConfigMultiError) AllErrors

func (m Geoip_XffConfigMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (Geoip_XffConfigMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type Geoip_XffConfigValidationError

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

Geoip_XffConfigValidationError is the validation error returned by Geoip_XffConfig.Validate if the designated constraints aren't met.

func (Geoip_XffConfigValidationError) Cause

Cause function returns cause value.

func (Geoip_XffConfigValidationError) Error

Error satisfies the builtin error interface

func (Geoip_XffConfigValidationError) ErrorName

func (e Geoip_XffConfigValidationError) ErrorName() string

ErrorName returns error name.

func (Geoip_XffConfigValidationError) Field

Field function returns field value.

func (Geoip_XffConfigValidationError) Key

Key function returns key value.

func (Geoip_XffConfigValidationError) Reason

Reason function returns reason value.

Jump to

Keyboard shortcuts

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