Documentation
¶
Index ¶
- Variables
- func BinaryRule() *validate.Rule
- func DurationGreaterThanZero(value any, h *validate.Helper) (any, error)
- func DurationRule() *validate.Rule
- type AdditionalAddress
- type Address
- type ApiConfigSource
- type ApiType
- type ApiVersion
- type Binary
- type BindConfig
- type CodecClientType
- type ConfigSource
- type CustomHealthCheck
- type DataSource
- type DnsResolutionConfig
- type DnsResolverOptions
- type DoubleMatcher
- type DoubleRange
- type Duration
- type DurationObject
- type DurationRestricted
- type Empty
- type EnvoyInternalAddress
- type ExtensionConfigSource
- type ExtraSourceAddress
- type FractionalPercent
- type GoogleCallCredentials
- type GoogleCallCredentialsFromPlugin
- type GoogleCallCredentialsGoogleIam
- type GoogleCallCredentialsServiceAccountJwtAccess
- type GoogleCallCredentialsStsService
- type GrpcHealthCheck
- type GrpcService
- type GrpcServiceEnvoyGrpc
- type GrpcServiceGoogleGrpc
- type GrpcServiceGoogleGrpcChannelCredentials
- type GrpcServiceGoogleGrpcChannelCredentialsSslCredentials
- type HeaderAppendAction
- type HeaderMatcher
- type HeaderValue
- type HeaderValueOption
- type HealthCheck
- type HealthCheckPayload
- type HealthCheckTlsOptions
- type HealthStatus
- type HealthStatusSet
- type Http1ProtocolOptions
- type Http1ProtocolOptionsHeaderKeyFormat
- type Http1ProtocolOptionsHeaderKeyFormatProperCaseWords
- type Http2ProtocolOptions
- type HttpHealthCheck
- type HttpProtocolOptions
- type HttpProtocolOptionsHeadersWithUnderscoresAction
- type HttpStatus
- type IntRange
- type KeepaliveSettings
- type ListStringMatcher
- type ListValue
- type Locality
- type MetadataMatcher
- type MetadataMatcherPath
- type MetadataMatcherValue
- type PathConfigSource
- type Percent
- type Pipe
- type Port
- type Priority
- type QueryParameterMatcher
- type RateLimitSettings
- type RegexMatcher
- type RegexMatcherGoogleRe2
- type RequestMethod
- type RetryPolicy
- type RouteMatch
- type RouteMatchGrpc
- type RouteMatchRestricted
- type RouteMatchTlsContext
- type RoutingPriority
- type RuntimeDouble
- type RuntimeFeatureFlag
- type RuntimeFractionalPercent
- type SocketAddress
- type SocketAddressProtocol
- type SocketOption
- type SocketOptionState
- type SocketOptionsOverride
- type StatusCode
- type StringMatcher
- type Struct
- type TcpHealthCheck
- type TcpKeepalive
- type TimeInterval
- type TransportSocket
- type TransportSocketTypedConfig
- type TransportSocketTypedConfigType
- type TypedExtensionConfig
- type UInt32
- type UInt64
- type UpstreamHttpProtocolOptions
- type ValueMatcher
- type WatchedDirectory
Constants ¶
This section is empty.
Variables ¶
var RouteMatchXorPeers = []string{"prefix", "path", "safe_regex", "connect_matcher", "path_separated_prefix", "path_match_policy"}
RouteMatchXorPeers is RouteMatch's xor peer list. `connect_matcher` is named by the Joi `.xor()` although it is not a key of the object (envoyCommon.ts:196) — it must stay in the list so the conflict message matches byte for byte.
Functions ¶
func BinaryRule ¶
BinaryRule ports Joi.binary(). Joi coerces an accepted string with `Buffer.from(value)` (utf8) and JSON.stringify then renders the Buffer as {"type":"Buffer","data":[...]} — which is what TS stores, so the port emits the same shape rather than keeping the string.
func DurationGreaterThanZero ¶
DurationGreaterThanZero ports durationGreaterThanZeroMethod (envoyCommon.ts:117).
func DurationRule ¶
DurationRule ports `Duration = Joi.alternatives(DurationString, DurationObject)`. `Duration` is a bare `any` in Go (a union), so nothing reflects onto it — the rule has to be handed to each field that uses it.
The engine's alternatives currently reports a flat `alternatives.match` for every failure, where Joi surfaces the failing branch's own error (`string.pattern.base`, `object.unknown`, `number.min` on `seconds`) and only collapses to `alternatives.types` when the value is neither shape — see the engine note in the report. The SHAPE here is right either way; only the message differs.
Types ¶
type AdditionalAddress ¶
type AdditionalAddress struct {
Address *Address `json:"address,omitzero"`
}
type Address ¶
type Address struct {
Socket_address *SocketAddress `json:"socket_address,omitzero"`
Pipe *Pipe `json:"pipe,omitzero"`
Envoy_internal_address *EnvoyInternalAddress `json:"envoy_internal_address,omitzero"`
}
func (Address) ValidationRule ¶
ValidationRule ports Address' `.xor('socket_address','pipe','envoy_internal_address')`.
type ApiConfigSource ¶
type ApiConfigSource struct {
Api_type ApiType `json:"api_type,omitzero"`
Transport_api_version ApiVersion `json:"transport_api_version,omitzero"`
Cluster_names []string `json:"cluster_names,omitzero"`
Grpc_services []GrpcService `json:"grpc_services,omitzero"`
Refresh_delay Duration `json:"refresh_delay,omitzero"`
Request_timeout Duration `json:"request_timeout,omitzero"`
Rate_limit_settings *RateLimitSettings `json:"rate_limit_settings,omitzero"`
Set_node_on_first_message_only *bool `json:"set_node_on_first_message_only,omitzero"`
Config_validators []TypedExtensionConfig `json:"config_validators,omitzero"`
}
type ApiType ¶
type ApiType string
func (ApiType) EnumValues ¶
EnumValues makes the generated string enums reflect to Joi.string().valid(...). The generator emits the constants but not the method, so without these the types validate as free-form strings.
type ApiVersion ¶
type ApiVersion string
const ( ApiVersionAuto ApiVersion = "AUTO" ApiVersionV2 ApiVersion = "V2" ApiVersionV3 ApiVersion = "V3" )
func (ApiVersion) EnumValues ¶
func (ApiVersion) EnumValues() []string
type Binary ¶
type Binary any
Binary is Joi.binary(): the wire carries a string, which Joi (convert:true) turns into a Buffer. It is a defined interface type so a single RegisterTypeRule covers every binary field rather than tagging each one.
type BindConfig ¶
type BindConfig struct {
Source_address *SocketAddress `json:"source_address,omitzero"`
Freebind *bool `json:"freebind,omitzero"`
Socket_options []SocketOption `json:"socket_options,omitzero"`
Extra_source_addresses []ExtraSourceAddress `json:"extra_source_addresses,omitzero"`
Additional_source_addresses []SocketAddress `json:"additional_source_addresses,omitzero"`
Local_address_selector *TypedExtensionConfig `json:"local_address_selector,omitzero"`
}
type CodecClientType ¶
type CodecClientType string
const ( CodecClientTypeHttp1 CodecClientType = "HTTP1" CodecClientTypeHttp2 CodecClientType = "HTTP2" )
func (CodecClientType) EnumValues ¶
func (CodecClientType) EnumValues() []string
type ConfigSource ¶
type ConfigSource struct {
Path string `json:"path,omitzero"`
Path_config_source *PathConfigSource `json:"path_config_source,omitzero"`
Api_config_source *ApiConfigSource `json:"api_config_source,omitzero"`
Initial_fetch_timeout Duration `json:"initial_fetch_timeout,omitzero"`
Resource_api_version ApiVersion `json:"resource_api_version,omitzero"`
}
func (ConfigSource) ValidationRule ¶
func (ConfigSource) ValidationRule() *validate.Rule
ValidationRule ports ConfigSource's `.xor('path','path_config_source','api_config_source')`.
type CustomHealthCheck ¶
type DataSource ¶
type DataSource struct {
Filename string `json:"filename,omitzero"`
Inline_bytes Binary `json:"inline_bytes,omitzero"`
Inline_string string `json:"inline_string,omitzero"`
Environment_variable string `json:"environment_variable,omitzero"`
}
func (DataSource) ValidationRule ¶
func (DataSource) ValidationRule() *validate.Rule
ValidationRule ports DataSource's `.xor('filename','inline_bytes','inline_string','environment_variable')`.
type DnsResolutionConfig ¶
type DnsResolutionConfig struct {
Resolvers []Address `json:"resolvers,omitzero"`
Dns_resolver_options *DnsResolverOptions `json:"dns_resolver_options,omitzero"`
}
type DnsResolverOptions ¶
type DoubleMatcher ¶
type DoubleMatcher struct {
Range *DoubleRange `json:"range,omitzero"`
Exact *float64 `json:"exact,omitzero"`
}
func (DoubleMatcher) ValidationRule ¶
func (DoubleMatcher) ValidationRule() *validate.Rule
ValidationRule ports DoubleMatcher's `.xor('range','exact')`.
type DoubleRange ¶
type DoubleRange struct {
Start *float64 `json:"start,omitzero"`
End *float64 `json:"end,omitzero"`
}
func (DoubleRange) ValidationRule ¶
func (DoubleRange) ValidationRule() *validate.Rule
ValidationRule ports RangeFactory(Joi.number()) for DoubleRange (envoyCommon.ts:31).
type Duration ¶
type Duration any //ts:string | DurationObject
Duration is a proto duration: either a string like "5s"/"15.5s" or a DurationObject{seconds,nanos}. Go has no union type, so it stays any-backed but is referenced by name.
type DurationObject ¶
type DurationObject struct {
Seconds *int `json:"seconds,omitzero"`
Nanos *int `json:"nanos,omitzero"`
}
DurationObject is the object form of a proto Duration (seconds 0..315576000000, nanos 0..999999999).
func (DurationObject) ValidationRule ¶
func (DurationObject) ValidationRule() *validate.Rule
ValidationRule ports `DurationObject`.
type DurationRestricted ¶
type DurationRestricted string
func (DurationRestricted) ValidationRule ¶
func (DurationRestricted) ValidationRule() *validate.Rule
ValidationRule ports `DurationRestricted = Joi.string().pattern(/^\d+s$/)`.
type EnvoyInternalAddress ¶
type ExtensionConfigSource ¶
type ExtensionConfigSource struct {
Config_source *ConfigSource `json:"config_source,omitzero"`
Default_config any `json:"default_config,omitzero"`
Apply_default_config_without_warming *bool `json:"apply_default_config_without_warming,omitzero"`
Type_urls []string `json:"type_urls,omitzero"`
}
type ExtraSourceAddress ¶
type ExtraSourceAddress struct {
Address *Address `json:"address,omitzero"`
Socket_options *SocketOptionsOverride `json:"socket_options,omitzero"`
}
type FractionalPercent ¶
type GoogleCallCredentials ¶
type GoogleCallCredentials struct {
Access_token string `json:"access_token,omitzero"`
Google_compute_engine *Empty `json:"google_compute_engine,omitzero"`
Google_refresh_token string `json:"google_refresh_token,omitzero"`
Service_account_jwt_access *GoogleCallCredentialsServiceAccountJwtAccess `json:"service_account_jwt_access,omitzero"`
Google_iam *GoogleCallCredentialsGoogleIam `json:"google_iam,omitzero"`
From_plugin *GoogleCallCredentialsFromPlugin `json:"from_plugin,omitzero"`
Sts_service *GoogleCallCredentialsStsService `json:"sts_service,omitzero"`
}
type GoogleCallCredentialsStsService ¶
type GoogleCallCredentialsStsService struct {
Token_exchange_service_uri string `json:"token_exchange_service_uri,omitzero"`
Resource string `json:"resource,omitzero"`
Audience string `json:"audience,omitzero"`
Scope string `json:"scope,omitzero"`
Requested_token_type string `json:"requested_token_type,omitzero"`
Subject_token_path string `json:"subject_token_path" validate:"required"`
Subject_token_type string `json:"subject_token_type" validate:"required"`
Actor_token_path string `json:"actor_token_path,omitzero"`
Actor_token_type string `json:"actor_token_type,omitzero"`
}
type GrpcHealthCheck ¶
type GrpcHealthCheck struct {
Service_name string `json:"service_name,omitzero"`
Authority string `json:"authority,omitzero"`
Initial_metadata []HeaderValueOption `json:"initial_metadata,omitzero"`
}
type GrpcService ¶
type GrpcService struct {
Envoy_grpc *GrpcServiceEnvoyGrpc `json:"envoy_grpc,omitzero"`
Google_grpc *GrpcServiceGoogleGrpc `json:"google_grpc,omitzero"`
Timeout Duration `json:"timeout,omitzero"`
Initial_metadata []HeaderValue `json:"initial_metadata,omitzero"`
}
func (GrpcService) ValidationRule ¶
func (GrpcService) ValidationRule() *validate.Rule
ValidationRule ports GrpcService: `.xor('envoy_grpc','google_grpc')` plus `timeout: Duration.default('0.200s')`.
type GrpcServiceEnvoyGrpc ¶
type GrpcServiceEnvoyGrpc struct {
Cluster_name string `json:"cluster_name" validate:"required"`
Authority string `json:"authority,omitzero"`
Retry_policy *RetryPolicy `json:"retry_policy,omitzero"`
}
func (GrpcServiceEnvoyGrpc) ValidationRule ¶
func (GrpcServiceEnvoyGrpc) ValidationRule() *validate.Rule
ValidationRule ports `authority: Joi.string().default(Joi.ref('cluster_name'))`.
type GrpcServiceGoogleGrpc ¶
type GrpcServiceGoogleGrpc struct {
Target_uri string `json:"target_uri" validate:"required"`
Channel_credentials *GrpcServiceGoogleGrpcChannelCredentials `json:"channel_credentials,omitzero"`
Call_credentials []GoogleCallCredentials `json:"call_credentials,omitzero"`
Stat_prefix string `json:"stat_prefix" validate:"required"`
Credentials_factory_name string `json:"credentials_factory_name,omitzero"`
Config Struct `json:"config,omitzero"`
}
type GrpcServiceGoogleGrpcChannelCredentials ¶
type GrpcServiceGoogleGrpcChannelCredentials struct {
Ssl_credentials *GrpcServiceGoogleGrpcChannelCredentialsSslCredentials `json:"ssl_credentials,omitzero"`
Google_default *Empty `json:"google_default,omitzero"`
}
func (GrpcServiceGoogleGrpcChannelCredentials) ValidationRule ¶
func (GrpcServiceGoogleGrpcChannelCredentials) ValidationRule() *validate.Rule
ValidationRule ports channel_credentials' `.xor('ssl_credentials','google_default')`.
type GrpcServiceGoogleGrpcChannelCredentialsSslCredentials ¶
type GrpcServiceGoogleGrpcChannelCredentialsSslCredentials struct {
Root_certs *DataSource `json:"root_certs,omitzero"`
Private_key *DataSource `json:"private_key,omitzero"`
Cert_chain *DataSource `json:"cert_chain,omitzero"`
}
type HeaderAppendAction ¶
type HeaderAppendAction string
const ( HeaderAppendActionAppendIfExistsOrAdd HeaderAppendAction = "APPEND_IF_EXISTS_OR_ADD" HeaderAppendActionAddIfAbsent HeaderAppendAction = "ADD_IF_ABSENT" HeaderAppendActionOverwriteIfExistsOrAdd HeaderAppendAction = "OVERWRITE_IF_EXISTS_OR_ADD" HeaderAppendActionOverwriteIfExists HeaderAppendAction = "OVERWRITE_IF_EXISTS" )
func (HeaderAppendAction) EnumValues ¶
func (HeaderAppendAction) EnumValues() []string
type HeaderMatcher ¶
type HeaderMatcher struct {
Name string `json:"name" validate:"required"`
Safe_regex_match *RegexMatcher `json:"safe_regex_match,omitzero"`
Range_match *IntRange `json:"range_match,omitzero"`
Present_match *bool `json:"present_match,omitzero"`
String_match *StringMatcher `json:"string_match,omitzero"`
Invert_match *bool `json:"invert_match,omitzero"`
Treat_missing_header_as_empty *bool `json:"treat_missing_header_as_empty,omitzero"`
}
type HeaderValue ¶
type HeaderValueOption ¶
type HeaderValueOption struct {
Header *HeaderValue `json:"header,omitzero"`
Append *bool `json:"append,omitzero"`
Append_action HeaderAppendAction `json:"append_action,omitzero"`
Keep_empty_value *bool `json:"keep_empty_value,omitzero"`
}
type HealthCheck ¶
type HealthCheck struct {
Timeout Duration `json:"timeout,omitzero"`
Interval Duration `json:"interval,omitzero"`
Initial_jitter Duration `json:"initial_jitter,omitzero"`
Interval_jitter Duration `json:"interval_jitter,omitzero"`
Interval_jitter_percent *UInt32 `json:"interval_jitter_percent,omitzero"`
Unhealthy_threshold *UInt32 `json:"unhealthy_threshold,omitzero"`
Healthy_threshold *UInt32 `json:"healthy_threshold,omitzero"`
Reuse_connection *bool `json:"reuse_connection,omitzero"`
Http_health_check *HttpHealthCheck `json:"http_health_check,omitzero"`
Tcp_health_check *TcpHealthCheck `json:"tcp_health_check,omitzero"`
Grpc_health_check *GrpcHealthCheck `json:"grpc_health_check,omitzero"`
Custom_health_check *CustomHealthCheck `json:"custom_health_check,omitzero"`
No_traffic_interval Duration `json:"no_traffic_interval,omitzero"`
No_traffic_healthy_interval Duration `json:"no_traffic_healthy_interval,omitzero"`
Unhealthy_interval Duration `json:"unhealthy_interval,omitzero"`
Healthy_edge_interval Duration `json:"healthy_edge_interval,omitzero"`
Event_log_path string `json:"event_log_path,omitzero"`
Event_logger []TypedExtensionConfig `json:"event_logger,omitzero"`
Always_log_health_check_failures *bool `json:"always_log_health_check_failures,omitzero"`
Tls_options *HealthCheckTlsOptions `json:"tls_options,omitzero"`
Transport_socket_match_criteria Struct `json:"transport_socket_match_criteria,omitzero"`
}
func (HealthCheck) ValidationRule ¶
func (HealthCheck) ValidationRule() *validate.Rule
ValidationRule ports HealthCheck's xor over the four check kinds.
type HealthCheckPayload ¶
type HealthCheckPayload struct {
Text string `json:"text,omitzero"`
Binary Binary `json:"binary,omitzero"`
}
func (HealthCheckPayload) ValidationRule ¶
func (HealthCheckPayload) ValidationRule() *validate.Rule
ValidationRule ports HealthCheckPayload's `.xor('text','binary')`.
type HealthCheckTlsOptions ¶
type HealthCheckTlsOptions struct {
Alpn_protocols []string `json:"alpn_protocols,omitzero"`
} //ts:export
type HealthStatus ¶
type HealthStatus string
const ( HealthStatusUnknown HealthStatus = "UNKNOWN" HealthStatusHealthy HealthStatus = "HEALTHY" HealthStatusUnhealthy HealthStatus = "UNHEALTHY" HealthStatusDraining HealthStatus = "DRAINING" HealthStatusTimeout HealthStatus = "TIMEOUT" HealthStatusDegraded HealthStatus = "DEGRADED" )
func (HealthStatus) EnumValues ¶
func (HealthStatus) EnumValues() []string
type HealthStatusSet ¶
type HealthStatusSet struct {
Statuses []HealthStatus `json:"statuses,omitzero"`
}
type Http1ProtocolOptions ¶
type Http1ProtocolOptions struct {
Allow_absolute_url *bool `json:"allow_absolute_url,omitzero"`
Accept_http_10 *bool `json:"accept_http_10,omitzero"`
Default_host_for_http_10 string `json:"default_host_for_http_10,omitzero"`
Header_key_format *Http1ProtocolOptionsHeaderKeyFormat `json:"header_key_format,omitzero"`
Enable_trailers *bool `json:"enable_trailers,omitzero"`
Allow_chunked_length *bool `json:"allow_chunked_length,omitzero"`
Override_stream_error_on_invalid_http_message *bool `json:"override_stream_error_on_invalid_http_message,omitzero"`
Send_fully_qualified_url *bool `json:"send_fully_qualified_url,omitzero"`
}
type Http1ProtocolOptionsHeaderKeyFormat ¶
type Http1ProtocolOptionsHeaderKeyFormat struct {
Proper_case_words *Http1ProtocolOptionsHeaderKeyFormatProperCaseWords `json:"proper_case_words,omitzero"`
Stateful_formatter *TypedExtensionConfig `json:"stateful_formatter,omitzero"`
}
type Http2ProtocolOptions ¶
type Http2ProtocolOptions struct {
Hpack_table_size *UInt32 `json:"hpack_table_size,omitzero"`
Max_concurrent_streams *UInt32 `json:"max_concurrent_streams,omitzero"`
Initial_stream_window_size *UInt32 `json:"initial_stream_window_size,omitzero"`
Initial_connection_window_size *UInt32 `json:"initial_connection_window_size,omitzero"`
Allow_connect *bool `json:"allow_connect,omitzero"`
Max_outbound_frames *UInt32 `json:"max_outbound_frames,omitzero"`
Max_outbound_control_frames *UInt32 `json:"max_outbound_control_frames,omitzero"`
Max_consecutive_inbound_frames_with_empty_payload *UInt32 `json:"max_consecutive_inbound_frames_with_empty_payload,omitzero"`
Max_inbound_priority_frames_per_stream *UInt32 `json:"max_inbound_priority_frames_per_stream,omitzero"`
Max_inbound_window_update_frames_per_data_frame_sent *UInt32 `json:"max_inbound_window_update_frames_per_data_frame_sent,omitzero"`
Stream_error_on_invalid_http_messaging *bool `json:"stream_error_on_invalid_http_messaging,omitzero"`
Override_stream_error_on_invalid_http_message *bool `json:"override_stream_error_on_invalid_http_message,omitzero"`
Connection_keepalive *KeepaliveSettings `json:"connection_keepalive,omitzero"`
}
type HttpHealthCheck ¶
type HttpHealthCheck struct {
Host string `json:"host,omitzero"`
Path string `json:"path" validate:"required"`
Receive []HealthCheckPayload `json:"receive,omitzero"`
Response_buffer_size *UInt64 `json:"response_buffer_size,omitzero"`
Request_headers_to_add []HeaderValueOption `json:"request_headers_to_add,omitzero"`
Request_headers_to_remove []string `json:"request_headers_to_remove,omitzero"`
Expected_statuses []IntRange `json:"expected_statuses,omitzero"`
Retriable_statuses []IntRange `json:"retriable_statuses,omitzero"`
Codec_client_type CodecClientType `json:"codec_client_type,omitzero"`
Service_name_matcher *StringMatcher `json:"service_name_matcher,omitzero"`
Method RequestMethod `json:"method,omitzero"`
}
type HttpProtocolOptions ¶
type HttpProtocolOptions struct {
Idle_timeout Duration `json:"idle_timeout,omitzero"`
Max_connection_duration Duration `json:"max_connection_duration,omitzero"`
Max_headers_count *UInt32 `json:"max_headers_count,omitzero"`
Max_stream_duration Duration `json:"max_stream_duration,omitzero"`
Headers_with_underscores_action HttpProtocolOptionsHeadersWithUnderscoresAction `json:"headers_with_underscores_action,omitzero"`
}
type HttpProtocolOptionsHeadersWithUnderscoresAction ¶
type HttpProtocolOptionsHeadersWithUnderscoresAction string
const ( HttpProtocolOptionsHeadersWithUnderscoresActionAllow HttpProtocolOptionsHeadersWithUnderscoresAction = "ALLOW" HttpProtocolOptionsHeadersWithUnderscoresActionRejectRequest HttpProtocolOptionsHeadersWithUnderscoresAction = "REJECT_REQUEST" HttpProtocolOptionsHeadersWithUnderscoresActionDropHeader HttpProtocolOptionsHeadersWithUnderscoresAction = "DROP_HEADER" )
func (HttpProtocolOptionsHeadersWithUnderscoresAction) EnumValues ¶
func (HttpProtocolOptionsHeadersWithUnderscoresAction) EnumValues() []string
type HttpStatus ¶
type HttpStatus struct {
Code StatusCode `json:"code,omitzero"`
}
type IntRange ¶
func (IntRange) ValidationRule ¶
ValidationRule ports RangeFactory(Joi.number().integer()) (envoyCommon.ts:34): end must be at least start.
type KeepaliveSettings ¶
type ListStringMatcher ¶
type ListStringMatcher struct {
Patterns []StringMatcher `json:"patterns,omitzero"`
}
type MetadataMatcher ¶
type MetadataMatcher struct {
Filter string `json:"filter" validate:"required"`
Path []MetadataMatcherPath `json:"path,omitzero"`
Value MetadataMatcherValue `json:"value" validate:"required"`
Invert *bool `json:"invert,omitzero"`
}
type MetadataMatcherPath ¶
type MetadataMatcherPath struct {
Key string `json:"key" validate:"required"`
}
type MetadataMatcherValue ¶
type MetadataMatcherValue struct {
Null_match any `json:"null_match,omitzero"`
Double_match *DoubleMatcher `json:"double_match,omitzero"`
String_match *StringMatcher `json:"string_match,omitzero"`
Bool_match *bool `json:"bool_match,omitzero"`
Present_match *bool `json:"present_match,omitzero"`
}
func (MetadataMatcherValue) ValidationRule ¶
func (MetadataMatcherValue) ValidationRule() *validate.Rule
ValidationRule ports ValueMatcher's xor — MetadataMatcherValue is the generator's second name for the same Joi schema.
type PathConfigSource ¶
type PathConfigSource struct {
Path string `json:"path" validate:"required"`
Watched_directory *WatchedDirectory `json:"watched_directory,omitzero"`
}
type Percent ¶
type Percent float64
func (Percent) ValidationRule ¶
ValidationRule ports `Percent = Joi.number().integer().min(0).max(100)`.
type Priority ¶
type Priority float64
func (Priority) ValidationRule ¶
ValidationRule ports `Priority = Joi.number().min(0).max(100)`.
type QueryParameterMatcher ¶
type QueryParameterMatcher struct {
Name string `json:"name" validate:"required"`
String_match *StringMatcher `json:"string_match,omitzero"`
Present_match *bool `json:"present_match,omitzero"`
}
func (QueryParameterMatcher) ValidationRule ¶
func (QueryParameterMatcher) ValidationRule() *validate.Rule
ValidationRule ports QueryParameterMatcher's `.xor('string_match','present_match')`.
type RateLimitSettings ¶
type RegexMatcher ¶
type RegexMatcher struct {
Google_re2 *RegexMatcherGoogleRe2 `json:"google_re2,omitzero"`
Regex string `json:"regex" validate:"required"`
}
type RegexMatcherGoogleRe2 ¶
type RegexMatcherGoogleRe2 struct {
Max_program_size *float64 `json:"max_program_size,omitzero" validate:"integer"`
}
type RequestMethod ¶
type RequestMethod string
const ( RequestMethodMethodUnspecified RequestMethod = "METHOD_UNSPECIFIED" RequestMethodGet RequestMethod = "GET" RequestMethodHead RequestMethod = "HEAD" RequestMethodPost RequestMethod = "POST" RequestMethodPut RequestMethod = "PUT" RequestMethodDelete RequestMethod = "DELETE" RequestMethodConnect RequestMethod = "CONNECT" RequestMethodOptions RequestMethod = "OPTIONS" RequestMethodTrace RequestMethod = "TRACE" RequestMethodPatch RequestMethod = "PATCH" )
func (RequestMethod) EnumValues ¶
func (RequestMethod) EnumValues() []string
type RetryPolicy ¶
type RetryPolicy struct {
Retry_back_off *TimeInterval `json:"retry_back_off,omitzero"`
Num_retries *float64 `json:"num_retries,omitzero" validate:"default=1"`
}
type RouteMatch ¶
type RouteMatch struct {
Prefix string `json:"prefix,omitzero"`
Path string `json:"path,omitzero"`
Safe_regex *RegexMatcher `json:"safe_regex,omitzero"`
Path_separated_prefix string `json:"path_separated_prefix,omitzero"`
Path_match_policy *TypedExtensionConfig `json:"path_match_policy,omitzero"`
Case_sensitive *bool `json:"case_sensitive,omitzero"`
Runtime_fraction *RuntimeFractionalPercent `json:"runtime_fraction,omitzero"`
Headers []HeaderMatcher `json:"headers,omitzero"`
Query_parameters []QueryParameterMatcher `json:"query_parameters,omitzero"`
Grpc *RouteMatchGrpc `json:"grpc,omitzero"`
Tls_context *RouteMatchTlsContext `json:"tls_context,omitzero"`
Dynamic_metadata []MetadataMatcher `json:"dynamic_metadata,omitzero"`
}
func (RouteMatch) ValidationRule ¶
func (RouteMatch) ValidationRule() *validate.Rule
ValidationRule ports RouteMatch's xor.
type RouteMatchGrpc ¶
type RouteMatchRestricted ¶
type RouteMatchRestricted struct {
Prefix string `json:"prefix,omitzero"`
Headers []HeaderMatcher `json:"headers,omitzero"`
}
type RouteMatchTlsContext ¶
type RoutingPriority ¶
type RoutingPriority string
const ( RoutingPriorityDefault RoutingPriority = "DEFAULT" RoutingPriorityHigh RoutingPriority = "HIGH" )
func (RoutingPriority) EnumValues ¶
func (RoutingPriority) EnumValues() []string
type RuntimeDouble ¶
type RuntimeFeatureFlag ¶
type RuntimeFractionalPercent ¶
type RuntimeFractionalPercent struct {
Default_value *FractionalPercent `json:"default_value,omitzero"`
Runtime_key string `json:"runtime_key" validate:"required"`
}
type SocketAddress ¶
type SocketAddress struct {
Protocol SocketAddressProtocol `json:"protocol,omitzero"`
Address string `json:"address" validate:"required"`
Port_value *float64 `json:"port_value,omitzero" validate:"integer"`
Named_port string `json:"named_port,omitzero"`
Resolver_name any `json:"resolver_name,omitzero"`
Ipv4_compat *bool `json:"ipv4_compat,omitzero"`
}
func (SocketAddress) ValidationRule ¶
func (SocketAddress) ValidationRule() *validate.Rule
ValidationRule ports SocketAddress: `.xor('port_value','named_port')`, an `address` that may not be empty, and a `resolver_name` that becomes required once `named_port` is set.
type SocketAddressProtocol ¶
type SocketAddressProtocol string
const ( SocketAddressProtocolTcp SocketAddressProtocol = "TCP" SocketAddressProtocolUdp SocketAddressProtocol = "UDP" )
func (SocketAddressProtocol) EnumValues ¶
func (SocketAddressProtocol) EnumValues() []string
type SocketOption ¶
type SocketOption struct {
Description string `json:"description,omitzero"`
Level *float64 `json:"level,omitzero" validate:"integer"`
Name *float64 `json:"name,omitzero" validate:"integer"`
Int_value *float64 `json:"int_value,omitzero" validate:"integer"`
Buf_value Binary `json:"buf_value,omitzero"`
State SocketOptionState `json:"state,omitzero"`
}
type SocketOptionState ¶
type SocketOptionState string
const ( SocketOptionStateStatePrebind SocketOptionState = "STATE_PREBIND" SocketOptionStateStateBound SocketOptionState = "STATE_BOUND" SocketOptionStateStateListening SocketOptionState = "STATE_LISTENING" )
func (SocketOptionState) EnumValues ¶
func (SocketOptionState) EnumValues() []string
type SocketOptionsOverride ¶
type SocketOptionsOverride struct {
Socket_options []SocketOption `json:"socket_options,omitzero"`
}
type StatusCode ¶
type StatusCode string
const ( StatusCodeEmpty StatusCode = "Empty" StatusCodeContinue StatusCode = "Continue" StatusCodeOk StatusCode = "OK" StatusCodeCreated StatusCode = "Created" StatusCodeAccepted StatusCode = "Accepted" StatusCodeNonAuthoritativeInformation StatusCode = "NonAuthoritativeInformation" StatusCodeNoContent StatusCode = "NoContent" StatusCodeResetContent StatusCode = "ResetContent" StatusCodePartialContent StatusCode = "PartialContent" StatusCodeMultiStatus StatusCode = "MultiStatus" StatusCodeAlradyReported StatusCode = "AlradyReported" StatusCodeImUsed StatusCode = "IMUsed" StatusCodeMultipleChoices StatusCode = "MultipleChoices" StatusCodeMovedPermanently StatusCode = "MovedPermanently" StatusCodeFound StatusCode = "Found" StatusCodeSeeOther StatusCode = "SeeOther" StatusCodeNotModified StatusCode = "NotModified" StatusCodeUseProxy StatusCode = "UseProxy" StatusCodeTemporaryRedirect StatusCode = "TemporaryRedirect" StatusCodePermanentRedirect StatusCode = "PermanentRedirect" StatusCodeBadRequest StatusCode = "BadRequest" StatusCodeUnauthroized StatusCode = "Unauthroized" StatusCodePaymentRequired StatusCode = "PaymentRequired" StatusCodeForbidden StatusCode = "Forbidden" StatusCodeNotFound StatusCode = "NotFound" StatusCodeMethodNotAllowed StatusCode = "MethodNotAllowed" StatusCodeNotAcceptable StatusCode = "NotAcceptable" StatusCodeProxyAuthenticationRequired StatusCode = "ProxyAuthenticationRequired" StatusCodeRequestTimeout StatusCode = "RequestTimeout" StatusCodeConflict StatusCode = "Conflict" StatusCodeGone StatusCode = "Gone" StatusCodeLengthRequired StatusCode = "LengthRequired" StatusCodePreconditionFailed StatusCode = "PreconditionFailed" StatusCodePayloadTooLarge StatusCode = "PayloadTooLarge" StatusCodeUriTooLong StatusCode = "URITooLong" StatusCodeUnsupportedMediaType StatusCode = "UnsupportedMediaType" StatusCodeRangeNotSatisfiable StatusCode = "RangeNotSatisfiable" StatusCodeExpectationFailed StatusCode = "ExpectationFailed" StatusCodeMisdirectedRequest StatusCode = "MisdirectedRequest" StatusCodeUnprocessableEntity StatusCode = "UnprocessableEntity" StatusCodeLocked StatusCode = "Locked" StatusCodeFailedDependency StatusCode = "FailedDependency" StatusCodeUpgradeRequired StatusCode = "UpgradeRequired" StatusCodePreconditionRequired StatusCode = "PreconditionRequired" StatusCodeTooManyRequests StatusCode = "TooManyRequests" StatusCodeRequestHeaderFieldsTooLarge StatusCode = "RequestHeaderFieldsTooLarge" StatusCodeInternalServerError StatusCode = "InternalServerError" StatusCodeNotImplemented StatusCode = "NotImplemented" StatusCodeBadGateway StatusCode = "BadGateway" StatusCodeGatewayTimeout StatusCode = "GatewayTimeout" StatusCodeHttpVersionNotSupported StatusCode = "HTTPVersionNotSupported" StatusCodeVariantAlsoNegotiates StatusCode = "VariantAlsoNegotiates" StatusCodeInsufficientStorage StatusCode = "InsufficientStorage" StatusCodeLoopDetected StatusCode = "LoopDetected" StatusCodeNotExtended StatusCode = "NotExtended" StatusCodeNetworkAuthenticationRequired StatusCode = "NetworkAuthenticationRequired" )
func (StatusCode) EnumValues ¶
func (StatusCode) EnumValues() []string
type StringMatcher ¶
type StringMatcher struct {
Exact string `json:"exact,omitzero"`
Prefix string `json:"prefix,omitzero"`
Suffix string `json:"suffix,omitzero"`
Safe_regex *RegexMatcher `json:"safe_regex,omitzero"`
Contains string `json:"contains,omitzero"`
Ignore_case *bool `json:"ignore_case,omitzero"`
}
func (StringMatcher) ValidationRule ¶
func (StringMatcher) ValidationRule() *validate.Rule
ValidationRule ports StringMatcher's `.xor('exact','prefix','suffix','safe_regex','contains')`.
type TcpHealthCheck ¶
type TcpHealthCheck struct {
Send *HealthCheckPayload `json:"send,omitzero"`
Receive []HealthCheckPayload `json:"receive,omitzero"`
}
type TcpKeepalive ¶
type TimeInterval ¶
type TimeInterval struct {
Base_interval Duration `json:"base_interval" validate:"required"`
Max_interval Duration `json:"max_interval,omitzero"`
}
func (TimeInterval) ValidationRule ¶
func (TimeInterval) ValidationRule() *validate.Rule
ValidationRule ports TimeInterval (envoyCommon.ts:218): base_interval is a required Duration that must be > 0, and max_interval (when present) must not be smaller.
TS spells the first check as a `.custom()` ON base_interval. The engine does not run a rule's customs after an ALTERNATIVES branch matches (validateAlternatives returns the matched value directly), so a custom attached to a Duration is silently dropped and `base_interval: "0s"` was accepted. Until that is fixed in the engine the check runs from the object custom and reports itself at the base_interval path, which is the field TS blames and the message TS writes.
type TransportSocket ¶
type TransportSocket struct {
Name string `json:"name" validate:"required"`
Typed_config *TransportSocketTypedConfig `json:"typed_config,omitzero"`
}
type TransportSocketTypedConfig ¶
type TransportSocketTypedConfig struct {
Type TransportSocketTypedConfigType `json:"@type,omitzero"`
Sni string `json:"sni,omitzero"`
}
type TransportSocketTypedConfigType ¶
type TransportSocketTypedConfigType string
const (
TransportSocketTypedConfigTypeTypeGoogleapisComEnvoyExtensionsTransportSocketsTlsV3UpstreamTlsContext TransportSocketTypedConfigType = "type.googleapis.com/envoy.extensions.transport_sockets.tls.v3.UpstreamTlsContext"
)
func (TransportSocketTypedConfigType) EnumValues ¶
func (TransportSocketTypedConfigType) EnumValues() []string
type TypedExtensionConfig ¶
type UInt32 ¶
type UInt32 float64
func (UInt32) ValidationRule ¶
ValidationRule ports `UInt32 = Joi.number().integer().min(0).max(2^32-1)`.
type UInt64 ¶
type UInt64 float64
func (UInt64) ValidationRule ¶
ValidationRule ports `UInt64 = Joi.number().integer().min(0).max(2^64-1)`.
type ValueMatcher ¶
type ValueMatcher struct {
Null_match any `json:"null_match,omitzero"`
Double_match *DoubleMatcher `json:"double_match,omitzero"`
String_match *StringMatcher `json:"string_match,omitzero"`
Bool_match *bool `json:"bool_match,omitzero"`
Present_match *bool `json:"present_match,omitzero"`
}
func (ValueMatcher) ValidationRule ¶
func (ValueMatcher) ValidationRule() *validate.Rule
ValidationRule ports ValueMatcher's xor.
type WatchedDirectory ¶
type WatchedDirectory struct {
Path string `json:"path" validate:"required"`
}