From ec00fe0c7bc3cb9d399a0ebcae4b1b967b0e32d4 Mon Sep 17 00:00:00 2001 From: Kuat Yessenov Date: Thu, 15 Mar 2018 22:06:01 -0700 Subject: [PATCH 1/3] Update istio/api Signed-off-by: Kuat Yessenov --- istio.io/api/CODEOWNERS | 19 - istio.io/api/Makefile | 5 +- .../adapter/model/v1beta1/extensions.pb.go | 10 +- .../adapter/model/v1beta1/extensions.proto | 6 - .../v1beta1/infrastructure_backend.pb.go | 1974 +++++++ .../v1beta1/infrastructure_backend.proto | 116 + .../istio.mixer.adapter.model.v1beta1.pb.html | 342 +- .../v1alpha3/destination_rule.pb.go | 2670 ++++++++- .../v1alpha3/external_service.pb.go | 849 ++- .../api/networking/v1alpha3/gateway.pb.go | 1195 +++- .../networking/v1alpha3/virtual_service.pb.go | 4806 ++++++++++++++++- 11 files changed, 11555 insertions(+), 437 deletions(-) delete mode 100644 istio.io/api/CODEOWNERS create mode 100644 istio.io/api/mixer/adapter/model/v1beta1/infrastructure_backend.pb.go create mode 100644 istio.io/api/mixer/adapter/model/v1beta1/infrastructure_backend.proto diff --git a/istio.io/api/CODEOWNERS b/istio.io/api/CODEOWNERS deleted file mode 100644 index caca6a18..00000000 --- a/istio.io/api/CODEOWNERS +++ /dev/null @@ -1,19 +0,0 @@ -# This is a comment. -# Each line is a file pattern followed by one or more owners. - -# These owners will be the default owners for everything in -# the repo. Unless a later match takes precedence, they will be -# requested for review when someone opens a pull request. - -* @rshriram @geeknoid @douglas-reid - -# Order is important; the last matching pattern takes the most -# precedence. When someone opens a pull request that only -# modifies routing/ files, only owners listed here and not the global -# owner(s) will be requested for a review. - -/mesh/ @ZackButcher @rshriram -/routing/ @rshriram @ZackButcher @kyessenov -/rbac/ @liminw -/mixer/ @geeknoid @douglas-reid -/broker/ @xiaolanz diff --git a/istio.io/api/Makefile b/istio.io/api/Makefile index 301dc5a2..b2dee8dc 100644 --- a/istio.io/api/Makefile +++ b/istio.io/api/Makefile @@ -33,6 +33,7 @@ protoc_gen_go_plugin := $(protoc_gen_go_prefix):$(out_path) ######################## gogo_plugin_prefix := --gogo_out=plugins=grpc, +gogofast_plugin_prefix := --gogofast_out=plugins=grpc, gogoslick_plugin_prefix := --gogoslick_out=plugins=grpc, comma := , @@ -45,6 +46,7 @@ importmaps := \ google/protobuf/descriptor.proto=github.com/gogo/protobuf/protoc-gen-gogo/descriptor \ google/protobuf/duration.proto=github.com/gogo/protobuf/types \ google/protobuf/timestamp.proto=github.com/gogo/protobuf/types \ + google/protobuf/wrappers.proto=github.com/gogo/protobuf/types \ google/rpc/status.proto=github.com/gogo/googleapis/google/rpc \ google/rpc/code.proto=github.com/gogo/googleapis/google/rpc \ google/rpc/error_details.proto=github.com/gogo/googleapis/google/rpc \ @@ -54,6 +56,7 @@ mapping_with_spaces := $(foreach map,$(importmaps),M$(map),) gogo_mapping := $(subst $(space),$(empty),$(mapping_with_spaces)) gogo_plugin := $(gogo_plugin_prefix)$(gogo_mapping):$(out_path) +gogofast_plugin := $(gogofast_plugin_prefix)$(gogo_mapping):$(out_path) gogoslick_plugin := $(gogoslick_plugin_prefix)$(gogo_mapping):$(out_path) ######################## @@ -216,7 +219,7 @@ $(routing_v1alpha1_pb_gos) $(routing_v1alpha1_pb_doc): $(routing_v1alpha1_protos $(routing_v1alpha3_pb_gos) $(routing_v1alpha3_pb_doc): $(routing_v1alpha3_protos) ## Generate networking/v1alpha3/*.pb.go - @$(docker_gen) $(protoc_gen_go_plugin) $(protoc_gen_docs_plugin)$(routing_v1alpha3_path) $^ + @$(docker_gen) $(gogofast_plugin) $(protoc_gen_docs_plugin)$(routing_v1alpha3_path) $^ clean-routing: rm -f $(routing_v1alpha1_pb_gos) $(routing_v1alpha3_pb_gos) diff --git a/istio.io/api/mixer/adapter/model/v1beta1/extensions.pb.go b/istio.io/api/mixer/adapter/model/v1beta1/extensions.pb.go index 727cfd16..f32ff0ca 100644 --- a/istio.io/api/mixer/adapter/model/v1beta1/extensions.pb.go +++ b/istio.io/api/mixer/adapter/model/v1beta1/extensions.pb.go @@ -4,14 +4,18 @@ /* Package v1beta1 is a generated protocol buffer package. -This package defines the types that are used when creating Mixer templates. `ValueType` defined in this pacakge -is also used by adapters to know the underlying datatype of the instance fields. - It is generated from these files: mixer/adapter/model/v1beta1/extensions.proto + mixer/adapter/model/v1beta1/infrastructure_backend.proto mixer/adapter/model/v1beta1/type.proto It has these top-level messages: + CreateSessionRequest + CreateSessionResponse + ValidateRequest + ValidateResponse + CloseSessionRequest + CloseSessionResponse Value IPAddress Duration diff --git a/istio.io/api/mixer/adapter/model/v1beta1/extensions.proto b/istio.io/api/mixer/adapter/model/v1beta1/extensions.proto index e037b325..5a04b370 100644 --- a/istio.io/api/mixer/adapter/model/v1beta1/extensions.proto +++ b/istio.io/api/mixer/adapter/model/v1beta1/extensions.proto @@ -14,12 +14,6 @@ syntax = "proto3"; -// $title: Mixer Adapter Model -// $overview: Definitions used when creating Mixer templates -// $location: https://istio.io/docs/reference/config/mixer/istio.mixer.adapter.model.v1beta1.html - -// This package defines the types that are used when creating Mixer templates. `ValueType` defined in this pacakge -// is also used by adapters to know the underlying datatype of the instance fields. package istio.mixer.adapter.model.v1beta1; option go_package="istio.io/api/mixer/adapter/model/v1beta1"; diff --git a/istio.io/api/mixer/adapter/model/v1beta1/infrastructure_backend.pb.go b/istio.io/api/mixer/adapter/model/v1beta1/infrastructure_backend.pb.go new file mode 100644 index 00000000..fdb3540a --- /dev/null +++ b/istio.io/api/mixer/adapter/model/v1beta1/infrastructure_backend.pb.go @@ -0,0 +1,1974 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: mixer/adapter/model/v1beta1/infrastructure_backend.proto + +package v1beta1 + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import google_protobuf1 "github.com/gogo/protobuf/types" +import google_rpc "github.com/gogo/googleapis/google/rpc" + +import strings "strings" +import reflect "reflect" +import sortkeys "github.com/gogo/protobuf/sortkeys" + +import context "golang.org/x/net/context" +import grpc "google.golang.org/grpc" + +import io "io" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// Request message for `CreateSession` method. +type CreateSessionRequest struct { + // Adapter specific configuration. + AdapterConfig *google_protobuf1.Any `protobuf:"bytes,1,opt,name=adapter_config,json=adapterConfig" json:"adapter_config,omitempty"` + // Map of instance names to their template-specific inferred type. + InferredTypes map[string]*google_protobuf1.Any `protobuf:"bytes,2,rep,name=inferred_types,json=inferredTypes" json:"inferred_types,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` +} + +func (m *CreateSessionRequest) Reset() { *m = CreateSessionRequest{} } +func (*CreateSessionRequest) ProtoMessage() {} +func (*CreateSessionRequest) Descriptor() ([]byte, []int) { + return fileDescriptorInfrastructureBackend, []int{0} +} + +func (m *CreateSessionRequest) GetAdapterConfig() *google_protobuf1.Any { + if m != nil { + return m.AdapterConfig + } + return nil +} + +func (m *CreateSessionRequest) GetInferredTypes() map[string]*google_protobuf1.Any { + if m != nil { + return m.InferredTypes + } + return nil +} + +// Response message for `CreateSession` method. +type CreateSessionResponse struct { + // Id of the created session. + SessionId string `protobuf:"bytes,1,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"` + // The success/failure status of create session call. + Status *google_rpc.Status `protobuf:"bytes,2,opt,name=status" json:"status,omitempty"` +} + +func (m *CreateSessionResponse) Reset() { *m = CreateSessionResponse{} } +func (*CreateSessionResponse) ProtoMessage() {} +func (*CreateSessionResponse) Descriptor() ([]byte, []int) { + return fileDescriptorInfrastructureBackend, []int{1} +} + +func (m *CreateSessionResponse) GetSessionId() string { + if m != nil { + return m.SessionId + } + return "" +} + +func (m *CreateSessionResponse) GetStatus() *google_rpc.Status { + if m != nil { + return m.Status + } + return nil +} + +// Request message for `Validate` method. +type ValidateRequest struct { + // Adapter specific configuration. + AdapterConfig *google_protobuf1.Any `protobuf:"bytes,1,opt,name=adapter_config,json=adapterConfig" json:"adapter_config,omitempty"` + // Map of instance names to their template-specific inferred type. + InferredTypes map[string]*google_protobuf1.Any `protobuf:"bytes,2,rep,name=inferred_types,json=inferredTypes" json:"inferred_types,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` +} + +func (m *ValidateRequest) Reset() { *m = ValidateRequest{} } +func (*ValidateRequest) ProtoMessage() {} +func (*ValidateRequest) Descriptor() ([]byte, []int) { + return fileDescriptorInfrastructureBackend, []int{2} +} + +func (m *ValidateRequest) GetAdapterConfig() *google_protobuf1.Any { + if m != nil { + return m.AdapterConfig + } + return nil +} + +func (m *ValidateRequest) GetInferredTypes() map[string]*google_protobuf1.Any { + if m != nil { + return m.InferredTypes + } + return nil +} + +// Response message for `Validate` method. +type ValidateResponse struct { + // The success/failure status of validation call. + Status *google_rpc.Status `protobuf:"bytes,1,opt,name=status" json:"status,omitempty"` +} + +func (m *ValidateResponse) Reset() { *m = ValidateResponse{} } +func (*ValidateResponse) ProtoMessage() {} +func (*ValidateResponse) Descriptor() ([]byte, []int) { + return fileDescriptorInfrastructureBackend, []int{3} +} + +func (m *ValidateResponse) GetStatus() *google_rpc.Status { + if m != nil { + return m.Status + } + return nil +} + +// Request message for `CloseSession` method. +type CloseSessionRequest struct { + // Id of the session to be closed. + SessionId string `protobuf:"bytes,1,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"` +} + +func (m *CloseSessionRequest) Reset() { *m = CloseSessionRequest{} } +func (*CloseSessionRequest) ProtoMessage() {} +func (*CloseSessionRequest) Descriptor() ([]byte, []int) { + return fileDescriptorInfrastructureBackend, []int{4} +} + +func (m *CloseSessionRequest) GetSessionId() string { + if m != nil { + return m.SessionId + } + return "" +} + +// Response message for `CloseSession` method. +type CloseSessionResponse struct { + // The success/failure status of close session call. + Status *google_rpc.Status `protobuf:"bytes,1,opt,name=status" json:"status,omitempty"` +} + +func (m *CloseSessionResponse) Reset() { *m = CloseSessionResponse{} } +func (*CloseSessionResponse) ProtoMessage() {} +func (*CloseSessionResponse) Descriptor() ([]byte, []int) { + return fileDescriptorInfrastructureBackend, []int{5} +} + +func (m *CloseSessionResponse) GetStatus() *google_rpc.Status { + if m != nil { + return m.Status + } + return nil +} + +func init() { + proto.RegisterType((*CreateSessionRequest)(nil), "istio.mixer.adapter.model.v1beta1.CreateSessionRequest") + proto.RegisterType((*CreateSessionResponse)(nil), "istio.mixer.adapter.model.v1beta1.CreateSessionResponse") + proto.RegisterType((*ValidateRequest)(nil), "istio.mixer.adapter.model.v1beta1.ValidateRequest") + proto.RegisterType((*ValidateResponse)(nil), "istio.mixer.adapter.model.v1beta1.ValidateResponse") + proto.RegisterType((*CloseSessionRequest)(nil), "istio.mixer.adapter.model.v1beta1.CloseSessionRequest") + proto.RegisterType((*CloseSessionResponse)(nil), "istio.mixer.adapter.model.v1beta1.CloseSessionResponse") +} +func (this *CreateSessionRequest) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*CreateSessionRequest) + if !ok { + that2, ok := that.(CreateSessionRequest) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.AdapterConfig.Equal(that1.AdapterConfig) { + return false + } + if len(this.InferredTypes) != len(that1.InferredTypes) { + return false + } + for i := range this.InferredTypes { + if !this.InferredTypes[i].Equal(that1.InferredTypes[i]) { + return false + } + } + return true +} +func (this *CreateSessionResponse) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*CreateSessionResponse) + if !ok { + that2, ok := that.(CreateSessionResponse) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.SessionId != that1.SessionId { + return false + } + if !this.Status.Equal(that1.Status) { + return false + } + return true +} +func (this *ValidateRequest) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*ValidateRequest) + if !ok { + that2, ok := that.(ValidateRequest) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.AdapterConfig.Equal(that1.AdapterConfig) { + return false + } + if len(this.InferredTypes) != len(that1.InferredTypes) { + return false + } + for i := range this.InferredTypes { + if !this.InferredTypes[i].Equal(that1.InferredTypes[i]) { + return false + } + } + return true +} +func (this *ValidateResponse) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*ValidateResponse) + if !ok { + that2, ok := that.(ValidateResponse) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Status.Equal(that1.Status) { + return false + } + return true +} +func (this *CloseSessionRequest) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*CloseSessionRequest) + if !ok { + that2, ok := that.(CloseSessionRequest) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.SessionId != that1.SessionId { + return false + } + return true +} +func (this *CloseSessionResponse) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*CloseSessionResponse) + if !ok { + that2, ok := that.(CloseSessionResponse) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Status.Equal(that1.Status) { + return false + } + return true +} +func (this *CreateSessionRequest) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&v1beta1.CreateSessionRequest{") + if this.AdapterConfig != nil { + s = append(s, "AdapterConfig: "+fmt.Sprintf("%#v", this.AdapterConfig)+",\n") + } + keysForInferredTypes := make([]string, 0, len(this.InferredTypes)) + for k, _ := range this.InferredTypes { + keysForInferredTypes = append(keysForInferredTypes, k) + } + sortkeys.Strings(keysForInferredTypes) + mapStringForInferredTypes := "map[string]*google_protobuf1.Any{" + for _, k := range keysForInferredTypes { + mapStringForInferredTypes += fmt.Sprintf("%#v: %#v,", k, this.InferredTypes[k]) + } + mapStringForInferredTypes += "}" + if this.InferredTypes != nil { + s = append(s, "InferredTypes: "+mapStringForInferredTypes+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *CreateSessionResponse) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&v1beta1.CreateSessionResponse{") + s = append(s, "SessionId: "+fmt.Sprintf("%#v", this.SessionId)+",\n") + if this.Status != nil { + s = append(s, "Status: "+fmt.Sprintf("%#v", this.Status)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *ValidateRequest) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&v1beta1.ValidateRequest{") + if this.AdapterConfig != nil { + s = append(s, "AdapterConfig: "+fmt.Sprintf("%#v", this.AdapterConfig)+",\n") + } + keysForInferredTypes := make([]string, 0, len(this.InferredTypes)) + for k, _ := range this.InferredTypes { + keysForInferredTypes = append(keysForInferredTypes, k) + } + sortkeys.Strings(keysForInferredTypes) + mapStringForInferredTypes := "map[string]*google_protobuf1.Any{" + for _, k := range keysForInferredTypes { + mapStringForInferredTypes += fmt.Sprintf("%#v: %#v,", k, this.InferredTypes[k]) + } + mapStringForInferredTypes += "}" + if this.InferredTypes != nil { + s = append(s, "InferredTypes: "+mapStringForInferredTypes+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *ValidateResponse) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&v1beta1.ValidateResponse{") + if this.Status != nil { + s = append(s, "Status: "+fmt.Sprintf("%#v", this.Status)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *CloseSessionRequest) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&v1beta1.CloseSessionRequest{") + s = append(s, "SessionId: "+fmt.Sprintf("%#v", this.SessionId)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *CloseSessionResponse) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&v1beta1.CloseSessionResponse{") + if this.Status != nil { + s = append(s, "Status: "+fmt.Sprintf("%#v", this.Status)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func valueToGoStringInfrastructureBackend(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) +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// Client API for InfrastructureBackend service + +type InfrastructureBackendClient interface { + // Validates the handler configuration along with the template-specific instances that would be routed to that + // handler. The `CreateSession` for a specific handler configuration is invoked only if its associated `Validate` + // call has returned success. + Validate(ctx context.Context, in *ValidateRequest, opts ...grpc.CallOption) (*ValidateResponse, error) + // Creates a session for a given handler configuration and the template-specific instances that would be routed to + // that handler. For every handler configuration, Mixer creates a separate session by invoking `CreateSession` + // on the backend. + // + // `CreateSessionRequest` contains the adapter specific handler configuration and the inferred type information about + // the instances the handler would receive during request processing. + // + // `CreateSession` must return a `session_id` which Mixer uses to invoke template-specific Handle functions during + // request processing. The `session_id` provides the Handle functions a way to retrieve the necessary configuration + // associated with the session. Upon Mixer configuration change, Mixer will re-invoke `CreateSession` for all + // handler configurations whose existing sessions are invalidated or didn't existed. + // + // Backend is allowed to return the same session id if given the same configuration block. + // This would happen when multiple instances of Mixer in a deployment all create sessions with the same configuration. + // Note that given individial instances of Mixer can call `CloseSession`, reusing `session_id` by the backend + // assumes that the backend is doing reference counting. + // + // If the backend couldn't create a session for a specific handler configuration and + // returns non S_OK status, Mixer will not make request-time Handle calls associated with that handler configuration. + CreateSession(ctx context.Context, in *CreateSessionRequest, opts ...grpc.CallOption) (*CreateSessionResponse, error) + // Closes the session associated with the `session_id`. Mixer closes a session when its associated handler + // configuration or the instance configuration changes. Backend is supposed to cleanup all the resources associated + // with the session_id referenced by CloseSessionRequest. + CloseSession(ctx context.Context, in *CloseSessionRequest, opts ...grpc.CallOption) (*CloseSessionResponse, error) +} + +type infrastructureBackendClient struct { + cc *grpc.ClientConn +} + +func NewInfrastructureBackendClient(cc *grpc.ClientConn) InfrastructureBackendClient { + return &infrastructureBackendClient{cc} +} + +func (c *infrastructureBackendClient) Validate(ctx context.Context, in *ValidateRequest, opts ...grpc.CallOption) (*ValidateResponse, error) { + out := new(ValidateResponse) + err := grpc.Invoke(ctx, "/istio.mixer.adapter.model.v1beta1.InfrastructureBackend/Validate", in, out, c.cc, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *infrastructureBackendClient) CreateSession(ctx context.Context, in *CreateSessionRequest, opts ...grpc.CallOption) (*CreateSessionResponse, error) { + out := new(CreateSessionResponse) + err := grpc.Invoke(ctx, "/istio.mixer.adapter.model.v1beta1.InfrastructureBackend/CreateSession", in, out, c.cc, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *infrastructureBackendClient) CloseSession(ctx context.Context, in *CloseSessionRequest, opts ...grpc.CallOption) (*CloseSessionResponse, error) { + out := new(CloseSessionResponse) + err := grpc.Invoke(ctx, "/istio.mixer.adapter.model.v1beta1.InfrastructureBackend/CloseSession", in, out, c.cc, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// Server API for InfrastructureBackend service + +type InfrastructureBackendServer interface { + // Validates the handler configuration along with the template-specific instances that would be routed to that + // handler. The `CreateSession` for a specific handler configuration is invoked only if its associated `Validate` + // call has returned success. + Validate(context.Context, *ValidateRequest) (*ValidateResponse, error) + // Creates a session for a given handler configuration and the template-specific instances that would be routed to + // that handler. For every handler configuration, Mixer creates a separate session by invoking `CreateSession` + // on the backend. + // + // `CreateSessionRequest` contains the adapter specific handler configuration and the inferred type information about + // the instances the handler would receive during request processing. + // + // `CreateSession` must return a `session_id` which Mixer uses to invoke template-specific Handle functions during + // request processing. The `session_id` provides the Handle functions a way to retrieve the necessary configuration + // associated with the session. Upon Mixer configuration change, Mixer will re-invoke `CreateSession` for all + // handler configurations whose existing sessions are invalidated or didn't existed. + // + // Backend is allowed to return the same session id if given the same configuration block. + // This would happen when multiple instances of Mixer in a deployment all create sessions with the same configuration. + // Note that given individial instances of Mixer can call `CloseSession`, reusing `session_id` by the backend + // assumes that the backend is doing reference counting. + // + // If the backend couldn't create a session for a specific handler configuration and + // returns non S_OK status, Mixer will not make request-time Handle calls associated with that handler configuration. + CreateSession(context.Context, *CreateSessionRequest) (*CreateSessionResponse, error) + // Closes the session associated with the `session_id`. Mixer closes a session when its associated handler + // configuration or the instance configuration changes. Backend is supposed to cleanup all the resources associated + // with the session_id referenced by CloseSessionRequest. + CloseSession(context.Context, *CloseSessionRequest) (*CloseSessionResponse, error) +} + +func RegisterInfrastructureBackendServer(s *grpc.Server, srv InfrastructureBackendServer) { + s.RegisterService(&_InfrastructureBackend_serviceDesc, srv) +} + +func _InfrastructureBackend_Validate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ValidateRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(InfrastructureBackendServer).Validate(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/istio.mixer.adapter.model.v1beta1.InfrastructureBackend/Validate", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(InfrastructureBackendServer).Validate(ctx, req.(*ValidateRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _InfrastructureBackend_CreateSession_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateSessionRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(InfrastructureBackendServer).CreateSession(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/istio.mixer.adapter.model.v1beta1.InfrastructureBackend/CreateSession", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(InfrastructureBackendServer).CreateSession(ctx, req.(*CreateSessionRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _InfrastructureBackend_CloseSession_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CloseSessionRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(InfrastructureBackendServer).CloseSession(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/istio.mixer.adapter.model.v1beta1.InfrastructureBackend/CloseSession", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(InfrastructureBackendServer).CloseSession(ctx, req.(*CloseSessionRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _InfrastructureBackend_serviceDesc = grpc.ServiceDesc{ + ServiceName: "istio.mixer.adapter.model.v1beta1.InfrastructureBackend", + HandlerType: (*InfrastructureBackendServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Validate", + Handler: _InfrastructureBackend_Validate_Handler, + }, + { + MethodName: "CreateSession", + Handler: _InfrastructureBackend_CreateSession_Handler, + }, + { + MethodName: "CloseSession", + Handler: _InfrastructureBackend_CloseSession_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "mixer/adapter/model/v1beta1/infrastructure_backend.proto", +} + +func (m *CreateSessionRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *CreateSessionRequest) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.AdapterConfig != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintInfrastructureBackend(dAtA, i, uint64(m.AdapterConfig.Size())) + n1, err := m.AdapterConfig.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n1 + } + if len(m.InferredTypes) > 0 { + for k, _ := range m.InferredTypes { + dAtA[i] = 0x12 + i++ + v := m.InferredTypes[k] + msgSize := 0 + if v != nil { + msgSize = v.Size() + msgSize += 1 + sovInfrastructureBackend(uint64(msgSize)) + } + mapSize := 1 + len(k) + sovInfrastructureBackend(uint64(len(k))) + msgSize + i = encodeVarintInfrastructureBackend(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintInfrastructureBackend(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + if v != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintInfrastructureBackend(dAtA, i, uint64(v.Size())) + n2, err := v.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n2 + } + } + } + return i, nil +} + +func (m *CreateSessionResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *CreateSessionResponse) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.SessionId) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintInfrastructureBackend(dAtA, i, uint64(len(m.SessionId))) + i += copy(dAtA[i:], m.SessionId) + } + if m.Status != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintInfrastructureBackend(dAtA, i, uint64(m.Status.Size())) + n3, err := m.Status.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n3 + } + return i, nil +} + +func (m *ValidateRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ValidateRequest) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.AdapterConfig != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintInfrastructureBackend(dAtA, i, uint64(m.AdapterConfig.Size())) + n4, err := m.AdapterConfig.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n4 + } + if len(m.InferredTypes) > 0 { + for k, _ := range m.InferredTypes { + dAtA[i] = 0x12 + i++ + v := m.InferredTypes[k] + msgSize := 0 + if v != nil { + msgSize = v.Size() + msgSize += 1 + sovInfrastructureBackend(uint64(msgSize)) + } + mapSize := 1 + len(k) + sovInfrastructureBackend(uint64(len(k))) + msgSize + i = encodeVarintInfrastructureBackend(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintInfrastructureBackend(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + if v != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintInfrastructureBackend(dAtA, i, uint64(v.Size())) + n5, err := v.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n5 + } + } + } + return i, nil +} + +func (m *ValidateResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ValidateResponse) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Status != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintInfrastructureBackend(dAtA, i, uint64(m.Status.Size())) + n6, err := m.Status.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n6 + } + return i, nil +} + +func (m *CloseSessionRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *CloseSessionRequest) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.SessionId) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintInfrastructureBackend(dAtA, i, uint64(len(m.SessionId))) + i += copy(dAtA[i:], m.SessionId) + } + return i, nil +} + +func (m *CloseSessionResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *CloseSessionResponse) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Status != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintInfrastructureBackend(dAtA, i, uint64(m.Status.Size())) + n7, err := m.Status.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n7 + } + return i, nil +} + +func encodeVarintInfrastructureBackend(dAtA []byte, offset int, v uint64) int { + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return offset + 1 +} +func (m *CreateSessionRequest) Size() (n int) { + var l int + _ = l + if m.AdapterConfig != nil { + l = m.AdapterConfig.Size() + n += 1 + l + sovInfrastructureBackend(uint64(l)) + } + if len(m.InferredTypes) > 0 { + for k, v := range m.InferredTypes { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovInfrastructureBackend(uint64(l)) + } + mapEntrySize := 1 + len(k) + sovInfrastructureBackend(uint64(len(k))) + l + n += mapEntrySize + 1 + sovInfrastructureBackend(uint64(mapEntrySize)) + } + } + return n +} + +func (m *CreateSessionResponse) Size() (n int) { + var l int + _ = l + l = len(m.SessionId) + if l > 0 { + n += 1 + l + sovInfrastructureBackend(uint64(l)) + } + if m.Status != nil { + l = m.Status.Size() + n += 1 + l + sovInfrastructureBackend(uint64(l)) + } + return n +} + +func (m *ValidateRequest) Size() (n int) { + var l int + _ = l + if m.AdapterConfig != nil { + l = m.AdapterConfig.Size() + n += 1 + l + sovInfrastructureBackend(uint64(l)) + } + if len(m.InferredTypes) > 0 { + for k, v := range m.InferredTypes { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovInfrastructureBackend(uint64(l)) + } + mapEntrySize := 1 + len(k) + sovInfrastructureBackend(uint64(len(k))) + l + n += mapEntrySize + 1 + sovInfrastructureBackend(uint64(mapEntrySize)) + } + } + return n +} + +func (m *ValidateResponse) Size() (n int) { + var l int + _ = l + if m.Status != nil { + l = m.Status.Size() + n += 1 + l + sovInfrastructureBackend(uint64(l)) + } + return n +} + +func (m *CloseSessionRequest) Size() (n int) { + var l int + _ = l + l = len(m.SessionId) + if l > 0 { + n += 1 + l + sovInfrastructureBackend(uint64(l)) + } + return n +} + +func (m *CloseSessionResponse) Size() (n int) { + var l int + _ = l + if m.Status != nil { + l = m.Status.Size() + n += 1 + l + sovInfrastructureBackend(uint64(l)) + } + return n +} + +func sovInfrastructureBackend(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozInfrastructureBackend(x uint64) (n int) { + return sovInfrastructureBackend(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *CreateSessionRequest) String() string { + if this == nil { + return "nil" + } + keysForInferredTypes := make([]string, 0, len(this.InferredTypes)) + for k, _ := range this.InferredTypes { + keysForInferredTypes = append(keysForInferredTypes, k) + } + sortkeys.Strings(keysForInferredTypes) + mapStringForInferredTypes := "map[string]*google_protobuf1.Any{" + for _, k := range keysForInferredTypes { + mapStringForInferredTypes += fmt.Sprintf("%v: %v,", k, this.InferredTypes[k]) + } + mapStringForInferredTypes += "}" + s := strings.Join([]string{`&CreateSessionRequest{`, + `AdapterConfig:` + strings.Replace(fmt.Sprintf("%v", this.AdapterConfig), "Any", "google_protobuf1.Any", 1) + `,`, + `InferredTypes:` + mapStringForInferredTypes + `,`, + `}`, + }, "") + return s +} +func (this *CreateSessionResponse) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CreateSessionResponse{`, + `SessionId:` + fmt.Sprintf("%v", this.SessionId) + `,`, + `Status:` + strings.Replace(fmt.Sprintf("%v", this.Status), "Status", "google_rpc.Status", 1) + `,`, + `}`, + }, "") + return s +} +func (this *ValidateRequest) String() string { + if this == nil { + return "nil" + } + keysForInferredTypes := make([]string, 0, len(this.InferredTypes)) + for k, _ := range this.InferredTypes { + keysForInferredTypes = append(keysForInferredTypes, k) + } + sortkeys.Strings(keysForInferredTypes) + mapStringForInferredTypes := "map[string]*google_protobuf1.Any{" + for _, k := range keysForInferredTypes { + mapStringForInferredTypes += fmt.Sprintf("%v: %v,", k, this.InferredTypes[k]) + } + mapStringForInferredTypes += "}" + s := strings.Join([]string{`&ValidateRequest{`, + `AdapterConfig:` + strings.Replace(fmt.Sprintf("%v", this.AdapterConfig), "Any", "google_protobuf1.Any", 1) + `,`, + `InferredTypes:` + mapStringForInferredTypes + `,`, + `}`, + }, "") + return s +} +func (this *ValidateResponse) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ValidateResponse{`, + `Status:` + strings.Replace(fmt.Sprintf("%v", this.Status), "Status", "google_rpc.Status", 1) + `,`, + `}`, + }, "") + return s +} +func (this *CloseSessionRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CloseSessionRequest{`, + `SessionId:` + fmt.Sprintf("%v", this.SessionId) + `,`, + `}`, + }, "") + return s +} +func (this *CloseSessionResponse) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CloseSessionResponse{`, + `Status:` + strings.Replace(fmt.Sprintf("%v", this.Status), "Status", "google_rpc.Status", 1) + `,`, + `}`, + }, "") + return s +} +func valueToStringInfrastructureBackend(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *CreateSessionRequest) 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 ErrIntOverflowInfrastructureBackend + } + 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: CreateSessionRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CreateSessionRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AdapterConfig", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowInfrastructureBackend + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthInfrastructureBackend + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.AdapterConfig == nil { + m.AdapterConfig = &google_protobuf1.Any{} + } + if err := m.AdapterConfig.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field InferredTypes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowInfrastructureBackend + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthInfrastructureBackend + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.InferredTypes == nil { + m.InferredTypes = make(map[string]*google_protobuf1.Any) + } + var mapkey string + var mapvalue *google_protobuf1.Any + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowInfrastructureBackend + } + 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 ErrIntOverflowInfrastructureBackend + } + 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 ErrInvalidLengthInfrastructureBackend + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowInfrastructureBackend + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthInfrastructureBackend + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthInfrastructureBackend + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &google_protobuf1.Any{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipInfrastructureBackend(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthInfrastructureBackend + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.InferredTypes[mapkey] = mapvalue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipInfrastructureBackend(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthInfrastructureBackend + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CreateSessionResponse) 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 ErrIntOverflowInfrastructureBackend + } + 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: CreateSessionResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CreateSessionResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SessionId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowInfrastructureBackend + } + 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 ErrInvalidLengthInfrastructureBackend + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SessionId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowInfrastructureBackend + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthInfrastructureBackend + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Status == nil { + m.Status = &google_rpc.Status{} + } + if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipInfrastructureBackend(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthInfrastructureBackend + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ValidateRequest) 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 ErrIntOverflowInfrastructureBackend + } + 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: ValidateRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ValidateRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AdapterConfig", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowInfrastructureBackend + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthInfrastructureBackend + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.AdapterConfig == nil { + m.AdapterConfig = &google_protobuf1.Any{} + } + if err := m.AdapterConfig.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field InferredTypes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowInfrastructureBackend + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthInfrastructureBackend + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.InferredTypes == nil { + m.InferredTypes = make(map[string]*google_protobuf1.Any) + } + var mapkey string + var mapvalue *google_protobuf1.Any + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowInfrastructureBackend + } + 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 ErrIntOverflowInfrastructureBackend + } + 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 ErrInvalidLengthInfrastructureBackend + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowInfrastructureBackend + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthInfrastructureBackend + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthInfrastructureBackend + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &google_protobuf1.Any{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipInfrastructureBackend(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthInfrastructureBackend + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.InferredTypes[mapkey] = mapvalue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipInfrastructureBackend(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthInfrastructureBackend + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ValidateResponse) 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 ErrIntOverflowInfrastructureBackend + } + 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: ValidateResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ValidateResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowInfrastructureBackend + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthInfrastructureBackend + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Status == nil { + m.Status = &google_rpc.Status{} + } + if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipInfrastructureBackend(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthInfrastructureBackend + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CloseSessionRequest) 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 ErrIntOverflowInfrastructureBackend + } + 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: CloseSessionRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CloseSessionRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SessionId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowInfrastructureBackend + } + 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 ErrInvalidLengthInfrastructureBackend + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SessionId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipInfrastructureBackend(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthInfrastructureBackend + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CloseSessionResponse) 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 ErrIntOverflowInfrastructureBackend + } + 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: CloseSessionResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CloseSessionResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowInfrastructureBackend + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthInfrastructureBackend + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Status == nil { + m.Status = &google_rpc.Status{} + } + if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipInfrastructureBackend(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthInfrastructureBackend + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipInfrastructureBackend(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, ErrIntOverflowInfrastructureBackend + } + 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, ErrIntOverflowInfrastructureBackend + } + 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, ErrIntOverflowInfrastructureBackend + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + iNdEx += length + if length < 0 { + return 0, ErrInvalidLengthInfrastructureBackend + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowInfrastructureBackend + } + 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 := skipInfrastructureBackend(dAtA[start:]) + if err != nil { + return 0, err + } + iNdEx = start + next + } + 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 ( + ErrInvalidLengthInfrastructureBackend = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowInfrastructureBackend = fmt.Errorf("proto: integer overflow") +) + +func init() { + proto.RegisterFile("mixer/adapter/model/v1beta1/infrastructure_backend.proto", fileDescriptorInfrastructureBackend) +} + +var fileDescriptorInfrastructureBackend = []byte{ + // 523 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x54, 0x41, 0x6b, 0x13, 0x41, + 0x14, 0xce, 0x24, 0x58, 0xec, 0xd4, 0xd4, 0x32, 0xa6, 0x18, 0x17, 0x1c, 0x6a, 0x4e, 0xa1, 0x87, + 0x59, 0x9a, 0x8a, 0x0d, 0x0a, 0x82, 0x09, 0x3d, 0xc4, 0x63, 0x2a, 0x05, 0xbd, 0x84, 0xc9, 0xee, + 0x4b, 0x18, 0xba, 0xdd, 0xd9, 0xce, 0xcc, 0x16, 0xf7, 0x64, 0xf1, 0x17, 0x88, 0x78, 0xf6, 0xec, + 0x4f, 0xf1, 0xd8, 0xa3, 0x47, 0xb3, 0x5e, 0x3c, 0xf6, 0x27, 0x48, 0x77, 0x27, 0xb4, 0x49, 0x35, + 0xed, 0x8a, 0xe0, 0x6d, 0x99, 0xf7, 0xbe, 0xf7, 0x7d, 0xef, 0x7b, 0xef, 0x2d, 0x6e, 0x1f, 0x8a, + 0xb7, 0xa0, 0x5c, 0xee, 0xf3, 0xc8, 0x80, 0x72, 0x0f, 0xa5, 0x0f, 0x81, 0x7b, 0xbc, 0x35, 0x04, + 0xc3, 0xb7, 0x5c, 0x11, 0x8e, 0x14, 0xd7, 0x46, 0xc5, 0x9e, 0x89, 0x15, 0x0c, 0x86, 0xdc, 0x3b, + 0x80, 0xd0, 0x67, 0x91, 0x92, 0x46, 0x92, 0x47, 0x42, 0x1b, 0x21, 0x59, 0x86, 0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34, 0x5c, 0xca, 0x56, 0x78, 0xfb, 0x57, 0x00, 0x00, + 0x00, 0xff, 0xff, 0x07, 0x94, 0xef, 0x33, 0xdf, 0x05, 0x00, 0x00, +} diff --git a/istio.io/api/mixer/adapter/model/v1beta1/infrastructure_backend.proto b/istio.io/api/mixer/adapter/model/v1beta1/infrastructure_backend.proto new file mode 100644 index 00000000..a3d112d9 --- /dev/null +++ b/istio.io/api/mixer/adapter/model/v1beta1/infrastructure_backend.proto @@ -0,0 +1,116 @@ +// 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: Mixer Adapter Model +// $overview: Definitions used to create adapters and templates +// $location: https://istio.io/docs/reference/config/mixer/istio.mixer.adapter.model.v1beta1.html + +// This package defines the service and types used by adapter code to serve requests from Mixer. +// This package also defines the types that are used to create Mixer templates. +package istio.mixer.adapter.model.v1beta1; + +option go_package="istio.io/api/mixer/adapter/model/v1beta1"; +option cc_generic_services = true; + +import "google/protobuf/any.proto"; +import "google/rpc/status.proto"; + +// `InfrastructureBackend` is implemented by backends that wants to provide telemetry and policy functionality to Mixer as an +// out of process adapter. +// +// `InfrastructureBackend` allows Mixer and the backends to have a session based model. In a session based model, Mixer passes +// the relevant configuration state to the backend only once and estabilshes a session using a session identifier. +// All future communications between Mixer and the backend uses the session identifier which refers to the previously +// passed in configuration data. +// +// For a given `InfrastructureBackend`, Mixer calls the `Validate` function, followed by `CreateSession`. The `session_id` +// returned from `CreateSession` is used to make subsequent request-time Handle calls and the eventual `CloseSession` function. +// Mixer assumes that, given the `session_id`, the backend can retrieve the necessary context to serve the +// Handle calls that contains the request-time payload (template-specific instance protobuf). +service InfrastructureBackend { + // Validates the handler configuration along with the template-specific instances that would be routed to that + // handler. The `CreateSession` for a specific handler configuration is invoked only if its associated `Validate` + // call has returned success. + rpc Validate(ValidateRequest) returns (ValidateResponse); + + // Creates a session for a given handler configuration and the template-specific instances that would be routed to + // that handler. For every handler configuration, Mixer creates a separate session by invoking `CreateSession` + // on the backend. + // + // `CreateSessionRequest` contains the adapter specific handler configuration and the inferred type information about + // the instances the handler would receive during request processing. + // + // `CreateSession` must return a `session_id` which Mixer uses to invoke template-specific Handle functions during + // request processing. The `session_id` provides the Handle functions a way to retrieve the necessary configuration + // associated with the session. Upon Mixer configuration change, Mixer will re-invoke `CreateSession` for all + // handler configurations whose existing sessions are invalidated or didn't existed. + // + // Backend is allowed to return the same session id if given the same configuration block. + // This would happen when multiple instances of Mixer in a deployment all create sessions with the same configuration. + // Note that given individial instances of Mixer can call `CloseSession`, reusing `session_id` by the backend + // assumes that the backend is doing reference counting. + // + // If the backend couldn't create a session for a specific handler configuration and + // returns non S_OK status, Mixer will not make request-time Handle calls associated with that handler configuration. + rpc CreateSession(CreateSessionRequest) returns (CreateSessionResponse); + + // Closes the session associated with the `session_id`. Mixer closes a session when its associated handler + // configuration or the instance configuration changes. Backend is supposed to cleanup all the resources associated + // with the session_id referenced by CloseSessionRequest. + rpc CloseSession(CloseSessionRequest) returns (CloseSessionResponse); +} + +// Request message for `CreateSession` method. +message CreateSessionRequest { + // Adapter specific configuration. + google.protobuf.Any adapter_config = 1; + // Map of instance names to their template-specific inferred type. + map inferred_types = 2; +} + +// Response message for `CreateSession` method. +message CreateSessionResponse { + // Id of the created session. + string session_id = 1; + // The success/failure status of create session call. + google.rpc.Status status = 2; +} + +// Request message for `Validate` method. +message ValidateRequest { + // Adapter specific configuration. + google.protobuf.Any adapter_config = 1; + // Map of instance names to their template-specific inferred type. + map inferred_types = 2; +} + +// Response message for `Validate` method. +message ValidateResponse { + // The success/failure status of validation call. + google.rpc.Status status = 1; +} + +// Request message for `CloseSession` method. +message CloseSessionRequest { + // Id of the session to be closed. + string session_id = 1; +} + +// Response message for `CloseSession` method. +message CloseSessionResponse { + // The success/failure status of close session call. + google.rpc.Status status = 1; +} diff --git a/istio.io/api/mixer/adapter/model/v1beta1/istio.mixer.adapter.model.v1beta1.pb.html b/istio.io/api/mixer/adapter/model/v1beta1/istio.mixer.adapter.model.v1beta1.pb.html index ecd9c9eb..706c0876 100644 --- a/istio.io/api/mixer/adapter/model/v1beta1/istio.mixer.adapter.model.v1beta1.pb.html +++ b/istio.io/api/mixer/adapter/model/v1beta1/istio.mixer.adapter.model.v1beta1.pb.html @@ -1,35 +1,199 @@ --- title: Mixer Adapter Model -overview: Definitions used when creating Mixer templates +overview: Definitions used to create adapters and templates location: https://istio.io/docs/reference/config/mixer/istio.mixer.adapter.model.v1beta1.html layout: protoc-gen-docs -number_of_entries: 8 +number_of_entries: 16 --- -

