use istio client-go library instead of knative (#1661)
use istio client-go library instead of knative bump kubernetes dependency version change code coverage to codecov
This commit is contained in:
7463
vendor/istio.io/api/policy/v1beta1/cfg.pb.go
generated
vendored
Normal file
7463
vendor/istio.io/api/policy/v1beta1/cfg.pb.go
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
570
vendor/istio.io/api/policy/v1beta1/cfg.proto
generated
vendored
Normal file
570
vendor/istio.io/api/policy/v1beta1/cfg.proto
generated
vendored
Normal file
@@ -0,0 +1,570 @@
|
||||
// Copyright 2018 Istio Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
syntax = "proto3";
|
||||
|
||||
import "gogoproto/gogo.proto";
|
||||
import "google/api/field_behavior.proto";
|
||||
import "google/protobuf/struct.proto";
|
||||
import "google/protobuf/duration.proto";
|
||||
import "policy/v1beta1/value_type.proto";
|
||||
|
||||
package istio.policy.v1beta1;
|
||||
|
||||
option go_package="istio.io/api/policy/v1beta1";
|
||||
|
||||
// AttributeManifest describes a set of Attributes produced by some component
|
||||
// of an Istio deployment.
|
||||
//
|
||||
// <!-- go code generation tags
|
||||
// +kubetype-gen
|
||||
// +kubetype-gen:groupVersion=config.istio.io/v1alpha2
|
||||
// +genclient
|
||||
// +k8s:deepcopy-gen=true
|
||||
// -->
|
||||
message AttributeManifest {
|
||||
// The revision of this document. Assigned by server.
|
||||
string revision = 1;
|
||||
// Name of the component producing these attributes. This can be
|
||||
// the proxy (with the canonical name `istio-proxy`) or the name of an
|
||||
// `attributes` kind adapter in Mixer.
|
||||
string name = 2 [(google.api.field_behavior) = REQUIRED];
|
||||
|
||||
// AttributeInfo describes the schema of an Istio `Attribute`.
|
||||
//
|
||||
// # Istio Attributes
|
||||
//
|
||||
// Istio uses `attributes` to describe runtime activities of Istio services.
|
||||
// An Istio attribute carries a specific piece of information about an activity,
|
||||
// such as the error code of an API request, the latency of an API request, or the
|
||||
// original IP address of a TCP connection. The attributes are often generated
|
||||
// and consumed by different services. For example, a frontend service can
|
||||
// generate an authenticated user attribute and pass it to a backend service for
|
||||
// access control purpose.
|
||||
//
|
||||
// To simplify the system and improve developer experience, Istio uses
|
||||
// shared attribute definitions across all components. For example, the same
|
||||
// authenticated user attribute will be used for logging, monitoring, analytics,
|
||||
// billing, access control, auditing. Many Istio components provide their
|
||||
// functionality by collecting, generating, and operating on attributes.
|
||||
// For example, the proxy collects the error code attribute, and the logging
|
||||
// stores it into a log.
|
||||
//
|
||||
// # Design
|
||||
//
|
||||
// Each Istio attribute must conform to an `AttributeInfo` in an
|
||||
// `AttributeManifest` in the current Istio deployment at runtime. An
|
||||
// [`AttributeInfo`][istio.policy.v1beta1] is used to define an attribute's
|
||||
// metadata: the type of its value and a detailed description that explains
|
||||
// the semantics of the attribute type. Each attribute's name is globally unique;
|
||||
// in other words an attribute name can only appear once across all manifests.
|
||||
//
|
||||
// The runtime presentation of an attribute is intentionally left out of this
|
||||
// specification, because passing attribute using JSON, XML, or Protocol Buffers
|
||||
// does not change the semantics of the attribute. Different implementations
|
||||
// can choose different representations based on their needs.
|
||||
//
|
||||
// # HTTP Mapping
|
||||
//
|
||||
// Because many systems already have REST APIs, it makes sense to define a
|
||||
// standard HTTP mapping for Istio attributes that are compatible with typical
|
||||
// REST APIs. The design is to map one attribute to one HTTP header, the
|
||||
// attribute name and value becomes the HTTP header name and value. The actual
|
||||
// encoding scheme will be decided later.
|
||||
message AttributeInfo {
|
||||
// A human-readable description of the attribute's purpose.
|
||||
string description = 1;
|
||||
|
||||
// The type of data carried by this attribute.
|
||||
istio.policy.v1beta1.ValueType value_type = 2 [(google.api.field_behavior) = REQUIRED];
|
||||
}
|
||||
// The set of attributes this Istio component will be responsible for producing at runtime.
|
||||
// We map from attribute name to the attribute's specification. The name of an attribute,
|
||||
// which is how attributes are referred to in aspect configuration, must conform to:
|
||||
//
|
||||
// Name = IDENT { SEPARATOR IDENT };
|
||||
//
|
||||
// Where `IDENT` must match the regular expression `[a-z][a-z0-9]+` and `SEPARATOR` must
|
||||
// match the regular expression `[\.-]`.
|
||||
//
|
||||
// Attribute names must be unique within a single Istio deployment. The set of canonical
|
||||
// attributes are described at [here](https://istio.io/docs/reference/config/policy-and-telemetry/attribute-vocabulary/).
|
||||
// Attributes not in that list should be named with a component-specific suffix such as
|
||||
// `request.count-my.component`.
|
||||
map<string, AttributeInfo> attributes = 3;
|
||||
}
|
||||
|
||||
// A Rule is a selector and a set of intentions to be executed when the
|
||||
// selector is `true`
|
||||
//
|
||||
// The following example instructs Mixer to invoke `prometheus-handler` handler for all services and pass it the
|
||||
// instance constructed using the 'RequestCountByService' instance.
|
||||
//
|
||||
// ```yaml
|
||||
// - match: match(destination.service.host, "*")
|
||||
// actions:
|
||||
// - handler: prometheus-handler
|
||||
// instances:
|
||||
// - RequestCountByService
|
||||
// ```
|
||||
//
|
||||
// <!-- go code generation tags
|
||||
// +kubetype-gen
|
||||
// +kubetype-gen:groupVersion=config.istio.io/v1alpha2
|
||||
// +genclient
|
||||
// +k8s:deepcopy-gen=true
|
||||
// -->
|
||||
message Rule {
|
||||
// Match is an attribute based predicate. When Mixer receives a
|
||||
// request it evaluates the match expression and executes all the associated `actions`
|
||||
// if the match evaluates to true.
|
||||
//
|
||||
// A few example match:
|
||||
//
|
||||
// * an empty match evaluates to `true`
|
||||
// * `true`, a boolean literal; a rule with this match will always be executed
|
||||
// * `match(destination.service.host, "ratings.*")` selects any request targeting a service whose
|
||||
// name starts with "ratings"
|
||||
// * `attr1 == "20" && attr2 == "30"` logical AND, OR, and NOT are also available
|
||||
string match = 1;
|
||||
|
||||
// The actions that will be executed when match evaluates to `true`.
|
||||
repeated Action actions = 2;
|
||||
|
||||
// A template for an HTTP header manipulation. Values in the template are expressions
|
||||
// that may reference action outputs by name. For example, if an action `x` produces an output
|
||||
// with a field `f`, then the header value expressions may use attribute `x.output.f` to reference
|
||||
// the field value:
|
||||
//
|
||||
// ```yaml
|
||||
// request_header_operations:
|
||||
// - name: x-istio-header
|
||||
// values:
|
||||
// - x.output.f
|
||||
// ```
|
||||
//
|
||||
// If the header value expression evaluates to an empty string, and the operation is to either replace
|
||||
// or append a header, then the operation is not applied. This permits conditional behavior on behalf of the
|
||||
// adapter to optionally modify the headers.
|
||||
message HeaderOperationTemplate {
|
||||
|
||||
// Header name literal value.
|
||||
string name = 1 [(google.api.field_behavior) = REQUIRED];
|
||||
|
||||
// Header value expressions.
|
||||
repeated string values = 2;
|
||||
|
||||
// Header operation type.
|
||||
enum Operation {
|
||||
// Replace a header by name.
|
||||
REPLACE = 0;
|
||||
|
||||
// Remove a header by name. Values are ignored.
|
||||
REMOVE = 1;
|
||||
|
||||
// Append values to the existing header values.
|
||||
APPEND = 2;
|
||||
}
|
||||
|
||||
// Header operation type. Default operation is to replace the value of the header by name.
|
||||
Operation operation = 3;
|
||||
}
|
||||
|
||||
// Templatized operations on the request headers using values produced by the
|
||||
// rule actions. Require the check action result to be OK.
|
||||
repeated HeaderOperationTemplate request_header_operations = 3;
|
||||
|
||||
// Templatized operations on the response headers using values produced by the
|
||||
// rule actions. Require the check action result to be OK.
|
||||
repeated HeaderOperationTemplate response_header_operations = 4;
|
||||
|
||||
// $hide_from_docs
|
||||
// Provides the ability to add a sampling configuration for Mixer rules. This sampling
|
||||
// will limit the scenarios in which the `actions` of the rule are executed. The sampling will
|
||||
// only take place after a `match` predicate has evaluated to true.
|
||||
//
|
||||
// Default behavior is no sampling (the `actions` are executed for all requests).
|
||||
Sampling sampling = 5;
|
||||
}
|
||||
|
||||
// Action describes which [Handler][istio.policy.v1beta1.Handler] to invoke and what data to pass to it for processing.
|
||||
//
|
||||
// The following example instructs Mixer to invoke 'prometheus-handler' handler and pass it the object
|
||||
// constructed using the instance 'RequestCountByService'.
|
||||
//
|
||||
// ```yaml
|
||||
// handler: prometheus-handler
|
||||
// instances:
|
||||
// - RequestCountByService
|
||||
// ```
|
||||
message Action {
|
||||
// Fully qualified name of the handler to invoke.
|
||||
// Must match the `name` of a [Handler][istio.policy.v1beta1.Handler.name].
|
||||
string handler = 2 [(google.api.field_behavior) = REQUIRED];
|
||||
|
||||
// Each value must match the fully qualified name of the
|
||||
// [Instance][istio.policy.v1beta1.Instance.name]s.
|
||||
// Referenced instances are evaluated by resolving the attributes/literals for all the fields.
|
||||
// The constructed objects are then passed to the `handler` referenced within this action.
|
||||
repeated string instances = 3 [(google.api.field_behavior) = REQUIRED];
|
||||
|
||||
// A handle to refer to the results of the action.
|
||||
string name = 4;
|
||||
}
|
||||
|
||||
// An Instance tells Mixer how to create instances for particular template.
|
||||
//
|
||||
// Instance is defined by the operator. Instance is defined relative to a known
|
||||
// template. Their purpose is to tell Mixer how to use attributes or literals to produce
|
||||
// instances of the specified template at runtime.
|
||||
//
|
||||
// The following example instructs Mixer to construct an instance associated with template
|
||||
// 'istio.mixer.adapter.metric.Metric'. It provides a mapping from the template's fields to expressions.
|
||||
// Instances produced with this instance can be referenced by [Actions][istio.policy.v1beta1.Action] using name
|
||||
// 'RequestCountByService'
|
||||
//
|
||||
// ```yaml
|
||||
// - name: RequestCountByService
|
||||
// template: istio.mixer.adapter.metric.Metric
|
||||
// params:
|
||||
// value: 1
|
||||
// dimensions:
|
||||
// source: source.name
|
||||
// destination_ip: destination.ip
|
||||
// ```
|
||||
//
|
||||
// <!-- go code generation tags
|
||||
// +kubetype-gen
|
||||
// +kubetype-gen:groupVersion=config.istio.io/v1alpha2
|
||||
// +genclient
|
||||
// +k8s:deepcopy-gen=true
|
||||
// -->
|
||||
message Instance {
|
||||
// The name of this instance
|
||||
//
|
||||
// Must be unique amongst other Instances in scope. Used by [Action][istio.policy.v1beta1.Action] to refer
|
||||
// to an instance produced by this instance.
|
||||
string name = 1 [(google.api.field_behavior) = REQUIRED];
|
||||
|
||||
// The name of the compiled in template this instance creates instances for. For referencing non compiled-in
|
||||
// templates, use the `template` field instead.
|
||||
//
|
||||
// The value must match the name of the available template Mixer is built with.
|
||||
string compiled_template = 67794676 [(google.api.field_behavior) = REQUIRED];
|
||||
|
||||
// The name of the template this instance creates instances for. For referencing compiled-in
|
||||
// templates, use the `compiled_template` field instead.
|
||||
//
|
||||
// The value must match the name of the available template in scope.
|
||||
string template = 2;
|
||||
|
||||
// Depends on referenced template. Struct representation of a
|
||||
// proto defined by the template; this varies depending on the value of field `template`.
|
||||
google.protobuf.Struct params = 3 [(google.api.field_behavior) = REQUIRED];
|
||||
|
||||
// Defines attribute bindings to map the output of attribute-producing adapters back into
|
||||
// the attribute space. The variable `output` refers to the output template instance produced
|
||||
// by the adapter.
|
||||
// The following example derives `source.namespace` from `source.uid` in the context of Kubernetes:
|
||||
// ```yaml
|
||||
// params:
|
||||
// # Pass the required attribute data to the adapter
|
||||
// source_uid: source.uid | ""
|
||||
// attribute_bindings:
|
||||
// # Fill the new attributes from the adapter produced output
|
||||
// source.namespace: output.source_namespace
|
||||
// ```
|
||||
map<string, string> attribute_bindings = 4;
|
||||
}
|
||||
|
||||
// Handler allows the operator to configure a specific adapter implementation.
|
||||
// Each adapter implementation defines its own `params` proto.
|
||||
//
|
||||
// In the following example we define a `metrics` handler for the `prometheus` adapter.
|
||||
// The example is in the form of a Kubernetes resource:
|
||||
// * The `metadata.name` is the name of the handler
|
||||
// * The `kind` refers to the adapter name
|
||||
// * The `spec` block represents adapter-specific configuration as well as the connection information
|
||||
//
|
||||
// ```yaml
|
||||
// # Sample-1: No connection specified (for compiled in adapters)
|
||||
// # Note: if connection information is not specified, the adapter configuration is directly inside
|
||||
// # `spec` block. This is going to be DEPRECATED in favor of Sample-2
|
||||
// apiVersion: "config.istio.io/v1alpha2"
|
||||
// kind: handler
|
||||
// metadata:
|
||||
// name: requestcount
|
||||
// namespace: istio-system
|
||||
// spec:
|
||||
// compiledAdapter: prometheus
|
||||
// params:
|
||||
// metrics:
|
||||
// - name: request_count
|
||||
// instance_name: requestcount.metric.istio-system
|
||||
// kind: COUNTER
|
||||
// label_names:
|
||||
// - source_service
|
||||
// - source_version
|
||||
// - destination_service
|
||||
// - destination_version
|
||||
// ---
|
||||
// # Sample-2: With connection information (for out-of-process adapters)
|
||||
// # Note: Unlike sample-1, the adapter configuration is parallel to `connection` and is nested inside `param` block.
|
||||
// apiVersion: "config.istio.io/v1alpha2"
|
||||
// kind: handler
|
||||
// metadata:
|
||||
// name: requestcount
|
||||
// namespace: istio-system
|
||||
// spec:
|
||||
// compiledAdapter: prometheus
|
||||
// params:
|
||||
// param:
|
||||
// metrics:
|
||||
// - name: request_count
|
||||
// instance_name: requestcount.metric.istio-system
|
||||
// kind: COUNTER
|
||||
// label_names:
|
||||
// - source_service
|
||||
// - source_version
|
||||
// - destination_service
|
||||
// - destination_version
|
||||
// connection:
|
||||
// address: localhost:8090
|
||||
// ---
|
||||
// ```
|
||||
//
|
||||
// <!-- go code generation tags
|
||||
// +kubetype-gen
|
||||
// +kubetype-gen:groupVersion=config.istio.io/v1alpha2
|
||||
// +genclient
|
||||
// +k8s:deepcopy-gen=true
|
||||
// -->
|
||||
message Handler {
|
||||
// Must be unique in the entire Mixer configuration. Used by [Actions][istio.policy.v1beta1.Action.handler]
|
||||
// to refer to this handler.
|
||||
string name = 1 [(google.api.field_behavior) = REQUIRED];
|
||||
|
||||
// The name of the compiled in adapter this handler instantiates. For referencing non compiled-in
|
||||
// adapters, use the `adapter` field instead.
|
||||
//
|
||||
// The value must match the name of the available adapter Mixer is built with. An adapter's name is typically a
|
||||
// constant in its code.
|
||||
string compiled_adapter = 67794676 [(google.api.field_behavior) = REQUIRED];
|
||||
|
||||
// The name of a specific adapter implementation. For referencing compiled-in
|
||||
// adapters, use the `compiled_adapter` field instead.
|
||||
//
|
||||
// An adapter's implementation name is typically a constant in its code.
|
||||
string adapter = 2;
|
||||
|
||||
// Depends on adapter implementation. Struct representation of a
|
||||
// proto defined by the adapter implementation; this varies depending on the value of field `adapter`.
|
||||
google.protobuf.Struct params = 3;
|
||||
|
||||
// Information on how to connect to the out-of-process adapter.
|
||||
// This is used if the adapter is not compiled into Mixer binary and is running as a separate process.
|
||||
Connection connection = 4;
|
||||
}
|
||||
|
||||
// Connection allows the operator to specify the endpoint for out-of-process infrastructure backend.
|
||||
// Connection is part of the handler custom resource and is specified alongside adapter specific configuration.
|
||||
message Connection {
|
||||
// The address of the backend.
|
||||
string address = 2;
|
||||
|
||||
// Timeout for remote calls to the backend.
|
||||
google.protobuf.Duration timeout = 3 [(gogoproto.stdduration) = true];
|
||||
|
||||
// Auth config for the connection to the backend. If omitted, plain text will
|
||||
// be used.
|
||||
Authentication authentication = 4;
|
||||
}
|
||||
|
||||
// $hide_from_docs
|
||||
// Sampling provides configuration of sampling strategies for Rule actions.
|
||||
// Multiple sampling strategies are supported. When multiple strategies are configured,
|
||||
// a request must be selected by all configured sampling strategies.
|
||||
message Sampling {
|
||||
// Provides filtering of actions based on random selection per request.
|
||||
RandomSampling random = 1;
|
||||
// Provides filtering of actions based on number of requests observed within
|
||||
// a configured time window.
|
||||
RateLimitSampling rate_limit = 2;
|
||||
}
|
||||
|
||||
// $hide_from_docs
|
||||
// RandomSampling will filter based on the comparison of a randomly-generated value
|
||||
// against the threshold provided.
|
||||
//
|
||||
// Example: To restrict the execution of Rule actions to only 12.5% of requests, the
|
||||
// `sampling_rate` would be set `12.5`.
|
||||
//
|
||||
// This sampling configuration is meant to closely match the access log RuntimeFilter configuration
|
||||
// [supported by Envoy](https://github.com/envoyproxy/data-plane-api/blob/master/envoy/config/filter/accesslog/v2/accesslog.proto#L113)
|
||||
message RandomSampling {
|
||||
// Specifies an attribute expression to use to override the numerator in the `percent_sampled` field.
|
||||
// If this value is set, but no value is found OR if that value is not a numeric value, then
|
||||
// the derived sampling rate will be 0 (meaning no `Action`s are executed for a `Rule`).
|
||||
string attribute_expression = 1;
|
||||
// The default sampling rate, expressed as a percentage. Defaults to 0% with a denominator
|
||||
// of 100.
|
||||
FractionalPercent percent_sampled = 2;
|
||||
// By default sampling will be based on the value of the request header `x-request-id`.
|
||||
// This behavior will cause consistent sampling across `Rule`s and for the full trace of a
|
||||
// request through a mesh (across hosts). If that value is not present and/or
|
||||
// `use_independent_randomness` is set to true, the sampling will be done based on the value of
|
||||
// attribute specified in `attribute_epxression`. If that attribute does not exist, the system
|
||||
// will behave as if the sampling rate was 0 (meaning no `Action`s are executed for a `Rule`).
|
||||
bool use_independent_randomness = 3;
|
||||
}
|
||||
|
||||
// $hide_from_docs
|
||||
// RateLimitSampling provides the ability to limit the number of Rule action executions that
|
||||
// occur over a period of time.
|
||||
message RateLimitSampling {
|
||||
// Window in which to enforce the sampling rate.
|
||||
google.protobuf.Duration sampling_duration = 1 [(gogoproto.nullable)=false,(gogoproto.stdduration) = true];
|
||||
// Number of entries to allow during the `sampling_duration` before sampling is enforced.
|
||||
int64 max_unsampled_entries = 2;
|
||||
// The rate at which to sample entries once the unsampled limit has been reached. Sampling will be enforced
|
||||
// as 1 per every `sampling_rate` entries allowed.
|
||||
int64 sampling_rate = 3;
|
||||
}
|
||||
|
||||
// $hide_from_docs
|
||||
// A fractional percentage is used in cases in which for performance reasons performing floating
|
||||
// point to integer conversions during randomness calculations is undesirable. The message includes
|
||||
// both a numerator and denominator that together determine the final fractional value.
|
||||
//
|
||||
// * **Example**: 1/100 = 1%.
|
||||
// * **Example**: 3/10000 = 0.03%.
|
||||
message FractionalPercent {
|
||||
// Specifies the numerator. Defaults to 0.
|
||||
uint32 numerator = 1;
|
||||
|
||||
// Fraction percentages support several fixed denominator values.
|
||||
enum DenominatorType {
|
||||
// 100.
|
||||
//
|
||||
// **Example**: 1/100 = 1%.
|
||||
HUNDRED = 0;
|
||||
|
||||
// 10,000.
|
||||
//
|
||||
// **Example**: 1/10000 = 0.01%.
|
||||
TEN_THOUSAND = 1;
|
||||
}
|
||||
|
||||
// Specifies the denominator. If the denominator specified is less than the numerator, the final
|
||||
// fractional percentage is capped at 1 (100%).
|
||||
DenominatorType denominator = 2;
|
||||
}
|
||||
|
||||
// Authentication allows the operator to specify the authentication of
|
||||
// connections to out-of-process infrastructure backend.
|
||||
message Authentication {
|
||||
oneof auth_type {
|
||||
// Originate a TLS connection to the adapter and present an auth token
|
||||
// in each call for client authentication.
|
||||
Tls tls = 1;
|
||||
|
||||
// Secure connections to the adapter using mutual TLS by presenting
|
||||
// client certificates for authentication.
|
||||
Mutual mutual = 2;
|
||||
};
|
||||
}
|
||||
|
||||
// Tls let operator specify client authentication setting when TLS is used for
|
||||
// connection to the backend.
|
||||
message Tls {
|
||||
// The path to the file holding additional CA certificates to well known
|
||||
// public certs.
|
||||
string ca_certificates = 1;
|
||||
|
||||
// Specifies how to get access token for client authn and authz.
|
||||
oneof token_source {
|
||||
// The path to the file holding the auth token (password, jwt token, api
|
||||
// key, etc).
|
||||
string token_path = 2;
|
||||
|
||||
// Oauth config to fetch access token from auth provider.
|
||||
OAuth oauth = 3;
|
||||
}
|
||||
|
||||
// AuthHeader specifies how to pass access token with authorization header.
|
||||
enum AuthHeader {
|
||||
// Access token is passed in authorization header as what it is
|
||||
// (authorization: some-token).
|
||||
PLAIN = 0;
|
||||
|
||||
// Access token is passed to adapter as bearer token (i.e. authorization:
|
||||
// bearer some-token).
|
||||
BEARER = 1;
|
||||
}
|
||||
|
||||
// Specifies how to pass access token to the adapter backend.
|
||||
oneof token_type {
|
||||
// Access token is passed as authorization header.
|
||||
AuthHeader auth_header = 4;
|
||||
|
||||
// Customized header key to hold access token, e.g. x-api-key. Token will be
|
||||
// passed as what it is.
|
||||
string custom_header = 5;
|
||||
}
|
||||
|
||||
// Used to configure mixer TLS client to verify the hostname on the returned
|
||||
// certificates. It is also included in the client's handshake to support SNI.
|
||||
string server_name = 6;
|
||||
}
|
||||
|
||||
// OAuth let operator specify config to fetch access token via oauth when using
|
||||
// TLS for connection to the backend.
|
||||
message OAuth {
|
||||
// OAuth client id for mixer.
|
||||
string client_id = 1 [(google.api.field_behavior) = REQUIRED];
|
||||
|
||||
// The path to the file holding the client secret for oauth.
|
||||
string client_secret = 2 [(google.api.field_behavior) = REQUIRED];
|
||||
|
||||
// The Resource server's token endpoint URL.
|
||||
string token_url = 3 [(google.api.field_behavior) = REQUIRED];
|
||||
|
||||
// List of requested permissions.
|
||||
repeated string scopes = 4;
|
||||
|
||||
// Additional parameters for requests to the token endpoint.
|
||||
map<string, string> endpoint_params = 5;
|
||||
}
|
||||
|
||||
// Mutual let operator specify TLS configuration for Mixer as client if mutual TLS is used to
|
||||
// secure connection to adapter backend.
|
||||
message Mutual {
|
||||
// The path to the file holding the private key for mutual TLS. If omitted, the
|
||||
// default Mixer private key will be used.
|
||||
string private_key = 1;
|
||||
|
||||
// The path to the file holding client certificate for mutual TLS. If omitted, the
|
||||
// default Mixer certificates will be used.
|
||||
string client_certificate = 2;
|
||||
|
||||
// The path to the file holding additional CA certificates that are needed to
|
||||
// verify the presented adapter certificates. By default Mixer should already
|
||||
// include Istio CA certificates and system certificates in cert pool.
|
||||
string ca_certificates = 3;
|
||||
|
||||
// Used to configure mixer mutual TLS client to supply server name for SNI.
|
||||
// It is not used to verify the hostname of the peer certificate, since
|
||||
// Istio verifies whitelisted SAN fields in mutual TLS.
|
||||
string server_name = 4;
|
||||
}
|
||||
42
vendor/istio.io/api/policy/v1beta1/cfg_deepcopy.gen.go
generated
vendored
Normal file
42
vendor/istio.io/api/policy/v1beta1/cfg_deepcopy.gen.go
generated
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
||||
// source: policy/v1beta1/cfg.proto
|
||||
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
fmt "fmt"
|
||||
_ "github.com/gogo/protobuf/gogoproto"
|
||||
proto "github.com/gogo/protobuf/proto"
|
||||
_ "github.com/gogo/protobuf/types"
|
||||
_ "istio.io/gogo-genproto/googleapis/google/api"
|
||||
math "math"
|
||||
)
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ = proto.Marshal
|
||||
var _ = fmt.Errorf
|
||||
var _ = math.Inf
|
||||
|
||||
// DeepCopyInto supports using AttributeManifest within kubernetes types, where deepcopy-gen is used.
|
||||
func (in *AttributeManifest) DeepCopyInto(out *AttributeManifest) {
|
||||
p := proto.Clone(in).(*AttributeManifest)
|
||||
*out = *p
|
||||
}
|
||||
|
||||
// DeepCopyInto supports using Rule within kubernetes types, where deepcopy-gen is used.
|
||||
func (in *Rule) DeepCopyInto(out *Rule) {
|
||||
p := proto.Clone(in).(*Rule)
|
||||
*out = *p
|
||||
}
|
||||
|
||||
// DeepCopyInto supports using Instance within kubernetes types, where deepcopy-gen is used.
|
||||
func (in *Instance) DeepCopyInto(out *Instance) {
|
||||
p := proto.Clone(in).(*Instance)
|
||||
*out = *p
|
||||
}
|
||||
|
||||
// DeepCopyInto supports using Handler within kubernetes types, where deepcopy-gen is used.
|
||||
func (in *Handler) DeepCopyInto(out *Handler) {
|
||||
p := proto.Clone(in).(*Handler)
|
||||
*out = *p
|
||||
}
|
||||
201
vendor/istio.io/api/policy/v1beta1/cfg_json.gen.go
generated
vendored
Normal file
201
vendor/istio.io/api/policy/v1beta1/cfg_json.gen.go
generated
vendored
Normal file
@@ -0,0 +1,201 @@
|
||||
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
||||
// source: policy/v1beta1/cfg.proto
|
||||
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
bytes "bytes"
|
||||
fmt "fmt"
|
||||
_ "github.com/gogo/protobuf/gogoproto"
|
||||
github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb"
|
||||
proto "github.com/gogo/protobuf/proto"
|
||||
_ "github.com/gogo/protobuf/types"
|
||||
_ "istio.io/gogo-genproto/googleapis/google/api"
|
||||
math "math"
|
||||
)
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ = proto.Marshal
|
||||
var _ = fmt.Errorf
|
||||
var _ = math.Inf
|
||||
|
||||
// MarshalJSON is a custom marshaler for AttributeManifest
|
||||
func (this *AttributeManifest) MarshalJSON() ([]byte, error) {
|
||||
str, err := CfgMarshaler.MarshalToString(this)
|
||||
return []byte(str), err
|
||||
}
|
||||
|
||||
// UnmarshalJSON is a custom unmarshaler for AttributeManifest
|
||||
func (this *AttributeManifest) UnmarshalJSON(b []byte) error {
|
||||
return CfgUnmarshaler.Unmarshal(bytes.NewReader(b), this)
|
||||
}
|
||||
|
||||
// MarshalJSON is a custom marshaler for AttributeManifest_AttributeInfo
|
||||
func (this *AttributeManifest_AttributeInfo) MarshalJSON() ([]byte, error) {
|
||||
str, err := CfgMarshaler.MarshalToString(this)
|
||||
return []byte(str), err
|
||||
}
|
||||
|
||||
// UnmarshalJSON is a custom unmarshaler for AttributeManifest_AttributeInfo
|
||||
func (this *AttributeManifest_AttributeInfo) UnmarshalJSON(b []byte) error {
|
||||
return CfgUnmarshaler.Unmarshal(bytes.NewReader(b), this)
|
||||
}
|
||||
|
||||
// MarshalJSON is a custom marshaler for Rule
|
||||
func (this *Rule) MarshalJSON() ([]byte, error) {
|
||||
str, err := CfgMarshaler.MarshalToString(this)
|
||||
return []byte(str), err
|
||||
}
|
||||
|
||||
// UnmarshalJSON is a custom unmarshaler for Rule
|
||||
func (this *Rule) UnmarshalJSON(b []byte) error {
|
||||
return CfgUnmarshaler.Unmarshal(bytes.NewReader(b), this)
|
||||
}
|
||||
|
||||
// MarshalJSON is a custom marshaler for Rule_HeaderOperationTemplate
|
||||
func (this *Rule_HeaderOperationTemplate) MarshalJSON() ([]byte, error) {
|
||||
str, err := CfgMarshaler.MarshalToString(this)
|
||||
return []byte(str), err
|
||||
}
|
||||
|
||||
// UnmarshalJSON is a custom unmarshaler for Rule_HeaderOperationTemplate
|
||||
func (this *Rule_HeaderOperationTemplate) UnmarshalJSON(b []byte) error {
|
||||
return CfgUnmarshaler.Unmarshal(bytes.NewReader(b), this)
|
||||
}
|
||||
|
||||
// MarshalJSON is a custom marshaler for Action
|
||||
func (this *Action) MarshalJSON() ([]byte, error) {
|
||||
str, err := CfgMarshaler.MarshalToString(this)
|
||||
return []byte(str), err
|
||||
}
|
||||
|
||||
// UnmarshalJSON is a custom unmarshaler for Action
|
||||
func (this *Action) UnmarshalJSON(b []byte) error {
|
||||
return CfgUnmarshaler.Unmarshal(bytes.NewReader(b), this)
|
||||
}
|
||||
|
||||
// MarshalJSON is a custom marshaler for Instance
|
||||
func (this *Instance) MarshalJSON() ([]byte, error) {
|
||||
str, err := CfgMarshaler.MarshalToString(this)
|
||||
return []byte(str), err
|
||||
}
|
||||
|
||||
// UnmarshalJSON is a custom unmarshaler for Instance
|
||||
func (this *Instance) UnmarshalJSON(b []byte) error {
|
||||
return CfgUnmarshaler.Unmarshal(bytes.NewReader(b), this)
|
||||
}
|
||||
|
||||
// MarshalJSON is a custom marshaler for Handler
|
||||
func (this *Handler) MarshalJSON() ([]byte, error) {
|
||||
str, err := CfgMarshaler.MarshalToString(this)
|
||||
return []byte(str), err
|
||||
}
|
||||
|
||||
// UnmarshalJSON is a custom unmarshaler for Handler
|
||||
func (this *Handler) UnmarshalJSON(b []byte) error {
|
||||
return CfgUnmarshaler.Unmarshal(bytes.NewReader(b), this)
|
||||
}
|
||||
|
||||
// MarshalJSON is a custom marshaler for Connection
|
||||
func (this *Connection) MarshalJSON() ([]byte, error) {
|
||||
str, err := CfgMarshaler.MarshalToString(this)
|
||||
return []byte(str), err
|
||||
}
|
||||
|
||||
// UnmarshalJSON is a custom unmarshaler for Connection
|
||||
func (this *Connection) UnmarshalJSON(b []byte) error {
|
||||
return CfgUnmarshaler.Unmarshal(bytes.NewReader(b), this)
|
||||
}
|
||||
|
||||
// MarshalJSON is a custom marshaler for Sampling
|
||||
func (this *Sampling) MarshalJSON() ([]byte, error) {
|
||||
str, err := CfgMarshaler.MarshalToString(this)
|
||||
return []byte(str), err
|
||||
}
|
||||
|
||||
// UnmarshalJSON is a custom unmarshaler for Sampling
|
||||
func (this *Sampling) UnmarshalJSON(b []byte) error {
|
||||
return CfgUnmarshaler.Unmarshal(bytes.NewReader(b), this)
|
||||
}
|
||||
|
||||
// MarshalJSON is a custom marshaler for RandomSampling
|
||||
func (this *RandomSampling) MarshalJSON() ([]byte, error) {
|
||||
str, err := CfgMarshaler.MarshalToString(this)
|
||||
return []byte(str), err
|
||||
}
|
||||
|
||||
// UnmarshalJSON is a custom unmarshaler for RandomSampling
|
||||
func (this *RandomSampling) UnmarshalJSON(b []byte) error {
|
||||
return CfgUnmarshaler.Unmarshal(bytes.NewReader(b), this)
|
||||
}
|
||||
|
||||
// MarshalJSON is a custom marshaler for RateLimitSampling
|
||||
func (this *RateLimitSampling) MarshalJSON() ([]byte, error) {
|
||||
str, err := CfgMarshaler.MarshalToString(this)
|
||||
return []byte(str), err
|
||||
}
|
||||
|
||||
// UnmarshalJSON is a custom unmarshaler for RateLimitSampling
|
||||
func (this *RateLimitSampling) UnmarshalJSON(b []byte) error {
|
||||
return CfgUnmarshaler.Unmarshal(bytes.NewReader(b), this)
|
||||
}
|
||||
|
||||
// MarshalJSON is a custom marshaler for FractionalPercent
|
||||
func (this *FractionalPercent) MarshalJSON() ([]byte, error) {
|
||||
str, err := CfgMarshaler.MarshalToString(this)
|
||||
return []byte(str), err
|
||||
}
|
||||
|
||||
// UnmarshalJSON is a custom unmarshaler for FractionalPercent
|
||||
func (this *FractionalPercent) UnmarshalJSON(b []byte) error {
|
||||
return CfgUnmarshaler.Unmarshal(bytes.NewReader(b), this)
|
||||
}
|
||||
|
||||
// MarshalJSON is a custom marshaler for Authentication
|
||||
func (this *Authentication) MarshalJSON() ([]byte, error) {
|
||||
str, err := CfgMarshaler.MarshalToString(this)
|
||||
return []byte(str), err
|
||||
}
|
||||
|
||||
// UnmarshalJSON is a custom unmarshaler for Authentication
|
||||
func (this *Authentication) UnmarshalJSON(b []byte) error {
|
||||
return CfgUnmarshaler.Unmarshal(bytes.NewReader(b), this)
|
||||
}
|
||||
|
||||
// MarshalJSON is a custom marshaler for Tls
|
||||
func (this *Tls) MarshalJSON() ([]byte, error) {
|
||||
str, err := CfgMarshaler.MarshalToString(this)
|
||||
return []byte(str), err
|
||||
}
|
||||
|
||||
// UnmarshalJSON is a custom unmarshaler for Tls
|
||||
func (this *Tls) UnmarshalJSON(b []byte) error {
|
||||
return CfgUnmarshaler.Unmarshal(bytes.NewReader(b), this)
|
||||
}
|
||||
|
||||
// MarshalJSON is a custom marshaler for OAuth
|
||||
func (this *OAuth) MarshalJSON() ([]byte, error) {
|
||||
str, err := CfgMarshaler.MarshalToString(this)
|
||||
return []byte(str), err
|
||||
}
|
||||
|
||||
// UnmarshalJSON is a custom unmarshaler for OAuth
|
||||
func (this *OAuth) UnmarshalJSON(b []byte) error {
|
||||
return CfgUnmarshaler.Unmarshal(bytes.NewReader(b), this)
|
||||
}
|
||||
|
||||
// MarshalJSON is a custom marshaler for Mutual
|
||||
func (this *Mutual) MarshalJSON() ([]byte, error) {
|
||||
str, err := CfgMarshaler.MarshalToString(this)
|
||||
return []byte(str), err
|
||||
}
|
||||
|
||||
// UnmarshalJSON is a custom unmarshaler for Mutual
|
||||
func (this *Mutual) UnmarshalJSON(b []byte) error {
|
||||
return CfgUnmarshaler.Unmarshal(bytes.NewReader(b), this)
|
||||
}
|
||||
|
||||
var (
|
||||
CfgMarshaler = &github_com_gogo_protobuf_jsonpb.Marshaler{}
|
||||
CfgUnmarshaler = &github_com_gogo_protobuf_jsonpb.Unmarshaler{}
|
||||
)
|
||||
900
vendor/istio.io/api/policy/v1beta1/http_response.pb.go
generated
vendored
Normal file
900
vendor/istio.io/api/policy/v1beta1/http_response.pb.go
generated
vendored
Normal file
@@ -0,0 +1,900 @@
|
||||
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
||||
// source: policy/v1beta1/http_response.proto
|
||||
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
fmt "fmt"
|
||||
proto "github.com/gogo/protobuf/proto"
|
||||
github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys"
|
||||
io "io"
|
||||
math "math"
|
||||
math_bits "math/bits"
|
||||
reflect "reflect"
|
||||
strconv "strconv"
|
||||
strings "strings"
|
||||
)
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ = proto.Marshal
|
||||
var _ = fmt.Errorf
|
||||
var _ = math.Inf
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the proto package it is being compiled against.
|
||||
// A compilation error at this line likely means your copy of the
|
||||
// proto package needs to be updated.
|
||||
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
|
||||
|
||||
// HTTP response codes.
|
||||
// For more details: http://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml
|
||||
type HttpStatusCode int32
|
||||
|
||||
const (
|
||||
// Empty - This code not part of the HTTP status code specification, but it is needed for proto
|
||||
// `enum` type.
|
||||
Empty HttpStatusCode = 0
|
||||
Continue HttpStatusCode = 100
|
||||
OK HttpStatusCode = 200
|
||||
Created HttpStatusCode = 201
|
||||
Accepted HttpStatusCode = 202
|
||||
NonAuthoritativeInformation HttpStatusCode = 203
|
||||
NoContent HttpStatusCode = 204
|
||||
ResetContent HttpStatusCode = 205
|
||||
PartialContent HttpStatusCode = 206
|
||||
MultiStatus HttpStatusCode = 207
|
||||
AlreadyReported HttpStatusCode = 208
|
||||
IMUsed HttpStatusCode = 226
|
||||
MultipleChoices HttpStatusCode = 300
|
||||
MovedPermanently HttpStatusCode = 301
|
||||
Found HttpStatusCode = 302
|
||||
SeeOther HttpStatusCode = 303
|
||||
NotModified HttpStatusCode = 304
|
||||
UseProxy HttpStatusCode = 305
|
||||
TemporaryRedirect HttpStatusCode = 307
|
||||
PermanentRedirect HttpStatusCode = 308
|
||||
BadRequest HttpStatusCode = 400
|
||||
Unauthorized HttpStatusCode = 401
|
||||
PaymentRequired HttpStatusCode = 402
|
||||
Forbidden HttpStatusCode = 403
|
||||
NotFound HttpStatusCode = 404
|
||||
MethodNotAllowed HttpStatusCode = 405
|
||||
NotAcceptable HttpStatusCode = 406
|
||||
ProxyAuthenticationRequired HttpStatusCode = 407
|
||||
RequestTimeout HttpStatusCode = 408
|
||||
Conflict HttpStatusCode = 409
|
||||
Gone HttpStatusCode = 410
|
||||
LengthRequired HttpStatusCode = 411
|
||||
PreconditionFailed HttpStatusCode = 412
|
||||
PayloadTooLarge HttpStatusCode = 413
|
||||
URITooLong HttpStatusCode = 414
|
||||
UnsupportedMediaType HttpStatusCode = 415
|
||||
RangeNotSatisfiable HttpStatusCode = 416
|
||||
ExpectationFailed HttpStatusCode = 417
|
||||
MisdirectedRequest HttpStatusCode = 421
|
||||
UnprocessableEntity HttpStatusCode = 422
|
||||
Locked HttpStatusCode = 423
|
||||
FailedDependency HttpStatusCode = 424
|
||||
UpgradeRequired HttpStatusCode = 426
|
||||
PreconditionRequired HttpStatusCode = 428
|
||||
TooManyRequests HttpStatusCode = 429
|
||||
RequestHeaderFieldsTooLarge HttpStatusCode = 431
|
||||
InternalServerError HttpStatusCode = 500
|
||||
NotImplemented HttpStatusCode = 501
|
||||
BadGateway HttpStatusCode = 502
|
||||
ServiceUnavailable HttpStatusCode = 503
|
||||
GatewayTimeout HttpStatusCode = 504
|
||||
HTTPVersionNotSupported HttpStatusCode = 505
|
||||
VariantAlsoNegotiates HttpStatusCode = 506
|
||||
InsufficientStorage HttpStatusCode = 507
|
||||
LoopDetected HttpStatusCode = 508
|
||||
NotExtended HttpStatusCode = 510
|
||||
NetworkAuthenticationRequired HttpStatusCode = 511
|
||||
)
|
||||
|
||||
var HttpStatusCode_name = map[int32]string{
|
||||
0: "Empty",
|
||||
100: "Continue",
|
||||
200: "OK",
|
||||
201: "Created",
|
||||
202: "Accepted",
|
||||
203: "NonAuthoritativeInformation",
|
||||
204: "NoContent",
|
||||
205: "ResetContent",
|
||||
206: "PartialContent",
|
||||
207: "MultiStatus",
|
||||
208: "AlreadyReported",
|
||||
226: "IMUsed",
|
||||
300: "MultipleChoices",
|
||||
301: "MovedPermanently",
|
||||
302: "Found",
|
||||
303: "SeeOther",
|
||||
304: "NotModified",
|
||||
305: "UseProxy",
|
||||
307: "TemporaryRedirect",
|
||||
308: "PermanentRedirect",
|
||||
400: "BadRequest",
|
||||
401: "Unauthorized",
|
||||
402: "PaymentRequired",
|
||||
403: "Forbidden",
|
||||
404: "NotFound",
|
||||
405: "MethodNotAllowed",
|
||||
406: "NotAcceptable",
|
||||
407: "ProxyAuthenticationRequired",
|
||||
408: "RequestTimeout",
|
||||
409: "Conflict",
|
||||
410: "Gone",
|
||||
411: "LengthRequired",
|
||||
412: "PreconditionFailed",
|
||||
413: "PayloadTooLarge",
|
||||
414: "URITooLong",
|
||||
415: "UnsupportedMediaType",
|
||||
416: "RangeNotSatisfiable",
|
||||
417: "ExpectationFailed",
|
||||
421: "MisdirectedRequest",
|
||||
422: "UnprocessableEntity",
|
||||
423: "Locked",
|
||||
424: "FailedDependency",
|
||||
426: "UpgradeRequired",
|
||||
428: "PreconditionRequired",
|
||||
429: "TooManyRequests",
|
||||
431: "RequestHeaderFieldsTooLarge",
|
||||
500: "InternalServerError",
|
||||
501: "NotImplemented",
|
||||
502: "BadGateway",
|
||||
503: "ServiceUnavailable",
|
||||
504: "GatewayTimeout",
|
||||
505: "HTTPVersionNotSupported",
|
||||
506: "VariantAlsoNegotiates",
|
||||
507: "InsufficientStorage",
|
||||
508: "LoopDetected",
|
||||
510: "NotExtended",
|
||||
511: "NetworkAuthenticationRequired",
|
||||
}
|
||||
|
||||
var HttpStatusCode_value = map[string]int32{
|
||||
"Empty": 0,
|
||||
"Continue": 100,
|
||||
"OK": 200,
|
||||
"Created": 201,
|
||||
"Accepted": 202,
|
||||
"NonAuthoritativeInformation": 203,
|
||||
"NoContent": 204,
|
||||
"ResetContent": 205,
|
||||
"PartialContent": 206,
|
||||
"MultiStatus": 207,
|
||||
"AlreadyReported": 208,
|
||||
"IMUsed": 226,
|
||||
"MultipleChoices": 300,
|
||||
"MovedPermanently": 301,
|
||||
"Found": 302,
|
||||
"SeeOther": 303,
|
||||
"NotModified": 304,
|
||||
"UseProxy": 305,
|
||||
"TemporaryRedirect": 307,
|
||||
"PermanentRedirect": 308,
|
||||
"BadRequest": 400,
|
||||
"Unauthorized": 401,
|
||||
"PaymentRequired": 402,
|
||||
"Forbidden": 403,
|
||||
"NotFound": 404,
|
||||
"MethodNotAllowed": 405,
|
||||
"NotAcceptable": 406,
|
||||
"ProxyAuthenticationRequired": 407,
|
||||
"RequestTimeout": 408,
|
||||
"Conflict": 409,
|
||||
"Gone": 410,
|
||||
"LengthRequired": 411,
|
||||
"PreconditionFailed": 412,
|
||||
"PayloadTooLarge": 413,
|
||||
"URITooLong": 414,
|
||||
"UnsupportedMediaType": 415,
|
||||
"RangeNotSatisfiable": 416,
|
||||
"ExpectationFailed": 417,
|
||||
"MisdirectedRequest": 421,
|
||||
"UnprocessableEntity": 422,
|
||||
"Locked": 423,
|
||||
"FailedDependency": 424,
|
||||
"UpgradeRequired": 426,
|
||||
"PreconditionRequired": 428,
|
||||
"TooManyRequests": 429,
|
||||
"RequestHeaderFieldsTooLarge": 431,
|
||||
"InternalServerError": 500,
|
||||
"NotImplemented": 501,
|
||||
"BadGateway": 502,
|
||||
"ServiceUnavailable": 503,
|
||||
"GatewayTimeout": 504,
|
||||
"HTTPVersionNotSupported": 505,
|
||||
"VariantAlsoNegotiates": 506,
|
||||
"InsufficientStorage": 507,
|
||||
"LoopDetected": 508,
|
||||
"NotExtended": 510,
|
||||
"NetworkAuthenticationRequired": 511,
|
||||
}
|
||||
|
||||
func (HttpStatusCode) EnumDescriptor() ([]byte, []int) {
|
||||
return fileDescriptor_dffd274153c8a074, []int{0}
|
||||
}
|
||||
|
||||
// Direct HTTP response for a client-facing error message which can be attached
|
||||
// to an RPC error.
|
||||
type DirectHttpResponse struct {
|
||||
// HTTP status code. If not set, RPC error code is used.
|
||||
Code HttpStatusCode `protobuf:"varint,1,opt,name=code,proto3,enum=istio.policy.v1beta1.HttpStatusCode" json:"code,omitempty"`
|
||||
// HTTP response body.
|
||||
Body string `protobuf:"bytes,2,opt,name=body,proto3" json:"body,omitempty"`
|
||||
// HTTP response headers.
|
||||
Headers map[string]string `protobuf:"bytes,3,rep,name=headers,proto3" json:"headers,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
|
||||
}
|
||||
|
||||
func (m *DirectHttpResponse) Reset() { *m = DirectHttpResponse{} }
|
||||
func (*DirectHttpResponse) ProtoMessage() {}
|
||||
func (*DirectHttpResponse) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_dffd274153c8a074, []int{0}
|
||||
}
|
||||
func (m *DirectHttpResponse) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
}
|
||||
func (m *DirectHttpResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
if deterministic {
|
||||
return xxx_messageInfo_DirectHttpResponse.Marshal(b, m, deterministic)
|
||||
} else {
|
||||
b = b[:cap(b)]
|
||||
n, err := m.MarshalToSizedBuffer(b)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return b[:n], nil
|
||||
}
|
||||
}
|
||||
func (m *DirectHttpResponse) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_DirectHttpResponse.Merge(m, src)
|
||||
}
|
||||
func (m *DirectHttpResponse) XXX_Size() int {
|
||||
return m.Size()
|
||||
}
|
||||
func (m *DirectHttpResponse) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_DirectHttpResponse.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_DirectHttpResponse proto.InternalMessageInfo
|
||||
|
||||
func (m *DirectHttpResponse) GetCode() HttpStatusCode {
|
||||
if m != nil {
|
||||
return m.Code
|
||||
}
|
||||
return Empty
|
||||
}
|
||||
|
||||
func (m *DirectHttpResponse) GetBody() string {
|
||||
if m != nil {
|
||||
return m.Body
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *DirectHttpResponse) GetHeaders() map[string]string {
|
||||
if m != nil {
|
||||
return m.Headers
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func init() {
|
||||
proto.RegisterEnum("istio.policy.v1beta1.HttpStatusCode", HttpStatusCode_name, HttpStatusCode_value)
|
||||
proto.RegisterType((*DirectHttpResponse)(nil), "istio.policy.v1beta1.DirectHttpResponse")
|
||||
proto.RegisterMapType((map[string]string)(nil), "istio.policy.v1beta1.DirectHttpResponse.HeadersEntry")
|
||||
}
|
||||
|
||||
func init() { proto.RegisterFile("policy/v1beta1/http_response.proto", fileDescriptor_dffd274153c8a074) }
|
||||
|
||||
var fileDescriptor_dffd274153c8a074 = []byte{
|
||||
// 1042 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x55, 0xcb, 0x6f, 0x14, 0xc7,
|
||||
0x13, 0xde, 0xd9, 0xe6, 0xe5, 0xc6, 0x98, 0xa6, 0x31, 0x3f, 0xfc, 0x83, 0x64, 0x64, 0xa1, 0x1c,
|
||||
0x50, 0x0e, 0xb6, 0x20, 0x8a, 0x84, 0xb8, 0x19, 0x63, 0x83, 0x15, 0xef, 0xe2, 0xac, 0x77, 0x39,
|
||||
0xe4, 0x12, 0xb5, 0xa7, 0x6b, 0x77, 0x5b, 0xcc, 0x76, 0x0d, 0x3d, 0xb5, 0x0b, 0x93, 0x53, 0xfe,
|
||||
0x04, 0xf2, 0x7e, 0xbf, 0x0e, 0x49, 0x50, 0x04, 0x21, 0x51, 0x72, 0xc9, 0x7f, 0x40, 0xde, 0x3e,
|
||||
0x72, 0x0c, 0xcb, 0x25, 0xb7, 0x70, 0xc8, 0x3b, 0x51, 0x12, 0x75, 0xef, 0x43, 0x46, 0x21, 0xb7,
|
||||
0xe9, 0x9a, 0xfa, 0xaa, 0xbe, 0xfa, 0xbe, 0x9a, 0x69, 0x7e, 0x24, 0xc3, 0xd4, 0x24, 0xc5, 0x7c,
|
||||
0xef, 0xd8, 0x06, 0x90, 0x3a, 0x36, 0xdf, 0x26, 0xca, 0x9e, 0x74, 0x90, 0x67, 0x68, 0x73, 0x98,
|
||||
0xcb, 0x1c, 0x12, 0xca, 0x69, 0x93, 0x93, 0xc1, 0xb9, 0x41, 0xe6, 0xdc, 0x30, 0xf3, 0xc8, 0x0f,
|
||||
0x11, 0x97, 0xa7, 0x8d, 0x83, 0x84, 0xce, 0x12, 0x65, 0xb5, 0x21, 0x44, 0x9e, 0xe0, 0xdb, 0x12,
|
||||
0xd4, 0x30, 0x13, 0xcd, 0x46, 0x47, 0xa7, 0x8e, 0x3f, 0x34, 0x77, 0x3f, 0xec, 0x9c, 0x47, 0xac,
|
||||
0x93, 0xa2, 0x6e, 0xbe, 0x88, 0x1a, 0x6a, 0x01, 0x21, 0x25, 0xdf, 0xb6, 0x81, 0xba, 0x98, 0x29,
|
||||
0xcf, 0x46, 0x47, 0x27, 0x6a, 0xe1, 0x59, 0x9e, 0xe3, 0x3b, 0xdb, 0xa0, 0x34, 0xb8, 0x7c, 0x86,
|
||||
0xcd, 0xb2, 0xa3, 0xbb, 0x8f, 0x3f, 0x7a, 0xff, 0x82, 0xff, 0x26, 0x32, 0x77, 0x76, 0x80, 0x5b,
|
||||
0xb2, 0xe4, 0x8a, 0xda, 0xa8, 0xca, 0xa1, 0x93, 0x7c, 0x72, 0xeb, 0x0b, 0x29, 0x38, 0xbb, 0x00,
|
||||
0x45, 0x60, 0x3b, 0x51, 0xf3, 0x8f, 0x72, 0x9a, 0x6f, 0xef, 0xa9, 0xb4, 0x0b, 0x43, 0x1e, 0x83,
|
||||
0xc3, 0xc9, 0xf2, 0x89, 0xe8, 0xe1, 0xcf, 0x26, 0xf8, 0xd4, 0xbd, 0xcc, 0xe5, 0x04, 0xdf, 0xbe,
|
||||
0xd4, 0xc9, 0xa8, 0x10, 0x25, 0x39, 0xc9, 0x77, 0x2d, 0xa2, 0x25, 0x63, 0xbb, 0x20, 0xb4, 0xdc,
|
||||
0xc9, 0xcb, 0xe7, 0x1e, 0x13, 0x37, 0x23, 0x39, 0xc9, 0x77, 0x2e, 0x3a, 0x50, 0x04, 0x5a, 0x7c,
|
||||
0x1e, 0xc9, 0x3d, 0x7c, 0xd7, 0x42, 0x92, 0x40, 0xe6, 0x8f, 0x5f, 0x44, 0x72, 0x96, 0x1f, 0xae,
|
||||
0xa2, 0x5d, 0xe8, 0x52, 0x1b, 0x9d, 0x21, 0x45, 0xa6, 0x07, 0x2b, 0xb6, 0x89, 0xae, 0xa3, 0xc8,
|
||||
0xa0, 0x15, 0x5f, 0x46, 0x72, 0x8a, 0x4f, 0x54, 0xd1, 0xd7, 0x05, 0x4b, 0xe2, 0xab, 0x48, 0xee,
|
||||
0xe3, 0x93, 0x35, 0xc8, 0x81, 0x46, 0xa1, 0xaf, 0x23, 0xb9, 0x9f, 0x4f, 0xad, 0x29, 0x47, 0x46,
|
||||
0xa5, 0xa3, 0xe0, 0x37, 0x91, 0x14, 0x7c, 0x77, 0xa5, 0x9b, 0x92, 0x19, 0x70, 0x15, 0xdf, 0x46,
|
||||
0x72, 0x9a, 0xef, 0x5d, 0x48, 0x1d, 0x28, 0x5d, 0xd4, 0x20, 0x43, 0xe7, 0x19, 0x6c, 0x46, 0x72,
|
||||
0x37, 0xdf, 0xb1, 0x52, 0x69, 0xe4, 0xa0, 0x45, 0x3f, 0xa4, 0x04, 0x50, 0x96, 0xc2, 0x62, 0x1b,
|
||||
0x4d, 0x02, 0xb9, 0xb8, 0x56, 0x96, 0x07, 0xb8, 0xa8, 0x60, 0x0f, 0xf4, 0x1a, 0xb8, 0x8e, 0xb2,
|
||||
0x60, 0x29, 0x2d, 0xc4, 0xf5, 0xb2, 0xe4, 0x7c, 0xfb, 0x32, 0x76, 0xad, 0x16, 0x1f, 0x96, 0xfd,
|
||||
0x58, 0xeb, 0x00, 0xe7, 0xa8, 0x0d, 0x4e, 0xdc, 0x28, 0xfb, 0xe6, 0x55, 0xa4, 0x0a, 0x6a, 0xd3,
|
||||
0x34, 0xa0, 0xc5, 0x47, 0x21, 0xa1, 0x91, 0xc3, 0x9a, 0xc3, 0xcb, 0x85, 0xf8, 0xb8, 0x2c, 0xff,
|
||||
0xc7, 0xf7, 0xd5, 0xa1, 0x93, 0xa1, 0x53, 0xae, 0xa8, 0x81, 0x0e, 0xe6, 0x89, 0x4f, 0x42, 0x7c,
|
||||
0xdc, 0x65, 0x1c, 0xff, 0xb4, 0x2c, 0xf7, 0x72, 0x7e, 0x4a, 0xe9, 0x1a, 0x5c, 0xec, 0x42, 0x4e,
|
||||
0xe2, 0x0a, 0xf3, 0x32, 0x34, 0xac, 0x1a, 0xe8, 0xf6, 0x14, 0x68, 0xf1, 0x0c, 0xf3, 0xe4, 0xd7,
|
||||
0x54, 0xd1, 0x09, 0xc8, 0x8b, 0x5d, 0xe3, 0x40, 0x8b, 0x67, 0x99, 0xd7, 0x6f, 0x19, 0xdd, 0x86,
|
||||
0xd1, 0x1a, 0xac, 0x78, 0x8e, 0x79, 0x22, 0x55, 0xa4, 0x01, 0xf1, 0xe7, 0x59, 0x98, 0x0d, 0xa8,
|
||||
0x8d, 0xba, 0x8a, 0xb4, 0x90, 0xa6, 0x78, 0x09, 0xb4, 0x78, 0x81, 0x49, 0xc9, 0xf7, 0xf8, 0x40,
|
||||
0x70, 0x4a, 0x6d, 0xa4, 0x20, 0x5e, 0x64, 0xde, 0xab, 0xc0, 0xdf, 0xbb, 0x05, 0x96, 0x4c, 0x12,
|
||||
0x3c, 0x1a, 0xf7, 0x7a, 0x89, 0x79, 0x23, 0x86, 0x14, 0xeb, 0xa6, 0x03, 0xd8, 0x25, 0xf1, 0x72,
|
||||
0x68, 0xb8, 0x88, 0xb6, 0x99, 0x9a, 0x84, 0xc4, 0x2b, 0x4c, 0x4e, 0xf0, 0x6d, 0x67, 0xd0, 0x82,
|
||||
0x78, 0x35, 0xa4, 0xaf, 0x82, 0x6d, 0x51, 0x7b, 0x5c, 0xe3, 0x35, 0x26, 0x0f, 0x72, 0xb9, 0xe6,
|
||||
0x20, 0x41, 0xab, 0x8d, 0x2f, 0xbf, 0xac, 0x4c, 0x0a, 0x5a, 0xbc, 0x3e, 0x1a, 0x2f, 0x45, 0xa5,
|
||||
0xeb, 0x88, 0xab, 0xca, 0xb5, 0x40, 0xbc, 0xc1, 0xbc, 0x30, 0x8d, 0xda, 0x8a, 0x8f, 0xa0, 0x6d,
|
||||
0x89, 0x37, 0x99, 0xfc, 0x3f, 0x9f, 0x6e, 0xd8, 0xbc, 0x9b, 0x0d, 0x1c, 0xae, 0x80, 0x36, 0xaa,
|
||||
0x5e, 0x64, 0x20, 0xde, 0x62, 0x72, 0x86, 0xef, 0xaf, 0x29, 0xdb, 0x82, 0x2a, 0xd2, 0xba, 0x22,
|
||||
0x93, 0x37, 0x4d, 0x18, 0xed, 0x6d, 0xe6, 0x65, 0x5f, 0xba, 0x9c, 0x41, 0x42, 0x6a, 0x4b, 0xcf,
|
||||
0x77, 0x02, 0x99, 0x8a, 0xc9, 0x07, 0x36, 0xc0, 0x58, 0xfe, 0x77, 0x43, 0xa9, 0x86, 0xcd, 0x1c,
|
||||
0x26, 0x90, 0xe7, 0xbe, 0xc8, 0x92, 0x25, 0x43, 0x85, 0x78, 0x8f, 0xf9, 0x7d, 0x5a, 0xc5, 0xe4,
|
||||
0x02, 0x68, 0xf1, 0x7e, 0x50, 0x77, 0x50, 0xec, 0x34, 0x64, 0x60, 0x35, 0xd8, 0xa4, 0x10, 0x57,
|
||||
0xc3, 0x28, 0x8d, 0xac, 0xe5, 0x94, 0x86, 0xf1, 0xe4, 0x1f, 0x04, 0xe6, 0x5b, 0x27, 0x1f, 0xbf,
|
||||
0xba, 0x16, 0x00, 0x75, 0xc4, 0x8a, 0xb2, 0xc5, 0x90, 0x43, 0x2e, 0xae, 0x07, 0x43, 0x86, 0xc7,
|
||||
0xc1, 0x17, 0xbd, 0x6c, 0x20, 0xd5, 0xf9, 0x58, 0x9d, 0x1b, 0x81, 0xe6, 0x8a, 0x25, 0x70, 0x56,
|
||||
0xa5, 0xeb, 0xe0, 0x7a, 0xe0, 0x96, 0x9c, 0x43, 0x27, 0x7e, 0x0c, 0xda, 0x57, 0x91, 0x56, 0x3a,
|
||||
0x59, 0x0a, 0x7e, 0x63, 0x40, 0x8b, 0x9f, 0xd8, 0x70, 0xcb, 0xce, 0x28, 0x82, 0x4b, 0xaa, 0x10,
|
||||
0x3f, 0x87, 0xf9, 0x3d, 0xce, 0x24, 0xd0, 0xb0, 0xaa, 0xa7, 0x4c, 0x1a, 0x04, 0xfb, 0x25, 0xc0,
|
||||
0x87, 0x69, 0x23, 0xa7, 0x7f, 0x65, 0xf2, 0x01, 0x7e, 0xf0, 0x6c, 0xbd, 0xbe, 0x76, 0x1e, 0x5c,
|
||||
0x6e, 0xd0, 0x7a, 0x95, 0x47, 0x36, 0x88, 0xdf, 0x98, 0x3c, 0xc4, 0x0f, 0x9c, 0x57, 0xce, 0x28,
|
||||
0x4b, 0x0b, 0x69, 0x8e, 0x55, 0x68, 0x21, 0x19, 0x45, 0x90, 0x8b, 0xdf, 0x87, 0x3c, 0xf3, 0x6e,
|
||||
0xb3, 0x69, 0x12, 0x03, 0x96, 0xd6, 0x09, 0x9d, 0x6a, 0x81, 0xf8, 0x23, 0xec, 0xf9, 0x2a, 0x62,
|
||||
0x76, 0x1a, 0x28, 0x58, 0x20, 0xfe, 0x64, 0xc3, 0x8f, 0x6b, 0xe9, 0x32, 0x79, 0x45, 0xb5, 0xf8,
|
||||
0x8b, 0xc9, 0x23, 0xfc, 0xc1, 0x2a, 0xd0, 0x25, 0x74, 0x17, 0xfe, 0x63, 0x37, 0xff, 0x66, 0xa7,
|
||||
0x1e, 0xdf, 0xbc, 0x1d, 0x97, 0x6e, 0xdd, 0x8e, 0x4b, 0x77, 0x6f, 0xc7, 0xd1, 0xd3, 0xfd, 0x38,
|
||||
0xba, 0xda, 0x8f, 0xa3, 0x9b, 0xfd, 0x38, 0xda, 0xec, 0xc7, 0xd1, 0x77, 0xfd, 0x38, 0xfa, 0xbe,
|
||||
0x1f, 0x97, 0xee, 0xf6, 0xe3, 0xe8, 0xca, 0x9d, 0xb8, 0xb4, 0x79, 0x27, 0x2e, 0xdd, 0xba, 0x13,
|
||||
0x97, 0x9e, 0x38, 0x3c, 0xf8, 0xd9, 0x1a, 0x9c, 0x57, 0x99, 0x99, 0xbf, 0xf7, 0xaa, 0xd8, 0xd8,
|
||||
0x11, 0x6e, 0x87, 0x47, 0xfe, 0x09, 0x00, 0x00, 0xff, 0xff, 0xea, 0x47, 0xf8, 0xf5, 0x43, 0x06,
|
||||
0x00, 0x00,
|
||||
}
|
||||
|
||||
func (x HttpStatusCode) String() string {
|
||||
s, ok := HttpStatusCode_name[int32(x)]
|
||||
if ok {
|
||||
return s
|
||||
}
|
||||
return strconv.Itoa(int(x))
|
||||
}
|
||||
func (this *DirectHttpResponse) Equal(that interface{}) bool {
|
||||
if that == nil {
|
||||
return this == nil
|
||||
}
|
||||
|
||||
that1, ok := that.(*DirectHttpResponse)
|
||||
if !ok {
|
||||
that2, ok := that.(DirectHttpResponse)
|
||||
if ok {
|
||||
that1 = &that2
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
}
|
||||
if that1 == nil {
|
||||
return this == nil
|
||||
} else if this == nil {
|
||||
return false
|
||||
}
|
||||
if this.Code != that1.Code {
|
||||
return false
|
||||
}
|
||||
if this.Body != that1.Body {
|
||||
return false
|
||||
}
|
||||
if len(this.Headers) != len(that1.Headers) {
|
||||
return false
|
||||
}
|
||||
for i := range this.Headers {
|
||||
if this.Headers[i] != that1.Headers[i] {
|
||||
return false
|
||||
}
|
||||
}
|
||||
return true
|
||||
}
|
||||
func (this *DirectHttpResponse) GoString() string {
|
||||
if this == nil {
|
||||
return "nil"
|
||||
}
|
||||
s := make([]string, 0, 7)
|
||||
s = append(s, "&v1beta1.DirectHttpResponse{")
|
||||
s = append(s, "Code: "+fmt.Sprintf("%#v", this.Code)+",\n")
|
||||
s = append(s, "Body: "+fmt.Sprintf("%#v", this.Body)+",\n")
|
||||
keysForHeaders := make([]string, 0, len(this.Headers))
|
||||
for k, _ := range this.Headers {
|
||||
keysForHeaders = append(keysForHeaders, k)
|
||||
}
|
||||
github_com_gogo_protobuf_sortkeys.Strings(keysForHeaders)
|
||||
mapStringForHeaders := "map[string]string{"
|
||||
for _, k := range keysForHeaders {
|
||||
mapStringForHeaders += fmt.Sprintf("%#v: %#v,", k, this.Headers[k])
|
||||
}
|
||||
mapStringForHeaders += "}"
|
||||
if this.Headers != nil {
|
||||
s = append(s, "Headers: "+mapStringForHeaders+",\n")
|
||||
}
|
||||
s = append(s, "}")
|
||||
return strings.Join(s, "")
|
||||
}
|
||||
func valueToGoStringHttpResponse(v interface{}, typ string) string {
|
||||
rv := reflect.ValueOf(v)
|
||||
if rv.IsNil() {
|
||||
return "nil"
|
||||
}
|
||||
pv := reflect.Indirect(rv).Interface()
|
||||
return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv)
|
||||
}
|
||||
func (m *DirectHttpResponse) Marshal() (dAtA []byte, err error) {
|
||||
size := m.Size()
|
||||
dAtA = make([]byte, size)
|
||||
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return dAtA[:n], nil
|
||||
}
|
||||
|
||||
func (m *DirectHttpResponse) MarshalTo(dAtA []byte) (int, error) {
|
||||
size := m.Size()
|
||||
return m.MarshalToSizedBuffer(dAtA[:size])
|
||||
}
|
||||
|
||||
func (m *DirectHttpResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||
i := len(dAtA)
|
||||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
if len(m.Headers) > 0 {
|
||||
for k := range m.Headers {
|
||||
v := m.Headers[k]
|
||||
baseI := i
|
||||
i -= len(v)
|
||||
copy(dAtA[i:], v)
|
||||
i = encodeVarintHttpResponse(dAtA, i, uint64(len(v)))
|
||||
i--
|
||||
dAtA[i] = 0x12
|
||||
i -= len(k)
|
||||
copy(dAtA[i:], k)
|
||||
i = encodeVarintHttpResponse(dAtA, i, uint64(len(k)))
|
||||
i--
|
||||
dAtA[i] = 0xa
|
||||
i = encodeVarintHttpResponse(dAtA, i, uint64(baseI-i))
|
||||
i--
|
||||
dAtA[i] = 0x1a
|
||||
}
|
||||
}
|
||||
if len(m.Body) > 0 {
|
||||
i -= len(m.Body)
|
||||
copy(dAtA[i:], m.Body)
|
||||
i = encodeVarintHttpResponse(dAtA, i, uint64(len(m.Body)))
|
||||
i--
|
||||
dAtA[i] = 0x12
|
||||
}
|
||||
if m.Code != 0 {
|
||||
i = encodeVarintHttpResponse(dAtA, i, uint64(m.Code))
|
||||
i--
|
||||
dAtA[i] = 0x8
|
||||
}
|
||||
return len(dAtA) - i, nil
|
||||
}
|
||||
|
||||
func encodeVarintHttpResponse(dAtA []byte, offset int, v uint64) int {
|
||||
offset -= sovHttpResponse(v)
|
||||
base := offset
|
||||
for v >= 1<<7 {
|
||||
dAtA[offset] = uint8(v&0x7f | 0x80)
|
||||
v >>= 7
|
||||
offset++
|
||||
}
|
||||
dAtA[offset] = uint8(v)
|
||||
return base
|
||||
}
|
||||
func (m *DirectHttpResponse) Size() (n int) {
|
||||
if m == nil {
|
||||
return 0
|
||||
}
|
||||
var l int
|
||||
_ = l
|
||||
if m.Code != 0 {
|
||||
n += 1 + sovHttpResponse(uint64(m.Code))
|
||||
}
|
||||
l = len(m.Body)
|
||||
if l > 0 {
|
||||
n += 1 + l + sovHttpResponse(uint64(l))
|
||||
}
|
||||
if len(m.Headers) > 0 {
|
||||
for k, v := range m.Headers {
|
||||
_ = k
|
||||
_ = v
|
||||
mapEntrySize := 1 + len(k) + sovHttpResponse(uint64(len(k))) + 1 + len(v) + sovHttpResponse(uint64(len(v)))
|
||||
n += mapEntrySize + 1 + sovHttpResponse(uint64(mapEntrySize))
|
||||
}
|
||||
}
|
||||
return n
|
||||
}
|
||||
|
||||
func sovHttpResponse(x uint64) (n int) {
|
||||
return (math_bits.Len64(x|1) + 6) / 7
|
||||
}
|
||||
func sozHttpResponse(x uint64) (n int) {
|
||||
return sovHttpResponse(uint64((x << 1) ^ uint64((int64(x) >> 63))))
|
||||
}
|
||||
func (this *DirectHttpResponse) String() string {
|
||||
if this == nil {
|
||||
return "nil"
|
||||
}
|
||||
keysForHeaders := make([]string, 0, len(this.Headers))
|
||||
for k, _ := range this.Headers {
|
||||
keysForHeaders = append(keysForHeaders, k)
|
||||
}
|
||||
github_com_gogo_protobuf_sortkeys.Strings(keysForHeaders)
|
||||
mapStringForHeaders := "map[string]string{"
|
||||
for _, k := range keysForHeaders {
|
||||
mapStringForHeaders += fmt.Sprintf("%v: %v,", k, this.Headers[k])
|
||||
}
|
||||
mapStringForHeaders += "}"
|
||||
s := strings.Join([]string{`&DirectHttpResponse{`,
|
||||
`Code:` + fmt.Sprintf("%v", this.Code) + `,`,
|
||||
`Body:` + fmt.Sprintf("%v", this.Body) + `,`,
|
||||
`Headers:` + mapStringForHeaders + `,`,
|
||||
`}`,
|
||||
}, "")
|
||||
return s
|
||||
}
|
||||
func valueToStringHttpResponse(v interface{}) string {
|
||||
rv := reflect.ValueOf(v)
|
||||
if rv.IsNil() {
|
||||
return "nil"
|
||||
}
|
||||
pv := reflect.Indirect(rv).Interface()
|
||||
return fmt.Sprintf("*%v", pv)
|
||||
}
|
||||
func (m *DirectHttpResponse) Unmarshal(dAtA []byte) error {
|
||||
l := len(dAtA)
|
||||
iNdEx := 0
|
||||
for iNdEx < l {
|
||||
preIndex := iNdEx
|
||||
var wire uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowHttpResponse
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
wire |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
fieldNum := int32(wire >> 3)
|
||||
wireType := int(wire & 0x7)
|
||||
if wireType == 4 {
|
||||
return fmt.Errorf("proto: DirectHttpResponse: wiretype end group for non-group")
|
||||
}
|
||||
if fieldNum <= 0 {
|
||||
return fmt.Errorf("proto: DirectHttpResponse: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||
}
|
||||
switch fieldNum {
|
||||
case 1:
|
||||
if wireType != 0 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType)
|
||||
}
|
||||
m.Code = 0
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowHttpResponse
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
m.Code |= HttpStatusCode(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
case 2:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Body", wireType)
|
||||
}
|
||||
var stringLen uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowHttpResponse
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
stringLen |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
intStringLen := int(stringLen)
|
||||
if intStringLen < 0 {
|
||||
return ErrInvalidLengthHttpResponse
|
||||
}
|
||||
postIndex := iNdEx + intStringLen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthHttpResponse
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.Body = string(dAtA[iNdEx:postIndex])
|
||||
iNdEx = postIndex
|
||||
case 3:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Headers", wireType)
|
||||
}
|
||||
var msglen int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowHttpResponse
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
msglen |= int(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
if msglen < 0 {
|
||||
return ErrInvalidLengthHttpResponse
|
||||
}
|
||||
postIndex := iNdEx + msglen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthHttpResponse
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
if m.Headers == nil {
|
||||
m.Headers = make(map[string]string)
|
||||
}
|
||||
var mapkey string
|
||||
var mapvalue string
|
||||
for iNdEx < postIndex {
|
||||
entryPreIndex := iNdEx
|
||||
var wire uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowHttpResponse
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
wire |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
fieldNum := int32(wire >> 3)
|
||||
if fieldNum == 1 {
|
||||
var stringLenmapkey uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowHttpResponse
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
stringLenmapkey |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
intStringLenmapkey := int(stringLenmapkey)
|
||||
if intStringLenmapkey < 0 {
|
||||
return ErrInvalidLengthHttpResponse
|
||||
}
|
||||
postStringIndexmapkey := iNdEx + intStringLenmapkey
|
||||
if postStringIndexmapkey < 0 {
|
||||
return ErrInvalidLengthHttpResponse
|
||||
}
|
||||
if postStringIndexmapkey > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
mapkey = string(dAtA[iNdEx:postStringIndexmapkey])
|
||||
iNdEx = postStringIndexmapkey
|
||||
} else if fieldNum == 2 {
|
||||
var stringLenmapvalue uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowHttpResponse
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
stringLenmapvalue |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
intStringLenmapvalue := int(stringLenmapvalue)
|
||||
if intStringLenmapvalue < 0 {
|
||||
return ErrInvalidLengthHttpResponse
|
||||
}
|
||||
postStringIndexmapvalue := iNdEx + intStringLenmapvalue
|
||||
if postStringIndexmapvalue < 0 {
|
||||
return ErrInvalidLengthHttpResponse
|
||||
}
|
||||
if postStringIndexmapvalue > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue])
|
||||
iNdEx = postStringIndexmapvalue
|
||||
} else {
|
||||
iNdEx = entryPreIndex
|
||||
skippy, err := skipHttpResponse(dAtA[iNdEx:])
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if skippy < 0 {
|
||||
return ErrInvalidLengthHttpResponse
|
||||
}
|
||||
if (iNdEx + skippy) > postIndex {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
iNdEx += skippy
|
||||
}
|
||||
}
|
||||
m.Headers[mapkey] = mapvalue
|
||||
iNdEx = postIndex
|
||||
default:
|
||||
iNdEx = preIndex
|
||||
skippy, err := skipHttpResponse(dAtA[iNdEx:])
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if skippy < 0 {
|
||||
return ErrInvalidLengthHttpResponse
|
||||
}
|
||||
if (iNdEx + skippy) < 0 {
|
||||
return ErrInvalidLengthHttpResponse
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
iNdEx += skippy
|
||||
}
|
||||
}
|
||||
|
||||
if iNdEx > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func skipHttpResponse(dAtA []byte) (n int, err error) {
|
||||
l := len(dAtA)
|
||||
iNdEx := 0
|
||||
for iNdEx < l {
|
||||
var wire uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return 0, ErrIntOverflowHttpResponse
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return 0, io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
wire |= (uint64(b) & 0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
wireType := int(wire & 0x7)
|
||||
switch wireType {
|
||||
case 0:
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return 0, ErrIntOverflowHttpResponse
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return 0, io.ErrUnexpectedEOF
|
||||
}
|
||||
iNdEx++
|
||||
if dAtA[iNdEx-1] < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
return iNdEx, nil
|
||||
case 1:
|
||||
iNdEx += 8
|
||||
return iNdEx, nil
|
||||
case 2:
|
||||
var length int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return 0, ErrIntOverflowHttpResponse
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return 0, io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
length |= (int(b) & 0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
if length < 0 {
|
||||
return 0, ErrInvalidLengthHttpResponse
|
||||
}
|
||||
iNdEx += length
|
||||
if iNdEx < 0 {
|
||||
return 0, ErrInvalidLengthHttpResponse
|
||||
}
|
||||
return iNdEx, nil
|
||||
case 3:
|
||||
for {
|
||||
var innerWire uint64
|
||||
var start int = iNdEx
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return 0, ErrIntOverflowHttpResponse
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return 0, io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
innerWire |= (uint64(b) & 0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
innerWireType := int(innerWire & 0x7)
|
||||
if innerWireType == 4 {
|
||||
break
|
||||
}
|
||||
next, err := skipHttpResponse(dAtA[start:])
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
iNdEx = start + next
|
||||
if iNdEx < 0 {
|
||||
return 0, ErrInvalidLengthHttpResponse
|
||||
}
|
||||
}
|
||||
return iNdEx, nil
|
||||
case 4:
|
||||
return iNdEx, nil
|
||||
case 5:
|
||||
iNdEx += 4
|
||||
return iNdEx, nil
|
||||
default:
|
||||
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
|
||||
}
|
||||
}
|
||||
panic("unreachable")
|
||||
}
|
||||
|
||||
var (
|
||||
ErrInvalidLengthHttpResponse = fmt.Errorf("proto: negative length found during unmarshaling")
|
||||
ErrIntOverflowHttpResponse = fmt.Errorf("proto: integer overflow")
|
||||
)
|
||||
101
vendor/istio.io/api/policy/v1beta1/http_response.proto
generated
vendored
Normal file
101
vendor/istio.io/api/policy/v1beta1/http_response.proto
generated
vendored
Normal file
@@ -0,0 +1,101 @@
|
||||
// Copyright 2019 Istio Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
syntax = "proto3";
|
||||
|
||||
package istio.policy.v1beta1;
|
||||
|
||||
option go_package="istio.io/api/policy/v1beta1";
|
||||
|
||||
// Direct HTTP response for a client-facing error message which can be attached
|
||||
// to an RPC error.
|
||||
message DirectHttpResponse {
|
||||
// HTTP status code. If not set, RPC error code is used.
|
||||
HttpStatusCode code = 1;
|
||||
|
||||
// HTTP response body.
|
||||
string body = 2;
|
||||
|
||||
// HTTP response headers.
|
||||
map<string, string> headers = 3;
|
||||
}
|
||||
|
||||
// HTTP response codes.
|
||||
// For more details: http://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml
|
||||
enum HttpStatusCode {
|
||||
// Empty - This code not part of the HTTP status code specification, but it is needed for proto
|
||||
// `enum` type.
|
||||
Empty = 0;
|
||||
|
||||
Continue = 100;
|
||||
|
||||
OK = 200;
|
||||
Created = 201;
|
||||
Accepted = 202;
|
||||
NonAuthoritativeInformation = 203;
|
||||
NoContent = 204;
|
||||
ResetContent = 205;
|
||||
PartialContent = 206;
|
||||
MultiStatus = 207;
|
||||
AlreadyReported = 208;
|
||||
IMUsed = 226;
|
||||
|
||||
MultipleChoices = 300;
|
||||
MovedPermanently = 301;
|
||||
Found = 302;
|
||||
SeeOther = 303;
|
||||
NotModified = 304;
|
||||
UseProxy = 305;
|
||||
TemporaryRedirect = 307;
|
||||
PermanentRedirect = 308;
|
||||
|
||||
BadRequest = 400;
|
||||
Unauthorized = 401;
|
||||
PaymentRequired = 402;
|
||||
Forbidden = 403;
|
||||
NotFound = 404;
|
||||
MethodNotAllowed = 405;
|
||||
NotAcceptable = 406;
|
||||
ProxyAuthenticationRequired = 407;
|
||||
RequestTimeout = 408;
|
||||
Conflict = 409;
|
||||
Gone = 410;
|
||||
LengthRequired = 411;
|
||||
PreconditionFailed = 412;
|
||||
PayloadTooLarge = 413;
|
||||
URITooLong = 414;
|
||||
UnsupportedMediaType = 415;
|
||||
RangeNotSatisfiable = 416;
|
||||
ExpectationFailed = 417;
|
||||
MisdirectedRequest = 421;
|
||||
UnprocessableEntity = 422;
|
||||
Locked = 423;
|
||||
FailedDependency = 424;
|
||||
UpgradeRequired = 426;
|
||||
PreconditionRequired = 428;
|
||||
TooManyRequests = 429;
|
||||
RequestHeaderFieldsTooLarge = 431;
|
||||
|
||||
InternalServerError = 500;
|
||||
NotImplemented = 501;
|
||||
BadGateway = 502;
|
||||
ServiceUnavailable = 503;
|
||||
GatewayTimeout = 504;
|
||||
HTTPVersionNotSupported = 505;
|
||||
VariantAlsoNegotiates = 506;
|
||||
InsufficientStorage = 507;
|
||||
LoopDetected = 508;
|
||||
NotExtended = 510;
|
||||
NetworkAuthenticationRequired = 511;
|
||||
}
|
||||
33
vendor/istio.io/api/policy/v1beta1/http_response_json.gen.go
generated
vendored
Normal file
33
vendor/istio.io/api/policy/v1beta1/http_response_json.gen.go
generated
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
||||
// source: policy/v1beta1/http_response.proto
|
||||
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
bytes "bytes"
|
||||
fmt "fmt"
|
||||
github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb"
|
||||
proto "github.com/gogo/protobuf/proto"
|
||||
math "math"
|
||||
)
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ = proto.Marshal
|
||||
var _ = fmt.Errorf
|
||||
var _ = math.Inf
|
||||
|
||||
// MarshalJSON is a custom marshaler for DirectHttpResponse
|
||||
func (this *DirectHttpResponse) MarshalJSON() ([]byte, error) {
|
||||
str, err := HttpResponseMarshaler.MarshalToString(this)
|
||||
return []byte(str), err
|
||||
}
|
||||
|
||||
// UnmarshalJSON is a custom unmarshaler for DirectHttpResponse
|
||||
func (this *DirectHttpResponse) UnmarshalJSON(b []byte) error {
|
||||
return HttpResponseUnmarshaler.Unmarshal(bytes.NewReader(b), this)
|
||||
}
|
||||
|
||||
var (
|
||||
HttpResponseMarshaler = &github_com_gogo_protobuf_jsonpb.Marshaler{}
|
||||
HttpResponseUnmarshaler = &github_com_gogo_protobuf_jsonpb.Unmarshaler{}
|
||||
)
|
||||
760
vendor/istio.io/api/policy/v1beta1/istio.policy.v1beta1.json
generated
vendored
Normal file
760
vendor/istio.io/api/policy/v1beta1/istio.policy.v1beta1.json
generated
vendored
Normal file
@@ -0,0 +1,760 @@
|
||||
{
|
||||
"openapi": "3.0.0",
|
||||
"info": {
|
||||
"title": "Describes the rules used to configure Mixer's policy and telemetry features.",
|
||||
"version": "v1beta1"
|
||||
},
|
||||
"components": {
|
||||
"schemas": {
|
||||
"istio.policy.v1beta1.Duration": {
|
||||
"description": "An instance field of type Duration denotes that the expression for the field must evaluate to [ValueType.DURATION][istio.policy.v1beta1.ValueType.DURATION]",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"value": {
|
||||
"description": "Duration encoded as google.protobuf.Duration.",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"istio.policy.v1beta1.AttributeManifest": {
|
||||
"description": "AttributeManifest describes a set of Attributes produced by some component of an Istio deployment.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"name": {
|
||||
"description": "Name of the component producing these attributes. This can be the proxy (with the canonical name `istio-proxy`) or the name of an `attributes` kind adapter in Mixer.",
|
||||
"type": "string",
|
||||
"format": "string"
|
||||
},
|
||||
"revision": {
|
||||
"description": "The revision of this document. Assigned by server.",
|
||||
"type": "string",
|
||||
"format": "string"
|
||||
},
|
||||
"attributes": {
|
||||
"description": "The set of attributes this Istio component will be responsible for producing at runtime. We map from attribute name to the attribute's specification. The name of an attribute, which is how attributes are referred to in aspect configuration, must conform to: Name = IDENT { SEPARATOR IDENT };",
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"$ref": "#/components/schemas/istio.policy.v1beta1.AttributeManifest.AttributeInfo"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"istio.policy.v1beta1.AttributeManifest.AttributeInfo": {
|
||||
"description": "AttributeInfo describes the schema of an Istio `Attribute`.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"description": {
|
||||
"description": "A human-readable description of the attribute's purpose.",
|
||||
"type": "string",
|
||||
"format": "string"
|
||||
},
|
||||
"valueType": {
|
||||
"$ref": "#/components/schemas/istio.policy.v1beta1.ValueType"
|
||||
}
|
||||
}
|
||||
},
|
||||
"istio.policy.v1beta1.ValueType": {
|
||||
"description": "ValueType describes the types that values in the Istio system can take. These are used to describe the type of Attributes at run time, describe the type of the result of evaluating an expression, and to describe the runtime type of fields of other descriptors.",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"VALUE_TYPE_UNSPECIFIED",
|
||||
"STRING",
|
||||
"INT64",
|
||||
"DOUBLE",
|
||||
"BOOL",
|
||||
"TIMESTAMP",
|
||||
"IP_ADDRESS",
|
||||
"EMAIL_ADDRESS",
|
||||
"URI",
|
||||
"DNS_NAME",
|
||||
"DURATION",
|
||||
"STRING_MAP"
|
||||
]
|
||||
},
|
||||
"istio.policy.v1beta1.Rule": {
|
||||
"description": "A Rule is a selector and a set of intentions to be executed when the selector is `true`",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"match": {
|
||||
"description": "Match is an attribute based predicate. When Mixer receives a request it evaluates the match expression and executes all the associated `actions` if the match evaluates to true.",
|
||||
"type": "string",
|
||||
"format": "string"
|
||||
},
|
||||
"actions": {
|
||||
"description": "The actions that will be executed when match evaluates to `true`.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/components/schemas/istio.policy.v1beta1.Action"
|
||||
}
|
||||
},
|
||||
"requestHeaderOperations": {
|
||||
"description": "Templatized operations on the request headers using values produced by the rule actions. Require the check action result to be OK.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/components/schemas/istio.policy.v1beta1.Rule.HeaderOperationTemplate"
|
||||
}
|
||||
},
|
||||
"responseHeaderOperations": {
|
||||
"description": "Templatized operations on the response headers using values produced by the rule actions. Require the check action result to be OK.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/components/schemas/istio.policy.v1beta1.Rule.HeaderOperationTemplate"
|
||||
}
|
||||
},
|
||||
"sampling": {
|
||||
"$ref": "#/components/schemas/istio.policy.v1beta1.Sampling"
|
||||
}
|
||||
}
|
||||
},
|
||||
"istio.policy.v1beta1.Action": {
|
||||
"description": "Action describes which [Handler][istio.policy.v1beta1.Handler] to invoke and what data to pass to it for processing.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"name": {
|
||||
"description": "A handle to refer to the results of the action.",
|
||||
"type": "string",
|
||||
"format": "string"
|
||||
},
|
||||
"handler": {
|
||||
"description": "Fully qualified name of the handler to invoke. Must match the `name` of a [Handler][istio.policy.v1beta1.Handler.name].",
|
||||
"type": "string",
|
||||
"format": "string"
|
||||
},
|
||||
"instances": {
|
||||
"description": "Each value must match the fully qualified name of the [Instance][istio.policy.v1beta1.Instance.name]s. Referenced instances are evaluated by resolving the attributes/literals for all the fields. The constructed objects are then passed to the `handler` referenced within this action.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"format": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"istio.policy.v1beta1.Rule.HeaderOperationTemplate": {
|
||||
"description": "A template for an HTTP header manipulation. Values in the template are expressions that may reference action outputs by name. For example, if an action `x` produces an output with a field `f`, then the header value expressions may use attribute `x.output.f` to reference the field value: ```yaml request_header_operations: - name: x-istio-header values: - x.output.f ```",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"name": {
|
||||
"description": "Header name literal value.",
|
||||
"type": "string",
|
||||
"format": "string"
|
||||
},
|
||||
"values": {
|
||||
"description": "Header value expressions.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"format": "string"
|
||||
}
|
||||
},
|
||||
"operation": {
|
||||
"$ref": "#/components/schemas/istio.policy.v1beta1.Rule.HeaderOperationTemplate.Operation"
|
||||
}
|
||||
}
|
||||
},
|
||||
"istio.policy.v1beta1.Sampling": {
|
||||
"description": "Sampling provides configuration of sampling strategies for Rule actions. Multiple sampling strategies are supported. When multiple strategies are configured, a request must be selected by all configured sampling strategies.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"random": {
|
||||
"$ref": "#/components/schemas/istio.policy.v1beta1.RandomSampling"
|
||||
},
|
||||
"rateLimit": {
|
||||
"$ref": "#/components/schemas/istio.policy.v1beta1.RateLimitSampling"
|
||||
}
|
||||
}
|
||||
},
|
||||
"istio.policy.v1beta1.Rule.HeaderOperationTemplate.Operation": {
|
||||
"description": "Header operation type.",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"REPLACE",
|
||||
"REMOVE",
|
||||
"APPEND"
|
||||
]
|
||||
},
|
||||
"istio.policy.v1beta1.Instance": {
|
||||
"description": "An Instance tells Mixer how to create instances for particular template.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"name": {
|
||||
"description": "The name of this instance",
|
||||
"type": "string",
|
||||
"format": "string"
|
||||
},
|
||||
"compiledTemplate": {
|
||||
"description": "The name of the compiled in template this instance creates instances for. For referencing non compiled-in templates, use the `template` field instead.",
|
||||
"type": "string",
|
||||
"format": "string"
|
||||
},
|
||||
"template": {
|
||||
"description": "The name of the template this instance creates instances for. For referencing compiled-in templates, use the `compiled_template` field instead.",
|
||||
"type": "string",
|
||||
"format": "string"
|
||||
},
|
||||
"params": {
|
||||
"description": "Depends on referenced template. Struct representation of a proto defined by the template; this varies depending on the value of field `template`.",
|
||||
"type": "object"
|
||||
},
|
||||
"attributeBindings": {
|
||||
"description": "Defines attribute bindings to map the output of attribute-producing adapters back into the attribute space. The variable `output` refers to the output template instance produced by the adapter. The following example derives `source.namespace` from `source.uid` in the context of Kubernetes: ```yaml params: # Pass the required attribute data to the adapter source_uid: source.uid | \"\" attribute_bindings: # Fill the new attributes from the adapter produced output source.namespace: output.source_namespace ```",
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string",
|
||||
"format": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"istio.policy.v1beta1.Handler": {
|
||||
"description": "Handler allows the operator to configure a specific adapter implementation. Each adapter implementation defines its own `params` proto.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"name": {
|
||||
"description": "Must be unique in the entire Mixer configuration. Used by [Actions][istio.policy.v1beta1.Action.handler] to refer to this handler.",
|
||||
"type": "string",
|
||||
"format": "string"
|
||||
},
|
||||
"params": {
|
||||
"description": "Depends on adapter implementation. Struct representation of a proto defined by the adapter implementation; this varies depending on the value of field `adapter`.",
|
||||
"type": "object"
|
||||
},
|
||||
"compiledAdapter": {
|
||||
"description": "The name of the compiled in adapter this handler instantiates. For referencing non compiled-in adapters, use the `adapter` field instead.",
|
||||
"type": "string",
|
||||
"format": "string"
|
||||
},
|
||||
"adapter": {
|
||||
"description": "The name of a specific adapter implementation. For referencing compiled-in adapters, use the `compiled_adapter` field instead.",
|
||||
"type": "string",
|
||||
"format": "string"
|
||||
},
|
||||
"connection": {
|
||||
"$ref": "#/components/schemas/istio.policy.v1beta1.Connection"
|
||||
}
|
||||
}
|
||||
},
|
||||
"istio.policy.v1beta1.Connection": {
|
||||
"description": "Connection allows the operator to specify the endpoint for out-of-process infrastructure backend. Connection is part of the handler custom resource and is specified alongside adapter specific configuration.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"address": {
|
||||
"description": "The address of the backend.",
|
||||
"type": "string",
|
||||
"format": "string"
|
||||
},
|
||||
"timeout": {
|
||||
"description": "Timeout for remote calls to the backend.",
|
||||
"type": "string"
|
||||
},
|
||||
"authentication": {
|
||||
"$ref": "#/components/schemas/istio.policy.v1beta1.Authentication"
|
||||
}
|
||||
}
|
||||
},
|
||||
"istio.policy.v1beta1.Authentication": {
|
||||
"description": "Authentication allows the operator to specify the authentication of connections to out-of-process infrastructure backend.",
|
||||
"type": "object",
|
||||
"oneOf": [
|
||||
{
|
||||
"required": [
|
||||
"tls"
|
||||
],
|
||||
"properties": {
|
||||
"tls": {
|
||||
"$ref": "#/components/schemas/istio.policy.v1beta1.Tls"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"required": [
|
||||
"mutual"
|
||||
],
|
||||
"properties": {
|
||||
"mutual": {
|
||||
"$ref": "#/components/schemas/istio.policy.v1beta1.Mutual"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"istio.policy.v1beta1.RandomSampling": {
|
||||
"description": "RandomSampling will filter based on the comparison of a randomly-generated value against the threshold provided.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"attributeExpression": {
|
||||
"description": "Specifies an attribute expression to use to override the numerator in the `percent_sampled` field. If this value is set, but no value is found OR if that value is not a numeric value, then the derived sampling rate will be 0 (meaning no `Action`s are executed for a `Rule`).",
|
||||
"type": "string",
|
||||
"format": "string"
|
||||
},
|
||||
"percentSampled": {
|
||||
"$ref": "#/components/schemas/istio.policy.v1beta1.FractionalPercent"
|
||||
},
|
||||
"useIndependentRandomness": {
|
||||
"description": "By default sampling will be based on the value of the request header `x-request-id`. This behavior will cause consistent sampling across `Rule`s and for the full trace of a request through a mesh (across hosts). If that value is not present and/or `use_independent_randomness` is set to true, the sampling will be done based on the value of attribute specified in `attribute_epxression`. If that attribute does not exist, the system will behave as if the sampling rate was 0 (meaning no `Action`s are executed for a `Rule`).",
|
||||
"type": "boolean"
|
||||
}
|
||||
}
|
||||
},
|
||||
"istio.policy.v1beta1.RateLimitSampling": {
|
||||
"description": "RateLimitSampling provides the ability to limit the number of Rule action executions that occur over a period of time.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"samplingDuration": {
|
||||
"description": "Window in which to enforce the sampling rate.",
|
||||
"type": "string"
|
||||
},
|
||||
"maxUnsampledEntries": {
|
||||
"description": "Number of entries to allow during the `sampling_duration` before sampling is enforced.",
|
||||
"type": "integer",
|
||||
"format": "int64"
|
||||
},
|
||||
"samplingRate": {
|
||||
"description": "The rate at which to sample entries once the unsampled limit has been reached. Sampling will be enforced as 1 per every `sampling_rate` entries allowed.",
|
||||
"type": "integer",
|
||||
"format": "int64"
|
||||
}
|
||||
}
|
||||
},
|
||||
"istio.policy.v1beta1.FractionalPercent": {
|
||||
"description": "A fractional percentage is used in cases in which for performance reasons performing floating point to integer conversions during randomness calculations is undesirable. The message includes both a numerator and denominator that together determine the final fractional value.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"numerator": {
|
||||
"description": "Specifies the numerator. Defaults to 0.",
|
||||
"type": "integer"
|
||||
},
|
||||
"denominator": {
|
||||
"$ref": "#/components/schemas/istio.policy.v1beta1.FractionalPercent.DenominatorType"
|
||||
}
|
||||
}
|
||||
},
|
||||
"istio.policy.v1beta1.FractionalPercent.DenominatorType": {
|
||||
"description": "Fraction percentages support several fixed denominator values.",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"HUNDRED",
|
||||
"TEN_THOUSAND"
|
||||
]
|
||||
},
|
||||
"istio.policy.v1beta1.Tls": {
|
||||
"description": "Tls let operator specify client authentication setting when TLS is used for connection to the backend.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"caCertificates": {
|
||||
"description": "The path to the file holding additional CA certificates to well known public certs.",
|
||||
"type": "string",
|
||||
"format": "string"
|
||||
},
|
||||
"serverName": {
|
||||
"description": "Used to configure mixer TLS client to verify the hostname on the returned certificates. It is also included in the client's handshake to support SNI.",
|
||||
"type": "string",
|
||||
"format": "string"
|
||||
}
|
||||
},
|
||||
"allOf": [
|
||||
{
|
||||
"oneOf": [
|
||||
{
|
||||
"required": [
|
||||
"tokenPath"
|
||||
],
|
||||
"properties": {
|
||||
"tokenPath": {
|
||||
"description": "The path to the file holding the auth token (password, jwt token, api key, etc).",
|
||||
"type": "string",
|
||||
"format": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"required": [
|
||||
"oauth"
|
||||
],
|
||||
"properties": {
|
||||
"oauth": {
|
||||
"$ref": "#/components/schemas/istio.policy.v1beta1.OAuth"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"oneOf": [
|
||||
{
|
||||
"required": [
|
||||
"authHeader"
|
||||
],
|
||||
"properties": {
|
||||
"authHeader": {
|
||||
"$ref": "#/components/schemas/istio.policy.v1beta1.Tls.AuthHeader"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"required": [
|
||||
"customHeader"
|
||||
],
|
||||
"properties": {
|
||||
"customHeader": {
|
||||
"description": "Customized header key to hold access token, e.g. x-api-key. Token will be passed as what it is.",
|
||||
"type": "string",
|
||||
"format": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"istio.policy.v1beta1.Mutual": {
|
||||
"description": "Mutual let operator specify TLS configuration for Mixer as client if mutual TLS is used to secure connection to adapter backend.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"caCertificates": {
|
||||
"description": "The path to the file holding additional CA certificates that are needed to verify the presented adapter certificates. By default Mixer should already include Istio CA certificates and system certificates in cert pool.",
|
||||
"type": "string",
|
||||
"format": "string"
|
||||
},
|
||||
"serverName": {
|
||||
"description": "Used to configure mixer mutual TLS client to supply server name for SNI. It is not used to verify the hostname of the peer certificate, since Istio verifies whitelisted SAN fields in mutual TLS.",
|
||||
"type": "string",
|
||||
"format": "string"
|
||||
},
|
||||
"privateKey": {
|
||||
"description": "The path to the file holding the private key for mutual TLS. If omitted, the default Mixer private key will be used.",
|
||||
"type": "string",
|
||||
"format": "string"
|
||||
},
|
||||
"clientCertificate": {
|
||||
"description": "The path to the file holding client certificate for mutual TLS. If omitted, the default Mixer certificates will be used.",
|
||||
"type": "string",
|
||||
"format": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"istio.policy.v1beta1.OAuth": {
|
||||
"description": "OAuth let operator specify config to fetch access token via oauth when using TLS for connection to the backend.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"clientId": {
|
||||
"description": "OAuth client id for mixer.",
|
||||
"type": "string",
|
||||
"format": "string"
|
||||
},
|
||||
"clientSecret": {
|
||||
"description": "The path to the file holding the client secret for oauth.",
|
||||
"type": "string",
|
||||
"format": "string"
|
||||
},
|
||||
"tokenUrl": {
|
||||
"description": "The Resource server's token endpoint URL.",
|
||||
"type": "string",
|
||||
"format": "string"
|
||||
},
|
||||
"scopes": {
|
||||
"description": "List of requested permissions.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"format": "string"
|
||||
}
|
||||
},
|
||||
"endpointParams": {
|
||||
"description": "Additional parameters for requests to the token endpoint.",
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string",
|
||||
"format": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"istio.policy.v1beta1.Tls.AuthHeader": {
|
||||
"description": "AuthHeader specifies how to pass access token with authorization header.",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"PLAIN",
|
||||
"BEARER"
|
||||
]
|
||||
},
|
||||
"istio.policy.v1beta1.DirectHttpResponse": {
|
||||
"description": "Direct HTTP response for a client-facing error message which can be attached to an RPC error.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"body": {
|
||||
"description": "HTTP response body.",
|
||||
"type": "string",
|
||||
"format": "string"
|
||||
},
|
||||
"code": {
|
||||
"$ref": "#/components/schemas/istio.policy.v1beta1.HttpStatusCode"
|
||||
},
|
||||
"headers": {
|
||||
"description": "HTTP response headers.",
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string",
|
||||
"format": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"istio.policy.v1beta1.HttpStatusCode": {
|
||||
"description": "HTTP response codes. For more details: http://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"Empty",
|
||||
"Continue",
|
||||
"OK",
|
||||
"Created",
|
||||
"Accepted",
|
||||
"NonAuthoritativeInformation",
|
||||
"NoContent",
|
||||
"ResetContent",
|
||||
"PartialContent",
|
||||
"MultiStatus",
|
||||
"AlreadyReported",
|
||||
"IMUsed",
|
||||
"MultipleChoices",
|
||||
"MovedPermanently",
|
||||
"Found",
|
||||
"SeeOther",
|
||||
"NotModified",
|
||||
"UseProxy",
|
||||
"TemporaryRedirect",
|
||||
"PermanentRedirect",
|
||||
"BadRequest",
|
||||
"Unauthorized",
|
||||
"PaymentRequired",
|
||||
"Forbidden",
|
||||
"NotFound",
|
||||
"MethodNotAllowed",
|
||||
"NotAcceptable",
|
||||
"ProxyAuthenticationRequired",
|
||||
"RequestTimeout",
|
||||
"Conflict",
|
||||
"Gone",
|
||||
"LengthRequired",
|
||||
"PreconditionFailed",
|
||||
"PayloadTooLarge",
|
||||
"URITooLong",
|
||||
"UnsupportedMediaType",
|
||||
"RangeNotSatisfiable",
|
||||
"ExpectationFailed",
|
||||
"MisdirectedRequest",
|
||||
"UnprocessableEntity",
|
||||
"Locked",
|
||||
"FailedDependency",
|
||||
"UpgradeRequired",
|
||||
"PreconditionRequired",
|
||||
"TooManyRequests",
|
||||
"RequestHeaderFieldsTooLarge",
|
||||
"InternalServerError",
|
||||
"NotImplemented",
|
||||
"BadGateway",
|
||||
"ServiceUnavailable",
|
||||
"GatewayTimeout",
|
||||
"HTTPVersionNotSupported",
|
||||
"VariantAlsoNegotiates",
|
||||
"InsufficientStorage",
|
||||
"LoopDetected",
|
||||
"NotExtended",
|
||||
"NetworkAuthenticationRequired"
|
||||
]
|
||||
},
|
||||
"istio.policy.v1beta1.Value": {
|
||||
"description": "An instance field of type Value denotes that the expression for the field is of dynamic type and can evaluate to any [ValueType][istio.policy.v1beta1.ValueType] enum values. For example, when authoring an instance configuration for a template that has a field `data` of type `istio.policy.v1beta1.Value`, both of the following expressions are valid `data: source.ip | ip(\"0.0.0.0\")`, `data: request.id | \"\"`; the resulting type is either ValueType.IP_ADDRESS or ValueType.STRING for the two cases respectively.",
|
||||
"type": "object",
|
||||
"oneOf": [
|
||||
{
|
||||
"required": [
|
||||
"stringValue"
|
||||
],
|
||||
"properties": {
|
||||
"stringValue": {
|
||||
"description": "Used for values of type STRING",
|
||||
"type": "string",
|
||||
"format": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"required": [
|
||||
"int64Value"
|
||||
],
|
||||
"properties": {
|
||||
"int64Value": {
|
||||
"description": "Used for values of type INT64",
|
||||
"type": "integer",
|
||||
"format": "int64"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"required": [
|
||||
"doubleValue"
|
||||
],
|
||||
"properties": {
|
||||
"doubleValue": {
|
||||
"description": "Used for values of type DOUBLE",
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"required": [
|
||||
"boolValue"
|
||||
],
|
||||
"properties": {
|
||||
"boolValue": {
|
||||
"description": "Used for values of type BOOL",
|
||||
"type": "boolean"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"required": [
|
||||
"ipAddressValue"
|
||||
],
|
||||
"properties": {
|
||||
"ipAddressValue": {
|
||||
"$ref": "#/components/schemas/istio.policy.v1beta1.IPAddress"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"required": [
|
||||
"timestampValue"
|
||||
],
|
||||
"properties": {
|
||||
"timestampValue": {
|
||||
"$ref": "#/components/schemas/istio.policy.v1beta1.TimeStamp"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"required": [
|
||||
"durationValue"
|
||||
],
|
||||
"properties": {
|
||||
"durationValue": {
|
||||
"$ref": "#/components/schemas/istio.policy.v1beta1.Duration"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"required": [
|
||||
"emailAddressValue"
|
||||
],
|
||||
"properties": {
|
||||
"emailAddressValue": {
|
||||
"$ref": "#/components/schemas/istio.policy.v1beta1.EmailAddress"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"required": [
|
||||
"dnsNameValue"
|
||||
],
|
||||
"properties": {
|
||||
"dnsNameValue": {
|
||||
"$ref": "#/components/schemas/istio.policy.v1beta1.DNSName"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"required": [
|
||||
"uriValue"
|
||||
],
|
||||
"properties": {
|
||||
"uriValue": {
|
||||
"$ref": "#/components/schemas/istio.policy.v1beta1.Uri"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"required": [
|
||||
"stringMapValue"
|
||||
],
|
||||
"properties": {
|
||||
"stringMapValue": {
|
||||
"$ref": "#/components/schemas/istio.policy.v1beta1.StringMap"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"istio.policy.v1beta1.IPAddress": {
|
||||
"description": "An instance field of type IPAddress denotes that the expression for the field must evaluate to [ValueType.IP_ADDRESS][istio.policy.v1beta1.ValueType.IP_ADDRESS]",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"value": {
|
||||
"description": "IPAddress encoded as bytes.",
|
||||
"type": "string",
|
||||
"format": "binary"
|
||||
}
|
||||
}
|
||||
},
|
||||
"istio.policy.v1beta1.TimeStamp": {
|
||||
"description": "An instance field of type TimeStamp denotes that the expression for the field must evaluate to [ValueType.TIMESTAMP][istio.policy.v1beta1.ValueType.TIMESTAMP]",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"value": {
|
||||
"description": "TimeStamp encoded as google.protobuf.Timestamp.",
|
||||
"type": "string",
|
||||
"format": "dateTime"
|
||||
}
|
||||
}
|
||||
},
|
||||
"istio.policy.v1beta1.EmailAddress": {
|
||||
"description": "DO NOT USE !! Under Development An instance field of type EmailAddress denotes that the expression for the field must evaluate to [ValueType.EMAIL_ADDRESS][istio.policy.v1beta1.ValueType.EMAIL_ADDRESS]",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"value": {
|
||||
"description": "EmailAddress encoded as string.",
|
||||
"type": "string",
|
||||
"format": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"istio.policy.v1beta1.DNSName": {
|
||||
"description": "An instance field of type DNSName denotes that the expression for the field must evaluate to [ValueType.DNS_NAME][istio.policy.v1beta1.ValueType.DNS_NAME]",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"value": {
|
||||
"description": "DNSName encoded as string.",
|
||||
"type": "string",
|
||||
"format": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"istio.policy.v1beta1.Uri": {
|
||||
"description": "DO NOT USE !! Under Development An instance field of type Uri denotes that the expression for the field must evaluate to [ValueType.URI][istio.policy.v1beta1.ValueType.URI]",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"value": {
|
||||
"description": "Uri encoded as string.",
|
||||
"type": "string",
|
||||
"format": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"istio.policy.v1beta1.StringMap": {
|
||||
"description": "An instance field of type StringMap denotes that the expression for the field must evaluate to [ValueType.STRING_MAP][istio.policy.v1beta1.ValueType.STRING_MAP]",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"value": {
|
||||
"description": "StringMap encoded as a map of strings",
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string",
|
||||
"format": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
1864
vendor/istio.io/api/policy/v1beta1/istio.policy.v1beta1.pb.html
generated
vendored
Normal file
1864
vendor/istio.io/api/policy/v1beta1/istio.policy.v1beta1.pb.html
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
3406
vendor/istio.io/api/policy/v1beta1/type.pb.go
generated
vendored
Normal file
3406
vendor/istio.io/api/policy/v1beta1/type.pb.go
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
146
vendor/istio.io/api/policy/v1beta1/type.proto
generated
vendored
Normal file
146
vendor/istio.io/api/policy/v1beta1/type.proto
generated
vendored
Normal file
@@ -0,0 +1,146 @@
|
||||
// Copyright 2018 Istio Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
syntax = "proto3";
|
||||
|
||||
// $title: Rules
|
||||
// $description: Describes the rules used to configure Mixer's policy and telemetry features.
|
||||
// $location: https://istio.io/docs/reference/config/policy-and-telemetry/istio.policy.v1beta1.html
|
||||
|
||||
// Describes the rules used to configure Mixer's policy and telemetry features.
|
||||
package istio.policy.v1beta1;
|
||||
|
||||
option go_package="istio.io/api/policy/v1beta1";
|
||||
|
||||
import "google/protobuf/duration.proto";
|
||||
import "google/protobuf/timestamp.proto";
|
||||
|
||||
// An instance field of type Value denotes that the expression for the field is of dynamic type and can evaluate to any
|
||||
// [ValueType][istio.policy.v1beta1.ValueType] enum values. For example, when
|
||||
// authoring an instance configuration for a template that has a field `data` of type `istio.policy.v1beta1.Value`,
|
||||
// both of the following expressions are valid `data: source.ip | ip("0.0.0.0")`, `data: request.id | ""`;
|
||||
// the resulting type is either ValueType.IP_ADDRESS or ValueType.STRING for the two cases respectively.
|
||||
//
|
||||
// Objects of type Value are also passed to the adapters during request-time. There is a 1:1 mapping between
|
||||
// oneof fields in `Value` and enum values inside `ValueType`. Depending on the expression's evaluated `ValueType`,
|
||||
// the equivalent oneof field in `Value` is populated by Mixer and passed to the adapters.
|
||||
message Value {
|
||||
oneof value {
|
||||
// Used for values of type STRING
|
||||
string string_value = 1;
|
||||
|
||||
// Used for values of type INT64
|
||||
int64 int64_value = 2;
|
||||
|
||||
// Used for values of type DOUBLE
|
||||
double double_value = 3;
|
||||
|
||||
// Used for values of type BOOL
|
||||
bool bool_value = 4;
|
||||
|
||||
// Used for values of type IPAddress
|
||||
IPAddress ip_address_value = 5;
|
||||
|
||||
// Used for values of type TIMESTAMP
|
||||
TimeStamp timestamp_value = 6;
|
||||
|
||||
// Used for values of type DURATION
|
||||
Duration duration_value = 7;
|
||||
|
||||
// Used for values of type EmailAddress
|
||||
EmailAddress email_address_value = 8;
|
||||
|
||||
// Used for values of type DNSName
|
||||
DNSName dns_name_value = 9;
|
||||
|
||||
// Used for values of type Uri
|
||||
Uri uri_value = 10;
|
||||
|
||||
// Used for values of type STRING_MAP
|
||||
StringMap string_map_value = 11;
|
||||
}
|
||||
}
|
||||
|
||||
// An instance field of type IPAddress denotes that the expression for the field must evaluate to
|
||||
// [ValueType.IP_ADDRESS][istio.policy.v1beta1.ValueType.IP_ADDRESS]
|
||||
//
|
||||
// Objects of type IPAddress are also passed to the adapters during request-time for the instance fields of
|
||||
// type IPAddress
|
||||
message IPAddress {
|
||||
// IPAddress encoded as bytes.
|
||||
bytes value = 1;
|
||||
}
|
||||
|
||||
// An instance field of type Duration denotes that the expression for the field must evaluate to
|
||||
// [ValueType.DURATION][istio.policy.v1beta1.ValueType.DURATION]
|
||||
//
|
||||
// Objects of type Duration are also passed to the adapters during request-time for the instance fields of
|
||||
// type Duration
|
||||
message Duration {
|
||||
// Duration encoded as google.protobuf.Duration.
|
||||
google.protobuf.Duration value = 1;
|
||||
}
|
||||
|
||||
// An instance field of type TimeStamp denotes that the expression for the field must evaluate to
|
||||
// [ValueType.TIMESTAMP][istio.policy.v1beta1.ValueType.TIMESTAMP]
|
||||
//
|
||||
// Objects of type TimeStamp are also passed to the adapters during request-time for the instance fields of
|
||||
// type TimeStamp
|
||||
message TimeStamp {
|
||||
// TimeStamp encoded as google.protobuf.Timestamp.
|
||||
google.protobuf.Timestamp value = 1;
|
||||
}
|
||||
|
||||
// An instance field of type DNSName denotes that the expression for the field must evaluate to
|
||||
// [ValueType.DNS_NAME][istio.policy.v1beta1.ValueType.DNS_NAME]
|
||||
//
|
||||
// Objects of type DNSName are also passed to the adapters during request-time for the instance fields of
|
||||
// type DNSName
|
||||
message DNSName {
|
||||
// DNSName encoded as string.
|
||||
string value = 1;
|
||||
}
|
||||
|
||||
|
||||
// An instance field of type StringMap denotes that the expression for the field must evaluate to
|
||||
// [ValueType.STRING_MAP][istio.policy.v1beta1.ValueType.STRING_MAP]
|
||||
//
|
||||
// Objects of type StringMap are also passed to the adapters during request-time for the instance fields of
|
||||
// type StringMap
|
||||
message StringMap {
|
||||
// StringMap encoded as a map of strings
|
||||
map<string, string> value = 1;
|
||||
}
|
||||
|
||||
// DO NOT USE !! Under Development
|
||||
// An instance field of type EmailAddress denotes that the expression for the field must evaluate to
|
||||
// [ValueType.EMAIL_ADDRESS][istio.policy.v1beta1.ValueType.EMAIL_ADDRESS]
|
||||
//
|
||||
// Objects of type EmailAddress are also passed to the adapters during request-time for the instance fields of
|
||||
// type EmailAddress
|
||||
message EmailAddress {
|
||||
// EmailAddress encoded as string.
|
||||
string value = 1;
|
||||
}
|
||||
|
||||
// DO NOT USE !! Under Development
|
||||
// An instance field of type Uri denotes that the expression for the field must evaluate to
|
||||
// [ValueType.URI][istio.policy.v1beta1.ValueType.URI]
|
||||
//
|
||||
// Objects of type Uri are also passed to the adapters during request-time for the instance fields of
|
||||
// type Uri
|
||||
message Uri {
|
||||
// Uri encoded as string.
|
||||
string value = 1;
|
||||
}
|
||||
113
vendor/istio.io/api/policy/v1beta1/type_json.gen.go
generated
vendored
Normal file
113
vendor/istio.io/api/policy/v1beta1/type_json.gen.go
generated
vendored
Normal file
@@ -0,0 +1,113 @@
|
||||
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
||||
// source: policy/v1beta1/type.proto
|
||||
|
||||
// Describes the rules used to configure Mixer's policy and telemetry features.
|
||||
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
bytes "bytes"
|
||||
fmt "fmt"
|
||||
github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb"
|
||||
proto "github.com/gogo/protobuf/proto"
|
||||
_ "github.com/gogo/protobuf/types"
|
||||
math "math"
|
||||
)
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ = proto.Marshal
|
||||
var _ = fmt.Errorf
|
||||
var _ = math.Inf
|
||||
|
||||
// MarshalJSON is a custom marshaler for Value
|
||||
func (this *Value) MarshalJSON() ([]byte, error) {
|
||||
str, err := TypeMarshaler.MarshalToString(this)
|
||||
return []byte(str), err
|
||||
}
|
||||
|
||||
// UnmarshalJSON is a custom unmarshaler for Value
|
||||
func (this *Value) UnmarshalJSON(b []byte) error {
|
||||
return TypeUnmarshaler.Unmarshal(bytes.NewReader(b), this)
|
||||
}
|
||||
|
||||
// MarshalJSON is a custom marshaler for IPAddress
|
||||
func (this *IPAddress) MarshalJSON() ([]byte, error) {
|
||||
str, err := TypeMarshaler.MarshalToString(this)
|
||||
return []byte(str), err
|
||||
}
|
||||
|
||||
// UnmarshalJSON is a custom unmarshaler for IPAddress
|
||||
func (this *IPAddress) UnmarshalJSON(b []byte) error {
|
||||
return TypeUnmarshaler.Unmarshal(bytes.NewReader(b), this)
|
||||
}
|
||||
|
||||
// MarshalJSON is a custom marshaler for Duration
|
||||
func (this *Duration) MarshalJSON() ([]byte, error) {
|
||||
str, err := TypeMarshaler.MarshalToString(this)
|
||||
return []byte(str), err
|
||||
}
|
||||
|
||||
// UnmarshalJSON is a custom unmarshaler for Duration
|
||||
func (this *Duration) UnmarshalJSON(b []byte) error {
|
||||
return TypeUnmarshaler.Unmarshal(bytes.NewReader(b), this)
|
||||
}
|
||||
|
||||
// MarshalJSON is a custom marshaler for TimeStamp
|
||||
func (this *TimeStamp) MarshalJSON() ([]byte, error) {
|
||||
str, err := TypeMarshaler.MarshalToString(this)
|
||||
return []byte(str), err
|
||||
}
|
||||
|
||||
// UnmarshalJSON is a custom unmarshaler for TimeStamp
|
||||
func (this *TimeStamp) UnmarshalJSON(b []byte) error {
|
||||
return TypeUnmarshaler.Unmarshal(bytes.NewReader(b), this)
|
||||
}
|
||||
|
||||
// MarshalJSON is a custom marshaler for DNSName
|
||||
func (this *DNSName) MarshalJSON() ([]byte, error) {
|
||||
str, err := TypeMarshaler.MarshalToString(this)
|
||||
return []byte(str), err
|
||||
}
|
||||
|
||||
// UnmarshalJSON is a custom unmarshaler for DNSName
|
||||
func (this *DNSName) UnmarshalJSON(b []byte) error {
|
||||
return TypeUnmarshaler.Unmarshal(bytes.NewReader(b), this)
|
||||
}
|
||||
|
||||
// MarshalJSON is a custom marshaler for StringMap
|
||||
func (this *StringMap) MarshalJSON() ([]byte, error) {
|
||||
str, err := TypeMarshaler.MarshalToString(this)
|
||||
return []byte(str), err
|
||||
}
|
||||
|
||||
// UnmarshalJSON is a custom unmarshaler for StringMap
|
||||
func (this *StringMap) UnmarshalJSON(b []byte) error {
|
||||
return TypeUnmarshaler.Unmarshal(bytes.NewReader(b), this)
|
||||
}
|
||||
|
||||
// MarshalJSON is a custom marshaler for EmailAddress
|
||||
func (this *EmailAddress) MarshalJSON() ([]byte, error) {
|
||||
str, err := TypeMarshaler.MarshalToString(this)
|
||||
return []byte(str), err
|
||||
}
|
||||
|
||||
// UnmarshalJSON is a custom unmarshaler for EmailAddress
|
||||
func (this *EmailAddress) UnmarshalJSON(b []byte) error {
|
||||
return TypeUnmarshaler.Unmarshal(bytes.NewReader(b), this)
|
||||
}
|
||||
|
||||
// MarshalJSON is a custom marshaler for Uri
|
||||
func (this *Uri) MarshalJSON() ([]byte, error) {
|
||||
str, err := TypeMarshaler.MarshalToString(this)
|
||||
return []byte(str), err
|
||||
}
|
||||
|
||||
// UnmarshalJSON is a custom unmarshaler for Uri
|
||||
func (this *Uri) UnmarshalJSON(b []byte) error {
|
||||
return TypeUnmarshaler.Unmarshal(bytes.NewReader(b), this)
|
||||
}
|
||||
|
||||
var (
|
||||
TypeMarshaler = &github_com_gogo_protobuf_jsonpb.Marshaler{}
|
||||
TypeUnmarshaler = &github_com_gogo_protobuf_jsonpb.Unmarshaler{}
|
||||
)
|
||||
127
vendor/istio.io/api/policy/v1beta1/value_type.pb.go
generated
vendored
Normal file
127
vendor/istio.io/api/policy/v1beta1/value_type.pb.go
generated
vendored
Normal file
@@ -0,0 +1,127 @@
|
||||
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
||||
// source: policy/v1beta1/value_type.proto
|
||||
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
fmt "fmt"
|
||||
proto "github.com/gogo/protobuf/proto"
|
||||
math "math"
|
||||
strconv "strconv"
|
||||
)
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ = proto.Marshal
|
||||
var _ = fmt.Errorf
|
||||
var _ = math.Inf
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the proto package it is being compiled against.
|
||||
// A compilation error at this line likely means your copy of the
|
||||
// proto package needs to be updated.
|
||||
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
|
||||
|
||||
// ValueType describes the types that values in the Istio system can take. These
|
||||
// are used to describe the type of Attributes at run time, describe the type of
|
||||
// the result of evaluating an expression, and to describe the runtime type of
|
||||
// fields of other descriptors.
|
||||
type ValueType int32
|
||||
|
||||
const (
|
||||
// Invalid, default value.
|
||||
VALUE_TYPE_UNSPECIFIED ValueType = 0
|
||||
// An undiscriminated variable-length string.
|
||||
STRING ValueType = 1
|
||||
// An undiscriminated 64-bit signed integer.
|
||||
INT64 ValueType = 2
|
||||
// An undiscriminated 64-bit floating-point value.
|
||||
DOUBLE ValueType = 3
|
||||
// An undiscriminated boolean value.
|
||||
BOOL ValueType = 4
|
||||
// A point in time.
|
||||
TIMESTAMP ValueType = 5
|
||||
// An IP address.
|
||||
IP_ADDRESS ValueType = 6
|
||||
// An email address.
|
||||
EMAIL_ADDRESS ValueType = 7
|
||||
// A URI.
|
||||
URI ValueType = 8
|
||||
// A DNS name.
|
||||
DNS_NAME ValueType = 9
|
||||
// A span between two points in time.
|
||||
DURATION ValueType = 10
|
||||
// A map string -> string, typically used by headers.
|
||||
STRING_MAP ValueType = 11
|
||||
)
|
||||
|
||||
var ValueType_name = map[int32]string{
|
||||
0: "VALUE_TYPE_UNSPECIFIED",
|
||||
1: "STRING",
|
||||
2: "INT64",
|
||||
3: "DOUBLE",
|
||||
4: "BOOL",
|
||||
5: "TIMESTAMP",
|
||||
6: "IP_ADDRESS",
|
||||
7: "EMAIL_ADDRESS",
|
||||
8: "URI",
|
||||
9: "DNS_NAME",
|
||||
10: "DURATION",
|
||||
11: "STRING_MAP",
|
||||
}
|
||||
|
||||
var ValueType_value = map[string]int32{
|
||||
"VALUE_TYPE_UNSPECIFIED": 0,
|
||||
"STRING": 1,
|
||||
"INT64": 2,
|
||||
"DOUBLE": 3,
|
||||
"BOOL": 4,
|
||||
"TIMESTAMP": 5,
|
||||
"IP_ADDRESS": 6,
|
||||
"EMAIL_ADDRESS": 7,
|
||||
"URI": 8,
|
||||
"DNS_NAME": 9,
|
||||
"DURATION": 10,
|
||||
"STRING_MAP": 11,
|
||||
}
|
||||
|
||||
func (ValueType) EnumDescriptor() ([]byte, []int) {
|
||||
return fileDescriptor_72649b1dc07496e9, []int{0}
|
||||
}
|
||||
|
||||
func init() {
|
||||
proto.RegisterEnum("istio.policy.v1beta1.ValueType", ValueType_name, ValueType_value)
|
||||
}
|
||||
|
||||
func init() { proto.RegisterFile("policy/v1beta1/value_type.proto", fileDescriptor_72649b1dc07496e9) }
|
||||
|
||||
var fileDescriptor_72649b1dc07496e9 = []byte{
|
||||
// 309 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x54, 0x90, 0xcd, 0x4a, 0xfb, 0x40,
|
||||
0x14, 0x47, 0x67, 0xfe, 0xfd, 0xcc, 0xfd, 0x5b, 0x19, 0x07, 0x71, 0xa1, 0x70, 0xdd, 0xbb, 0x68,
|
||||
0x28, 0x8a, 0xfb, 0xa9, 0x19, 0x65, 0x20, 0x5f, 0x26, 0x93, 0x82, 0x6e, 0x42, 0x2b, 0x59, 0x04,
|
||||
0x0a, 0x09, 0x1a, 0x0b, 0xdd, 0xf9, 0x08, 0x3e, 0x86, 0xef, 0xe0, 0x0b, 0xb8, 0xec, 0xb2, 0x4b,
|
||||
0x3b, 0xdd, 0xb8, 0xec, 0x23, 0x48, 0x1b, 0x11, 0x5c, 0xde, 0xc3, 0xe1, 0xf2, 0xe3, 0xc0, 0x69,
|
||||
0x59, 0x4c, 0xf3, 0x87, 0xb9, 0x3d, 0x1b, 0x4c, 0xb2, 0x6a, 0x3c, 0xb0, 0x67, 0xe3, 0xe9, 0x73,
|
||||
0x96, 0x56, 0xf3, 0x32, 0xeb, 0x97, 0x8f, 0x45, 0x55, 0xf0, 0xc3, 0xfc, 0xa9, 0xca, 0x8b, 0x7e,
|
||||
0xad, 0xf5, 0x7f, 0xb4, 0xb3, 0x77, 0x0a, 0xd6, 0x68, 0xab, 0xea, 0x79, 0x99, 0xf1, 0x63, 0x38,
|
||||
0x1a, 0x09, 0x37, 0x91, 0xa9, 0xbe, 0x0b, 0x65, 0x9a, 0xf8, 0x71, 0x28, 0xaf, 0xd4, 0xb5, 0x92,
|
||||
0x0e, 0x23, 0x1c, 0xa0, 0x1d, 0xeb, 0x48, 0xf9, 0x37, 0x8c, 0x72, 0x0b, 0x5a, 0xca, 0xd7, 0x97,
|
||||
0x17, 0xec, 0xdf, 0x16, 0x3b, 0x41, 0x32, 0x74, 0x25, 0x6b, 0xf0, 0x2e, 0x34, 0x87, 0x41, 0xe0,
|
||||
0xb2, 0x26, 0xef, 0x81, 0xa5, 0x95, 0x27, 0x63, 0x2d, 0xbc, 0x90, 0xb5, 0xf8, 0x3e, 0x80, 0x0a,
|
||||
0x53, 0xe1, 0x38, 0x91, 0x8c, 0x63, 0xd6, 0xe6, 0x07, 0xd0, 0x93, 0x9e, 0x50, 0xee, 0x2f, 0xea,
|
||||
0xf0, 0x0e, 0x34, 0x92, 0x48, 0xb1, 0x2e, 0xdf, 0x83, 0xae, 0xe3, 0xc7, 0xa9, 0x2f, 0x3c, 0xc9,
|
||||
0xac, 0xdd, 0x95, 0x44, 0x42, 0xab, 0xc0, 0x67, 0xb0, 0xfd, 0x53, 0x6f, 0x48, 0x3d, 0x11, 0xb2,
|
||||
0xff, 0xc3, 0xdb, 0xc5, 0x0a, 0xc9, 0x72, 0x85, 0x64, 0xb3, 0x42, 0xfa, 0x62, 0x90, 0xbe, 0x19,
|
||||
0xa4, 0x1f, 0x06, 0xe9, 0xc2, 0x20, 0xfd, 0x34, 0x48, 0xbf, 0x0c, 0x92, 0x8d, 0x41, 0xfa, 0xba,
|
||||
0x46, 0xb2, 0x58, 0x23, 0x59, 0xae, 0x91, 0xdc, 0x9f, 0xd4, 0x25, 0xf2, 0xc2, 0x1e, 0x97, 0xb9,
|
||||
0xfd, 0xb7, 0xdb, 0xa4, 0xbd, 0xab, 0x75, 0xfe, 0x1d, 0x00, 0x00, 0xff, 0xff, 0xa4, 0x0e, 0x39,
|
||||
0x92, 0x50, 0x01, 0x00, 0x00,
|
||||
}
|
||||
|
||||
func (x ValueType) String() string {
|
||||
s, ok := ValueType_name[int32(x)]
|
||||
if ok {
|
||||
return s
|
||||
}
|
||||
return strconv.Itoa(int(x))
|
||||
}
|
||||
61
vendor/istio.io/api/policy/v1beta1/value_type.proto
generated
vendored
Normal file
61
vendor/istio.io/api/policy/v1beta1/value_type.proto
generated
vendored
Normal file
@@ -0,0 +1,61 @@
|
||||
// Copyright 2018 Istio Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
syntax = "proto3";
|
||||
|
||||
package istio.policy.v1beta1;
|
||||
|
||||
option go_package="istio.io/api/policy/v1beta1";
|
||||
|
||||
// ValueType describes the types that values in the Istio system can take. These
|
||||
// are used to describe the type of Attributes at run time, describe the type of
|
||||
// the result of evaluating an expression, and to describe the runtime type of
|
||||
// fields of other descriptors.
|
||||
enum ValueType {
|
||||
// Invalid, default value.
|
||||
VALUE_TYPE_UNSPECIFIED = 0;
|
||||
|
||||
// An undiscriminated variable-length string.
|
||||
STRING = 1;
|
||||
|
||||
// An undiscriminated 64-bit signed integer.
|
||||
INT64 = 2;
|
||||
|
||||
// An undiscriminated 64-bit floating-point value.
|
||||
DOUBLE = 3;
|
||||
|
||||
// An undiscriminated boolean value.
|
||||
BOOL = 4;
|
||||
|
||||
// A point in time.
|
||||
TIMESTAMP = 5;
|
||||
|
||||
// An IP address.
|
||||
IP_ADDRESS = 6;
|
||||
|
||||
// An email address.
|
||||
EMAIL_ADDRESS = 7;
|
||||
|
||||
// A URI.
|
||||
URI = 8;
|
||||
|
||||
// A DNS name.
|
||||
DNS_NAME = 9;
|
||||
|
||||
// A span between two points in time.
|
||||
DURATION = 10;
|
||||
|
||||
// A map string -> string, typically used by headers.
|
||||
STRING_MAP = 11;
|
||||
}
|
||||
Reference in New Issue
Block a user