This package defines the types that are used when creating Mixer templates. ValueType defined in this pacakge -is also used by adapters to know the underlying datatype of the instance fields.

+

This package defines the service and types used by adapter code to serve requests from Mixer. +This package also defines the types that are used to create Mixer templates.

-

DNSName

+

Services

+

InfrastructureBackend

+
+

InfrastructureBackend is implemented by backends that wants to provide telemetry and policy functionality to Mixer as an +out of process adapter.

+ +

InfrastructureBackend allows Mixer and the backends to have a session based model. In a session based model, Mixer passes +the relevant configuration state to the backend only once and estabilshes a session using a session identifier. +All future communications between Mixer and the backend uses the session identifier which refers to the previously +passed in configuration data.

+ +

For a given InfrastructureBackend, Mixer calls the Validate function, followed by CreateSession. The session_id +returned from CreateSession is used to make subsequent request-time Handle calls and the eventual CloseSession function. +Mixer assumes that, given the session_id, the backend can retrieve the necessary context to serve the +Handle calls that contains the request-time payload (template-specific instance protobuf).

+ +
rpc Validate(ValidateRequest) returns (ValidateResponse)
+
+

Validates the handler configuration along with the template-specific instances that would be routed to that +handler. The CreateSession for a specific handler configuration is invoked only if its associated Validate +call has returned success.

+ +
rpc CreateSession(CreateSessionRequest) returns (CreateSessionResponse)
+
+

Creates a session for a given handler configuration and the template-specific instances that would be routed to +that handler. For every handler configuration, Mixer creates a separate session by invoking CreateSession +on the backend.

+ +

CreateSessionRequest contains the adapter specific handler configuration and the inferred type information about +the instances the handler would receive during request processing.

+ +

CreateSession must return a session_id which Mixer uses to invoke template-specific Handle functions during +request processing. The session_id provides the Handle functions a way to retrieve the necessary configuration +associated with the session. Upon Mixer configuration change, Mixer will re-invoke CreateSession for all +handler configurations whose existing sessions are invalidated or didn’t existed.

+ +

Backend is allowed to return the same session id if given the same configuration block. +This would happen when multiple instances of Mixer in a deployment all create sessions with the same configuration. +Note that given individial instances of Mixer can call CloseSession, reusing session_id by the backend +assumes that the backend is doing reference counting.

+ +

If the backend couldn’t create a session for a specific handler configuration and +returns non S_OK status, Mixer will not make request-time Handle calls associated with that handler configuration.

+ +
rpc CloseSession(CloseSessionRequest) returns (CloseSessionResponse)
+
+

Closes the session associated with the session_id. Mixer closes a session when its associated handler +configuration or the instance configuration changes. Backend is supposed to cleanup all the resources associated +with the session_id referenced by CloseSessionRequest.

+ +
+

Types

+

CloseSessionRequest

+
+

Request message for CloseSession method.

+ + + + + + + + + + + + + + + + +
FieldTypeDescription
sessionIdstring +

Id of the session to be closed.

+ +
+
+

CloseSessionResponse

+
+

Response message for CloseSession method.

+ + + + + + + + + + + + + + + + +
FieldTypeDescription
statusgoogle.rpc.Status +

The success/failure status of close session call.

+ +
+
+

CreateSessionRequest

+
+

Request message for CreateSession method.

+ + + + + + + + + + + + + + + + + + + + + +
FieldTypeDescription
adapterConfiggoogle.protobuf.Any +

Adapter specific configuration.

+ +
inferredTypesmap<string, google.protobuf.Any> +

Map of instance names to their template-specific inferred type.

+ +
+
+

CreateSessionResponse

+
+

Response message for CreateSession method.

+ + + + + + + + + + + + + + + + + + + + + +
FieldTypeDescription
sessionIdstring +

Id of the created session.

+ +
statusgoogle.rpc.Status +

The success/failure status of create session call.

+ +
+
+

DNSName

DNSName is used inside templates for fields that are of ValueType “DNS_NAME”

-

Duration

+

Duration

Duration is used inside templates for fields that are of ValueType “DURATION”

-

EmailAddress

+

EmailAddress

EmailAddress is used inside templates for fields that are of ValueType “EMAIL_ADDRESS” DO NOT USE !! Under Development

-

IPAddress

+

IPAddress

IPAddress is used inside templates for fields that are of ValueType “IP_ADDRESS”

-

TemplateVariety

+

TemplateVariety

The available varieties of templates, controlling the semantics of what an adapter does with each instance.

@@ -72,20 +236,174 @@

TemplateVariety

-

TimeStamp

+

TimeStamp

TimeStamp is used inside templates for fields that are of ValueType “TIMESTAMP”

-

Uri

+

Uri

Uri is used inside templates for fields that are of ValueType “URI” DO NOT USE ! Under Development

-

Value

+

ValidateRequest

+
+

Request message for Validate method.

+ + + + + + + + + + + + + + + + + + + + + +
FieldTypeDescription
adapterConfiggoogle.protobuf.Any +

Adapter specific configuration.

+ +
inferredTypesmap<string, google.protobuf.Any> +

Map of instance names to their template-specific inferred type.

+ +
+
+

ValidateResponse

+
+

Response message for Validate method.

+ + + + + + + + + + + + + + + + +
FieldTypeDescription
statusgoogle.rpc.Status +

The success/failure status of validation call.

+ +
+
+

Value

Value is used inside templates for fields that have dynamic types. The actual datatype of the field depends on the datatype of the expression used in the operator configuration.

+

google.rpc.Status

+
+

The Status type defines a logical error model that is suitable for different +programming environments, including REST APIs and RPC APIs. It is used by +gRPC. The error model is designed to be:

+ +
    +
  • Simple to use and understand for most users
  • +
  • Flexible enough to meet unexpected needs
  • +
+ +

Overview

+ +

The Status message contains three pieces of data: error code, error message, +and error details. The error code should be an enum value of +google.rpc.Code, but it may accept additional error codes if needed. The +error message should be a developer-facing English message that helps +developers understand and resolve the error. If a localized user-facing +error message is needed, put the localized message in the error details or +localize it in the client. The optional error details may contain arbitrary +information about the error. There is a predefined set of error detail types +in the package google.rpc that can be used for common error conditions.

+ +

Language mapping

+ +

The Status message is the logical representation of the error model, but it +is not necessarily the actual wire format. When the Status message is +exposed in different client libraries and different wire protocols, it can be +mapped differently. For example, it will likely be mapped to some exceptions +in Java, but more likely mapped to some error codes in C.

+ +

Other uses

+ +

The error model and the Status message can be used in a variety of +environments, either with or without APIs, to provide a +consistent developer experience across different environments.

+ +

Example uses of this error model include:

+ +
    +
  • Partial errors. If a service needs to return partial errors to the client, +it may embed the Status in the normal response to indicate the partial +errors.

  • + +
  • Workflow errors. A typical workflow has multiple steps. Each step may +have a Status message for error reporting.

  • + +
  • Batch operations. If a client uses batch request and batch response, the +Status message should be used directly inside batch response, one for +each error sub-response.

  • + +
  • Asynchronous operations. If an API call embeds asynchronous operation +results in its response, the status of those operations should be +represented directly using the Status message.

  • + +
  • Logging. If some API errors are stored in logs, the message Status could +be used directly after any stripping needed for security/privacy reasons.

  • +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeDescription
codeint32 +

The status code, which should be an enum value of google.rpc.Code.

+ +
messagestring +

A developer-facing error message, which should be in English. Any +user-facing error message should be localized and sent in the +google.rpc.Status.details field, or localized by the client.

+ +
detailsgoogle.protobuf.Any[] +

A list of messages that carry the error details. There is a common set of +message types for APIs to use.

+ +
+
diff --git a/istio.io/api/networking/v1alpha3/destination_rule.pb.go b/istio.io/api/networking/v1alpha3/destination_rule.pb.go index 76bfe58d..0dee3dff 100644 --- a/istio.io/api/networking/v1alpha3/destination_rule.pb.go +++ b/istio.io/api/networking/v1alpha3/destination_rule.pb.go @@ -1,48 +1,50 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. +// Code generated by protoc-gen-gogo. DO NOT EDIT. // source: networking/v1alpha3/destination_rule.proto /* -Package v1alpha3 is a generated protocol buffer package. - -It is generated from these files: - networking/v1alpha3/destination_rule.proto - networking/v1alpha3/external_service.proto - networking/v1alpha3/gateway.proto - networking/v1alpha3/virtual_service.proto - -It has these top-level messages: - DestinationRule - TrafficPolicy - Subset - LoadBalancerSettings - ConnectionPoolSettings - OutlierDetection - TLSSettings - ExternalService - Gateway - Server - Port - VirtualService - Destination - HTTPRoute - TCPRoute - HTTPMatchRequest - DestinationWeight - L4MatchAttributes - HTTPRedirect - HTTPRewrite - StringMatch - HTTPRetry - CorsPolicy - HTTPFaultInjection - PortSelector + Package v1alpha3 is a generated protocol buffer package. + + It is generated from these files: + networking/v1alpha3/destination_rule.proto + networking/v1alpha3/external_service.proto + networking/v1alpha3/gateway.proto + networking/v1alpha3/virtual_service.proto + + It has these top-level messages: + DestinationRule + TrafficPolicy + Subset + LoadBalancerSettings + ConnectionPoolSettings + OutlierDetection + TLSSettings + ExternalService + Gateway + Server + Port + VirtualService + Destination + HTTPRoute + TCPRoute + HTTPMatchRequest + DestinationWeight + L4MatchAttributes + HTTPRedirect + HTTPRewrite + StringMatch + HTTPRetry + CorsPolicy + HTTPFaultInjection + PortSelector */ package v1alpha3 -import proto "github.com/golang/protobuf/proto" +import proto "github.com/gogo/protobuf/proto" import fmt "fmt" import math "math" -import google_protobuf "github.com/golang/protobuf/ptypes/duration" +import google_protobuf "github.com/gogo/protobuf/types" + +import io "io" // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal @@ -53,7 +55,7 @@ var _ = math.Inf // 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.ProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package // Standard load balancing algorithms that require no tuning. type LoadBalancerSettings_SimpleLB int32 @@ -94,7 +96,7 @@ func (x LoadBalancerSettings_SimpleLB) String() string { return proto.EnumName(LoadBalancerSettings_SimpleLB_name, int32(x)) } func (LoadBalancerSettings_SimpleLB) EnumDescriptor() ([]byte, []int) { - return fileDescriptor0, []int{3, 0} + return fileDescriptorDestinationRule, []int{3, 0} } // TLS connection mode @@ -127,7 +129,9 @@ var TLSSettings_TLSmode_value = map[string]int32{ func (x TLSSettings_TLSmode) String() string { return proto.EnumName(TLSSettings_TLSmode_name, int32(x)) } -func (TLSSettings_TLSmode) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{6, 0} } +func (TLSSettings_TLSmode) EnumDescriptor() ([]byte, []int) { + return fileDescriptorDestinationRule, []int{6, 0} +} // DestinationRule defines policies that apply to traffic intended for a // service after routing has occurred. These rules specify configuration @@ -193,7 +197,7 @@ type DestinationRule struct { // registry, must always be referred to using their alphanumeric // names. IP addresses or CIDR prefixes are allowed only for services // defined via the Gateway. - Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // Traffic policies to apply (load balancing policy, connection pool // sizes, outlier detection). TrafficPolicy *TrafficPolicy `protobuf:"bytes,2,opt,name=traffic_policy,json=trafficPolicy" json:"traffic_policy,omitempty"` @@ -205,7 +209,7 @@ type DestinationRule struct { func (m *DestinationRule) Reset() { *m = DestinationRule{} } func (m *DestinationRule) String() string { return proto.CompactTextString(m) } func (*DestinationRule) ProtoMessage() {} -func (*DestinationRule) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} } +func (*DestinationRule) Descriptor() ([]byte, []int) { return fileDescriptorDestinationRule, []int{0} } func (m *DestinationRule) GetName() string { if m != nil { @@ -244,7 +248,7 @@ type TrafficPolicy struct { func (m *TrafficPolicy) Reset() { *m = TrafficPolicy{} } func (m *TrafficPolicy) String() string { return proto.CompactTextString(m) } func (*TrafficPolicy) ProtoMessage() {} -func (*TrafficPolicy) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} } +func (*TrafficPolicy) Descriptor() ([]byte, []int) { return fileDescriptorDestinationRule, []int{1} } func (m *TrafficPolicy) GetLoadBalancer() *LoadBalancerSettings { if m != nil { @@ -305,10 +309,10 @@ func (m *TrafficPolicy) GetTls() *TLSSettings { type Subset struct { // REQUIRED. name of the subset. The service name and the subset name can // be used for traffic splitting in a route rule. - Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // REQUIRED. Labels apply a filter over the endpoints of a service in the // service registry. See route rules for examples of usage. - Labels map[string]string `protobuf:"bytes,2,rep,name=labels" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + Labels map[string]string `protobuf:"bytes,2,rep,name=labels" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` // Traffic policies that apply to this subset. Subsets inherit the // traffic policies specified at the DestinationRule level. Settings // specified at the subset level will override the corresponding settings @@ -319,7 +323,7 @@ type Subset struct { func (m *Subset) Reset() { *m = Subset{} } func (m *Subset) String() string { return proto.CompactTextString(m) } func (*Subset) ProtoMessage() {} -func (*Subset) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} } +func (*Subset) Descriptor() ([]byte, []int) { return fileDescriptorDestinationRule, []int{2} } func (m *Subset) GetName() string { if m != nil { @@ -383,17 +387,21 @@ type LoadBalancerSettings struct { LbPolicy isLoadBalancerSettings_LbPolicy `protobuf_oneof:"lb_policy"` } -func (m *LoadBalancerSettings) Reset() { *m = LoadBalancerSettings{} } -func (m *LoadBalancerSettings) String() string { return proto.CompactTextString(m) } -func (*LoadBalancerSettings) ProtoMessage() {} -func (*LoadBalancerSettings) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} } +func (m *LoadBalancerSettings) Reset() { *m = LoadBalancerSettings{} } +func (m *LoadBalancerSettings) String() string { return proto.CompactTextString(m) } +func (*LoadBalancerSettings) ProtoMessage() {} +func (*LoadBalancerSettings) Descriptor() ([]byte, []int) { + return fileDescriptorDestinationRule, []int{3} +} type isLoadBalancerSettings_LbPolicy interface { isLoadBalancerSettings_LbPolicy() + MarshalTo([]byte) (int, error) + Size() int } type LoadBalancerSettings_Simple struct { - Simple LoadBalancerSettings_SimpleLB `protobuf:"varint,1,opt,name=simple,enum=istio.networking.v1alpha3.LoadBalancerSettings_SimpleLB,oneof"` + Simple LoadBalancerSettings_SimpleLB `protobuf:"varint,1,opt,name=simple,proto3,enum=istio.networking.v1alpha3.LoadBalancerSettings_SimpleLB,oneof"` } type LoadBalancerSettings_ConsistentHash struct { ConsistentHash *LoadBalancerSettings_ConsistentHashLB `protobuf:"bytes,2,opt,name=consistent_hash,json=consistentHash,oneof"` @@ -436,10 +444,10 @@ func _LoadBalancerSettings_OneofMarshaler(msg proto.Message, b *proto.Buffer) er // lb_policy switch x := m.LbPolicy.(type) { case *LoadBalancerSettings_Simple: - b.EncodeVarint(1<<3 | proto.WireVarint) - b.EncodeVarint(uint64(x.Simple)) + _ = b.EncodeVarint(1<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Simple)) case *LoadBalancerSettings_ConsistentHash: - b.EncodeVarint(2<<3 | proto.WireBytes) + _ = b.EncodeVarint(2<<3 | proto.WireBytes) if err := b.EncodeMessage(x.ConsistentHash); err != nil { return err } @@ -502,20 +510,20 @@ type LoadBalancerSettings_ConsistentHashLB struct { // obtain the hash key. If the request header is not present, the load // balancer will use a random number as the hash, effectively making // the load balancing policy random. - HttpHeader string `protobuf:"bytes,1,opt,name=http_header,json=httpHeader" json:"http_header,omitempty"` + HttpHeader string `protobuf:"bytes,1,opt,name=http_header,json=httpHeader,proto3" json:"http_header,omitempty"` // The minimum number of virtual nodes to use for the hash // ring. Defaults to 1024. Larger ring sizes result in more granular // load distributions. If the number of hosts in the load balancing // pool is larger than the ring size, each host will be assigned a // single virtual node. - MinimumRingSize uint32 `protobuf:"varint,2,opt,name=minimum_ring_size,json=minimumRingSize" json:"minimum_ring_size,omitempty"` + MinimumRingSize uint32 `protobuf:"varint,2,opt,name=minimum_ring_size,json=minimumRingSize,proto3" json:"minimum_ring_size,omitempty"` } func (m *LoadBalancerSettings_ConsistentHashLB) Reset() { *m = LoadBalancerSettings_ConsistentHashLB{} } func (m *LoadBalancerSettings_ConsistentHashLB) String() string { return proto.CompactTextString(m) } func (*LoadBalancerSettings_ConsistentHashLB) ProtoMessage() {} func (*LoadBalancerSettings_ConsistentHashLB) Descriptor() ([]byte, []int) { - return fileDescriptor0, []int{3, 0} + return fileDescriptorDestinationRule, []int{3, 0} } func (m *LoadBalancerSettings_ConsistentHashLB) GetHttpHeader() string { @@ -560,10 +568,12 @@ type ConnectionPoolSettings struct { Http *ConnectionPoolSettings_HTTPSettings `protobuf:"bytes,2,opt,name=http" json:"http,omitempty"` } -func (m *ConnectionPoolSettings) Reset() { *m = ConnectionPoolSettings{} } -func (m *ConnectionPoolSettings) String() string { return proto.CompactTextString(m) } -func (*ConnectionPoolSettings) ProtoMessage() {} -func (*ConnectionPoolSettings) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} } +func (m *ConnectionPoolSettings) Reset() { *m = ConnectionPoolSettings{} } +func (m *ConnectionPoolSettings) String() string { return proto.CompactTextString(m) } +func (*ConnectionPoolSettings) ProtoMessage() {} +func (*ConnectionPoolSettings) Descriptor() ([]byte, []int) { + return fileDescriptorDestinationRule, []int{4} +} func (m *ConnectionPoolSettings) GetTcp() *ConnectionPoolSettings_TCPSettings { if m != nil { @@ -582,7 +592,7 @@ func (m *ConnectionPoolSettings) GetHttp() *ConnectionPoolSettings_HTTPSettings // Settings common to both HTTP and TCP upstream connections. type ConnectionPoolSettings_TCPSettings struct { // Maximum number of HTTP1 /TCP connections to a destination host. - MaxConnections int32 `protobuf:"varint,1,opt,name=max_connections,json=maxConnections" json:"max_connections,omitempty"` + MaxConnections int32 `protobuf:"varint,1,opt,name=max_connections,json=maxConnections,proto3" json:"max_connections,omitempty"` // TCP connection timeout. ConnectTimeout *google_protobuf.Duration `protobuf:"bytes,2,opt,name=connect_timeout,json=connectTimeout" json:"connect_timeout,omitempty"` } @@ -591,7 +601,7 @@ func (m *ConnectionPoolSettings_TCPSettings) Reset() { *m = ConnectionPo func (m *ConnectionPoolSettings_TCPSettings) String() string { return proto.CompactTextString(m) } func (*ConnectionPoolSettings_TCPSettings) ProtoMessage() {} func (*ConnectionPoolSettings_TCPSettings) Descriptor() ([]byte, []int) { - return fileDescriptor0, []int{4, 0} + return fileDescriptorDestinationRule, []int{4, 0} } func (m *ConnectionPoolSettings_TCPSettings) GetMaxConnections() int32 { @@ -611,22 +621,22 @@ func (m *ConnectionPoolSettings_TCPSettings) GetConnectTimeout() *google_protobu // Settings applicable to HTTP1.1/HTTP2/GRPC connections. type ConnectionPoolSettings_HTTPSettings struct { // Maximum number of pending HTTP requests to a destination. Default 1024. - Http1MaxPendingRequests int32 `protobuf:"varint,1,opt,name=http1_max_pending_requests,json=http1MaxPendingRequests" json:"http1_max_pending_requests,omitempty"` + Http1MaxPendingRequests int32 `protobuf:"varint,1,opt,name=http1_max_pending_requests,json=http1MaxPendingRequests,proto3" json:"http1_max_pending_requests,omitempty"` // Maximum number of requests to a backend. Default 1024. - Http2MaxRequests int32 `protobuf:"varint,2,opt,name=http2_max_requests,json=http2MaxRequests" json:"http2_max_requests,omitempty"` + Http2MaxRequests int32 `protobuf:"varint,2,opt,name=http2_max_requests,json=http2MaxRequests,proto3" json:"http2_max_requests,omitempty"` // Maximum number of requests per connection to a backend. Setting this // parameter to 1 disables keep alive. - MaxRequestsPerConnection int32 `protobuf:"varint,3,opt,name=max_requests_per_connection,json=maxRequestsPerConnection" json:"max_requests_per_connection,omitempty"` + MaxRequestsPerConnection int32 `protobuf:"varint,3,opt,name=max_requests_per_connection,json=maxRequestsPerConnection,proto3" json:"max_requests_per_connection,omitempty"` // Maximum number of retries that can be outstanding to all hosts in a // cluster at a given time. Defaults to 3. - MaxRetries int32 `protobuf:"varint,4,opt,name=max_retries,json=maxRetries" json:"max_retries,omitempty"` + MaxRetries int32 `protobuf:"varint,4,opt,name=max_retries,json=maxRetries,proto3" json:"max_retries,omitempty"` } func (m *ConnectionPoolSettings_HTTPSettings) Reset() { *m = ConnectionPoolSettings_HTTPSettings{} } func (m *ConnectionPoolSettings_HTTPSettings) String() string { return proto.CompactTextString(m) } func (*ConnectionPoolSettings_HTTPSettings) ProtoMessage() {} func (*ConnectionPoolSettings_HTTPSettings) Descriptor() ([]byte, []int) { - return fileDescriptor0, []int{4, 1} + return fileDescriptorDestinationRule, []int{4, 1} } func (m *ConnectionPoolSettings_HTTPSettings) GetHttp1MaxPendingRequests() int32 { @@ -699,7 +709,7 @@ type OutlierDetection struct { func (m *OutlierDetection) Reset() { *m = OutlierDetection{} } func (m *OutlierDetection) String() string { return proto.CompactTextString(m) } func (*OutlierDetection) ProtoMessage() {} -func (*OutlierDetection) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{5} } +func (*OutlierDetection) Descriptor() ([]byte, []int) { return fileDescriptorDestinationRule, []int{5} } func (m *OutlierDetection) GetHttp() *OutlierDetection_HTTPSettings { if m != nil { @@ -712,7 +722,7 @@ func (m *OutlierDetection) GetHttp() *OutlierDetection_HTTPSettings { type OutlierDetection_HTTPSettings struct { // Number of 5XX errors before a host is ejected from the connection // pool. Defaults to 5. - ConsecutiveErrors int32 `protobuf:"varint,1,opt,name=consecutive_errors,json=consecutiveErrors" json:"consecutive_errors,omitempty"` + ConsecutiveErrors int32 `protobuf:"varint,1,opt,name=consecutive_errors,json=consecutiveErrors,proto3" json:"consecutive_errors,omitempty"` // Time interval between ejection sweep analysis. format: // 1h/1m/1s/1ms. MUST BE >=1ms. Default is 10s. Interval *google_protobuf.Duration `protobuf:"bytes,2,opt,name=interval" json:"interval,omitempty"` @@ -724,14 +734,14 @@ type OutlierDetection_HTTPSettings struct { BaseEjectionTime *google_protobuf.Duration `protobuf:"bytes,3,opt,name=base_ejection_time,json=baseEjectionTime" json:"base_ejection_time,omitempty"` // Maximum % of hosts in the load balancing pool for the upstream // service that can be ejected. Defaults to 10%. - MaxEjectionPercent int32 `protobuf:"varint,4,opt,name=max_ejection_percent,json=maxEjectionPercent" json:"max_ejection_percent,omitempty"` + MaxEjectionPercent int32 `protobuf:"varint,4,opt,name=max_ejection_percent,json=maxEjectionPercent,proto3" json:"max_ejection_percent,omitempty"` } func (m *OutlierDetection_HTTPSettings) Reset() { *m = OutlierDetection_HTTPSettings{} } func (m *OutlierDetection_HTTPSettings) String() string { return proto.CompactTextString(m) } func (*OutlierDetection_HTTPSettings) ProtoMessage() {} func (*OutlierDetection_HTTPSettings) Descriptor() ([]byte, []int) { - return fileDescriptor0, []int{5, 0} + return fileDescriptorDestinationRule, []int{5, 0} } func (m *OutlierDetection_HTTPSettings) GetConsecutiveErrors() int32 { @@ -797,29 +807,29 @@ func (m *OutlierDetection_HTTPSettings) GetMaxEjectionPercent() int32 { type TLSSettings struct { // REQUIRED: Indicates whether connections to this port should be secured // using TLS. The value of this field determines how TLS is enforced. - Mode TLSSettings_TLSmode `protobuf:"varint,1,opt,name=mode,enum=istio.networking.v1alpha3.TLSSettings_TLSmode" json:"mode,omitempty"` + Mode TLSSettings_TLSmode `protobuf:"varint,1,opt,name=mode,proto3,enum=istio.networking.v1alpha3.TLSSettings_TLSmode" json:"mode,omitempty"` // REQUIRED if mode is "mutual". The path to the file holding the // client-side TLS certificate to use. - ClientCertificate string `protobuf:"bytes,2,opt,name=client_certificate,json=clientCertificate" json:"client_certificate,omitempty"` + ClientCertificate string `protobuf:"bytes,2,opt,name=client_certificate,json=clientCertificate,proto3" json:"client_certificate,omitempty"` // REQUIRED if mode is "mutual". The path to the file holding the // client's private key. - PrivateKey string `protobuf:"bytes,3,opt,name=private_key,json=privateKey" json:"private_key,omitempty"` + PrivateKey string `protobuf:"bytes,3,opt,name=private_key,json=privateKey,proto3" json:"private_key,omitempty"` // OPTIONAL: The path to the file containing certificate authority // certificates to use in verifying a presented server certificate. If // omitted, the proxy will not verify the server's certificate. - CaCertificates string `protobuf:"bytes,4,opt,name=ca_certificates,json=caCertificates" json:"ca_certificates,omitempty"` + CaCertificates string `protobuf:"bytes,4,opt,name=ca_certificates,json=caCertificates,proto3" json:"ca_certificates,omitempty"` // A list of alternate names to verify the subject identity in the // certificate. If specified, the proxy will verify that the server // certificate's subject alt name matches one of the specified values. SubjectAltNames []string `protobuf:"bytes,5,rep,name=subject_alt_names,json=subjectAltNames" json:"subject_alt_names,omitempty"` // SNI string to present to the server during TLS handshake. - Sni string `protobuf:"bytes,6,opt,name=sni" json:"sni,omitempty"` + Sni string `protobuf:"bytes,6,opt,name=sni,proto3" json:"sni,omitempty"` } func (m *TLSSettings) Reset() { *m = TLSSettings{} } func (m *TLSSettings) String() string { return proto.CompactTextString(m) } func (*TLSSettings) ProtoMessage() {} -func (*TLSSettings) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{6} } +func (*TLSSettings) Descriptor() ([]byte, []int) { return fileDescriptorDestinationRule, []int{6} } func (m *TLSSettings) GetMode() TLSSettings_TLSmode { if m != nil { @@ -878,75 +888,2439 @@ func init() { proto.RegisterEnum("istio.networking.v1alpha3.LoadBalancerSettings_SimpleLB", LoadBalancerSettings_SimpleLB_name, LoadBalancerSettings_SimpleLB_value) proto.RegisterEnum("istio.networking.v1alpha3.TLSSettings_TLSmode", TLSSettings_TLSmode_name, TLSSettings_TLSmode_value) } +func (m *DestinationRule) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DestinationRule) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Name) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintDestinationRule(dAtA, i, uint64(len(m.Name))) + i += copy(dAtA[i:], m.Name) + } + if m.TrafficPolicy != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintDestinationRule(dAtA, i, uint64(m.TrafficPolicy.Size())) + n1, err := m.TrafficPolicy.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n1 + } + if len(m.Subsets) > 0 { + for _, msg := range m.Subsets { + dAtA[i] = 0x1a + i++ + i = encodeVarintDestinationRule(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + return i, nil +} + +func (m *TrafficPolicy) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *TrafficPolicy) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.LoadBalancer != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintDestinationRule(dAtA, i, uint64(m.LoadBalancer.Size())) + n2, err := m.LoadBalancer.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n2 + } + if m.ConnectionPool != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintDestinationRule(dAtA, i, uint64(m.ConnectionPool.Size())) + n3, err := m.ConnectionPool.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n3 + } + if m.OutlierDetection != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintDestinationRule(dAtA, i, uint64(m.OutlierDetection.Size())) + n4, err := m.OutlierDetection.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n4 + } + if m.Tls != nil { + dAtA[i] = 0x22 + i++ + i = encodeVarintDestinationRule(dAtA, i, uint64(m.Tls.Size())) + n5, err := m.Tls.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n5 + } + return i, nil +} + +func (m *Subset) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Subset) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Name) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintDestinationRule(dAtA, i, uint64(len(m.Name))) + i += copy(dAtA[i:], m.Name) + } + if len(m.Labels) > 0 { + for k, _ := range m.Labels { + dAtA[i] = 0x12 + i++ + v := m.Labels[k] + mapSize := 1 + len(k) + sovDestinationRule(uint64(len(k))) + 1 + len(v) + sovDestinationRule(uint64(len(v))) + i = encodeVarintDestinationRule(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintDestinationRule(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x12 + i++ + i = encodeVarintDestinationRule(dAtA, i, uint64(len(v))) + i += copy(dAtA[i:], v) + } + } + if m.TrafficPolicy != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintDestinationRule(dAtA, i, uint64(m.TrafficPolicy.Size())) + n6, err := m.TrafficPolicy.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n6 + } + return i, nil +} + +func (m *LoadBalancerSettings) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *LoadBalancerSettings) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.LbPolicy != nil { + nn7, err := m.LbPolicy.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += nn7 + } + return i, nil +} + +func (m *LoadBalancerSettings_Simple) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x8 + i++ + i = encodeVarintDestinationRule(dAtA, i, uint64(m.Simple)) + return i, nil +} +func (m *LoadBalancerSettings_ConsistentHash) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.ConsistentHash != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintDestinationRule(dAtA, i, uint64(m.ConsistentHash.Size())) + n8, err := m.ConsistentHash.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n8 + } + return i, nil +} +func (m *LoadBalancerSettings_ConsistentHashLB) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *LoadBalancerSettings_ConsistentHashLB) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.HttpHeader) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintDestinationRule(dAtA, i, uint64(len(m.HttpHeader))) + i += copy(dAtA[i:], m.HttpHeader) + } + if m.MinimumRingSize != 0 { + dAtA[i] = 0x10 + i++ + i = encodeVarintDestinationRule(dAtA, i, uint64(m.MinimumRingSize)) + } + return i, nil +} + +func (m *ConnectionPoolSettings) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ConnectionPoolSettings) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Tcp != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintDestinationRule(dAtA, i, uint64(m.Tcp.Size())) + n9, err := m.Tcp.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n9 + } + if m.Http != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintDestinationRule(dAtA, i, uint64(m.Http.Size())) + n10, err := m.Http.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n10 + } + return i, nil +} + +func (m *ConnectionPoolSettings_TCPSettings) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ConnectionPoolSettings_TCPSettings) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.MaxConnections != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintDestinationRule(dAtA, i, uint64(m.MaxConnections)) + } + if m.ConnectTimeout != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintDestinationRule(dAtA, i, uint64(m.ConnectTimeout.Size())) + n11, err := m.ConnectTimeout.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n11 + } + return i, nil +} + +func (m *ConnectionPoolSettings_HTTPSettings) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ConnectionPoolSettings_HTTPSettings) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Http1MaxPendingRequests != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintDestinationRule(dAtA, i, uint64(m.Http1MaxPendingRequests)) + } + if m.Http2MaxRequests != 0 { + dAtA[i] = 0x10 + i++ + i = encodeVarintDestinationRule(dAtA, i, uint64(m.Http2MaxRequests)) + } + if m.MaxRequestsPerConnection != 0 { + dAtA[i] = 0x18 + i++ + i = encodeVarintDestinationRule(dAtA, i, uint64(m.MaxRequestsPerConnection)) + } + if m.MaxRetries != 0 { + dAtA[i] = 0x20 + i++ + i = encodeVarintDestinationRule(dAtA, i, uint64(m.MaxRetries)) + } + return i, nil +} -func init() { proto.RegisterFile("networking/v1alpha3/destination_rule.proto", fileDescriptor0) } - -var fileDescriptor0 = []byte{ - // 1056 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x56, 0xdd, 0x6e, 0x1a, 0x47, - 0x14, 0x0e, 0xac, 0x4d, 0xc2, 0x21, 0x86, 0xf5, 0xc8, 0x6a, 0x09, 0x95, 0x5a, 0x97, 0x8b, 0xd6, - 0x4a, 0x9b, 0xa5, 0x76, 0x54, 0xc9, 0x6d, 0x94, 0xaa, 0x60, 0x50, 0xb0, 0x8a, 0x01, 0x0d, 0x58, - 0xaa, 0x72, 0xb3, 0x1a, 0x96, 0x31, 0x4c, 0xbd, 0x7f, 0xdd, 0x99, 0x75, 0x6d, 0xbf, 0x44, 0xaf, - 0xfa, 0x24, 0xbd, 0xe9, 0x73, 0x54, 0xea, 0x45, 0x9f, 0x22, 0xaf, 0x50, 0xcd, 0x0f, 0xb0, 0xb6, - 0x28, 0xa9, 0xd5, 0xbb, 0xe5, 0x9c, 0xf3, 0x7d, 0x73, 0xe6, 0xfc, 0x7c, 0x03, 0x3c, 0x0f, 0xa9, - 0xf8, 0x25, 0x4a, 0x2e, 0x59,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x36, 0xec, 0x75, 0xb4, 0x8a, 0x9d, 0x9d, 0x8f, 0xcf, 0x9b, 0x3d, 0x3b, 0xdf, 0xaa, - 0xbf, 0xdd, 0xd7, 0xd5, 0x61, 0x51, 0x83, 0xc4, 0xac, 0xb1, 0xe6, 0xff, 0xda, 0xa4, 0xa0, 0xba, - 0xf6, 0xf2, 0x9f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xf7, 0xc8, 0xfd, 0x3f, 0xcd, 0x09, 0x00, 0x00, +func (m *OutlierDetection) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *OutlierDetection) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Http != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintDestinationRule(dAtA, i, uint64(m.Http.Size())) + n12, err := m.Http.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n12 + } + return i, nil +} + +func (m *OutlierDetection_HTTPSettings) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *OutlierDetection_HTTPSettings) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.ConsecutiveErrors != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintDestinationRule(dAtA, i, uint64(m.ConsecutiveErrors)) + } + if m.Interval != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintDestinationRule(dAtA, i, uint64(m.Interval.Size())) + n13, err := m.Interval.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n13 + } + if m.BaseEjectionTime != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintDestinationRule(dAtA, i, uint64(m.BaseEjectionTime.Size())) + n14, err := m.BaseEjectionTime.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n14 + } + if m.MaxEjectionPercent != 0 { + dAtA[i] = 0x20 + i++ + i = encodeVarintDestinationRule(dAtA, i, uint64(m.MaxEjectionPercent)) + } + return i, nil +} + +func (m *TLSSettings) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *TLSSettings) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Mode != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintDestinationRule(dAtA, i, uint64(m.Mode)) + } + if len(m.ClientCertificate) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintDestinationRule(dAtA, i, uint64(len(m.ClientCertificate))) + i += copy(dAtA[i:], m.ClientCertificate) + } + if len(m.PrivateKey) > 0 { + dAtA[i] = 0x1a + i++ + i = encodeVarintDestinationRule(dAtA, i, uint64(len(m.PrivateKey))) + i += copy(dAtA[i:], m.PrivateKey) + } + if len(m.CaCertificates) > 0 { + dAtA[i] = 0x22 + i++ + i = encodeVarintDestinationRule(dAtA, i, uint64(len(m.CaCertificates))) + i += copy(dAtA[i:], m.CaCertificates) + } + if len(m.SubjectAltNames) > 0 { + for _, s := range m.SubjectAltNames { + dAtA[i] = 0x2a + i++ + l = len(s) + for l >= 1<<7 { + dAtA[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + dAtA[i] = uint8(l) + i++ + i += copy(dAtA[i:], s) + } + } + if len(m.Sni) > 0 { + dAtA[i] = 0x32 + i++ + i = encodeVarintDestinationRule(dAtA, i, uint64(len(m.Sni))) + i += copy(dAtA[i:], m.Sni) + } + return i, nil +} + +func encodeVarintDestinationRule(dAtA []byte, offset int, v uint64) int { + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return offset + 1 +} +func (m *DestinationRule) Size() (n int) { + var l int + _ = l + l = len(m.Name) + if l > 0 { + n += 1 + l + sovDestinationRule(uint64(l)) + } + if m.TrafficPolicy != nil { + l = m.TrafficPolicy.Size() + n += 1 + l + sovDestinationRule(uint64(l)) + } + if len(m.Subsets) > 0 { + for _, e := range m.Subsets { + l = e.Size() + n += 1 + l + sovDestinationRule(uint64(l)) + } + } + return n +} + +func (m *TrafficPolicy) Size() (n int) { + var l int + _ = l + if m.LoadBalancer != nil { + l = m.LoadBalancer.Size() + n += 1 + l + sovDestinationRule(uint64(l)) + } + if m.ConnectionPool != nil { + l = m.ConnectionPool.Size() + n += 1 + l + sovDestinationRule(uint64(l)) + } + if m.OutlierDetection != nil { + l = m.OutlierDetection.Size() + n += 1 + l + sovDestinationRule(uint64(l)) + } + if m.Tls != nil { + l = m.Tls.Size() + n += 1 + l + sovDestinationRule(uint64(l)) + } + return n +} + +func (m *Subset) Size() (n int) { + var l int + _ = l + l = len(m.Name) + if l > 0 { + n += 1 + l + sovDestinationRule(uint64(l)) + } + if len(m.Labels) > 0 { + for k, v := range m.Labels { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovDestinationRule(uint64(len(k))) + 1 + len(v) + sovDestinationRule(uint64(len(v))) + n += mapEntrySize + 1 + sovDestinationRule(uint64(mapEntrySize)) + } + } + if m.TrafficPolicy != nil { + l = m.TrafficPolicy.Size() + n += 1 + l + sovDestinationRule(uint64(l)) + } + return n +} + +func (m *LoadBalancerSettings) Size() (n int) { + var l int + _ = l + if m.LbPolicy != nil { + n += m.LbPolicy.Size() + } + return n +} + +func (m *LoadBalancerSettings_Simple) Size() (n int) { + var l int + _ = l + n += 1 + sovDestinationRule(uint64(m.Simple)) + return n +} +func (m *LoadBalancerSettings_ConsistentHash) Size() (n int) { + var l int + _ = l + if m.ConsistentHash != nil { + l = m.ConsistentHash.Size() + n += 1 + l + sovDestinationRule(uint64(l)) + } + return n +} +func (m *LoadBalancerSettings_ConsistentHashLB) Size() (n int) { + var l int + _ = l + l = len(m.HttpHeader) + if l > 0 { + n += 1 + l + sovDestinationRule(uint64(l)) + } + if m.MinimumRingSize != 0 { + n += 1 + sovDestinationRule(uint64(m.MinimumRingSize)) + } + return n +} + +func (m *ConnectionPoolSettings) Size() (n int) { + var l int + _ = l + if m.Tcp != nil { + l = m.Tcp.Size() + n += 1 + l + sovDestinationRule(uint64(l)) + } + if m.Http != nil { + l = m.Http.Size() + n += 1 + l + sovDestinationRule(uint64(l)) + } + return n +} + +func (m *ConnectionPoolSettings_TCPSettings) Size() (n int) { + var l int + _ = l + if m.MaxConnections != 0 { + n += 1 + sovDestinationRule(uint64(m.MaxConnections)) + } + if m.ConnectTimeout != nil { + l = m.ConnectTimeout.Size() + n += 1 + l + sovDestinationRule(uint64(l)) + } + return n +} + +func (m *ConnectionPoolSettings_HTTPSettings) Size() (n int) { + var l int + _ = l + if m.Http1MaxPendingRequests != 0 { + n += 1 + sovDestinationRule(uint64(m.Http1MaxPendingRequests)) + } + if m.Http2MaxRequests != 0 { + n += 1 + sovDestinationRule(uint64(m.Http2MaxRequests)) + } + if m.MaxRequestsPerConnection != 0 { + n += 1 + sovDestinationRule(uint64(m.MaxRequestsPerConnection)) + } + if m.MaxRetries != 0 { + n += 1 + sovDestinationRule(uint64(m.MaxRetries)) + } + return n +} + +func (m *OutlierDetection) Size() (n int) { + var l int + _ = l + if m.Http != nil { + l = m.Http.Size() + n += 1 + l + sovDestinationRule(uint64(l)) + } + return n +} + +func (m *OutlierDetection_HTTPSettings) Size() (n int) { + var l int + _ = l + if m.ConsecutiveErrors != 0 { + n += 1 + sovDestinationRule(uint64(m.ConsecutiveErrors)) + } + if m.Interval != nil { + l = m.Interval.Size() + n += 1 + l + sovDestinationRule(uint64(l)) + } + if m.BaseEjectionTime != nil { + l = m.BaseEjectionTime.Size() + n += 1 + l + sovDestinationRule(uint64(l)) + } + if m.MaxEjectionPercent != 0 { + n += 1 + sovDestinationRule(uint64(m.MaxEjectionPercent)) + } + return n +} + +func (m *TLSSettings) Size() (n int) { + var l int + _ = l + if m.Mode != 0 { + n += 1 + sovDestinationRule(uint64(m.Mode)) + } + l = len(m.ClientCertificate) + if l > 0 { + n += 1 + l + sovDestinationRule(uint64(l)) + } + l = len(m.PrivateKey) + if l > 0 { + n += 1 + l + sovDestinationRule(uint64(l)) + } + l = len(m.CaCertificates) + if l > 0 { + n += 1 + l + sovDestinationRule(uint64(l)) + } + if len(m.SubjectAltNames) > 0 { + for _, s := range m.SubjectAltNames { + l = len(s) + n += 1 + l + sovDestinationRule(uint64(l)) + } + } + l = len(m.Sni) + if l > 0 { + n += 1 + l + sovDestinationRule(uint64(l)) + } + return n +} + +func sovDestinationRule(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozDestinationRule(x uint64) (n int) { + return sovDestinationRule(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *DestinationRule) 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 ErrIntOverflowDestinationRule + } + 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: DestinationRule: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DestinationRule: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDestinationRule + } + 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 ErrInvalidLengthDestinationRule + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TrafficPolicy", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDestinationRule + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthDestinationRule + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.TrafficPolicy == nil { + m.TrafficPolicy = &TrafficPolicy{} + } + if err := m.TrafficPolicy.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Subsets", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDestinationRule + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthDestinationRule + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Subsets = append(m.Subsets, &Subset{}) + if err := m.Subsets[len(m.Subsets)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipDestinationRule(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthDestinationRule + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *TrafficPolicy) 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 ErrIntOverflowDestinationRule + } + 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: TrafficPolicy: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TrafficPolicy: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LoadBalancer", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDestinationRule + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthDestinationRule + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.LoadBalancer == nil { + m.LoadBalancer = &LoadBalancerSettings{} + } + if err := m.LoadBalancer.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ConnectionPool", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDestinationRule + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthDestinationRule + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ConnectionPool == nil { + m.ConnectionPool = &ConnectionPoolSettings{} + } + if err := m.ConnectionPool.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OutlierDetection", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDestinationRule + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthDestinationRule + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.OutlierDetection == nil { + m.OutlierDetection = &OutlierDetection{} + } + if err := m.OutlierDetection.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Tls", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDestinationRule + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthDestinationRule + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Tls == nil { + m.Tls = &TLSSettings{} + } + if err := m.Tls.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipDestinationRule(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthDestinationRule + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Subset) 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 ErrIntOverflowDestinationRule + } + 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: Subset: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Subset: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDestinationRule + } + 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 ErrInvalidLengthDestinationRule + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Labels", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDestinationRule + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthDestinationRule + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Labels == nil { + m.Labels = 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 ErrIntOverflowDestinationRule + } + 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 ErrIntOverflowDestinationRule + } + 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 ErrInvalidLengthDestinationRule + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + 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 ErrIntOverflowDestinationRule + } + 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 ErrInvalidLengthDestinationRule + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + } else { + iNdEx = entryPreIndex + skippy, err := skipDestinationRule(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthDestinationRule + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Labels[mapkey] = mapvalue + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TrafficPolicy", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDestinationRule + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthDestinationRule + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.TrafficPolicy == nil { + m.TrafficPolicy = &TrafficPolicy{} + } + if err := m.TrafficPolicy.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipDestinationRule(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthDestinationRule + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *LoadBalancerSettings) 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 ErrIntOverflowDestinationRule + } + 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: LoadBalancerSettings: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: LoadBalancerSettings: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Simple", wireType) + } + var v LoadBalancerSettings_SimpleLB + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDestinationRule + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (LoadBalancerSettings_SimpleLB(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.LbPolicy = &LoadBalancerSettings_Simple{v} + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ConsistentHash", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDestinationRule + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthDestinationRule + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &LoadBalancerSettings_ConsistentHashLB{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.LbPolicy = &LoadBalancerSettings_ConsistentHash{v} + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipDestinationRule(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthDestinationRule + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *LoadBalancerSettings_ConsistentHashLB) 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 ErrIntOverflowDestinationRule + } + 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: ConsistentHashLB: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ConsistentHashLB: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field HttpHeader", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDestinationRule + } + 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 ErrInvalidLengthDestinationRule + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.HttpHeader = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MinimumRingSize", wireType) + } + m.MinimumRingSize = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDestinationRule + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.MinimumRingSize |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipDestinationRule(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthDestinationRule + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ConnectionPoolSettings) 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 ErrIntOverflowDestinationRule + } + 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: ConnectionPoolSettings: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ConnectionPoolSettings: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Tcp", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDestinationRule + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthDestinationRule + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Tcp == nil { + m.Tcp = &ConnectionPoolSettings_TCPSettings{} + } + if err := m.Tcp.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Http", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDestinationRule + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthDestinationRule + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Http == nil { + m.Http = &ConnectionPoolSettings_HTTPSettings{} + } + if err := m.Http.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipDestinationRule(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthDestinationRule + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ConnectionPoolSettings_TCPSettings) 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 ErrIntOverflowDestinationRule + } + 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: TCPSettings: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TCPSettings: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MaxConnections", wireType) + } + m.MaxConnections = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDestinationRule + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.MaxConnections |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ConnectTimeout", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDestinationRule + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthDestinationRule + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ConnectTimeout == nil { + m.ConnectTimeout = &google_protobuf.Duration{} + } + if err := m.ConnectTimeout.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipDestinationRule(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthDestinationRule + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ConnectionPoolSettings_HTTPSettings) 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 ErrIntOverflowDestinationRule + } + 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: HTTPSettings: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: HTTPSettings: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Http1MaxPendingRequests", wireType) + } + m.Http1MaxPendingRequests = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDestinationRule + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Http1MaxPendingRequests |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Http2MaxRequests", wireType) + } + m.Http2MaxRequests = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDestinationRule + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Http2MaxRequests |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MaxRequestsPerConnection", wireType) + } + m.MaxRequestsPerConnection = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDestinationRule + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.MaxRequestsPerConnection |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MaxRetries", wireType) + } + m.MaxRetries = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDestinationRule + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.MaxRetries |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipDestinationRule(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthDestinationRule + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *OutlierDetection) 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 ErrIntOverflowDestinationRule + } + 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: OutlierDetection: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: OutlierDetection: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Http", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDestinationRule + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthDestinationRule + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Http == nil { + m.Http = &OutlierDetection_HTTPSettings{} + } + if err := m.Http.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipDestinationRule(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthDestinationRule + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *OutlierDetection_HTTPSettings) 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 ErrIntOverflowDestinationRule + } + 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: HTTPSettings: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: HTTPSettings: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ConsecutiveErrors", wireType) + } + m.ConsecutiveErrors = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDestinationRule + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ConsecutiveErrors |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Interval", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDestinationRule + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthDestinationRule + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Interval == nil { + m.Interval = &google_protobuf.Duration{} + } + if err := m.Interval.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BaseEjectionTime", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDestinationRule + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthDestinationRule + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.BaseEjectionTime == nil { + m.BaseEjectionTime = &google_protobuf.Duration{} + } + if err := m.BaseEjectionTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MaxEjectionPercent", wireType) + } + m.MaxEjectionPercent = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDestinationRule + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.MaxEjectionPercent |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipDestinationRule(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthDestinationRule + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *TLSSettings) 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 ErrIntOverflowDestinationRule + } + 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: TLSSettings: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TLSSettings: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Mode", wireType) + } + m.Mode = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDestinationRule + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Mode |= (TLSSettings_TLSmode(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ClientCertificate", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDestinationRule + } + 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 ErrInvalidLengthDestinationRule + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ClientCertificate = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PrivateKey", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDestinationRule + } + 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 ErrInvalidLengthDestinationRule + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PrivateKey = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CaCertificates", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDestinationRule + } + 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 ErrInvalidLengthDestinationRule + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.CaCertificates = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SubjectAltNames", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDestinationRule + } + 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 ErrInvalidLengthDestinationRule + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SubjectAltNames = append(m.SubjectAltNames, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sni", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDestinationRule + } + 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 ErrInvalidLengthDestinationRule + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Sni = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipDestinationRule(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthDestinationRule + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipDestinationRule(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, ErrIntOverflowDestinationRule + } + 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, ErrIntOverflowDestinationRule + } + 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, ErrIntOverflowDestinationRule + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + iNdEx += length + if length < 0 { + return 0, ErrInvalidLengthDestinationRule + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowDestinationRule + } + 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 := skipDestinationRule(dAtA[start:]) + if err != nil { + return 0, err + } + iNdEx = start + next + } + 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 ( + ErrInvalidLengthDestinationRule = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowDestinationRule = fmt.Errorf("proto: integer overflow") +) + +func init() { + proto.RegisterFile("networking/v1alpha3/destination_rule.proto", fileDescriptorDestinationRule) +} + +var fileDescriptorDestinationRule = []byte{ + // 1074 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x56, 0xdd, 0x6e, 0x1b, 0x45, + 0x14, 0xee, 0x7a, 0x13, 0xb7, 0x3e, 0x6e, 0xec, 0xcd, 0xa8, 0x02, 0xd7, 0x48, 0x21, 0xf8, 0x02, + 0xa2, 0x42, 0xd7, 0x24, 0x15, 0x52, 0xa0, 0x2a, 0xc2, 0x8e, 0xad, 0x3a, 0xc2, 0xb1, 0xad, 0xb1, + 0x23, 0xa1, 0xde, 0xac, 0xc6, 0xeb, 0x89, 0x3d, 0x64, 0xff, 0xd8, 0x99, 0x0d, 0x49, 0x5e, 0x82, + 0x2b, 0x9e, 0x84, 0x1b, 0x1e, 0x81, 0x4b, 0x84, 0xc4, 0x05, 0x77, 0x28, 0x2f, 0xd0, 0x57, 0x40, + 0x33, 0x3b, 0xb6, 0x37, 0x91, 0x71, 0x89, 0xb8, 0x5b, 0x9f, 0x73, 0xbe, 0x6f, 0xce, 0x9c, 0x9f, + 0x6f, 0x0c, 0xcf, 0x02, 0x2a, 0x7e, 0x0c, 0xe3, 0x73, 0x16, 0x4c, 0xeb, 0x17, 0xfb, 0xc4, 0x8b, + 0x66, 0xe4, 0x45, 0x7d, 0x42, 0xb9, 0x60, 0x01, 0x11, 0x2c, 0x0c, 0x9c, 0x38, 0xf1, 0xa8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e, 0xf1, 0xfb, 0xcd, 0x8e, 0xf1, 0xf7, + 0xcd, 0x8e, 0xf1, 0x66, 0x37, 0xad, 0x14, 0x0b, 0xeb, 0x24, 0x62, 0xf5, 0x15, 0xff, 0xdd, 0xc6, + 0x79, 0xd5, 0xc1, 0x17, 0xff, 0x04, 0x00, 0x00, 0xff, 0xff, 0x13, 0x90, 0x84, 0x8a, 0xd9, 0x09, + 0x00, 0x00, } diff --git a/istio.io/api/networking/v1alpha3/external_service.pb.go b/istio.io/api/networking/v1alpha3/external_service.pb.go index ee7628b5..04baeb71 100644 --- a/istio.io/api/networking/v1alpha3/external_service.pb.go +++ b/istio.io/api/networking/v1alpha3/external_service.pb.go @@ -1,12 +1,14 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. +// Code generated by protoc-gen-gogo. DO NOT EDIT. // source: networking/v1alpha3/external_service.proto package v1alpha3 -import proto "github.com/golang/protobuf/proto" +import proto "github.com/gogo/protobuf/proto" import fmt "fmt" import math "math" +import io "io" + // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf @@ -51,7 +53,9 @@ var ExternalService_Discovery_value = map[string]int32{ func (x ExternalService_Discovery) String() string { return proto.EnumName(ExternalService_Discovery_name, int32(x)) } -func (ExternalService_Discovery) EnumDescriptor() ([]byte, []int) { return fileDescriptor1, []int{0, 0} } +func (ExternalService_Discovery) EnumDescriptor() ([]byte, []int) { + return fileDescriptorExternalService, []int{0, 0} +} // External service describes the endpoints, ports and protocols of a // white-listed set of mesh-external domains and IP blocks that services in @@ -210,7 +214,7 @@ type ExternalService struct { Ports []*Port `protobuf:"bytes,2,rep,name=ports" json:"ports,omitempty"` // Service discovery mode for the hosts. If not set, Istio will attempt // to infer the discovery mode based on the value of hosts and endpoints. - Discovery ExternalService_Discovery `protobuf:"varint,3,opt,name=discovery,enum=istio.networking.v1alpha3.ExternalService_Discovery" json:"discovery,omitempty"` + Discovery ExternalService_Discovery `protobuf:"varint,3,opt,name=discovery,proto3,enum=istio.networking.v1alpha3.ExternalService_Discovery" json:"discovery,omitempty"` // One or more endpoints associated with the service. Endpoints must be // accessible over the set of outPorts defined at the service level. Endpoints []*ExternalService_Endpoint `protobuf:"bytes,4,rep,name=endpoints" json:"endpoints,omitempty"` @@ -219,7 +223,7 @@ type ExternalService struct { func (m *ExternalService) Reset() { *m = ExternalService{} } func (m *ExternalService) String() string { return proto.CompactTextString(m) } func (*ExternalService) ProtoMessage() {} -func (*ExternalService) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{0} } +func (*ExternalService) Descriptor() ([]byte, []int) { return fileDescriptorExternalService, []int{0} } func (m *ExternalService) GetHosts() []string { if m != nil { @@ -254,19 +258,21 @@ func (m *ExternalService) GetEndpoints() []*ExternalService_Endpoint { type ExternalService_Endpoint struct { // REQUIRED: Address associated with the network endpoint without the // port ( IP or fully qualified domain name without wildcards). - Address string `protobuf:"bytes,1,opt,name=address" json:"address,omitempty"` + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` // Set of ports associated with the endpoint. The ports must be // associated with a port name that was declared as part of the // service. - Ports map[string]uint32 `protobuf:"bytes,2,rep,name=ports" json:"ports,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + Ports map[string]uint32 `protobuf:"bytes,2,rep,name=ports" json:"ports,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // One or more labels associated with the endpoint. - Labels map[string]string `protobuf:"bytes,3,rep,name=labels" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + Labels map[string]string `protobuf:"bytes,3,rep,name=labels" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` } -func (m *ExternalService_Endpoint) Reset() { *m = ExternalService_Endpoint{} } -func (m *ExternalService_Endpoint) String() string { return proto.CompactTextString(m) } -func (*ExternalService_Endpoint) ProtoMessage() {} -func (*ExternalService_Endpoint) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{0, 0} } +func (m *ExternalService_Endpoint) Reset() { *m = ExternalService_Endpoint{} } +func (m *ExternalService_Endpoint) String() string { return proto.CompactTextString(m) } +func (*ExternalService_Endpoint) ProtoMessage() {} +func (*ExternalService_Endpoint) Descriptor() ([]byte, []int) { + return fileDescriptorExternalService, []int{0, 0} +} func (m *ExternalService_Endpoint) GetAddress() string { if m != nil { @@ -294,33 +300,798 @@ func init() { proto.RegisterType((*ExternalService_Endpoint)(nil), "istio.networking.v1alpha3.ExternalService.Endpoint") proto.RegisterEnum("istio.networking.v1alpha3.ExternalService_Discovery", ExternalService_Discovery_name, ExternalService_Discovery_value) } +func (m *ExternalService) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ExternalService) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Hosts) > 0 { + for _, s := range m.Hosts { + dAtA[i] = 0xa + i++ + l = len(s) + for l >= 1<<7 { + dAtA[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + dAtA[i] = uint8(l) + i++ + i += copy(dAtA[i:], s) + } + } + if len(m.Ports) > 0 { + for _, msg := range m.Ports { + dAtA[i] = 0x12 + i++ + i = encodeVarintExternalService(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.Discovery != 0 { + dAtA[i] = 0x18 + i++ + i = encodeVarintExternalService(dAtA, i, uint64(m.Discovery)) + } + if len(m.Endpoints) > 0 { + for _, msg := range m.Endpoints { + dAtA[i] = 0x22 + i++ + i = encodeVarintExternalService(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + return i, nil +} + +func (m *ExternalService_Endpoint) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ExternalService_Endpoint) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Address) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintExternalService(dAtA, i, uint64(len(m.Address))) + i += copy(dAtA[i:], m.Address) + } + if len(m.Ports) > 0 { + for k, _ := range m.Ports { + dAtA[i] = 0x12 + i++ + v := m.Ports[k] + mapSize := 1 + len(k) + sovExternalService(uint64(len(k))) + 1 + sovExternalService(uint64(v)) + i = encodeVarintExternalService(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintExternalService(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x10 + i++ + i = encodeVarintExternalService(dAtA, i, uint64(v)) + } + } + if len(m.Labels) > 0 { + for k, _ := range m.Labels { + dAtA[i] = 0x1a + i++ + v := m.Labels[k] + mapSize := 1 + len(k) + sovExternalService(uint64(len(k))) + 1 + len(v) + sovExternalService(uint64(len(v))) + i = encodeVarintExternalService(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintExternalService(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x12 + i++ + i = encodeVarintExternalService(dAtA, i, uint64(len(v))) + i += copy(dAtA[i:], v) + } + } + return i, nil +} + +func encodeVarintExternalService(dAtA []byte, offset int, v uint64) int { + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return offset + 1 +} +func (m *ExternalService) Size() (n int) { + var l int + _ = l + if len(m.Hosts) > 0 { + for _, s := range m.Hosts { + l = len(s) + n += 1 + l + sovExternalService(uint64(l)) + } + } + if len(m.Ports) > 0 { + for _, e := range m.Ports { + l = e.Size() + n += 1 + l + sovExternalService(uint64(l)) + } + } + if m.Discovery != 0 { + n += 1 + sovExternalService(uint64(m.Discovery)) + } + if len(m.Endpoints) > 0 { + for _, e := range m.Endpoints { + l = e.Size() + n += 1 + l + sovExternalService(uint64(l)) + } + } + return n +} + +func (m *ExternalService_Endpoint) Size() (n int) { + var l int + _ = l + l = len(m.Address) + if l > 0 { + n += 1 + l + sovExternalService(uint64(l)) + } + if len(m.Ports) > 0 { + for k, v := range m.Ports { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovExternalService(uint64(len(k))) + 1 + sovExternalService(uint64(v)) + n += mapEntrySize + 1 + sovExternalService(uint64(mapEntrySize)) + } + } + if len(m.Labels) > 0 { + for k, v := range m.Labels { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovExternalService(uint64(len(k))) + 1 + len(v) + sovExternalService(uint64(len(v))) + n += mapEntrySize + 1 + sovExternalService(uint64(mapEntrySize)) + } + } + return n +} + +func sovExternalService(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozExternalService(x uint64) (n int) { + return sovExternalService(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *ExternalService) 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 ErrIntOverflowExternalService + } + 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: ExternalService: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ExternalService: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Hosts", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExternalService + } + 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 ErrInvalidLengthExternalService + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Hosts = append(m.Hosts, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Ports", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExternalService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthExternalService + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Ports = append(m.Ports, &Port{}) + if err := m.Ports[len(m.Ports)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Discovery", wireType) + } + m.Discovery = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExternalService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Discovery |= (ExternalService_Discovery(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Endpoints", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExternalService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthExternalService + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Endpoints = append(m.Endpoints, &ExternalService_Endpoint{}) + if err := m.Endpoints[len(m.Endpoints)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipExternalService(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthExternalService + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ExternalService_Endpoint) 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 ErrIntOverflowExternalService + } + 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: Endpoint: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Endpoint: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExternalService + } + 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 ErrInvalidLengthExternalService + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Address = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Ports", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExternalService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthExternalService + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Ports == nil { + m.Ports = make(map[string]uint32) + } + var mapkey string + var mapvalue uint32 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExternalService + } + 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 ErrIntOverflowExternalService + } + 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 ErrInvalidLengthExternalService + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExternalService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvalue |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else { + iNdEx = entryPreIndex + skippy, err := skipExternalService(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthExternalService + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Ports[mapkey] = mapvalue + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Labels", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExternalService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthExternalService + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Labels == nil { + m.Labels = 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 ErrIntOverflowExternalService + } + 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 ErrIntOverflowExternalService + } + 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 ErrInvalidLengthExternalService + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + 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 ErrIntOverflowExternalService + } + 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 ErrInvalidLengthExternalService + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + } else { + iNdEx = entryPreIndex + skippy, err := skipExternalService(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthExternalService + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Labels[mapkey] = mapvalue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipExternalService(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthExternalService + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } -func init() { proto.RegisterFile("networking/v1alpha3/external_service.proto", fileDescriptor1) } + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipExternalService(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, ErrIntOverflowExternalService + } + 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, ErrIntOverflowExternalService + } + 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, ErrIntOverflowExternalService + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + iNdEx += length + if length < 0 { + return 0, ErrInvalidLengthExternalService + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowExternalService + } + 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 := skipExternalService(dAtA[start:]) + if err != nil { + return 0, err + } + iNdEx = start + next + } + 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 ( + ErrInvalidLengthExternalService = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowExternalService = fmt.Errorf("proto: integer overflow") +) + +func init() { + proto.RegisterFile("networking/v1alpha3/external_service.proto", fileDescriptorExternalService) +} -var fileDescriptor1 = []byte{ - // 376 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x92, 0x4d, 0x6b, 0xdb, 0x40, - 0x10, 0x86, 0x2b, 0xc9, 0x5f, 0x1a, 0xd3, 0x56, 0x2c, 0x3d, 0xa8, 0xba, 0x54, 0xf5, 0x49, 0xf8, - 0x20, 0x51, 0xbb, 0x05, 0xb7, 0x87, 0x96, 0x26, 0xd6, 0x21, 0x10, 0x9c, 0x44, 0x36, 0x04, 0x72, - 0x09, 0x6b, 0x6b, 0xb1, 0x17, 0x0b, 0xad, 0xd8, 0xdd, 0xc8, 0xd1, 0x3f, 0xcc, 0x8f, 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7f, 0x0f, 0xe8, 0x9a, 0xa7, 0x23, 0xfc, 0x58, 0xf2, 0xac, 0xca, 0xe8, - 0x12, 0x5a, 0x11, 0x9e, 0x93, 0x48, 0x98, 0x5a, 0xae, 0xfd, 0x77, 0x88, 0xf6, 0x34, 0x37, 0x14, - 0xde, 0x52, 0x67, 0x8d, 0x00, 0xea, 0x6e, 0xc8, 0x00, 0x6d, 0x4d, 0xb2, 0xf2, 0x49, 0xdb, 0xcf, - 0xed, 0xa4, 0x53, 0x1c, 0xdd, 0x10, 0x53, 0xb5, 0x15, 0xe7, 0x63, 0x50, 0x14, 0x7f, 0xd4, 0x91, - 0x62, 0xfd, 0x86, 0xee, 0x8e, 0xf0, 0x2d, 0x54, 0xdf, 0x41, 0x7b, 0x7d, 0xd0, 0x1f, 0xa7, 0x86, - 0x3a, 0xd0, 0x98, 0x9c, 0x4d, 0x7c, 0xe3, 0x03, 0x02, 0x68, 0x4d, 0x67, 0xff, 0x67, 0x27, 0xc7, - 0x86, 0x82, 0xda, 0xa0, 0x8d, 0x27, 0x53, 0x43, 0x3d, 0xea, 0x5d, 0xd9, 0xc5, 0x53, 0x29, 0xf3, - 0x70, 0x42, 0xbd, 0x3d, 0x0b, 0x3b, 0x6f, 0xe5, 0x9b, 0x3a, 0x7c, 0x08, 0x00, 0x00, 0xff, 0xff, - 0x83, 0x97, 0x1b, 0xdc, 0x15, 0x03, 0x00, 0x00, +var fileDescriptorExternalService = []byte{ + // 388 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x92, 0x4d, 0xeb, 0xd3, 0x40, + 0x10, 0x87, 0xdd, 0xa4, 0x6f, 0x99, 0xa2, 0x86, 0xc5, 0x43, 0xcc, 0xa1, 0xc6, 0x9e, 0x42, 0x0f, + 0x09, 0xb6, 0x0a, 0xd5, 0x83, 0xa2, 0x36, 0x07, 0x41, 0xaa, 0xa6, 0x05, 0xc1, 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xfd, 0x1f, 0x5b, 0xd0, 0x25, 0x51, 0x24, 0xa8, 0x3c, 0x45, 0x80, 0x5c, 0x23, 0xac, + 0x4b, 0xbc, 0xfc, 0x3d, 0x84, 0xe7, 0x57, 0x74, 0x2d, 0xd2, 0x91, 0x41, 0xa2, 0x44, 0x5e, 0x67, + 0xf4, 0x11, 0x3a, 0x31, 0x59, 0xd1, 0x58, 0x5a, 0x7a, 0xa1, 0x7d, 0x71, 0x8d, 0xf6, 0x6d, 0x61, + 0x28, 0xbd, 0x95, 0xce, 0x9e, 0x02, 0x34, 0xdd, 0xb0, 0x09, 0xfa, 0x8e, 0xe6, 0xd5, 0x93, 0x4e, + 0x9f, 0xa7, 0x49, 0x67, 0x24, 0xfe, 0x42, 0x2d, 0xcd, 0x41, 0xee, 0xed, 0xb0, 0x2c, 0x9e, 0x69, + 0x53, 0x64, 0x3f, 0x85, 0xfe, 0x99, 0xf0, 0x7f, 0xa8, 0x71, 0x86, 0x0e, 0x47, 0x60, 0xfc, 0x9a, + 0x1a, 0xee, 0x41, 0x6b, 0xfe, 0x6e, 0x1e, 0x98, 0xb7, 0x30, 0x40, 0x67, 0xb1, 0x7c, 0xb9, 0x7c, + 0xf3, 0xda, 0x44, 0xb8, 0x0b, 0xfa, 0x6c, 0xbe, 0x30, 0xb5, 0x57, 0xde, 0xe1, 0x38, 0x40, 0xdf, + 0x8e, 0x03, 0xf4, 0xfd, 0x38, 0x40, 0x9f, 0x9c, 0xf2, 0xd9, 0x8c, 0xfb, 0x24, 0x65, 0xfe, 0x85, + 0xe5, 0x5d, 0x75, 0x8a, 0xad, 0x9d, 0xfc, 0x0c, 0x00, 0x00, 0xff, 0xff, 0x62, 0xc3, 0xc9, 0x7f, + 0x21, 0x03, 0x00, 0x00, } diff --git a/istio.io/api/networking/v1alpha3/gateway.pb.go b/istio.io/api/networking/v1alpha3/gateway.pb.go index f2509332..9c23f6e9 100644 --- a/istio.io/api/networking/v1alpha3/gateway.pb.go +++ b/istio.io/api/networking/v1alpha3/gateway.pb.go @@ -1,12 +1,14 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. +// Code generated by protoc-gen-gogo. DO NOT EDIT. // source: networking/v1alpha3/gateway.proto package v1alpha3 -import proto "github.com/golang/protobuf/proto" +import proto "github.com/gogo/protobuf/proto" import fmt "fmt" import math "math" +import io "io" + // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf @@ -44,7 +46,7 @@ func (x Server_TLSOptions_TLSmode) String() string { return proto.EnumName(Server_TLSOptions_TLSmode_name, int32(x)) } func (Server_TLSOptions_TLSmode) EnumDescriptor() ([]byte, []int) { - return fileDescriptor2, []int{1, 0, 0} + return fileDescriptorGateway, []int{1, 0, 0} } // Gateway describes a load balancer operating at the edge of the mesh @@ -174,13 +176,13 @@ type Gateway struct { // on which this gateway configuration should be applied. // If no selectors are provided, the gateway will be implemented by // the default istio-ingress controller. - Selector map[string]string `protobuf:"bytes,2,rep,name=selector" json:"selector,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + Selector map[string]string `protobuf:"bytes,2,rep,name=selector" json:"selector,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` } func (m *Gateway) Reset() { *m = Gateway{} } func (m *Gateway) String() string { return proto.CompactTextString(m) } func (*Gateway) ProtoMessage() {} -func (*Gateway) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{0} } +func (*Gateway) Descriptor() ([]byte, []int) { return fileDescriptorGateway, []int{0} } func (m *Gateway) GetServers() []*Server { if m != nil { @@ -266,7 +268,7 @@ type Server struct { func (m *Server) Reset() { *m = Server{} } func (m *Server) String() string { return proto.CompactTextString(m) } func (*Server) ProtoMessage() {} -func (*Server) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{1} } +func (*Server) Descriptor() ([]byte, []int) { return fileDescriptorGateway, []int{1} } func (m *Server) GetPort() *Port { if m != nil { @@ -292,21 +294,21 @@ func (m *Server) GetTls() *Server_TLSOptions { type Server_TLSOptions struct { // If set to true, the load balancer will send a 302 redirect for all // http connections, asking the clients to use HTTPS. - HttpsRedirect bool `protobuf:"varint,1,opt,name=https_redirect,json=httpsRedirect" json:"https_redirect,omitempty"` + HttpsRedirect bool `protobuf:"varint,1,opt,name=https_redirect,json=httpsRedirect,proto3" json:"https_redirect,omitempty"` // Optional: Indicates whether connections to this port should be // secured using TLS. The value of this field determines how TLS is // enforced. - Mode Server_TLSOptions_TLSmode `protobuf:"varint,2,opt,name=mode,enum=istio.networking.v1alpha3.Server_TLSOptions_TLSmode" json:"mode,omitempty"` + Mode Server_TLSOptions_TLSmode `protobuf:"varint,2,opt,name=mode,proto3,enum=istio.networking.v1alpha3.Server_TLSOptions_TLSmode" json:"mode,omitempty"` // REQUIRED if mode is "simple" or "mutual". The path to the file // holding the server-side TLS certificate to use. - ServerCertificate string `protobuf:"bytes,3,opt,name=server_certificate,json=serverCertificate" json:"server_certificate,omitempty"` + ServerCertificate string `protobuf:"bytes,3,opt,name=server_certificate,json=serverCertificate,proto3" json:"server_certificate,omitempty"` // REQUIRED if mode is "simple" or "mutual". The path to the file // holding the server's private key. - PrivateKey string `protobuf:"bytes,4,opt,name=private_key,json=privateKey" json:"private_key,omitempty"` + PrivateKey string `protobuf:"bytes,4,opt,name=private_key,json=privateKey,proto3" json:"private_key,omitempty"` // REQUIRED if mode is "mutual". The path to a file containing // certificate authority certificates to use in verifying a presented // client side certificate. - CaCertificates string `protobuf:"bytes,5,opt,name=ca_certificates,json=caCertificates" json:"ca_certificates,omitempty"` + CaCertificates string `protobuf:"bytes,5,opt,name=ca_certificates,json=caCertificates,proto3" json:"ca_certificates,omitempty"` // A list of alternate names to verify the subject identity in the // certificate presented by the client. SubjectAltNames []string `protobuf:"bytes,6,rep,name=subject_alt_names,json=subjectAltNames" json:"subject_alt_names,omitempty"` @@ -315,7 +317,7 @@ type Server_TLSOptions struct { func (m *Server_TLSOptions) Reset() { *m = Server_TLSOptions{} } func (m *Server_TLSOptions) String() string { return proto.CompactTextString(m) } func (*Server_TLSOptions) ProtoMessage() {} -func (*Server_TLSOptions) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{1, 0} } +func (*Server_TLSOptions) Descriptor() ([]byte, []int) { return fileDescriptorGateway, []int{1, 0} } func (m *Server_TLSOptions) GetHttpsRedirect() bool { if m != nil { @@ -362,18 +364,18 @@ func (m *Server_TLSOptions) GetSubjectAltNames() []string { // Port describes the properties of a specific port of a service. type Port struct { // REQUIRED: A valid non-negative integer port number. - Number uint32 `protobuf:"varint,1,opt,name=number" json:"number,omitempty"` + Number uint32 `protobuf:"varint,1,opt,name=number,proto3" json:"number,omitempty"` // The protocol exposed on the port. // MUST BE one of HTTP|HTTPS|GRPC|HTTP2|MONGO|TCP. - Protocol string `protobuf:"bytes,2,opt,name=protocol" json:"protocol,omitempty"` + Protocol string `protobuf:"bytes,2,opt,name=protocol,proto3" json:"protocol,omitempty"` // Label assigned to the port. - Name string `protobuf:"bytes,3,opt,name=name" json:"name,omitempty"` + Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` } func (m *Port) Reset() { *m = Port{} } func (m *Port) String() string { return proto.CompactTextString(m) } func (*Port) ProtoMessage() {} -func (*Port) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{2} } +func (*Port) Descriptor() ([]byte, []int) { return fileDescriptorGateway, []int{2} } func (m *Port) GetNumber() uint32 { if m != nil { @@ -403,40 +405,1131 @@ func init() { proto.RegisterType((*Port)(nil), "istio.networking.v1alpha3.Port") proto.RegisterEnum("istio.networking.v1alpha3.Server_TLSOptions_TLSmode", Server_TLSOptions_TLSmode_name, Server_TLSOptions_TLSmode_value) } +func (m *Gateway) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Gateway) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Servers) > 0 { + for _, msg := range m.Servers { + dAtA[i] = 0xa + i++ + i = encodeVarintGateway(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.Selector) > 0 { + for k, _ := range m.Selector { + dAtA[i] = 0x12 + i++ + v := m.Selector[k] + mapSize := 1 + len(k) + sovGateway(uint64(len(k))) + 1 + len(v) + sovGateway(uint64(len(v))) + i = encodeVarintGateway(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintGateway(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x12 + i++ + i = encodeVarintGateway(dAtA, i, uint64(len(v))) + i += copy(dAtA[i:], v) + } + } + return i, nil +} + +func (m *Server) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Server) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Port != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintGateway(dAtA, i, uint64(m.Port.Size())) + n1, err := m.Port.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n1 + } + if len(m.Hosts) > 0 { + for _, s := range m.Hosts { + dAtA[i] = 0x12 + i++ + l = len(s) + for l >= 1<<7 { + dAtA[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + dAtA[i] = uint8(l) + i++ + i += copy(dAtA[i:], s) + } + } + if m.Tls != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintGateway(dAtA, i, uint64(m.Tls.Size())) + n2, err := m.Tls.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n2 + } + return i, nil +} + +func (m *Server_TLSOptions) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Server_TLSOptions) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.HttpsRedirect { + dAtA[i] = 0x8 + i++ + if m.HttpsRedirect { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + if m.Mode != 0 { + dAtA[i] = 0x10 + i++ + i = encodeVarintGateway(dAtA, i, uint64(m.Mode)) + } + if len(m.ServerCertificate) > 0 { + dAtA[i] = 0x1a + i++ + i = encodeVarintGateway(dAtA, i, uint64(len(m.ServerCertificate))) + i += copy(dAtA[i:], m.ServerCertificate) + } + if len(m.PrivateKey) > 0 { + dAtA[i] = 0x22 + i++ + i = encodeVarintGateway(dAtA, i, uint64(len(m.PrivateKey))) + i += copy(dAtA[i:], m.PrivateKey) + } + if len(m.CaCertificates) > 0 { + dAtA[i] = 0x2a + i++ + i = encodeVarintGateway(dAtA, i, uint64(len(m.CaCertificates))) + i += copy(dAtA[i:], m.CaCertificates) + } + if len(m.SubjectAltNames) > 0 { + for _, s := range m.SubjectAltNames { + dAtA[i] = 0x32 + i++ + l = len(s) + for l >= 1<<7 { + dAtA[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + dAtA[i] = uint8(l) + i++ + i += copy(dAtA[i:], s) + } + } + return i, nil +} + +func (m *Port) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Port) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Number != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintGateway(dAtA, i, uint64(m.Number)) + } + if len(m.Protocol) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintGateway(dAtA, i, uint64(len(m.Protocol))) + i += copy(dAtA[i:], m.Protocol) + } + if len(m.Name) > 0 { + dAtA[i] = 0x1a + i++ + i = encodeVarintGateway(dAtA, i, uint64(len(m.Name))) + i += copy(dAtA[i:], m.Name) + } + return i, nil +} + +func encodeVarintGateway(dAtA []byte, offset int, v uint64) int { + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return offset + 1 +} +func (m *Gateway) Size() (n int) { + var l int + _ = l + if len(m.Servers) > 0 { + for _, e := range m.Servers { + l = e.Size() + n += 1 + l + sovGateway(uint64(l)) + } + } + if len(m.Selector) > 0 { + for k, v := range m.Selector { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovGateway(uint64(len(k))) + 1 + len(v) + sovGateway(uint64(len(v))) + n += mapEntrySize + 1 + sovGateway(uint64(mapEntrySize)) + } + } + return n +} + +func (m *Server) Size() (n int) { + var l int + _ = l + if m.Port != nil { + l = m.Port.Size() + n += 1 + l + sovGateway(uint64(l)) + } + if len(m.Hosts) > 0 { + for _, s := range m.Hosts { + l = len(s) + n += 1 + l + sovGateway(uint64(l)) + } + } + if m.Tls != nil { + l = m.Tls.Size() + n += 1 + l + sovGateway(uint64(l)) + } + return n +} + +func (m *Server_TLSOptions) Size() (n int) { + var l int + _ = l + if m.HttpsRedirect { + n += 2 + } + if m.Mode != 0 { + n += 1 + sovGateway(uint64(m.Mode)) + } + l = len(m.ServerCertificate) + if l > 0 { + n += 1 + l + sovGateway(uint64(l)) + } + l = len(m.PrivateKey) + if l > 0 { + n += 1 + l + sovGateway(uint64(l)) + } + l = len(m.CaCertificates) + if l > 0 { + n += 1 + l + sovGateway(uint64(l)) + } + if len(m.SubjectAltNames) > 0 { + for _, s := range m.SubjectAltNames { + l = len(s) + n += 1 + l + sovGateway(uint64(l)) + } + } + return n +} + +func (m *Port) Size() (n int) { + var l int + _ = l + if m.Number != 0 { + n += 1 + sovGateway(uint64(m.Number)) + } + l = len(m.Protocol) + if l > 0 { + n += 1 + l + sovGateway(uint64(l)) + } + l = len(m.Name) + if l > 0 { + n += 1 + l + sovGateway(uint64(l)) + } + return n +} + +func sovGateway(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozGateway(x uint64) (n int) { + return sovGateway(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Gateway) 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 ErrIntOverflowGateway + } + 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: Gateway: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Gateway: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Servers", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGateway + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGateway + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Servers = append(m.Servers, &Server{}) + if err := m.Servers[len(m.Servers)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Selector", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGateway + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGateway + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Selector == nil { + m.Selector = 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 ErrIntOverflowGateway + } + 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 ErrIntOverflowGateway + } + 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 ErrInvalidLengthGateway + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + 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 ErrIntOverflowGateway + } + 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 ErrInvalidLengthGateway + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + } else { + iNdEx = entryPreIndex + skippy, err := skipGateway(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGateway + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Selector[mapkey] = mapvalue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGateway(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGateway + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Server) 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 ErrIntOverflowGateway + } + 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: Server: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Server: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Port", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGateway + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGateway + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Port == nil { + m.Port = &Port{} + } + if err := m.Port.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Hosts", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGateway + } + 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 ErrInvalidLengthGateway + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Hosts = append(m.Hosts, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Tls", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGateway + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGateway + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Tls == nil { + m.Tls = &Server_TLSOptions{} + } + if err := m.Tls.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGateway(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGateway + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Server_TLSOptions) 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 ErrIntOverflowGateway + } + 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: TLSOptions: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TLSOptions: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field HttpsRedirect", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGateway + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.HttpsRedirect = bool(v != 0) + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Mode", wireType) + } + m.Mode = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGateway + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Mode |= (Server_TLSOptions_TLSmode(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ServerCertificate", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGateway + } + 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 ErrInvalidLengthGateway + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ServerCertificate = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PrivateKey", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGateway + } + 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 ErrInvalidLengthGateway + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PrivateKey = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CaCertificates", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGateway + } + 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 ErrInvalidLengthGateway + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.CaCertificates = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SubjectAltNames", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGateway + } + 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 ErrInvalidLengthGateway + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SubjectAltNames = append(m.SubjectAltNames, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGateway(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGateway + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Port) 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 ErrIntOverflowGateway + } + 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: Port: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Port: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Number", wireType) + } + m.Number = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGateway + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Number |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Protocol", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGateway + } + 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 ErrInvalidLengthGateway + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Protocol = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGateway + } + 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 ErrInvalidLengthGateway + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGateway(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGateway + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipGateway(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, ErrIntOverflowGateway + } + 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, ErrIntOverflowGateway + } + 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, ErrIntOverflowGateway + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + iNdEx += length + if length < 0 { + return 0, ErrInvalidLengthGateway + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGateway + } + 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 := skipGateway(dAtA[start:]) + if err != nil { + return 0, err + } + iNdEx = start + next + } + 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 ( + ErrInvalidLengthGateway = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGateway = fmt.Errorf("proto: integer overflow") +) + +func init() { proto.RegisterFile("networking/v1alpha3/gateway.proto", fileDescriptorGateway) } -func init() { proto.RegisterFile("networking/v1alpha3/gateway.proto", fileDescriptor2) } - -var fileDescriptor2 = []byte{ - // 493 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x53, 0x5f, 0x6f, 0xd3, 0x3e, - 0x14, 0xfd, 0xa5, 0xed, 0xd2, 0xf6, 0x56, 0xfd, 0xb3, 0xab, 0x9f, 0x50, 0xe8, 0xcb, 0xba, 0x48, - 0x88, 0x09, 0x41, 0x0a, 0x2d, 0x0f, 0x88, 0x49, 0x48, 0x05, 0x4d, 0x2b, 0xa2, 0xdb, 0x2a, 0xa7, - 0x7d, 0xe1, 0x25, 0x72, 0x33, 0xb3, 0x9a, 0xa5, 0x71, 0x64, 0xbb, 0x9d, 0xfa, 0x31, 0x79, 0xe1, - 0x53, 0xf0, 0x21, 0x90, 0x9d, 0x6c, 0x1d, 0x12, 0x0c, 0xf1, 0x76, 0xef, 0xb9, 0xe7, 0x9c, 0x5c, - 0x1f, 0xc7, 0x70, 0x98, 0x32, 0x7d, 0x23, 0xe4, 0x35, 0x4f, 0xaf, 0xfa, 0x9b, 0x57, 0x34, 0xc9, - 0x96, 0x74, 0xd8, 0xbf, 0xa2, 0x9a, 0xdd, 0xd0, 0x6d, 0x90, 0x49, 0xa1, 0x05, 0x3e, 0xe6, 0x4a, - 0x73, 0x11, 0xec, 0x88, 0xc1, 0x2d, 0xd1, 0xff, 0xe6, 0x40, 0xf5, 0x34, 0x27, 0xe3, 0x31, 0x54, - 0x15, 0x93, 0x1b, 0x26, 0x95, 0xe7, 0xf4, 0xca, 0x47, 0x8d, 0xc1, 0x61, 0xf0, 0x47, 0x61, 0x10, - 0x5a, 0x26, 0xb9, 0x55, 0xe0, 0x04, 0x6a, 0x8a, 0x25, 0x2c, 0xd6, 0x42, 0x7a, 0x25, 0xab, 0x7e, - 0xf9, 0x80, 0xba, 0xf8, 0x64, 0x10, 0x16, 0x92, 0x93, 0x54, 0xcb, 0x2d, 0xb9, 0x73, 0xe8, 0x1e, - 0x43, 0xf3, 0x97, 0x11, 0x76, 0xa0, 0x7c, 0xcd, 0xb6, 0x9e, 0xd3, 0x73, 0x8e, 0xea, 0xc4, 0x94, - 0xf8, 0x3f, 0xec, 0x6d, 0x68, 0xb2, 0x66, 0x5e, 0xc9, 0x62, 0x79, 0xf3, 0xb6, 0xf4, 0xc6, 0xf1, - 0x7f, 0x94, 0xc1, 0xcd, 0xd7, 0xc3, 0x21, 0x54, 0x32, 0x21, 0xb5, 0xd5, 0x35, 0x06, 0x07, 0x0f, - 0x6c, 0x34, 0x15, 0x52, 0x13, 0x4b, 0x36, 0xce, 0x4b, 0xa1, 0xb4, 0xb2, 0xe7, 0xa8, 0x93, 0xbc, - 0xc1, 0x77, 0x50, 0xd6, 0x89, 0xf2, 0xca, 0xd6, 0xe9, 0xf9, 0x5f, 0x93, 0x09, 0x66, 0x93, 0xf0, - 0x22, 0xd3, 0x5c, 0xa4, 0x8a, 0x18, 0x61, 0xf7, 0x7b, 0x09, 0x60, 0x87, 0xe1, 0x13, 0x68, 0x2d, - 0xb5, 0xce, 0x54, 0x24, 0xd9, 0x25, 0x97, 0x2c, 0xce, 0x77, 0xac, 0x91, 0xa6, 0x45, 0x49, 0x01, - 0xe2, 0x18, 0x2a, 0x2b, 0x71, 0x99, 0x1f, 0xb2, 0x35, 0x78, 0xfd, 0x2f, 0x9f, 0x35, 0xa5, 0xd1, -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xc7, 0x36, 0x87, 0xdf, 0x7d, 0x03, 0x00, 0x00, +var fileDescriptorGateway = []byte{ + // 507 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x53, 0xcf, 0x6f, 0x12, 0x41, + 0x14, 0x76, 0x81, 0xf2, 0xe3, 0x11, 0x7e, 0xf4, 0xc5, 0x98, 0x95, 0x03, 0xa5, 0x24, 0xc6, 0xc6, + 0xe8, 0xa2, 0xe0, 0xc1, 0xd8, 0xc4, 0x04, 0x4d, 0x53, 0x8c, 0xb4, 0x25, 0xb3, 0x70, 0xf1, 0x42, + 0x86, 0xed, 0x58, 0xc6, 0x2e, 0x3b, 0x9b, 0x99, 0x81, 0x86, 0xff, 0xd0, 0xa3, 0x5e, 0x3c, 0x1b, + 0xce, 0xfe, 0x11, 0x66, 0x66, 0xb7, 0xa5, 0x26, 0x5a, 0xe3, 0xed, 0xbd, 0xef, 0x7d, 0xdf, 0xb7, + 0x6f, 0xbe, 0xd9, 0x81, 0xfd, 0x88, 0xe9, 0x2b, 0x21, 0x2f, 0x79, 0x74, 0xd1, 0x59, 0xbd, 0xa0, + 0x61, 0x3c, 0xa7, 0xbd, 0xce, 0x05, 0xd5, 0xec, 0x8a, 0xae, 0xbd, 0x58, 0x0a, 0x2d, 0xf0, 0x21, + 0x57, 0x9a, 0x0b, 0x6f, 0x4b, 0xf4, 0xae, 0x89, 0xed, 0x6f, 0x0e, 0x14, 0x8e, 0x13, 0x32, 0x1e, + 0x42, 0x41, 0x31, 0xb9, 0x62, 0x52, 0xb9, 0x4e, 0x2b, 0x7b, 0x50, 0xee, 0xee, 0x7b, 0x7f, 0x15, + 0x7a, 0xbe, 0x65, 0x92, 0x6b, 0x05, 0x0e, 0xa1, 0xa8, 0x58, 0xc8, 0x02, 0x2d, 0xa4, 0x9b, 0xb1, + 0xea, 0xe7, 0x77, 0xa8, 0xd3, 0x4f, 0x7a, 0x7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x18, 0x6a, 0x01, + 0xbd, 0xed, 0xa5, 0xdc, 0x1d, 0x4b, 0xaa, 0x06, 0xf4, 0x96, 0x91, 0xc2, 0x27, 0xb0, 0xab, 0x96, + 0xb3, 0xcf, 0x2c, 0xd0, 0x53, 0x1a, 0xea, 0x69, 0x44, 0x17, 0x4c, 0xb9, 0x79, 0x1b, 0x6d, 0x2d, + 0x1d, 0xf4, 0x43, 0x7d, 0x6a, 0xe0, 0x76, 0x17, 0x0a, 0xe9, 0xd6, 0x58, 0x83, 0xf2, 0xa8, 0xef, + 0xfb, 0xe3, 0x01, 0x39, 0x9b, 0x1c, 0x0f, 0xea, 0xf7, 0x10, 0x20, 0xef, 0xbf, 0x3f, 0x19, 0x0d, + 0x8f, 0xea, 0x8e, 0xa9, 0x4f, 0x26, 0xe3, 0x49, 0x7f, 0x58, 0xcf, 0xb4, 0x4f, 0x21, 0x67, 0x2e, + 0x0f, 0x1f, 0x40, 0x3e, 0x5a, 0x2e, 0x66, 0x4c, 0xda, 0x24, 0x2b, 0x24, 0xed, 0xb0, 0x01, 0x45, + 0xfb, 0x0c, 0x02, 0x11, 0xa6, 0xff, 0xca, 0x4d, 0x8f, 0x08, 0x39, 0xb3, 0x4f, 0x1a, 0x83, 0xad, + 0xdf, 0x7a, 0x5f, 0x36, 0x4d, 0xe7, 0xeb, 0xa6, 0xe9, 0xfc, 0xd8, 0x34, 0x9d, 0x8f, 0xad, 0x24, + 0x71, 0x2e, 0x3a, 0x34, 0xe6, 0x9d, 0x3f, 0xbc, 0xb5, 0x59, 0xde, 0xba, 0xf5, 0x7e, 0x05, 0x00, + 0x00, 0xff, 0xff, 0xc7, 0x7e, 0x45, 0x9e, 0x89, 0x03, 0x00, 0x00, } diff --git a/istio.io/api/networking/v1alpha3/virtual_service.pb.go b/istio.io/api/networking/v1alpha3/virtual_service.pb.go index 50d3d077..00760da1 100644 --- a/istio.io/api/networking/v1alpha3/virtual_service.pb.go +++ b/istio.io/api/networking/v1alpha3/virtual_service.pb.go @@ -1,13 +1,15 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. +// Code generated by protoc-gen-gogo. DO NOT EDIT. // source: networking/v1alpha3/virtual_service.proto package v1alpha3 -import proto "github.com/golang/protobuf/proto" +import proto "github.com/gogo/protobuf/proto" import fmt "fmt" import math "math" -import google_protobuf "github.com/golang/protobuf/ptypes/duration" -import google_protobuf1 "github.com/golang/protobuf/ptypes/wrappers" +import google_protobuf "github.com/gogo/protobuf/types" +import google_protobuf1 "github.com/gogo/protobuf/types" + +import io "io" // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal @@ -123,7 +125,7 @@ type VirtualService struct { func (m *VirtualService) Reset() { *m = VirtualService{} } func (m *VirtualService) String() string { return proto.CompactTextString(m) } func (*VirtualService) ProtoMessage() {} -func (*VirtualService) Descriptor() ([]byte, []int) { return fileDescriptor3, []int{0} } +func (*VirtualService) Descriptor() ([]byte, []int) { return fileDescriptorVirtualService, []int{0} } func (m *VirtualService) GetHosts() []string { if m != nil { @@ -270,11 +272,11 @@ type Destination struct { // fails, "reviews" is treated as an external service, such that the sidecar // will dynamically resolve the DNS of the service name and route the request // to the IP addresses returned by the DNS. - Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // The name of a subset within the service. Applicable only to services // within the mesh. The subset must be defined in a corresponding // DestinationRule. - Subset string `protobuf:"bytes,2,opt,name=subset" json:"subset,omitempty"` + Subset string `protobuf:"bytes,2,opt,name=subset,proto3" json:"subset,omitempty"` // Specifies the port on the destination. Many services only expose a // single port or label ports with the protocols they support, in these // cases it is not required to explicitly select the port. Note that @@ -290,7 +292,7 @@ type Destination struct { func (m *Destination) Reset() { *m = Destination{} } func (m *Destination) String() string { return proto.CompactTextString(m) } func (*Destination) ProtoMessage() {} -func (*Destination) Descriptor() ([]byte, []int) { return fileDescriptor3, []int{1} } +func (*Destination) Descriptor() ([]byte, []int) { return fileDescriptorVirtualService, []int{1} } func (m *Destination) GetName() string { if m != nil { @@ -341,7 +343,7 @@ type HTTPRoute struct { // upgrade headers. Otherwise, the request will be rejected. Note that // Websocket allows secondary protocol negotiation which may then be // subject to further routing rules based on the protocol selected. - WebsocketUpgrade bool `protobuf:"varint,5,opt,name=websocket_upgrade,json=websocketUpgrade" json:"websocket_upgrade,omitempty"` + WebsocketUpgrade bool `protobuf:"varint,5,opt,name=websocket_upgrade,json=websocketUpgrade,proto3" json:"websocket_upgrade,omitempty"` // Timeout for HTTP requests. Timeout *google_protobuf.Duration `protobuf:"bytes,6,opt,name=timeout" json:"timeout,omitempty"` // Retry policy for HTTP requests. @@ -362,13 +364,13 @@ type HTTPRoute struct { CorsPolicy *CorsPolicy `protobuf:"bytes,10,opt,name=cors_policy,json=corsPolicy" json:"cors_policy,omitempty"` // Additional HTTP headers to add before forwarding a request to the // destination service. - AppendHeaders map[string]string `protobuf:"bytes,11,rep,name=append_headers,json=appendHeaders" json:"append_headers,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + AppendHeaders map[string]string `protobuf:"bytes,11,rep,name=append_headers,json=appendHeaders" json:"append_headers,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` } func (m *HTTPRoute) Reset() { *m = HTTPRoute{} } func (m *HTTPRoute) String() string { return proto.CompactTextString(m) } func (*HTTPRoute) ProtoMessage() {} -func (*HTTPRoute) Descriptor() ([]byte, []int) { return fileDescriptor3, []int{2} } +func (*HTTPRoute) Descriptor() ([]byte, []int) { return fileDescriptorVirtualService, []int{2} } func (m *HTTPRoute) GetMatch() []*HTTPMatchRequest { if m != nil { @@ -483,7 +485,7 @@ type TCPRoute struct { func (m *TCPRoute) Reset() { *m = TCPRoute{} } func (m *TCPRoute) String() string { return proto.CompactTextString(m) } func (*TCPRoute) ProtoMessage() {} -func (*TCPRoute) Descriptor() ([]byte, []int) { return fileDescriptor3, []int{3} } +func (*TCPRoute) Descriptor() ([]byte, []int) { return fileDescriptorVirtualService, []int{3} } func (m *TCPRoute) GetMatch() []*L4MatchAttributes { if m != nil { @@ -577,7 +579,7 @@ type HTTPMatchRequest struct { // *regex: "value"* for ECMAscript style regex-based match // // *Note:* The keys _uri_, _scheme_, _method_, and _authority_ will be ignored. - Headers map[string]*StringMatch `protobuf:"bytes,5,rep,name=headers" json:"headers,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + Headers map[string]*StringMatch `protobuf:"bytes,5,rep,name=headers" json:"headers,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` // Specifies the ports on the host that is being addressed. Many services // only expose a single port or label ports with the protocols they support, // in these cases it is not required to explicitly select the port. Note that @@ -591,7 +593,7 @@ type HTTPMatchRequest struct { // workloads with the given labels. If the VirtualService has a list of // gateways specified at the top, it should include the reserved gateway // "mesh" in order for this field to be applicable. - SourceLabels map[string]string `protobuf:"bytes,7,rep,name=source_labels,json=sourceLabels" json:"source_labels,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + SourceLabels map[string]string `protobuf:"bytes,7,rep,name=source_labels,json=sourceLabels" json:"source_labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` // Names of gateways where the rule should be applied to. Gateway names // at the top of the VirtualService (if any) are overridden. The gateway match is // independent of sourceLabels. @@ -601,7 +603,7 @@ type HTTPMatchRequest struct { func (m *HTTPMatchRequest) Reset() { *m = HTTPMatchRequest{} } func (m *HTTPMatchRequest) String() string { return proto.CompactTextString(m) } func (*HTTPMatchRequest) ProtoMessage() {} -func (*HTTPMatchRequest) Descriptor() ([]byte, []int) { return fileDescriptor3, []int{4} } +func (*HTTPMatchRequest) Descriptor() ([]byte, []int) { return fileDescriptorVirtualService, []int{4} } func (m *HTTPMatchRequest) GetUri() *StringMatch { if m != nil { @@ -708,13 +710,13 @@ type DestinationWeight struct { // version. (0-100). Sum of weights across destinations SHOULD BE == 100. // If there is only destination in a rule, the weight value is assumed to // be 100. - Weight int32 `protobuf:"varint,2,opt,name=weight" json:"weight,omitempty"` + Weight int32 `protobuf:"varint,2,opt,name=weight,proto3" json:"weight,omitempty"` } func (m *DestinationWeight) Reset() { *m = DestinationWeight{} } func (m *DestinationWeight) String() string { return proto.CompactTextString(m) } func (*DestinationWeight) ProtoMessage() {} -func (*DestinationWeight) Descriptor() ([]byte, []int) { return fileDescriptor3, []int{5} } +func (*DestinationWeight) Descriptor() ([]byte, []int) { return fileDescriptorVirtualService, []int{5} } func (m *DestinationWeight) GetDestination() *Destination { if m != nil { @@ -737,7 +739,7 @@ type L4MatchAttributes struct { // a.b.c.d/xx form or just a.b.c.d. This is only valid when the // destination service has several IPs and the application explicitly // specifies a particular IP. - DestinationSubnet string `protobuf:"bytes,1,opt,name=destination_subnet,json=destinationSubnet" json:"destination_subnet,omitempty"` + DestinationSubnet string `protobuf:"bytes,1,opt,name=destination_subnet,json=destinationSubnet,proto3" json:"destination_subnet,omitempty"` // Specifies the port on the host that is being addressed. Many services // only expose a single port or label ports with the protocols they support, // in these cases it is not required to explicitly select the port. Note that @@ -749,12 +751,12 @@ type L4MatchAttributes struct { Port *PortSelector `protobuf:"bytes,2,opt,name=port" json:"port,omitempty"` // IPv4 or IPv6 ip address of source with optional subnet. E.g., a.b.c.d/xx // form or just a.b.c.d - SourceSubnet string `protobuf:"bytes,3,opt,name=source_subnet,json=sourceSubnet" json:"source_subnet,omitempty"` + SourceSubnet string `protobuf:"bytes,3,opt,name=source_subnet,json=sourceSubnet,proto3" json:"source_subnet,omitempty"` // One or more labels that constrain the applicability of a rule to // workloads with the given labels. If the VirtualService has a list of // gateways specified at the top, it should include the reserved gateway // "mesh" in order for this field to be applicable. - SourceLabels map[string]string `protobuf:"bytes,4,rep,name=source_labels,json=sourceLabels" json:"source_labels,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + SourceLabels map[string]string `protobuf:"bytes,4,rep,name=source_labels,json=sourceLabels" json:"source_labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` // Names of gateways where the rule should be applied to. Gateway names // at the top of the VirtualService (if any) are overridden. The gateway match is // independent of sourceLabels. @@ -764,7 +766,7 @@ type L4MatchAttributes struct { func (m *L4MatchAttributes) Reset() { *m = L4MatchAttributes{} } func (m *L4MatchAttributes) String() string { return proto.CompactTextString(m) } func (*L4MatchAttributes) ProtoMessage() {} -func (*L4MatchAttributes) Descriptor() ([]byte, []int) { return fileDescriptor3, []int{6} } +func (*L4MatchAttributes) Descriptor() ([]byte, []int) { return fileDescriptorVirtualService, []int{6} } func (m *L4MatchAttributes) GetDestinationSubnet() string { if m != nil { @@ -827,16 +829,16 @@ type HTTPRedirect struct { // On a redirect, overwrite the Path portion of the URL with this // value. Note that the entire path will be replaced, irrespective of the // request URI being matched as an exact path or prefix. - Uri string `protobuf:"bytes,1,opt,name=uri" json:"uri,omitempty"` + Uri string `protobuf:"bytes,1,opt,name=uri,proto3" json:"uri,omitempty"` // On a redirect, overwrite the Authority/Host portion of the URL with // this value. - Authority string `protobuf:"bytes,2,opt,name=authority" json:"authority,omitempty"` + Authority string `protobuf:"bytes,2,opt,name=authority,proto3" json:"authority,omitempty"` } func (m *HTTPRedirect) Reset() { *m = HTTPRedirect{} } func (m *HTTPRedirect) String() string { return proto.CompactTextString(m) } func (*HTTPRedirect) ProtoMessage() {} -func (*HTTPRedirect) Descriptor() ([]byte, []int) { return fileDescriptor3, []int{7} } +func (*HTTPRedirect) Descriptor() ([]byte, []int) { return fileDescriptorVirtualService, []int{7} } func (m *HTTPRedirect) GetUri() string { if m != nil { @@ -880,15 +882,15 @@ type HTTPRewrite struct { // rewrite the path (or the prefix) portion of the URI with this // value. If the original URI was matched based on prefix, the value // provided in this field will replace the corresponding matched prefix. - Uri string `protobuf:"bytes,1,opt,name=uri" json:"uri,omitempty"` + Uri string `protobuf:"bytes,1,opt,name=uri,proto3" json:"uri,omitempty"` // rewrite the Authority/Host header with this value. - Authority string `protobuf:"bytes,2,opt,name=authority" json:"authority,omitempty"` + Authority string `protobuf:"bytes,2,opt,name=authority,proto3" json:"authority,omitempty"` } func (m *HTTPRewrite) Reset() { *m = HTTPRewrite{} } func (m *HTTPRewrite) String() string { return proto.CompactTextString(m) } func (*HTTPRewrite) ProtoMessage() {} -func (*HTTPRewrite) Descriptor() ([]byte, []int) { return fileDescriptor3, []int{8} } +func (*HTTPRewrite) Descriptor() ([]byte, []int) { return fileDescriptorVirtualService, []int{8} } func (m *HTTPRewrite) GetUri() string { if m != nil { @@ -917,20 +919,22 @@ type StringMatch struct { func (m *StringMatch) Reset() { *m = StringMatch{} } func (m *StringMatch) String() string { return proto.CompactTextString(m) } func (*StringMatch) ProtoMessage() {} -func (*StringMatch) Descriptor() ([]byte, []int) { return fileDescriptor3, []int{9} } +func (*StringMatch) Descriptor() ([]byte, []int) { return fileDescriptorVirtualService, []int{9} } type isStringMatch_MatchType interface { isStringMatch_MatchType() + MarshalTo([]byte) (int, error) + Size() int } type StringMatch_Exact struct { - Exact string `protobuf:"bytes,1,opt,name=exact,oneof"` + Exact string `protobuf:"bytes,1,opt,name=exact,proto3,oneof"` } type StringMatch_Prefix struct { - Prefix string `protobuf:"bytes,2,opt,name=prefix,oneof"` + Prefix string `protobuf:"bytes,2,opt,name=prefix,proto3,oneof"` } type StringMatch_Regex struct { - Regex string `protobuf:"bytes,3,opt,name=regex,oneof"` + Regex string `protobuf:"bytes,3,opt,name=regex,proto3,oneof"` } func (*StringMatch_Exact) isStringMatch_MatchType() {} @@ -979,14 +983,14 @@ func _StringMatch_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { // match_type switch x := m.MatchType.(type) { case *StringMatch_Exact: - b.EncodeVarint(1<<3 | proto.WireBytes) - b.EncodeStringBytes(x.Exact) + _ = b.EncodeVarint(1<<3 | proto.WireBytes) + _ = b.EncodeStringBytes(x.Exact) case *StringMatch_Prefix: - b.EncodeVarint(2<<3 | proto.WireBytes) - b.EncodeStringBytes(x.Prefix) + _ = b.EncodeVarint(2<<3 | proto.WireBytes) + _ = b.EncodeStringBytes(x.Prefix) case *StringMatch_Regex: - b.EncodeVarint(3<<3 | proto.WireBytes) - b.EncodeStringBytes(x.Regex) + _ = b.EncodeVarint(3<<3 | proto.WireBytes) + _ = b.EncodeStringBytes(x.Regex) case nil: default: return fmt.Errorf("StringMatch.MatchType has unexpected type %T", x) @@ -1070,7 +1074,7 @@ type HTTPRetry struct { // REQUIRED. Number of retries for a given request. The interval // between retries will be determined automatically (25ms+). Actual // number of retries attempted depends on the httpReqTimeout. - Attempts int32 `protobuf:"varint,1,opt,name=attempts" json:"attempts,omitempty"` + Attempts int32 `protobuf:"varint,1,opt,name=attempts,proto3" json:"attempts,omitempty"` // Timeout per retry attempt for a given request. format: 1h/1m/1s/1ms. MUST BE >=1ms. PerTryTimeout *google_protobuf.Duration `protobuf:"bytes,2,opt,name=per_try_timeout,json=perTryTimeout" json:"per_try_timeout,omitempty"` } @@ -1078,7 +1082,7 @@ type HTTPRetry struct { func (m *HTTPRetry) Reset() { *m = HTTPRetry{} } func (m *HTTPRetry) String() string { return proto.CompactTextString(m) } func (*HTTPRetry) ProtoMessage() {} -func (*HTTPRetry) Descriptor() ([]byte, []int) { return fileDescriptor3, []int{10} } +func (*HTTPRetry) Descriptor() ([]byte, []int) { return fileDescriptorVirtualService, []int{10} } func (m *HTTPRetry) GetAttempts() int32 { if m != nil { @@ -1152,7 +1156,7 @@ type CorsPolicy struct { func (m *CorsPolicy) Reset() { *m = CorsPolicy{} } func (m *CorsPolicy) String() string { return proto.CompactTextString(m) } func (*CorsPolicy) ProtoMessage() {} -func (*CorsPolicy) Descriptor() ([]byte, []int) { return fileDescriptor3, []int{11} } +func (*CorsPolicy) Descriptor() ([]byte, []int) { return fileDescriptorVirtualService, []int{11} } func (m *CorsPolicy) GetAllowOrigin() []string { if m != nil { @@ -1214,10 +1218,12 @@ type HTTPFaultInjection struct { Abort *HTTPFaultInjection_Abort `protobuf:"bytes,2,opt,name=abort" json:"abort,omitempty"` } -func (m *HTTPFaultInjection) Reset() { *m = HTTPFaultInjection{} } -func (m *HTTPFaultInjection) String() string { return proto.CompactTextString(m) } -func (*HTTPFaultInjection) ProtoMessage() {} -func (*HTTPFaultInjection) Descriptor() ([]byte, []int) { return fileDescriptor3, []int{12} } +func (m *HTTPFaultInjection) Reset() { *m = HTTPFaultInjection{} } +func (m *HTTPFaultInjection) String() string { return proto.CompactTextString(m) } +func (*HTTPFaultInjection) ProtoMessage() {} +func (*HTTPFaultInjection) Descriptor() ([]byte, []int) { + return fileDescriptorVirtualService, []int{12} +} func (m *HTTPFaultInjection) GetDelay() *HTTPFaultInjection_Delay { if m != nil { @@ -1264,20 +1270,24 @@ func (m *HTTPFaultInjection) GetAbort() *HTTPFaultInjection_Abort { // unspecified, all request will be delayed. type HTTPFaultInjection_Delay struct { // Percentage of requests on which the delay will be injected (0-100). - Percent int32 `protobuf:"varint,1,opt,name=percent" json:"percent,omitempty"` + Percent int32 `protobuf:"varint,1,opt,name=percent,proto3" json:"percent,omitempty"` // Types that are valid to be assigned to HttpDelayType: // *HTTPFaultInjection_Delay_FixedDelay // *HTTPFaultInjection_Delay_ExponentialDelay HttpDelayType isHTTPFaultInjection_Delay_HttpDelayType `protobuf_oneof:"http_delay_type"` } -func (m *HTTPFaultInjection_Delay) Reset() { *m = HTTPFaultInjection_Delay{} } -func (m *HTTPFaultInjection_Delay) String() string { return proto.CompactTextString(m) } -func (*HTTPFaultInjection_Delay) ProtoMessage() {} -func (*HTTPFaultInjection_Delay) Descriptor() ([]byte, []int) { return fileDescriptor3, []int{12, 0} } +func (m *HTTPFaultInjection_Delay) Reset() { *m = HTTPFaultInjection_Delay{} } +func (m *HTTPFaultInjection_Delay) String() string { return proto.CompactTextString(m) } +func (*HTTPFaultInjection_Delay) ProtoMessage() {} +func (*HTTPFaultInjection_Delay) Descriptor() ([]byte, []int) { + return fileDescriptorVirtualService, []int{12, 0} +} type isHTTPFaultInjection_Delay_HttpDelayType interface { isHTTPFaultInjection_Delay_HttpDelayType() + MarshalTo([]byte) (int, error) + Size() int } type HTTPFaultInjection_Delay_FixedDelay struct { @@ -1331,12 +1341,12 @@ func _HTTPFaultInjection_Delay_OneofMarshaler(msg proto.Message, b *proto.Buffer // http_delay_type switch x := m.HttpDelayType.(type) { case *HTTPFaultInjection_Delay_FixedDelay: - b.EncodeVarint(2<<3 | proto.WireBytes) + _ = b.EncodeVarint(2<<3 | proto.WireBytes) if err := b.EncodeMessage(x.FixedDelay); err != nil { return err } case *HTTPFaultInjection_Delay_ExponentialDelay: - b.EncodeVarint(3<<3 | proto.WireBytes) + _ = b.EncodeVarint(3<<3 | proto.WireBytes) if err := b.EncodeMessage(x.ExponentialDelay); err != nil { return err } @@ -1419,7 +1429,7 @@ func _HTTPFaultInjection_Delay_OneofSizer(msg proto.Message) (n int) { // not specified, all requests are aborted. type HTTPFaultInjection_Abort struct { // Percentage of requests to be aborted with the error code provided (0-100). - Percent int32 `protobuf:"varint,1,opt,name=percent" json:"percent,omitempty"` + Percent int32 `protobuf:"varint,1,opt,name=percent,proto3" json:"percent,omitempty"` // Types that are valid to be assigned to ErrorType: // *HTTPFaultInjection_Abort_HttpStatus // *HTTPFaultInjection_Abort_GrpcStatus @@ -1427,23 +1437,27 @@ type HTTPFaultInjection_Abort struct { ErrorType isHTTPFaultInjection_Abort_ErrorType `protobuf_oneof:"error_type"` } -func (m *HTTPFaultInjection_Abort) Reset() { *m = HTTPFaultInjection_Abort{} } -func (m *HTTPFaultInjection_Abort) String() string { return proto.CompactTextString(m) } -func (*HTTPFaultInjection_Abort) ProtoMessage() {} -func (*HTTPFaultInjection_Abort) Descriptor() ([]byte, []int) { return fileDescriptor3, []int{12, 1} } +func (m *HTTPFaultInjection_Abort) Reset() { *m = HTTPFaultInjection_Abort{} } +func (m *HTTPFaultInjection_Abort) String() string { return proto.CompactTextString(m) } +func (*HTTPFaultInjection_Abort) ProtoMessage() {} +func (*HTTPFaultInjection_Abort) Descriptor() ([]byte, []int) { + return fileDescriptorVirtualService, []int{12, 1} +} type isHTTPFaultInjection_Abort_ErrorType interface { isHTTPFaultInjection_Abort_ErrorType() + MarshalTo([]byte) (int, error) + Size() int } type HTTPFaultInjection_Abort_HttpStatus struct { - HttpStatus int32 `protobuf:"varint,2,opt,name=http_status,json=httpStatus,oneof"` + HttpStatus int32 `protobuf:"varint,2,opt,name=http_status,json=httpStatus,proto3,oneof"` } type HTTPFaultInjection_Abort_GrpcStatus struct { - GrpcStatus string `protobuf:"bytes,3,opt,name=grpc_status,json=grpcStatus,oneof"` + GrpcStatus string `protobuf:"bytes,3,opt,name=grpc_status,json=grpcStatus,proto3,oneof"` } type HTTPFaultInjection_Abort_Http2Error struct { - Http2Error string `protobuf:"bytes,4,opt,name=http2_error,json=http2Error,oneof"` + Http2Error string `protobuf:"bytes,4,opt,name=http2_error,json=http2Error,proto3,oneof"` } func (*HTTPFaultInjection_Abort_HttpStatus) isHTTPFaultInjection_Abort_ErrorType() {} @@ -1499,14 +1513,14 @@ func _HTTPFaultInjection_Abort_OneofMarshaler(msg proto.Message, b *proto.Buffer // error_type switch x := m.ErrorType.(type) { case *HTTPFaultInjection_Abort_HttpStatus: - b.EncodeVarint(2<<3 | proto.WireVarint) - b.EncodeVarint(uint64(x.HttpStatus)) + _ = b.EncodeVarint(2<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.HttpStatus)) case *HTTPFaultInjection_Abort_GrpcStatus: - b.EncodeVarint(3<<3 | proto.WireBytes) - b.EncodeStringBytes(x.GrpcStatus) + _ = b.EncodeVarint(3<<3 | proto.WireBytes) + _ = b.EncodeStringBytes(x.GrpcStatus) case *HTTPFaultInjection_Abort_Http2Error: - b.EncodeVarint(4<<3 | proto.WireBytes) - b.EncodeStringBytes(x.Http2Error) + _ = b.EncodeVarint(4<<3 | proto.WireBytes) + _ = b.EncodeStringBytes(x.Http2Error) case nil: default: return fmt.Errorf("HTTPFaultInjection_Abort.ErrorType has unexpected type %T", x) @@ -1577,17 +1591,19 @@ type PortSelector struct { func (m *PortSelector) Reset() { *m = PortSelector{} } func (m *PortSelector) String() string { return proto.CompactTextString(m) } func (*PortSelector) ProtoMessage() {} -func (*PortSelector) Descriptor() ([]byte, []int) { return fileDescriptor3, []int{13} } +func (*PortSelector) Descriptor() ([]byte, []int) { return fileDescriptorVirtualService, []int{13} } type isPortSelector_Port interface { isPortSelector_Port() + MarshalTo([]byte) (int, error) + Size() int } type PortSelector_Number struct { - Number uint32 `protobuf:"varint,1,opt,name=number,oneof"` + Number uint32 `protobuf:"varint,1,opt,name=number,proto3,oneof"` } type PortSelector_Name struct { - Name string `protobuf:"bytes,2,opt,name=name,oneof"` + Name string `protobuf:"bytes,2,opt,name=name,proto3,oneof"` } func (*PortSelector_Number) isPortSelector_Port() {} @@ -1627,11 +1643,11 @@ func _PortSelector_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { // port switch x := m.Port.(type) { case *PortSelector_Number: - b.EncodeVarint(1<<3 | proto.WireVarint) - b.EncodeVarint(uint64(x.Number)) + _ = b.EncodeVarint(1<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Number)) case *PortSelector_Name: - b.EncodeVarint(2<<3 | proto.WireBytes) - b.EncodeStringBytes(x.Name) + _ = b.EncodeVarint(2<<3 | proto.WireBytes) + _ = b.EncodeStringBytes(x.Name) case nil: default: return fmt.Errorf("PortSelector.Port has unexpected type %T", x) @@ -1697,91 +1713,4565 @@ func init() { proto.RegisterType((*HTTPFaultInjection_Abort)(nil), "istio.networking.v1alpha3.HTTPFaultInjection.Abort") proto.RegisterType((*PortSelector)(nil), "istio.networking.v1alpha3.PortSelector") } +func (m *VirtualService) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *VirtualService) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Hosts) > 0 { + for _, s := range m.Hosts { + dAtA[i] = 0xa + i++ + l = len(s) + for l >= 1<<7 { + dAtA[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + dAtA[i] = uint8(l) + i++ + i += copy(dAtA[i:], s) + } + } + if len(m.Gateways) > 0 { + for _, s := range m.Gateways { + dAtA[i] = 0x12 + i++ + l = len(s) + for l >= 1<<7 { + dAtA[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + dAtA[i] = uint8(l) + i++ + i += copy(dAtA[i:], s) + } + } + if len(m.Http) > 0 { + for _, msg := range m.Http { + dAtA[i] = 0x1a + i++ + i = encodeVarintVirtualService(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.Tcp) > 0 { + for _, msg := range m.Tcp { + dAtA[i] = 0x22 + i++ + i = encodeVarintVirtualService(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + return i, nil +} + +func (m *Destination) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Destination) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Name) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintVirtualService(dAtA, i, uint64(len(m.Name))) + i += copy(dAtA[i:], m.Name) + } + if len(m.Subset) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintVirtualService(dAtA, i, uint64(len(m.Subset))) + i += copy(dAtA[i:], m.Subset) + } + if m.Port != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintVirtualService(dAtA, i, uint64(m.Port.Size())) + n1, err := m.Port.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n1 + } + return i, nil +} + +func (m *HTTPRoute) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *HTTPRoute) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Match) > 0 { + for _, msg := range m.Match { + dAtA[i] = 0xa + i++ + i = encodeVarintVirtualService(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.Route) > 0 { + for _, msg := range m.Route { + dAtA[i] = 0x12 + i++ + i = encodeVarintVirtualService(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.Redirect != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintVirtualService(dAtA, i, uint64(m.Redirect.Size())) + n2, err := m.Redirect.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n2 + } + if m.Rewrite != nil { + dAtA[i] = 0x22 + i++ + i = encodeVarintVirtualService(dAtA, i, uint64(m.Rewrite.Size())) + n3, err := m.Rewrite.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n3 + } + if m.WebsocketUpgrade { + dAtA[i] = 0x28 + i++ + if m.WebsocketUpgrade { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + if m.Timeout != nil { + dAtA[i] = 0x32 + i++ + i = encodeVarintVirtualService(dAtA, i, uint64(m.Timeout.Size())) + n4, err := m.Timeout.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n4 + } + if m.Retries != nil { + dAtA[i] = 0x3a + i++ + i = encodeVarintVirtualService(dAtA, i, uint64(m.Retries.Size())) + n5, err := m.Retries.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n5 + } + if m.Fault != nil { + dAtA[i] = 0x42 + i++ + i = encodeVarintVirtualService(dAtA, i, uint64(m.Fault.Size())) + n6, err := m.Fault.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n6 + } + if m.Mirror != nil { + dAtA[i] = 0x4a + i++ + i = encodeVarintVirtualService(dAtA, i, uint64(m.Mirror.Size())) + n7, err := m.Mirror.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n7 + } + if m.CorsPolicy != nil { + dAtA[i] = 0x52 + i++ + i = encodeVarintVirtualService(dAtA, i, uint64(m.CorsPolicy.Size())) + n8, err := m.CorsPolicy.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n8 + } + if len(m.AppendHeaders) > 0 { + for k, _ := range m.AppendHeaders { + dAtA[i] = 0x5a + i++ + v := m.AppendHeaders[k] + mapSize := 1 + len(k) + sovVirtualService(uint64(len(k))) + 1 + len(v) + sovVirtualService(uint64(len(v))) + i = encodeVarintVirtualService(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintVirtualService(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x12 + i++ + i = encodeVarintVirtualService(dAtA, i, uint64(len(v))) + i += copy(dAtA[i:], v) + } + } + return i, nil +} + +func (m *TCPRoute) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *TCPRoute) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Match) > 0 { + for _, msg := range m.Match { + dAtA[i] = 0xa + i++ + i = encodeVarintVirtualService(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.Route) > 0 { + for _, msg := range m.Route { + dAtA[i] = 0x12 + i++ + i = encodeVarintVirtualService(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + return i, nil +} + +func (m *HTTPMatchRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *HTTPMatchRequest) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Uri != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintVirtualService(dAtA, i, uint64(m.Uri.Size())) + n9, err := m.Uri.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n9 + } + if m.Scheme != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintVirtualService(dAtA, i, uint64(m.Scheme.Size())) + n10, err := m.Scheme.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n10 + } + if m.Method != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintVirtualService(dAtA, i, uint64(m.Method.Size())) + n11, err := m.Method.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n11 + } + if m.Authority != nil { + dAtA[i] = 0x22 + i++ + i = encodeVarintVirtualService(dAtA, i, uint64(m.Authority.Size())) + n12, err := m.Authority.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n12 + } + if len(m.Headers) > 0 { + for k, _ := range m.Headers { + dAtA[i] = 0x2a + i++ + v := m.Headers[k] + msgSize := 0 + if v != nil { + msgSize = v.Size() + msgSize += 1 + sovVirtualService(uint64(msgSize)) + } + mapSize := 1 + len(k) + sovVirtualService(uint64(len(k))) + msgSize + i = encodeVarintVirtualService(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintVirtualService(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + if v != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintVirtualService(dAtA, i, uint64(v.Size())) + n13, err := v.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n13 + } + } + } + if m.Port != nil { + dAtA[i] = 0x32 + i++ + i = encodeVarintVirtualService(dAtA, i, uint64(m.Port.Size())) + n14, err := m.Port.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n14 + } + if len(m.SourceLabels) > 0 { + for k, _ := range m.SourceLabels { + dAtA[i] = 0x3a + i++ + v := m.SourceLabels[k] + mapSize := 1 + len(k) + sovVirtualService(uint64(len(k))) + 1 + len(v) + sovVirtualService(uint64(len(v))) + i = encodeVarintVirtualService(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintVirtualService(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x12 + i++ + i = encodeVarintVirtualService(dAtA, i, uint64(len(v))) + i += copy(dAtA[i:], v) + } + } + if len(m.Gateways) > 0 { + for _, s := range m.Gateways { + dAtA[i] = 0x42 + i++ + l = len(s) + for l >= 1<<7 { + dAtA[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + dAtA[i] = uint8(l) + i++ + i += copy(dAtA[i:], s) + } + } + return i, nil +} + +func (m *DestinationWeight) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DestinationWeight) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Destination != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintVirtualService(dAtA, i, uint64(m.Destination.Size())) + n15, err := m.Destination.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n15 + } + if m.Weight != 0 { + dAtA[i] = 0x10 + i++ + i = encodeVarintVirtualService(dAtA, i, uint64(m.Weight)) + } + return i, nil +} + +func (m *L4MatchAttributes) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *L4MatchAttributes) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.DestinationSubnet) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintVirtualService(dAtA, i, uint64(len(m.DestinationSubnet))) + i += copy(dAtA[i:], m.DestinationSubnet) + } + if m.Port != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintVirtualService(dAtA, i, uint64(m.Port.Size())) + n16, err := m.Port.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n16 + } + if len(m.SourceSubnet) > 0 { + dAtA[i] = 0x1a + i++ + i = encodeVarintVirtualService(dAtA, i, uint64(len(m.SourceSubnet))) + i += copy(dAtA[i:], m.SourceSubnet) + } + if len(m.SourceLabels) > 0 { + for k, _ := range m.SourceLabels { + dAtA[i] = 0x22 + i++ + v := m.SourceLabels[k] + mapSize := 1 + len(k) + sovVirtualService(uint64(len(k))) + 1 + len(v) + sovVirtualService(uint64(len(v))) + i = encodeVarintVirtualService(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintVirtualService(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x12 + i++ + i = encodeVarintVirtualService(dAtA, i, uint64(len(v))) + i += copy(dAtA[i:], v) + } + } + if len(m.Gateways) > 0 { + for _, s := range m.Gateways { + dAtA[i] = 0x2a + i++ + l = len(s) + for l >= 1<<7 { + dAtA[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + dAtA[i] = uint8(l) + i++ + i += copy(dAtA[i:], s) + } + } + return i, nil +} + +func (m *HTTPRedirect) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *HTTPRedirect) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Uri) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintVirtualService(dAtA, i, uint64(len(m.Uri))) + i += copy(dAtA[i:], m.Uri) + } + if len(m.Authority) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintVirtualService(dAtA, i, uint64(len(m.Authority))) + i += copy(dAtA[i:], m.Authority) + } + return i, nil +} + +func (m *HTTPRewrite) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *HTTPRewrite) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Uri) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintVirtualService(dAtA, i, uint64(len(m.Uri))) + i += copy(dAtA[i:], m.Uri) + } + if len(m.Authority) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintVirtualService(dAtA, i, uint64(len(m.Authority))) + i += copy(dAtA[i:], m.Authority) + } + return i, nil +} + +func (m *StringMatch) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *StringMatch) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.MatchType != nil { + nn17, err := m.MatchType.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += nn17 + } + return i, nil +} + +func (m *StringMatch_Exact) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0xa + i++ + i = encodeVarintVirtualService(dAtA, i, uint64(len(m.Exact))) + i += copy(dAtA[i:], m.Exact) + return i, nil +} +func (m *StringMatch_Prefix) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x12 + i++ + i = encodeVarintVirtualService(dAtA, i, uint64(len(m.Prefix))) + i += copy(dAtA[i:], m.Prefix) + return i, nil +} +func (m *StringMatch_Regex) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x1a + i++ + i = encodeVarintVirtualService(dAtA, i, uint64(len(m.Regex))) + i += copy(dAtA[i:], m.Regex) + return i, nil +} +func (m *HTTPRetry) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *HTTPRetry) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Attempts != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintVirtualService(dAtA, i, uint64(m.Attempts)) + } + if m.PerTryTimeout != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintVirtualService(dAtA, i, uint64(m.PerTryTimeout.Size())) + n18, err := m.PerTryTimeout.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n18 + } + return i, nil +} + +func (m *CorsPolicy) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *CorsPolicy) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.AllowOrigin) > 0 { + for _, s := range m.AllowOrigin { + dAtA[i] = 0xa + i++ + l = len(s) + for l >= 1<<7 { + dAtA[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + dAtA[i] = uint8(l) + i++ + i += copy(dAtA[i:], s) + } + } + if len(m.AllowMethods) > 0 { + for _, s := range m.AllowMethods { + dAtA[i] = 0x12 + i++ + l = len(s) + for l >= 1<<7 { + dAtA[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + dAtA[i] = uint8(l) + i++ + i += copy(dAtA[i:], s) + } + } + if len(m.AllowHeaders) > 0 { + for _, s := range m.AllowHeaders { + dAtA[i] = 0x1a + i++ + l = len(s) + for l >= 1<<7 { + dAtA[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + dAtA[i] = uint8(l) + i++ + i += copy(dAtA[i:], s) + } + } + if len(m.ExposeHeaders) > 0 { + for _, s := range m.ExposeHeaders { + dAtA[i] = 0x22 + i++ + l = len(s) + for l >= 1<<7 { + dAtA[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + dAtA[i] = uint8(l) + i++ + i += copy(dAtA[i:], s) + } + } + if m.MaxAge != nil { + dAtA[i] = 0x2a + i++ + i = encodeVarintVirtualService(dAtA, i, uint64(m.MaxAge.Size())) + n19, err := m.MaxAge.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n19 + } + if m.AllowCredentials != nil { + dAtA[i] = 0x32 + i++ + i = encodeVarintVirtualService(dAtA, i, uint64(m.AllowCredentials.Size())) + n20, err := m.AllowCredentials.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n20 + } + return i, nil +} + +func (m *HTTPFaultInjection) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *HTTPFaultInjection) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Delay != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintVirtualService(dAtA, i, uint64(m.Delay.Size())) + n21, err := m.Delay.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n21 + } + if m.Abort != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintVirtualService(dAtA, i, uint64(m.Abort.Size())) + n22, err := m.Abort.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n22 + } + return i, nil +} + +func (m *HTTPFaultInjection_Delay) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *HTTPFaultInjection_Delay) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Percent != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintVirtualService(dAtA, i, uint64(m.Percent)) + } + if m.HttpDelayType != nil { + nn23, err := m.HttpDelayType.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += nn23 + } + return i, nil +} + +func (m *HTTPFaultInjection_Delay_FixedDelay) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.FixedDelay != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintVirtualService(dAtA, i, uint64(m.FixedDelay.Size())) + n24, err := m.FixedDelay.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n24 + } + return i, nil +} +func (m *HTTPFaultInjection_Delay_ExponentialDelay) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.ExponentialDelay != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintVirtualService(dAtA, i, uint64(m.ExponentialDelay.Size())) + n25, err := m.ExponentialDelay.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n25 + } + return i, nil +} +func (m *HTTPFaultInjection_Abort) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *HTTPFaultInjection_Abort) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Percent != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintVirtualService(dAtA, i, uint64(m.Percent)) + } + if m.ErrorType != nil { + nn26, err := m.ErrorType.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += nn26 + } + return i, nil +} + +func (m *HTTPFaultInjection_Abort_HttpStatus) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x10 + i++ + i = encodeVarintVirtualService(dAtA, i, uint64(m.HttpStatus)) + return i, nil +} +func (m *HTTPFaultInjection_Abort_GrpcStatus) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x1a + i++ + i = encodeVarintVirtualService(dAtA, i, uint64(len(m.GrpcStatus))) + i += copy(dAtA[i:], m.GrpcStatus) + return i, nil +} +func (m *HTTPFaultInjection_Abort_Http2Error) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x22 + i++ + i = encodeVarintVirtualService(dAtA, i, uint64(len(m.Http2Error))) + i += copy(dAtA[i:], m.Http2Error) + return i, nil +} +func (m *PortSelector) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *PortSelector) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Port != nil { + nn27, err := m.Port.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += nn27 + } + return i, nil +} + +func (m *PortSelector_Number) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x8 + i++ + i = encodeVarintVirtualService(dAtA, i, uint64(m.Number)) + return i, nil +} +func (m *PortSelector_Name) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x12 + i++ + i = encodeVarintVirtualService(dAtA, i, uint64(len(m.Name))) + i += copy(dAtA[i:], m.Name) + return i, nil +} +func encodeVarintVirtualService(dAtA []byte, offset int, v uint64) int { + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return offset + 1 +} +func (m *VirtualService) Size() (n int) { + var l int + _ = l + if len(m.Hosts) > 0 { + for _, s := range m.Hosts { + l = len(s) + n += 1 + l + sovVirtualService(uint64(l)) + } + } + if len(m.Gateways) > 0 { + for _, s := range m.Gateways { + l = len(s) + n += 1 + l + sovVirtualService(uint64(l)) + } + } + if len(m.Http) > 0 { + for _, e := range m.Http { + l = e.Size() + n += 1 + l + sovVirtualService(uint64(l)) + } + } + if len(m.Tcp) > 0 { + for _, e := range m.Tcp { + l = e.Size() + n += 1 + l + sovVirtualService(uint64(l)) + } + } + return n +} + +func (m *Destination) Size() (n int) { + var l int + _ = l + l = len(m.Name) + if l > 0 { + n += 1 + l + sovVirtualService(uint64(l)) + } + l = len(m.Subset) + if l > 0 { + n += 1 + l + sovVirtualService(uint64(l)) + } + if m.Port != nil { + l = m.Port.Size() + n += 1 + l + sovVirtualService(uint64(l)) + } + return n +} + +func (m *HTTPRoute) Size() (n int) { + var l int + _ = l + if len(m.Match) > 0 { + for _, e := range m.Match { + l = e.Size() + n += 1 + l + sovVirtualService(uint64(l)) + } + } + if len(m.Route) > 0 { + for _, e := range m.Route { + l = e.Size() + n += 1 + l + sovVirtualService(uint64(l)) + } + } + if m.Redirect != nil { + l = m.Redirect.Size() + n += 1 + l + sovVirtualService(uint64(l)) + } + if m.Rewrite != nil { + l = m.Rewrite.Size() + n += 1 + l + sovVirtualService(uint64(l)) + } + if m.WebsocketUpgrade { + n += 2 + } + if m.Timeout != nil { + l = m.Timeout.Size() + n += 1 + l + sovVirtualService(uint64(l)) + } + if m.Retries != nil { + l = m.Retries.Size() + n += 1 + l + sovVirtualService(uint64(l)) + } + if m.Fault != nil { + l = m.Fault.Size() + n += 1 + l + sovVirtualService(uint64(l)) + } + if m.Mirror != nil { + l = m.Mirror.Size() + n += 1 + l + sovVirtualService(uint64(l)) + } + if m.CorsPolicy != nil { + l = m.CorsPolicy.Size() + n += 1 + l + sovVirtualService(uint64(l)) + } + if len(m.AppendHeaders) > 0 { + for k, v := range m.AppendHeaders { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovVirtualService(uint64(len(k))) + 1 + len(v) + sovVirtualService(uint64(len(v))) + n += mapEntrySize + 1 + sovVirtualService(uint64(mapEntrySize)) + } + } + return n +} + +func (m *TCPRoute) Size() (n int) { + var l int + _ = l + if len(m.Match) > 0 { + for _, e := range m.Match { + l = e.Size() + n += 1 + l + sovVirtualService(uint64(l)) + } + } + if len(m.Route) > 0 { + for _, e := range m.Route { + l = e.Size() + n += 1 + l + sovVirtualService(uint64(l)) + } + } + return n +} + +func (m *HTTPMatchRequest) Size() (n int) { + var l int + _ = l + if m.Uri != nil { + l = m.Uri.Size() + n += 1 + l + sovVirtualService(uint64(l)) + } + if m.Scheme != nil { + l = m.Scheme.Size() + n += 1 + l + sovVirtualService(uint64(l)) + } + if m.Method != nil { + l = m.Method.Size() + n += 1 + l + sovVirtualService(uint64(l)) + } + if m.Authority != nil { + l = m.Authority.Size() + n += 1 + l + sovVirtualService(uint64(l)) + } + if len(m.Headers) > 0 { + for k, v := range m.Headers { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovVirtualService(uint64(l)) + } + mapEntrySize := 1 + len(k) + sovVirtualService(uint64(len(k))) + l + n += mapEntrySize + 1 + sovVirtualService(uint64(mapEntrySize)) + } + } + if m.Port != nil { + l = m.Port.Size() + n += 1 + l + sovVirtualService(uint64(l)) + } + if len(m.SourceLabels) > 0 { + for k, v := range m.SourceLabels { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovVirtualService(uint64(len(k))) + 1 + len(v) + sovVirtualService(uint64(len(v))) + n += mapEntrySize + 1 + sovVirtualService(uint64(mapEntrySize)) + } + } + if len(m.Gateways) > 0 { + for _, s := range m.Gateways { + l = len(s) + n += 1 + l + sovVirtualService(uint64(l)) + } + } + return n +} + +func (m *DestinationWeight) Size() (n int) { + var l int + _ = l + if m.Destination != nil { + l = m.Destination.Size() + n += 1 + l + sovVirtualService(uint64(l)) + } + if m.Weight != 0 { + n += 1 + sovVirtualService(uint64(m.Weight)) + } + return n +} + +func (m *L4MatchAttributes) Size() (n int) { + var l int + _ = l + l = len(m.DestinationSubnet) + if l > 0 { + n += 1 + l + sovVirtualService(uint64(l)) + } + if m.Port != nil { + l = m.Port.Size() + n += 1 + l + sovVirtualService(uint64(l)) + } + l = len(m.SourceSubnet) + if l > 0 { + n += 1 + l + sovVirtualService(uint64(l)) + } + if len(m.SourceLabels) > 0 { + for k, v := range m.SourceLabels { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovVirtualService(uint64(len(k))) + 1 + len(v) + sovVirtualService(uint64(len(v))) + n += mapEntrySize + 1 + sovVirtualService(uint64(mapEntrySize)) + } + } + if len(m.Gateways) > 0 { + for _, s := range m.Gateways { + l = len(s) + n += 1 + l + sovVirtualService(uint64(l)) + } + } + return n +} + +func (m *HTTPRedirect) Size() (n int) { + var l int + _ = l + l = len(m.Uri) + if l > 0 { + n += 1 + l + sovVirtualService(uint64(l)) + } + l = len(m.Authority) + if l > 0 { + n += 1 + l + sovVirtualService(uint64(l)) + } + return n +} + +func (m *HTTPRewrite) Size() (n int) { + var l int + _ = l + l = len(m.Uri) + if l > 0 { + n += 1 + l + sovVirtualService(uint64(l)) + } + l = len(m.Authority) + if l > 0 { + n += 1 + l + sovVirtualService(uint64(l)) + } + return n +} + +func (m *StringMatch) Size() (n int) { + var l int + _ = l + if m.MatchType != nil { + n += m.MatchType.Size() + } + return n +} + +func (m *StringMatch_Exact) Size() (n int) { + var l int + _ = l + l = len(m.Exact) + n += 1 + l + sovVirtualService(uint64(l)) + return n +} +func (m *StringMatch_Prefix) Size() (n int) { + var l int + _ = l + l = len(m.Prefix) + n += 1 + l + sovVirtualService(uint64(l)) + return n +} +func (m *StringMatch_Regex) Size() (n int) { + var l int + _ = l + l = len(m.Regex) + n += 1 + l + sovVirtualService(uint64(l)) + return n +} +func (m *HTTPRetry) Size() (n int) { + var l int + _ = l + if m.Attempts != 0 { + n += 1 + sovVirtualService(uint64(m.Attempts)) + } + if m.PerTryTimeout != nil { + l = m.PerTryTimeout.Size() + n += 1 + l + sovVirtualService(uint64(l)) + } + return n +} + +func (m *CorsPolicy) Size() (n int) { + var l int + _ = l + if len(m.AllowOrigin) > 0 { + for _, s := range m.AllowOrigin { + l = len(s) + n += 1 + l + sovVirtualService(uint64(l)) + } + } + if len(m.AllowMethods) > 0 { + for _, s := range m.AllowMethods { + l = len(s) + n += 1 + l + sovVirtualService(uint64(l)) + } + } + if len(m.AllowHeaders) > 0 { + for _, s := range m.AllowHeaders { + l = len(s) + n += 1 + l + sovVirtualService(uint64(l)) + } + } + if len(m.ExposeHeaders) > 0 { + for _, s := range m.ExposeHeaders { + l = len(s) + n += 1 + l + sovVirtualService(uint64(l)) + } + } + if m.MaxAge != nil { + l = m.MaxAge.Size() + n += 1 + l + sovVirtualService(uint64(l)) + } + if m.AllowCredentials != nil { + l = m.AllowCredentials.Size() + n += 1 + l + sovVirtualService(uint64(l)) + } + return n +} + +func (m *HTTPFaultInjection) Size() (n int) { + var l int + _ = l + if m.Delay != nil { + l = m.Delay.Size() + n += 1 + l + sovVirtualService(uint64(l)) + } + if m.Abort != nil { + l = m.Abort.Size() + n += 1 + l + sovVirtualService(uint64(l)) + } + return n +} + +func (m *HTTPFaultInjection_Delay) Size() (n int) { + var l int + _ = l + if m.Percent != 0 { + n += 1 + sovVirtualService(uint64(m.Percent)) + } + if m.HttpDelayType != nil { + n += m.HttpDelayType.Size() + } + return n +} + +func (m *HTTPFaultInjection_Delay_FixedDelay) Size() (n int) { + var l int + _ = l + if m.FixedDelay != nil { + l = m.FixedDelay.Size() + n += 1 + l + sovVirtualService(uint64(l)) + } + return n +} +func (m *HTTPFaultInjection_Delay_ExponentialDelay) Size() (n int) { + var l int + _ = l + if m.ExponentialDelay != nil { + l = m.ExponentialDelay.Size() + n += 1 + l + sovVirtualService(uint64(l)) + } + return n +} +func (m *HTTPFaultInjection_Abort) Size() (n int) { + var l int + _ = l + if m.Percent != 0 { + n += 1 + sovVirtualService(uint64(m.Percent)) + } + if m.ErrorType != nil { + n += m.ErrorType.Size() + } + return n +} + +func (m *HTTPFaultInjection_Abort_HttpStatus) Size() (n int) { + var l int + _ = l + n += 1 + sovVirtualService(uint64(m.HttpStatus)) + return n +} +func (m *HTTPFaultInjection_Abort_GrpcStatus) Size() (n int) { + var l int + _ = l + l = len(m.GrpcStatus) + n += 1 + l + sovVirtualService(uint64(l)) + return n +} +func (m *HTTPFaultInjection_Abort_Http2Error) Size() (n int) { + var l int + _ = l + l = len(m.Http2Error) + n += 1 + l + sovVirtualService(uint64(l)) + return n +} +func (m *PortSelector) Size() (n int) { + var l int + _ = l + if m.Port != nil { + n += m.Port.Size() + } + return n +} + +func (m *PortSelector_Number) Size() (n int) { + var l int + _ = l + n += 1 + sovVirtualService(uint64(m.Number)) + return n +} +func (m *PortSelector_Name) Size() (n int) { + var l int + _ = l + l = len(m.Name) + n += 1 + l + sovVirtualService(uint64(l)) + return n +} + +func sovVirtualService(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozVirtualService(x uint64) (n int) { + return sovVirtualService(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *VirtualService) 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 ErrIntOverflowVirtualService + } + 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: VirtualService: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: VirtualService: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Hosts", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVirtualService + } + 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 ErrInvalidLengthVirtualService + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Hosts = append(m.Hosts, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Gateways", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVirtualService + } + 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 ErrInvalidLengthVirtualService + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Gateways = append(m.Gateways, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Http", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVirtualService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthVirtualService + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Http = append(m.Http, &HTTPRoute{}) + if err := m.Http[len(m.Http)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Tcp", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVirtualService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthVirtualService + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Tcp = append(m.Tcp, &TCPRoute{}) + if err := m.Tcp[len(m.Tcp)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipVirtualService(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthVirtualService + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Destination) 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 ErrIntOverflowVirtualService + } + 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: Destination: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Destination: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVirtualService + } + 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 ErrInvalidLengthVirtualService + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Subset", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVirtualService + } + 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 ErrInvalidLengthVirtualService + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Subset = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Port", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVirtualService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthVirtualService + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Port == nil { + m.Port = &PortSelector{} + } + if err := m.Port.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipVirtualService(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthVirtualService + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *HTTPRoute) 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 ErrIntOverflowVirtualService + } + 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: HTTPRoute: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: HTTPRoute: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Match", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVirtualService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthVirtualService + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Match = append(m.Match, &HTTPMatchRequest{}) + if err := m.Match[len(m.Match)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Route", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVirtualService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthVirtualService + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Route = append(m.Route, &DestinationWeight{}) + if err := m.Route[len(m.Route)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Redirect", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVirtualService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthVirtualService + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Redirect == nil { + m.Redirect = &HTTPRedirect{} + } + if err := m.Redirect.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Rewrite", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVirtualService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthVirtualService + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Rewrite == nil { + m.Rewrite = &HTTPRewrite{} + } + if err := m.Rewrite.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field WebsocketUpgrade", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVirtualService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.WebsocketUpgrade = bool(v != 0) + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Timeout", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVirtualService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthVirtualService + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Timeout == nil { + m.Timeout = &google_protobuf.Duration{} + } + if err := m.Timeout.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Retries", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVirtualService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthVirtualService + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Retries == nil { + m.Retries = &HTTPRetry{} + } + if err := m.Retries.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Fault", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVirtualService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthVirtualService + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Fault == nil { + m.Fault = &HTTPFaultInjection{} + } + if err := m.Fault.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Mirror", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVirtualService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthVirtualService + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Mirror == nil { + m.Mirror = &Destination{} + } + if err := m.Mirror.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CorsPolicy", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVirtualService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthVirtualService + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.CorsPolicy == nil { + m.CorsPolicy = &CorsPolicy{} + } + if err := m.CorsPolicy.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AppendHeaders", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVirtualService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthVirtualService + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.AppendHeaders == nil { + m.AppendHeaders = 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 ErrIntOverflowVirtualService + } + 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 ErrIntOverflowVirtualService + } + 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 ErrInvalidLengthVirtualService + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + 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 ErrIntOverflowVirtualService + } + 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 ErrInvalidLengthVirtualService + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + } else { + iNdEx = entryPreIndex + skippy, err := skipVirtualService(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthVirtualService + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.AppendHeaders[mapkey] = mapvalue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipVirtualService(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthVirtualService + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *TCPRoute) 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 ErrIntOverflowVirtualService + } + 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: TCPRoute: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TCPRoute: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Match", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVirtualService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthVirtualService + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Match = append(m.Match, &L4MatchAttributes{}) + if err := m.Match[len(m.Match)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Route", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVirtualService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthVirtualService + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Route = append(m.Route, &DestinationWeight{}) + if err := m.Route[len(m.Route)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipVirtualService(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthVirtualService + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *HTTPMatchRequest) 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 ErrIntOverflowVirtualService + } + 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: HTTPMatchRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: HTTPMatchRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Uri", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVirtualService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthVirtualService + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Uri == nil { + m.Uri = &StringMatch{} + } + if err := m.Uri.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Scheme", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVirtualService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthVirtualService + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Scheme == nil { + m.Scheme = &StringMatch{} + } + if err := m.Scheme.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Method", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVirtualService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthVirtualService + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Method == nil { + m.Method = &StringMatch{} + } + if err := m.Method.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVirtualService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthVirtualService + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Authority == nil { + m.Authority = &StringMatch{} + } + if err := m.Authority.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + 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 ErrIntOverflowVirtualService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthVirtualService + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Headers == nil { + m.Headers = make(map[string]*StringMatch) + } + var mapkey string + var mapvalue *StringMatch + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVirtualService + } + 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 ErrIntOverflowVirtualService + } + 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 ErrInvalidLengthVirtualService + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVirtualService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthVirtualService + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthVirtualService + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &StringMatch{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipVirtualService(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthVirtualService + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Headers[mapkey] = mapvalue + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Port", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVirtualService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthVirtualService + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Port == nil { + m.Port = &PortSelector{} + } + if err := m.Port.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SourceLabels", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVirtualService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthVirtualService + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.SourceLabels == nil { + m.SourceLabels = 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 ErrIntOverflowVirtualService + } + 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 ErrIntOverflowVirtualService + } + 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 ErrInvalidLengthVirtualService + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + 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 ErrIntOverflowVirtualService + } + 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 ErrInvalidLengthVirtualService + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + } else { + iNdEx = entryPreIndex + skippy, err := skipVirtualService(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthVirtualService + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.SourceLabels[mapkey] = mapvalue + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Gateways", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVirtualService + } + 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 ErrInvalidLengthVirtualService + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Gateways = append(m.Gateways, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipVirtualService(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthVirtualService + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DestinationWeight) 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 ErrIntOverflowVirtualService + } + 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: DestinationWeight: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DestinationWeight: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Destination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVirtualService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthVirtualService + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Destination == nil { + m.Destination = &Destination{} + } + if err := m.Destination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Weight", wireType) + } + m.Weight = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVirtualService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Weight |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipVirtualService(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthVirtualService + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *L4MatchAttributes) 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 ErrIntOverflowVirtualService + } + 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: L4MatchAttributes: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: L4MatchAttributes: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DestinationSubnet", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVirtualService + } + 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 ErrInvalidLengthVirtualService + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DestinationSubnet = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Port", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVirtualService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthVirtualService + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Port == nil { + m.Port = &PortSelector{} + } + if err := m.Port.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SourceSubnet", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVirtualService + } + 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 ErrInvalidLengthVirtualService + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SourceSubnet = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SourceLabels", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVirtualService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthVirtualService + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.SourceLabels == nil { + m.SourceLabels = 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 ErrIntOverflowVirtualService + } + 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 ErrIntOverflowVirtualService + } + 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 ErrInvalidLengthVirtualService + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + 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 ErrIntOverflowVirtualService + } + 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 ErrInvalidLengthVirtualService + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + } else { + iNdEx = entryPreIndex + skippy, err := skipVirtualService(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthVirtualService + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.SourceLabels[mapkey] = mapvalue + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Gateways", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVirtualService + } + 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 ErrInvalidLengthVirtualService + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Gateways = append(m.Gateways, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipVirtualService(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthVirtualService + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *HTTPRedirect) 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 ErrIntOverflowVirtualService + } + 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: HTTPRedirect: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: HTTPRedirect: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Uri", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVirtualService + } + 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 ErrInvalidLengthVirtualService + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Uri = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVirtualService + } + 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 ErrInvalidLengthVirtualService + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Authority = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipVirtualService(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthVirtualService + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *HTTPRewrite) 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 ErrIntOverflowVirtualService + } + 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: HTTPRewrite: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: HTTPRewrite: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Uri", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVirtualService + } + 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 ErrInvalidLengthVirtualService + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Uri = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVirtualService + } + 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 ErrInvalidLengthVirtualService + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Authority = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipVirtualService(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthVirtualService + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *StringMatch) 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 ErrIntOverflowVirtualService + } + 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: StringMatch: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: StringMatch: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Exact", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVirtualService + } + 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 ErrInvalidLengthVirtualService + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MatchType = &StringMatch_Exact{string(dAtA[iNdEx:postIndex])} + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Prefix", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVirtualService + } + 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 ErrInvalidLengthVirtualService + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MatchType = &StringMatch_Prefix{string(dAtA[iNdEx:postIndex])} + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Regex", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVirtualService + } + 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 ErrInvalidLengthVirtualService + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MatchType = &StringMatch_Regex{string(dAtA[iNdEx:postIndex])} + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipVirtualService(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthVirtualService + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *HTTPRetry) 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 ErrIntOverflowVirtualService + } + 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: HTTPRetry: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: HTTPRetry: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Attempts", wireType) + } + m.Attempts = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVirtualService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Attempts |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PerTryTimeout", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVirtualService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthVirtualService + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.PerTryTimeout == nil { + m.PerTryTimeout = &google_protobuf.Duration{} + } + if err := m.PerTryTimeout.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipVirtualService(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthVirtualService + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CorsPolicy) 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 ErrIntOverflowVirtualService + } + 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: CorsPolicy: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CorsPolicy: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AllowOrigin", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVirtualService + } + 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 ErrInvalidLengthVirtualService + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AllowOrigin = append(m.AllowOrigin, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AllowMethods", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVirtualService + } + 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 ErrInvalidLengthVirtualService + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AllowMethods = append(m.AllowMethods, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AllowHeaders", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVirtualService + } + 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 ErrInvalidLengthVirtualService + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AllowHeaders = append(m.AllowHeaders, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ExposeHeaders", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVirtualService + } + 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 ErrInvalidLengthVirtualService + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ExposeHeaders = append(m.ExposeHeaders, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MaxAge", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVirtualService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthVirtualService + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.MaxAge == nil { + m.MaxAge = &google_protobuf.Duration{} + } + if err := m.MaxAge.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AllowCredentials", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVirtualService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthVirtualService + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.AllowCredentials == nil { + m.AllowCredentials = &google_protobuf1.BoolValue{} + } + if err := m.AllowCredentials.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipVirtualService(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthVirtualService + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *HTTPFaultInjection) 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 ErrIntOverflowVirtualService + } + 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: HTTPFaultInjection: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: HTTPFaultInjection: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Delay", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVirtualService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthVirtualService + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Delay == nil { + m.Delay = &HTTPFaultInjection_Delay{} + } + if err := m.Delay.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Abort", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVirtualService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthVirtualService + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Abort == nil { + m.Abort = &HTTPFaultInjection_Abort{} + } + if err := m.Abort.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipVirtualService(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthVirtualService + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *HTTPFaultInjection_Delay) 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 ErrIntOverflowVirtualService + } + 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: Delay: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Delay: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Percent", wireType) + } + m.Percent = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVirtualService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Percent |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FixedDelay", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVirtualService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthVirtualService + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &google_protobuf.Duration{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.HttpDelayType = &HTTPFaultInjection_Delay_FixedDelay{v} + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ExponentialDelay", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVirtualService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthVirtualService + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &google_protobuf.Duration{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.HttpDelayType = &HTTPFaultInjection_Delay_ExponentialDelay{v} + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipVirtualService(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthVirtualService + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *HTTPFaultInjection_Abort) 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 ErrIntOverflowVirtualService + } + 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: Abort: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Abort: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Percent", wireType) + } + m.Percent = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVirtualService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Percent |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field HttpStatus", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVirtualService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.ErrorType = &HTTPFaultInjection_Abort_HttpStatus{v} + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field GrpcStatus", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVirtualService + } + 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 ErrInvalidLengthVirtualService + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ErrorType = &HTTPFaultInjection_Abort_GrpcStatus{string(dAtA[iNdEx:postIndex])} + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Http2Error", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVirtualService + } + 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 ErrInvalidLengthVirtualService + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ErrorType = &HTTPFaultInjection_Abort_Http2Error{string(dAtA[iNdEx:postIndex])} + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipVirtualService(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthVirtualService + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PortSelector) 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 ErrIntOverflowVirtualService + } + 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: PortSelector: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PortSelector: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Number", wireType) + } + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVirtualService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Port = &PortSelector_Number{v} + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVirtualService + } + 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 ErrInvalidLengthVirtualService + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Port = &PortSelector_Name{string(dAtA[iNdEx:postIndex])} + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipVirtualService(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthVirtualService + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipVirtualService(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, ErrIntOverflowVirtualService + } + 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, ErrIntOverflowVirtualService + } + 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, ErrIntOverflowVirtualService + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + iNdEx += length + if length < 0 { + return 0, ErrInvalidLengthVirtualService + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowVirtualService + } + 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 := skipVirtualService(dAtA[start:]) + if err != nil { + return 0, err + } + iNdEx = start + next + } + 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 ( + ErrInvalidLengthVirtualService = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowVirtualService = fmt.Errorf("proto: integer overflow") +) + +func init() { + proto.RegisterFile("networking/v1alpha3/virtual_service.proto", fileDescriptorVirtualService) +} -func init() { proto.RegisterFile("networking/v1alpha3/virtual_service.proto", fileDescriptor3) } - -var fileDescriptor3 = []byte{ - // 1307 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x57, 0xdd, 0x6e, 0xdb, 0xc6, - 0x12, 0x8e, 0x7e, 0x28, 0xdb, 0x43, 0x3b, 0xb1, 0x16, 0x41, 0xc0, 0x08, 0x07, 0x07, 0x8e, 0x72, - 0x72, 0x8e, 0x0f, 0xd2, 0xc8, 0xa8, 0xdd, 0xa2, 0x46, 0x9b, 0xb8, 0xf1, 0x4f, 0x52, 0x05, 0x48, - 0xd0, 0x80, 0x76, 0x53, 0xa0, 0x17, 0x25, 0x56, 0xd4, 0x58, 0x62, 0x42, 0x71, 0xd9, 0xe5, 0xd2, - 0x92, 0xee, 0xfb, 0x04, 0xbd, 0xea, 0x4d, 0x5f, 0xa0, 0xb7, 0xbd, 0xed, 0x03, 0xf4, 0x49, 0xfa, - 0x1c, 0xc5, 0xce, 0x92, 0x12, 0x13, 0xb5, 0xfa, 0x49, 0x7b, 0xc7, 0x99, 0x9d, 0x6f, 0x76, 0x76, - 0xf7, 0xfb, 0x66, 0x97, 0xf0, 0xff, 0x08, 0xd5, 0x50, 0xc8, 0x37, 0x41, 0xd4, 0xdb, 0xbb, 0xfa, - 0x90, 0x87, 0x71, 0x9f, 0x1f, 0xec, 0x5d, 0x05, 0x52, 0xa5, 0x3c, 0xf4, 0x12, 0x94, 0x57, 0x81, - 0x8f, 0xad, 0x58, 0x0a, 0x25, 0xd8, 0xed, 0x20, 0x51, 0x81, 0x68, 0x4d, 0x01, 0xad, 0x1c, 0xd0, - 0x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69, 0x49, 0xd2, 0xa0, 0x91, 0xe4, 0x53, 0xd8, 0x2c, 0x76, - 0x5d, 0x2d, 0xf1, 0x28, 0x1d, 0x74, 0x50, 0x52, 0x7d, 0x5b, 0x5a, 0xe2, 0xc6, 0x66, 0x37, 0xb3, - 0x1f, 0xaf, 0x5c, 0xfa, 0x64, 0x9d, 0xd4, 0x4c, 0x73, 0x3f, 0x69, 0x7e, 0xb3, 0x63, 0x8e, 0x37, - 0x10, 0x7b, 0x3c, 0x0e, 0xf6, 0xfe, 0xe4, 0x87, 0xb7, 0x53, 0xa3, 0x0d, 0x3c, 0xf8, 0x23, 0x00, - 0x00, 0xff, 0xff, 0xdf, 0x42, 0xc4, 0xa8, 0x0e, 0x0f, 0x00, 0x00, +var fileDescriptorVirtualService = []byte{ + // 1324 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x57, 0xcd, 0x6e, 0xdb, 0xc6, + 0x16, 0x8e, 0x7e, 0x6d, 0x1f, 0xda, 0x89, 0x35, 0x08, 0x02, 0x46, 0xb8, 0x30, 0x1c, 0xe5, 0xe6, + 0x5e, 0x5f, 0xe4, 0x46, 0x46, 0xed, 0x16, 0x35, 0xda, 0xc4, 0x8d, 0x7f, 0x92, 0x2a, 0x40, 0x82, + 0x06, 0xb4, 0x9b, 0x02, 0x5d, 0x94, 0x18, 0x51, 0xc7, 0x12, 0x13, 0x8a, 0xc3, 0x0e, 0x87, 0x96, + 0xb4, 0xef, 0x13, 0x74, 0xd5, 0x4d, 0x5f, 0xa0, 0xdb, 0x6e, 0xfb, 0x00, 0x59, 0xf6, 0x11, 0x8a, + 0x2c, 0xfa, 0x1c, 0xc5, 0x9c, 0x21, 0x25, 0x26, 0x6a, 0xf5, 0x93, 0x76, 0xc7, 0x73, 0xe6, 0x7c, + 0x67, 0xce, 0xcc, 0x7c, 0xdf, 0x99, 0x21, 0xfc, 0x2f, 0x44, 0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 0x19, + 0xe5, 0xdf, 0x02, 0x8b, 0x60, 0xb1, 0xe2, 0x2a, 0x89, 0x4d, 0x1f, 0xd6, 0x35, 0x6a, 0xe7, 0x19, + 0xf9, 0x74, 0x48, 0x57, 0x46, 0x5e, 0x16, 0x92, 0x49, 0x0d, 0xb4, 0x73, 0x12, 0xa2, 0x01, 0x7b, + 0x2e, 0xd2, 0xb3, 0xb5, 0x9c, 0x85, 0x90, 0xf3, 0x91, 0xf6, 0x69, 0x49, 0xd2, 0xa0, 0x91, 0xe4, + 0x63, 0x58, 0xcf, 0x77, 0x5d, 0x2d, 0xf1, 0x30, 0xe9, 0xb7, 0x51, 0x52, 0x7d, 0x1b, 0x5a, 0xe2, + 0xc6, 0x66, 0xd7, 0xd3, 0x1f, 0xaf, 0x4c, 0xfa, 0x64, 0x1d, 0x57, 0x4d, 0x73, 0x3f, 0x6e, 0xbe, + 0x7e, 0xb3, 0x55, 0xf8, 0xf5, 0xcd, 0x56, 0xe1, 0xb7, 0x37, 0x5b, 0x85, 0xaf, 0xb7, 0xcd, 0x51, + 0xfb, 0x62, 0x97, 0x47, 0xfe, 0xee, 0x9f, 0xfc, 0xfc, 0xb6, 0xab, 0xb4, 0x99, 0xfb, 0x7f, 0x04, + 0x00, 0x00, 0xff, 0xff, 0x0b, 0xd6, 0xe5, 0x3b, 0x1a, 0x0f, 0x00, 0x00, } From 6b30a5a688e402f93e0b4217a39e9deb4266acf9 Mon Sep 17 00:00:00 2001 From: Kuat Yessenov Date: Thu, 15 Mar 2018 22:06:09 -0700 Subject: [PATCH 2/3] Update istio/api Signed-off-by: Kuat Yessenov --- Gopkg.lock | 5 +++-- Gopkg.toml | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Gopkg.lock b/Gopkg.lock index 7fd74a53..86b755f0 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -1201,6 +1201,7 @@ version = "v2.1.1" [[projects]] + branch = "master" name = "istio.io/api" packages = [ "authentication/v1alpha1", @@ -1214,7 +1215,7 @@ "rbac/v1alpha1", "routing/v1alpha1" ] - revision = "cc0e5e493a556ed726ec528fcce2e03ff0eed66e" + revision = "75cb4e133ec9bde1bed1a184b49a06bc5d3ab3f9" [[projects]] name = "istio.io/fortio" @@ -1510,6 +1511,6 @@ [solve-meta] analyzer-name = "dep" analyzer-version = 1 - inputs-digest = "9836695268a1e37d3296da37d8387b233589968270d3b178fccfc4850b238c0b" + inputs-digest = "9e272bd95e1464d0834e77b99d5add9797b375a5112caa4b37df79dc4b7f72a5" solver-name = "gps-cdcl" solver-version = 1 diff --git a/Gopkg.toml b/Gopkg.toml index be299d18..da412ae0 100644 --- a/Gopkg.toml +++ b/Gopkg.toml @@ -129,7 +129,7 @@ required = [ # TODO replace with master as api/master should be tracked in istio/master [[constraint]] name = "istio.io/api" - revision = "cc0e5e493a556ed726ec528fcce2e03ff0eed66e" + branch = "master" [[constraint]] name = "github.com/envoyproxy/go-control-plane" From 0f95b09ca3ebec61466ce12ba337a3bb54d16c4d Mon Sep 17 00:00:00 2001 From: Kuat Yessenov Date: Fri, 16 Mar 2018 01:29:29 -0700 Subject: [PATCH 3/3] update api Signed-off-by: Kuat Yessenov --- Gopkg.lock | 2 +- istio.io/api/Makefile | 2 +- .../api/authentication/v1alpha1/policy.pb.go | 1518 ++++++++++++++++- 3 files changed, 1448 insertions(+), 74 deletions(-) diff --git a/Gopkg.lock b/Gopkg.lock index 86b755f0..24109c3a 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -1215,7 +1215,7 @@ "rbac/v1alpha1", "routing/v1alpha1" ] - revision = "75cb4e133ec9bde1bed1a184b49a06bc5d3ab3f9" + revision = "9ce29e2dde6194f0c67a58cad261e64f71a68a8a" [[projects]] name = "istio.io/fortio" diff --git a/istio.io/api/Makefile b/istio.io/api/Makefile index b2dee8dc..2730410a 100644 --- a/istio.io/api/Makefile +++ b/istio.io/api/Makefile @@ -258,7 +258,7 @@ generate-authn-go: $(authn_v1alpha1_pb_gos) $(authn_v1alpha1_pb_doc) $(authn_v1alpha1_pb_gos) $(authn_v1alpha1_pb_doc): $(authn_v1alpha1_protos) ## Generate authentication/v1alpha1/*.pb.go - @$(docker_gen) $(protoc_gen_go_plugin) $(protoc_gen_docs_plugin)$(authn_v1alpha1_path) $^ + @$(docker_gen) $(gogofast_plugin) $(protoc_gen_docs_plugin)$(authn_v1alpha1_path) $^ clean-authn: rm -f $(authn_v1alpha1_pb_gos) diff --git a/istio.io/api/authentication/v1alpha1/policy.pb.go b/istio.io/api/authentication/v1alpha1/policy.pb.go index 09161984..21cabbc6 100644 --- a/istio.io/api/authentication/v1alpha1/policy.pb.go +++ b/istio.io/api/authentication/v1alpha1/policy.pb.go @@ -1,31 +1,33 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. +// Code generated by protoc-gen-gogo. DO NOT EDIT. // source: authentication/v1alpha1/policy.proto /* -Package v1alpha1 is a generated protocol buffer package. - -This package defines user-facing authentication policy as well as configs -that the sidecar proxy uses to perform authentication. - -It is generated from these files: - authentication/v1alpha1/policy.proto - -It has these top-level messages: - None - MutualTls - Jwt - PeerAuthenticationMethod - OriginAuthenticationMethod - CredentialRule - Policy + Package v1alpha1 is a generated protocol buffer package. + + This package defines user-facing authentication policy as well as configs + that the sidecar proxy uses to perform authentication. + + It is generated from these files: + authentication/v1alpha1/policy.proto + + It has these top-level messages: + None + MutualTls + Jwt + PeerAuthenticationMethod + OriginAuthenticationMethod + CredentialRule + Policy */ package v1alpha1 -import proto "github.com/golang/protobuf/proto" +import proto "github.com/gogo/protobuf/proto" import fmt "fmt" import math "math" import istio_networking_v1alpha3 "istio.io/api/networking/v1alpha3" +import io "io" + // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf @@ -35,7 +37,7 @@ var _ = math.Inf // 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.ProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package // Associates authentication with request principal. type CredentialRule_Binding int32 @@ -59,7 +61,9 @@ var CredentialRule_Binding_value = map[string]int32{ func (x CredentialRule_Binding) String() string { return proto.EnumName(CredentialRule_Binding_name, int32(x)) } -func (CredentialRule_Binding) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{5, 0} } +func (CredentialRule_Binding) EnumDescriptor() ([]byte, []int) { + return fileDescriptorPolicy, []int{5, 0} +} // Placeholder for None authentication params. type None struct { @@ -68,7 +72,7 @@ type None struct { func (m *None) Reset() { *m = None{} } func (m *None) String() string { return proto.CompactTextString(m) } func (*None) ProtoMessage() {} -func (*None) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} } +func (*None) Descriptor() ([]byte, []int) { return fileDescriptorPolicy, []int{0} } // Placeholder for mTLS authentication params. type MutualTls struct { @@ -77,7 +81,7 @@ type MutualTls struct { func (m *MutualTls) Reset() { *m = MutualTls{} } func (m *MutualTls) String() string { return proto.CompactTextString(m) } func (*MutualTls) ProtoMessage() {} -func (*MutualTls) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} } +func (*MutualTls) Descriptor() ([]byte, []int) { return fileDescriptorPolicy, []int{1} } // JSON Web Token (JWT) token format for authentication as defined by // https://tools.ietf.org/html/rfc7519. See [OAuth @@ -101,7 +105,7 @@ type Jwt struct { // // Example: https://securetoken.google.com // Example: 1234567-compute@developer.gserviceaccount.com - Issuer string `protobuf:"bytes,1,opt,name=issuer" json:"issuer,omitempty"` + Issuer string `protobuf:"bytes,1,opt,name=issuer,proto3" json:"issuer,omitempty"` // The list of JWT // [audiences](https://tools.ietf.org/html/rfc7519#section-4.1.3). // that are allowed to access. A JWT containing any of these @@ -128,7 +132,7 @@ type Jwt struct { // Google service account). // // Example: https://www.googleapis.com/oauth2/v1/certs - JwksUri string `protobuf:"bytes,3,opt,name=jwks_uri,json=jwksUri" json:"jwks_uri,omitempty"` + JwksUri string `protobuf:"bytes,3,opt,name=jwks_uri,json=jwksUri,proto3" json:"jwks_uri,omitempty"` // JWT is sent in a request header. `header` represents the // header name. // @@ -145,7 +149,7 @@ type Jwt struct { func (m *Jwt) Reset() { *m = Jwt{} } func (m *Jwt) String() string { return proto.CompactTextString(m) } func (*Jwt) ProtoMessage() {} -func (*Jwt) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} } +func (*Jwt) Descriptor() ([]byte, []int) { return fileDescriptorPolicy, []int{2} } func (m *Jwt) GetIssuer() string { if m != nil { @@ -198,10 +202,12 @@ type PeerAuthenticationMethod struct { func (m *PeerAuthenticationMethod) Reset() { *m = PeerAuthenticationMethod{} } func (m *PeerAuthenticationMethod) String() string { return proto.CompactTextString(m) } func (*PeerAuthenticationMethod) ProtoMessage() {} -func (*PeerAuthenticationMethod) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} } +func (*PeerAuthenticationMethod) Descriptor() ([]byte, []int) { return fileDescriptorPolicy, []int{3} } type isPeerAuthenticationMethod_Params interface { isPeerAuthenticationMethod_Params() + MarshalTo([]byte) (int, error) + Size() int } type PeerAuthenticationMethod_None struct { @@ -260,17 +266,17 @@ func _PeerAuthenticationMethod_OneofMarshaler(msg proto.Message, b *proto.Buffer // params switch x := m.Params.(type) { case *PeerAuthenticationMethod_None: - b.EncodeVarint(1<<3 | proto.WireBytes) + _ = b.EncodeVarint(1<<3 | proto.WireBytes) if err := b.EncodeMessage(x.None); err != nil { return err } case *PeerAuthenticationMethod_Mtls: - b.EncodeVarint(2<<3 | proto.WireBytes) + _ = b.EncodeVarint(2<<3 | proto.WireBytes) if err := b.EncodeMessage(x.Mtls); err != nil { return err } case *PeerAuthenticationMethod_Jwt: - b.EncodeVarint(3<<3 | proto.WireBytes) + _ = b.EncodeVarint(3<<3 | proto.WireBytes) if err := b.EncodeMessage(x.Jwt); err != nil { return err } @@ -351,7 +357,7 @@ type OriginAuthenticationMethod struct { func (m *OriginAuthenticationMethod) Reset() { *m = OriginAuthenticationMethod{} } func (m *OriginAuthenticationMethod) String() string { return proto.CompactTextString(m) } func (*OriginAuthenticationMethod) ProtoMessage() {} -func (*OriginAuthenticationMethod) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} } +func (*OriginAuthenticationMethod) Descriptor() ([]byte, []int) { return fileDescriptorPolicy, []int{4} } func (m *OriginAuthenticationMethod) GetJwt() *Jwt { if m != nil { @@ -366,7 +372,7 @@ func (m *OriginAuthenticationMethod) GetJwt() *Jwt { type CredentialRule struct { // Defines which authentication (peer vs origin) will be binded to // request principal. - Binding CredentialRule_Binding `protobuf:"varint,1,opt,name=binding,enum=istio.authentication.v1alpha1.CredentialRule_Binding" json:"binding,omitempty"` + Binding CredentialRule_Binding `protobuf:"varint,1,opt,name=binding,proto3,enum=istio.authentication.v1alpha1.CredentialRule_Binding" json:"binding,omitempty"` // This list of origin authentication methods that should be // considered for the rule. // At run time, each method will be evaluated in order, until the first valid @@ -383,7 +389,7 @@ type CredentialRule struct { func (m *CredentialRule) Reset() { *m = CredentialRule{} } func (m *CredentialRule) String() string { return proto.CompactTextString(m) } func (*CredentialRule) ProtoMessage() {} -func (*CredentialRule) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{5} } +func (*CredentialRule) Descriptor() ([]byte, []int) { return fileDescriptorPolicy, []int{5} } func (m *CredentialRule) GetBinding() CredentialRule_Binding { if m != nil { @@ -591,7 +597,7 @@ type Policy struct { func (m *Policy) Reset() { *m = Policy{} } func (m *Policy) String() string { return proto.CompactTextString(m) } func (*Policy) ProtoMessage() {} -func (*Policy) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{6} } +func (*Policy) Descriptor() ([]byte, []int) { return fileDescriptorPolicy, []int{6} } func (m *Policy) GetDestinations() []*istio_networking_v1alpha3.Destination { if m != nil { @@ -624,44 +630,1412 @@ func init() { proto.RegisterType((*Policy)(nil), "istio.authentication.v1alpha1.Policy") proto.RegisterEnum("istio.authentication.v1alpha1.CredentialRule_Binding", CredentialRule_Binding_name, CredentialRule_Binding_value) } +func (m *None) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *None) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + return i, nil +} + +func (m *MutualTls) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MutualTls) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + return i, nil +} + +func (m *Jwt) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Jwt) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Issuer) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintPolicy(dAtA, i, uint64(len(m.Issuer))) + i += copy(dAtA[i:], m.Issuer) + } + if len(m.Audiences) > 0 { + for _, s := range m.Audiences { + dAtA[i] = 0x12 + i++ + l = len(s) + for l >= 1<<7 { + dAtA[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + dAtA[i] = uint8(l) + i++ + i += copy(dAtA[i:], s) + } + } + if len(m.JwksUri) > 0 { + dAtA[i] = 0x1a + i++ + i = encodeVarintPolicy(dAtA, i, uint64(len(m.JwksUri))) + i += copy(dAtA[i:], m.JwksUri) + } + if len(m.JwtHeaders) > 0 { + for _, s := range m.JwtHeaders { + dAtA[i] = 0x32 + i++ + l = len(s) + for l >= 1<<7 { + dAtA[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + dAtA[i] = uint8(l) + i++ + i += copy(dAtA[i:], s) + } + } + if len(m.JwtParams) > 0 { + for _, s := range m.JwtParams { + dAtA[i] = 0x3a + i++ + l = len(s) + for l >= 1<<7 { + dAtA[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + dAtA[i] = uint8(l) + i++ + i += copy(dAtA[i:], s) + } + } + return i, nil +} + +func (m *PeerAuthenticationMethod) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *PeerAuthenticationMethod) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Params != nil { + nn1, err := m.Params.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += nn1 + } + return i, nil +} + +func (m *PeerAuthenticationMethod_None) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.None != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintPolicy(dAtA, i, uint64(m.None.Size())) + n2, err := m.None.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n2 + } + return i, nil +} +func (m *PeerAuthenticationMethod_Mtls) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.Mtls != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintPolicy(dAtA, i, uint64(m.Mtls.Size())) + n3, err := m.Mtls.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n3 + } + return i, nil +} +func (m *PeerAuthenticationMethod_Jwt) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.Jwt != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintPolicy(dAtA, i, uint64(m.Jwt.Size())) + n4, err := m.Jwt.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n4 + } + return i, nil +} +func (m *OriginAuthenticationMethod) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *OriginAuthenticationMethod) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Jwt != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintPolicy(dAtA, i, uint64(m.Jwt.Size())) + n5, err := m.Jwt.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n5 + } + return i, nil +} + +func (m *CredentialRule) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *CredentialRule) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Binding != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintPolicy(dAtA, i, uint64(m.Binding)) + } + if len(m.Origins) > 0 { + for _, msg := range m.Origins { + dAtA[i] = 0x12 + i++ + i = encodeVarintPolicy(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.MatchingPeers) > 0 { + for _, s := range m.MatchingPeers { + dAtA[i] = 0x1a + i++ + l = len(s) + for l >= 1<<7 { + dAtA[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + dAtA[i] = uint8(l) + i++ + i += copy(dAtA[i:], s) + } + } + return i, nil +} + +func (m *Policy) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Policy) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Destinations) > 0 { + for _, msg := range m.Destinations { + dAtA[i] = 0xa + i++ + i = encodeVarintPolicy(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.Peers) > 0 { + for _, msg := range m.Peers { + dAtA[i] = 0x12 + i++ + i = encodeVarintPolicy(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.CredentialRules) > 0 { + for _, msg := range m.CredentialRules { + dAtA[i] = 0x22 + i++ + i = encodeVarintPolicy(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + return i, nil +} + +func encodeVarintPolicy(dAtA []byte, offset int, v uint64) int { + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return offset + 1 +} +func (m *None) Size() (n int) { + var l int + _ = l + return n +} + +func (m *MutualTls) Size() (n int) { + var l int + _ = l + return n +} + +func (m *Jwt) Size() (n int) { + var l int + _ = l + l = len(m.Issuer) + if l > 0 { + n += 1 + l + sovPolicy(uint64(l)) + } + if len(m.Audiences) > 0 { + for _, s := range m.Audiences { + l = len(s) + n += 1 + l + sovPolicy(uint64(l)) + } + } + l = len(m.JwksUri) + if l > 0 { + n += 1 + l + sovPolicy(uint64(l)) + } + if len(m.JwtHeaders) > 0 { + for _, s := range m.JwtHeaders { + l = len(s) + n += 1 + l + sovPolicy(uint64(l)) + } + } + if len(m.JwtParams) > 0 { + for _, s := range m.JwtParams { + l = len(s) + n += 1 + l + sovPolicy(uint64(l)) + } + } + return n +} + +func (m *PeerAuthenticationMethod) Size() (n int) { + var l int + _ = l + if m.Params != nil { + n += m.Params.Size() + } + return n +} + +func (m *PeerAuthenticationMethod_None) Size() (n int) { + var l int + _ = l + if m.None != nil { + l = m.None.Size() + n += 1 + l + sovPolicy(uint64(l)) + } + return n +} +func (m *PeerAuthenticationMethod_Mtls) Size() (n int) { + var l int + _ = l + if m.Mtls != nil { + l = m.Mtls.Size() + n += 1 + l + sovPolicy(uint64(l)) + } + return n +} +func (m *PeerAuthenticationMethod_Jwt) Size() (n int) { + var l int + _ = l + if m.Jwt != nil { + l = m.Jwt.Size() + n += 1 + l + sovPolicy(uint64(l)) + } + return n +} +func (m *OriginAuthenticationMethod) Size() (n int) { + var l int + _ = l + if m.Jwt != nil { + l = m.Jwt.Size() + n += 1 + l + sovPolicy(uint64(l)) + } + return n +} + +func (m *CredentialRule) Size() (n int) { + var l int + _ = l + if m.Binding != 0 { + n += 1 + sovPolicy(uint64(m.Binding)) + } + if len(m.Origins) > 0 { + for _, e := range m.Origins { + l = e.Size() + n += 1 + l + sovPolicy(uint64(l)) + } + } + if len(m.MatchingPeers) > 0 { + for _, s := range m.MatchingPeers { + l = len(s) + n += 1 + l + sovPolicy(uint64(l)) + } + } + return n +} + +func (m *Policy) Size() (n int) { + var l int + _ = l + if len(m.Destinations) > 0 { + for _, e := range m.Destinations { + l = e.Size() + n += 1 + l + sovPolicy(uint64(l)) + } + } + if len(m.Peers) > 0 { + for _, e := range m.Peers { + l = e.Size() + n += 1 + l + sovPolicy(uint64(l)) + } + } + if len(m.CredentialRules) > 0 { + for _, e := range m.CredentialRules { + l = e.Size() + n += 1 + l + sovPolicy(uint64(l)) + } + } + return n +} + +func sovPolicy(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozPolicy(x uint64) (n int) { + return sovPolicy(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *None) 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 ErrIntOverflowPolicy + } + 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: None: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: None: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipPolicy(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthPolicy + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MutualTls) 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 ErrIntOverflowPolicy + } + 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: MutualTls: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MutualTls: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipPolicy(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthPolicy + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Jwt) 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 ErrIntOverflowPolicy + } + 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: Jwt: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Jwt: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Issuer", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPolicy + } + 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 ErrInvalidLengthPolicy + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Issuer = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Audiences", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPolicy + } + 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 ErrInvalidLengthPolicy + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Audiences = append(m.Audiences, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field JwksUri", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPolicy + } + 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 ErrInvalidLengthPolicy + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.JwksUri = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field JwtHeaders", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPolicy + } + 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 ErrInvalidLengthPolicy + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.JwtHeaders = append(m.JwtHeaders, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field JwtParams", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPolicy + } + 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 ErrInvalidLengthPolicy + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.JwtParams = append(m.JwtParams, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipPolicy(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthPolicy + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PeerAuthenticationMethod) 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 ErrIntOverflowPolicy + } + 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: PeerAuthenticationMethod: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PeerAuthenticationMethod: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field None", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPolicy + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthPolicy + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &None{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Params = &PeerAuthenticationMethod_None{v} + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Mtls", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPolicy + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthPolicy + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &MutualTls{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Params = &PeerAuthenticationMethod_Mtls{v} + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Jwt", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPolicy + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthPolicy + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &Jwt{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Params = &PeerAuthenticationMethod_Jwt{v} + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipPolicy(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthPolicy + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *OriginAuthenticationMethod) 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 ErrIntOverflowPolicy + } + 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: OriginAuthenticationMethod: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: OriginAuthenticationMethod: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Jwt", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPolicy + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthPolicy + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Jwt == nil { + m.Jwt = &Jwt{} + } + if err := m.Jwt.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipPolicy(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthPolicy + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CredentialRule) 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 ErrIntOverflowPolicy + } + 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: CredentialRule: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CredentialRule: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Binding", wireType) + } + m.Binding = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPolicy + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Binding |= (CredentialRule_Binding(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Origins", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPolicy + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthPolicy + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Origins = append(m.Origins, &OriginAuthenticationMethod{}) + if err := m.Origins[len(m.Origins)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MatchingPeers", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPolicy + } + 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 ErrInvalidLengthPolicy + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MatchingPeers = append(m.MatchingPeers, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipPolicy(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthPolicy + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Policy) 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 ErrIntOverflowPolicy + } + 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: Policy: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Policy: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Destinations", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPolicy + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthPolicy + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Destinations = append(m.Destinations, &istio_networking_v1alpha3.Destination{}) + if err := m.Destinations[len(m.Destinations)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Peers", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPolicy + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthPolicy + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Peers = append(m.Peers, &PeerAuthenticationMethod{}) + if err := m.Peers[len(m.Peers)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CredentialRules", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPolicy + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthPolicy + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.CredentialRules = append(m.CredentialRules, &CredentialRule{}) + if err := m.CredentialRules[len(m.CredentialRules)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipPolicy(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthPolicy + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipPolicy(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, ErrIntOverflowPolicy + } + 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, ErrIntOverflowPolicy + } + 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, ErrIntOverflowPolicy + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + iNdEx += length + if length < 0 { + return 0, ErrInvalidLengthPolicy + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowPolicy + } + 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 := skipPolicy(dAtA[start:]) + if err != nil { + return 0, err + } + iNdEx = start + next + } + 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 ( + ErrInvalidLengthPolicy = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowPolicy = fmt.Errorf("proto: integer overflow") +) + +func init() { proto.RegisterFile("authentication/v1alpha1/policy.proto", fileDescriptorPolicy) } -func init() { proto.RegisterFile("authentication/v1alpha1/policy.proto", fileDescriptor0) } - -var fileDescriptor0 = []byte{ - // 548 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x94, 0xdf, 0x6e, 0x12, 0x41, - 0x14, 0xc6, 0xbb, 0x05, 0x17, 0x38, 0x54, 0x24, 0x73, 0x61, 0xd6, 0xc6, 0xc6, 0x66, 0xad, 0x15, - 0x2f, 0x5c, 0x52, 0xf0, 0x4f, 0x7a, 0x63, 0x22, 0x4a, 0xa4, 0x24, 0x14, 0x32, 0xb5, 0x89, 0xf1, - 0x66, 0x33, 0xdd, 0x9d, 0xc0, 0xd0, 0x65, 0x76, 0x33, 0x33, 0xcb, 0xc6, 0x17, 0xf0, 0x11, 0x7c, - 0x35, 0x9f, 0xc6, 0xc4, 0xcc, 0x2c, 0x5b, 0x42, 0x22, 0xa2, 0x97, 0xe7, 0x70, 0xbe, 0x1f, 0xdf, - 0x37, 0x7b, 0x66, 0xe0, 0x84, 0xa4, 0x6a, 0x46, 0xb9, 0x62, 0x01, 0x51, 0x2c, 0xe6, 0xed, 0xe5, - 0x19, 0x89, 0x92, 0x19, 0x39, 0x6b, 0x27, 0x71, 0xc4, 0x82, 0x6f, 0x5e, 0x22, 0x62, 0x15, 0xa3, - 0x23, 0x26, 0x15, 0x8b, 0xbd, 0xcd, 0x59, 0xaf, 0x98, 0x3d, 0x7c, 0xc1, 0xa9, 0xca, 0x62, 0x71, - 0xcb, 0xf8, 0xb4, 0x00, 0x74, 0xdb, 0x4b, 0x26, 0x54, 0x4a, 0x22, 0x5f, 0x52, 0xb1, 0x64, 0x01, - 0xcd, 0x49, 0xae, 0x0d, 0xe5, 0xcb, 0x98, 0x53, 0xb7, 0x0e, 0xb5, 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0xeb, 0x49, 0x0e, 0x60, 0x71, 0x9b, 0x24, 0xac, 0xbd, 0xe5, - 0x8d, 0xb9, 0xb1, 0xcd, 0x9b, 0xd0, 0xfd, 0x1d, 0x00, 0x00, 0xff, 0xff, 0xac, 0x59, 0x29, 0xc6, - 0x85, 0x04, 0x00, 0x00, +var fileDescriptorPolicy = []byte{ + // 566 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x94, 0xdf, 0x6e, 0xd3, 0x30, + 0x14, 0xc6, 0x97, 0xb5, 0xa4, 0xeb, 0xe9, 0x28, 0x93, 0x2f, 0x50, 0x98, 0xd8, 0x98, 0xc2, 0x80, + 0x71, 0x41, 0xaa, 0x75, 0xfc, 0xd1, 0x6e, 0x90, 0x28, 0x54, 0x74, 0x95, 0xba, 0x56, 0x1e, 0x93, + 0x10, 0x37, 0x91, 0x97, 0x58, 0xad, 0xbb, 0xd4, 0x89, 0x6c, 0xa7, 0x11, 0x2f, 0xc0, 0x23, 0xf0, + 0x4c, 0x5c, 0x72, 0xc7, 0x2d, 0xea, 0x7b, 0x20, 0x21, 0x3b, 0xcd, 0xaa, 0x4a, 0x94, 0xc2, 0xe5, + 0x39, 0x3d, 0xdf, 0xaf, 0xdf, 0xe7, 0x1c, 0x1b, 0x0e, 0x49, 0xaa, 0x46, 0x94, 0x2b, 0x16, 0x10, + 0xc5, 0x62, 0xde, 0x98, 0x1e, 0x93, 0x28, 0x19, 0x91, 0xe3, 0x46, 0x12, 0x47, 0x2c, 0xf8, 0xec, + 0x25, 0x22, 0x56, 0x31, 0xda, 0x63, 0x52, 0xb1, 0xd8, 0x5b, 0x9e, 0xf5, 0x8a, 0xd9, 0xdd, 0xa7, + 0x9c, 0xaa, 0x2c, 0x16, 0xd7, 0x8c, 0x0f, 0x0b, 0xc0, 0x49, 0x63, 0xca, 0x84, 0x4a, 0x49, 0xe4, + 0x4b, 0x2a, 0xa6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