From c3c01bcb79059d164ac0ea4c0eb0daef330ef319 Mon Sep 17 00:00:00 2001 From: Clayton Pence Date: Fri, 22 Nov 2019 14:06:02 -0800 Subject: [PATCH 1/3] Add proto for analysis messages --- analysis/v1alpha1/message.proto | 128 +++++++++++++++++++++++++++ proto.lock | 147 ++++++++++++++++++++++++++++++++ 2 files changed, 275 insertions(+) create mode 100644 analysis/v1alpha1/message.proto diff --git a/analysis/v1alpha1/message.proto b/analysis/v1alpha1/message.proto new file mode 100644 index 00000000000..d1f4d7f4834 --- /dev/null +++ b/analysis/v1alpha1/message.proto @@ -0,0 +1,128 @@ +// Copyright 2019 Istio Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +// $title: Analysis Messages +// $description: Describes the structure of messages generated by Istio analyzers. +// $location: https://istio.io/docs/reference/config/istio.analysis.v1alpha1.html +// $weight: 20 + +// Describes the structure of messages generated by Istio analyzers. +package istio.analysis.v1alpha1; + +import "google/protobuf/struct.proto"; + +option go_package="istio.io/api/analysis/v1alpha1"; + +// There are four messages described in this file. One of them is a struct +// common to the other three: AnalysisMessageBase. Using this, we can construct +// one of three different structures. +// One is the AnalysisMessageWeakSchema, a YAML only description of a message +// type intended to be used where strong API guarantees are not necessary. +// One is the GenericAnalysisMessage, which is the struct that we guarantee that +// you can deserialize any analysis message to. Istio internally uses generated +// golang types from messages.yaml, so in order to reduce friction in creating +// new analyzers we offer a path that doesn't require committing to two +// different repos and solidifying the interface. +// Finally, we can create a new proto message of a specific message type and +// commit it to istio/api when we need a strong guarantee for cross platform +// communication. + +// AnalysisMessageBase describes some common information that is needed for all +// messages. All information should be static with respect to the error code. +message AnalysisMessageBase { + // A human-readable name for the message type. e.g. "InternalError", + // "PodMissingProxy". This should be the same for all messages of the same type. + // Required. + string name = 1; + + // A 7 character code matching `^IST[0-9]{4}$` intended to uniquely identify + // the message type. (e.g. "IST0001" is mapped to the "InternalError" message + // type.) 0000-0100 are reserved. Required. + string code = 2; + + // The values here are chosen so that more severe messages get sorted higher, + // as well as leaving space in between to add more later + enum Level { + UNKNOWN = 0; // invalid, but included for proto compatibility for 0 values + ERROR = 3; + WARNING = 8; + INFO = 12; + } + + // Represents how severe a message is. Required. + Level level = 3; + + // A url pointing to the Istio documentation for this specific error type. + // Should be of the form + // `^http(s)?://(preliminary\.)?istio.io/docs/reference/config/analysis/` + // Required. + string documentation_url = 4; + +} + +// AnalysisMessageWeakSchema is the set of information that's needed to define a +// weakly-typed schema. The purpose of this proto is to provide a mechanism for +// validating istio/istio/galley/pkg/config/analysis/msg/messages.yaml to make +// sure that we don't allow committing underspecified types. +message AnalysisMessageWeakSchema { + // Required + AnalysisMessageBase message_base = 1; + + // A human readable description of what the error means. Required. + string description = 2; + + // A go-style template string defining how to combine the args for a + // particular message into a log line. Required. + string template = 3; + + message ArgType { + // Required + string name = 1; + // Required. Should be a golang type, used in code generation + string go_type = 2; + } + + // A description of the arguments for a particular message type + repeated ArgType args = 4; +} + +// GenericAnalysisMessage is an instance of an AnalysisMessage defined by a +// schema, whose metaschema is AnalysisMessageWeakSchema. (Names are hard.) Code +// should be able to perform validation of arguments as needed by using the +// message type information to look at the AnalysisMessageWeakSchema and examine the +// list of args at runtime. Developers can also create stronger-typed versions +// of GenericAnalysisMessage for well-known and stable message types. +message GenericAnalysisMessage { + // Required + AnalysisMessageBase message_base = 1; + + // Any message-type specific arguments that need to get codified. Optional. + google.protobuf.Struct args = 2; + + // A list of strings specifying the path for resources which were the cause of + // message generation. At least one is required. + repeated string resource_paths = 3; +} + +// InternalErrorAnalysisMessage is a strongly-typed message representing some +// error in Istio code that prevented us from performing analysis at all. +message InternalErrorAnalysisMessage { + // Required + AnalysisMessageBase message_base = 1; + + // Any detail regarding specifics of the error. Should be human-readable. + string detail = 2; +} diff --git a/proto.lock b/proto.lock index db1eddf4ab2..286c5581a81 100644 --- a/proto.lock +++ b/proto.lock @@ -1,5 +1,152 @@ { "definitions": [ + { + "protopath": "analysis:/:v1alpha1:/:message.proto", + "def": { + "enums": [ + { + "name": "AnalysisMessageBase.Level", + "enum_fields": [ + { + "name": "UNKNOWN" + }, + { + "name": "ERROR", + "integer": 3 + }, + { + "name": "WARNING", + "integer": 8 + }, + { + "name": "INFO", + "integer": 12 + } + ] + } + ], + "messages": [ + { + "name": "AnalysisMessageBase", + "fields": [ + { + "id": 1, + "name": "name", + "type": "string" + }, + { + "id": 2, + "name": "code", + "type": "string" + }, + { + "id": 3, + "name": "level", + "type": "Level" + }, + { + "id": 4, + "name": "documentation_url", + "type": "string" + } + ] + }, + { + "name": "AnalysisMessageWeakSchema", + "fields": [ + { + "id": 1, + "name": "message_base", + "type": "AnalysisMessageBase" + }, + { + "id": 2, + "name": "description", + "type": "string" + }, + { + "id": 3, + "name": "template", + "type": "string" + }, + { + "id": 4, + "name": "args", + "type": "ArgType", + "is_repeated": true + } + ], + "messages": [ + { + "name": "ArgType", + "fields": [ + { + "id": 1, + "name": "name", + "type": "string" + }, + { + "id": 2, + "name": "go_type", + "type": "string" + } + ] + } + ] + }, + { + "name": "GenericAnalysisMessage", + "fields": [ + { + "id": 1, + "name": "message_base", + "type": "AnalysisMessageBase" + }, + { + "id": 2, + "name": "args", + "type": "google.protobuf.Struct" + }, + { + "id": 3, + "name": "resource_paths", + "type": "string", + "is_repeated": true + } + ] + }, + { + "name": "InternalErrorAnalysisMessage", + "fields": [ + { + "id": 1, + "name": "message_base", + "type": "AnalysisMessageBase" + }, + { + "id": 2, + "name": "detail", + "type": "string" + } + ] + } + ], + "imports": [ + { + "path": "google/protobuf/struct.proto" + } + ], + "package": { + "name": "istio.analysis.v1alpha1" + }, + "options": [ + { + "name": "go_package", + "value": "istio.io/api/analysis/v1alpha1" + } + ] + } + }, { "protopath": "authentication:/:v1alpha1:/:policy.proto", "def": { From 349eb829fe56e50f4b5cc6b7a5574e5673ac7299 Mon Sep 17 00:00:00 2001 From: Clayton Pence Date: Mon, 2 Dec 2019 14:29:24 -0800 Subject: [PATCH 2/3] Add analysis protos to make system --- Makefile.core.mk | 26 + analysis/v1alpha1/message.gen.json | 121 ++ analysis/v1alpha1/message.pb.go | 1731 +++++++++++++++++ analysis/v1alpha1/message.pb.html | 316 +++ cue.yaml | 2 + .../analysis/v1alpha1/message_pb2.py | 337 ++++ 6 files changed, 2533 insertions(+) create mode 100644 analysis/v1alpha1/message.gen.json create mode 100644 analysis/v1alpha1/message.pb.go create mode 100644 analysis/v1alpha1/message.pb.html create mode 100644 python/istio_api/analysis/v1alpha1/message_pb2.py diff --git a/Makefile.core.mk b/Makefile.core.mk index a0f801aa6e6..8a362e57bc5 100644 --- a/Makefile.core.mk +++ b/Makefile.core.mk @@ -99,6 +99,7 @@ gen: \ generate-rbac \ generate-authn \ generate-security \ + generate-analysis \ generate-envoy \ generate-policy \ generate-annotations \ @@ -396,6 +397,28 @@ generate-security: $(security_v1beta1_pb_gos) $(security_v1beta1_pb_docs) $(secu clean-security: @rm -fr $(security_v1beta1_pb_gos) $(security_v1beta1_pb_docs) $(security_v1beta1_pb_pythons) $(security_v1beta1_k8s_gos) +##################### +# analysis/... +##################### + +analysis_v1alpha1_path := analysis/v1alpha1 +analysis_v1alpha1_protos := $(wildcard $(analysis_v1alpha1_path)/*.proto) +analysis_v1alpha1_pb_gos := $(analysis_v1alpha1_protos:.proto=.pb.go) +analysis_v1alpha1_pb_pythons := $(patsubst $(analysis_v1alpha1_path)/%.proto,$(python_output_path)/$(analysis_v1alpha1_path)/%_pb2.py,$(analysis_v1alpha1_protos)) +analysis_v1alpha1_pb_docs := $(analysis_v1alpha1_protos:.proto=.pb.html) +analysis_v1alpha1_openapi := $(analysis_v1alpha1_protos:.proto=.gen.json) + + +$(analysis_v1alpha1_pb_gos) $(analysis_v1alpha1_pb_docs) $(analysis_v1alpha1_pb_pythons): $(analysis_v1alpha1_protos) + @$(protolock) status + @$(protoc) $(gogofast_plugin) $(protoc_gen_docs_plugin_per_file)$(analysis_v1alpha1_path) $(protoc_gen_python_plugin) $^ + @cp -r /tmp/istio.io/api/analysis/* analysis + +generate-analysis: $(analysis_v1alpha1_pb_gos) $(analysis_v1alpha1_pb_docs) $(analysis_v1alpha1_pb_pythons) + +clean-analysis: + @rm -fr $(analysis_v1alpha1_pb_gos) $(analysis_v1alpha1_pb_docs) $(analysis_v1alpha1_pb_pythons) + ##################### # envoy/... ##################### @@ -471,6 +494,7 @@ all_protos := \ $(rbac_v1alpha1_protos) \ $(authn_v1alpha1_protos) \ $(security_v1beta1_protos) \ + $(analysis_v1alpha1_protos) \ $(type_v1beta1_protos) all_openapi := \ @@ -486,6 +510,7 @@ all_openapi := \ $(rbac_v1alpha1_openapi) \ $(authn_v1alpha1_openapi) \ $(security_v1beta1_openapi) \ + $(analysis_v1alpha1_openapi) \ $(type_v1beta1_openapi) all_openapi_crd := kubernetes/customresourcedefinitions.gen.yaml @@ -525,6 +550,7 @@ clean: \ clean-annotations \ clean-openapi-schema \ clean-security \ + generate-analysis \ clean-type \ clean-openapi-crd diff --git a/analysis/v1alpha1/message.gen.json b/analysis/v1alpha1/message.gen.json new file mode 100644 index 00000000000..5b42b98b07d --- /dev/null +++ b/analysis/v1alpha1/message.gen.json @@ -0,0 +1,121 @@ +{ + "openapi": "3.0.0", + "info": { + "title": "Describes the structure of messages generated by Istio analyzers.", + "version": "v1alpha1" + }, + "components": { + "schemas": { + "istio.analysis.v1alpha1.AnalysisMessageBase": { + "description": "AnalysisMessageBase describes some common information that is needed for all messages. All information should be static with respect to the error code.", + "type": "object", + "properties": { + "name": { + "description": "A human-readable name for the message type. e.g. \"InternalError\", \"PodMissingProxy\". This should be the same for all messages of the same type. Required.", + "type": "string", + "format": "string" + }, + "code": { + "description": "A 7 character code matching `^IST[0-9]{4}$` intended to uniquely identify the message type. (e.g. \"IST0001\" is mapped to the \"InternalError\" message type.) 0000-0100 are reserved. Required.", + "type": "string", + "format": "string" + }, + "level": { + "$ref": "#/components/schemas/istio.analysis.v1alpha1.AnalysisMessageBase.Level" + }, + "documentationUrl": { + "description": "A url pointing to the Istio documentation for this specific error type. Should be of the form `^http(s)?://(preliminary\\.)?istio.io/docs/reference/config/analysis/` Required.", + "type": "string", + "format": "string" + } + } + }, + "istio.analysis.v1alpha1.AnalysisMessageBase.Level": { + "description": "The values here are chosen so that more severe messages get sorted higher, as well as leaving space in between to add more later", + "type": "string", + "enum": [ + "UNKNOWN", + "ERROR", + "WARNING", + "INFO" + ] + }, + "istio.analysis.v1alpha1.AnalysisMessageWeakSchema": { + "description": "AnalysisMessageWeakSchema is the set of information that's needed to define a weakly-typed schema. The purpose of this proto is to provide a mechanism for validating istio/istio/galley/pkg/config/analysis/msg/messages.yaml to make sure that we don't allow committing underspecified types.", + "type": "object", + "properties": { + "messageBase": { + "$ref": "#/components/schemas/istio.analysis.v1alpha1.AnalysisMessageBase" + }, + "description": { + "description": "A human readable description of what the error means. Required.", + "type": "string", + "format": "string" + }, + "template": { + "description": "A go-style template string defining how to combine the args for a particular message into a log line. Required.", + "type": "string", + "format": "string" + }, + "args": { + "description": "A description of the arguments for a particular message type", + "type": "array", + "items": { + "$ref": "#/components/schemas/istio.analysis.v1alpha1.AnalysisMessageWeakSchema.ArgType" + } + } + } + }, + "istio.analysis.v1alpha1.AnalysisMessageWeakSchema.ArgType": { + "type": "object", + "properties": { + "name": { + "description": "Required", + "type": "string", + "format": "string" + }, + "goType": { + "description": "Required. Should be a golang type, used in code generation", + "type": "string", + "format": "string" + } + } + }, + "istio.analysis.v1alpha1.GenericAnalysisMessage": { + "description": "GenericAnalysisMessage is an instance of an AnalysisMessage defined by a schema, whose metaschema is AnalysisMessageWeakSchema. (Names are hard.) Code should be able to perform validation of arguments as needed by using the message type information to look at the AnalysisMessageWeakSchema and examine the list of args at runtime. Developers can also create stronger-typed versions of GenericAnalysisMessage for well-known and stable message types.", + "type": "object", + "properties": { + "messageBase": { + "$ref": "#/components/schemas/istio.analysis.v1alpha1.AnalysisMessageBase" + }, + "args": { + "description": "Any message-type specific arguments that need to get codified. Optional.", + "type": "object" + }, + "resourcePaths": { + "description": "A list of strings specifying the path for resources which were the cause of message generation. At least one is required.", + "type": "array", + "items": { + "type": "string", + "format": "string" + } + } + } + }, + "istio.analysis.v1alpha1.InternalErrorAnalysisMessage": { + "description": "InternalErrorAnalysisMessage is a strongly-typed message representing some error in Istio code that prevented us from performing analysis at all.", + "type": "object", + "properties": { + "messageBase": { + "$ref": "#/components/schemas/istio.analysis.v1alpha1.AnalysisMessageBase" + }, + "detail": { + "description": "Any detail regarding specifics of the error. Should be human-readable.", + "type": "string", + "format": "string" + } + } + } + } + } +} \ No newline at end of file diff --git a/analysis/v1alpha1/message.pb.go b/analysis/v1alpha1/message.pb.go new file mode 100644 index 00000000000..46d4600aee3 --- /dev/null +++ b/analysis/v1alpha1/message.pb.go @@ -0,0 +1,1731 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: analysis/v1alpha1/message.proto + +// Describes the structure of messages generated by Istio analyzers. + +package v1alpha1 + +import ( + fmt "fmt" + proto "github.com/gogo/protobuf/proto" + types "github.com/gogo/protobuf/types" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// The values here are chosen so that more severe messages get sorted higher, +// as well as leaving space in between to add more later +type AnalysisMessageBase_Level int32 + +const ( + AnalysisMessageBase_UNKNOWN AnalysisMessageBase_Level = 0 + AnalysisMessageBase_ERROR AnalysisMessageBase_Level = 3 + AnalysisMessageBase_WARNING AnalysisMessageBase_Level = 8 + AnalysisMessageBase_INFO AnalysisMessageBase_Level = 12 +) + +var AnalysisMessageBase_Level_name = map[int32]string{ + 0: "UNKNOWN", + 3: "ERROR", + 8: "WARNING", + 12: "INFO", +} + +var AnalysisMessageBase_Level_value = map[string]int32{ + "UNKNOWN": 0, + "ERROR": 3, + "WARNING": 8, + "INFO": 12, +} + +func (x AnalysisMessageBase_Level) String() string { + return proto.EnumName(AnalysisMessageBase_Level_name, int32(x)) +} + +func (AnalysisMessageBase_Level) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_4d6fd1414dfe3800, []int{0, 0} +} + +// AnalysisMessageBase describes some common information that is needed for all +// messages. All information should be static with respect to the error code. +type AnalysisMessageBase struct { + // A human-readable name for the message type. e.g. "InternalError", + // "PodMissingProxy". This should be the same for all messages of the same type. + // Required. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // A 7 character code matching `^IST[0-9]{4}$` intended to uniquely identify + // the message type. (e.g. "IST0001" is mapped to the "InternalError" message + // type.) 0000-0100 are reserved. Required. + Code string `protobuf:"bytes,2,opt,name=code,proto3" json:"code,omitempty"` + // Represents how severe a message is. Required. + Level AnalysisMessageBase_Level `protobuf:"varint,3,opt,name=level,proto3,enum=istio.analysis.v1alpha1.AnalysisMessageBase_Level" json:"level,omitempty"` + // A url pointing to the Istio documentation for this specific error type. + // Should be of the form + // `^http(s)?://(preliminary\.)?istio.io/docs/reference/config/analysis/` + // Required. + DocumentationUrl string `protobuf:"bytes,4,opt,name=documentation_url,json=documentationUrl,proto3" json:"documentation_url,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *AnalysisMessageBase) Reset() { *m = AnalysisMessageBase{} } +func (m *AnalysisMessageBase) String() string { return proto.CompactTextString(m) } +func (*AnalysisMessageBase) ProtoMessage() {} +func (*AnalysisMessageBase) Descriptor() ([]byte, []int) { + return fileDescriptor_4d6fd1414dfe3800, []int{0} +} +func (m *AnalysisMessageBase) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *AnalysisMessageBase) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_AnalysisMessageBase.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *AnalysisMessageBase) XXX_Merge(src proto.Message) { + xxx_messageInfo_AnalysisMessageBase.Merge(m, src) +} +func (m *AnalysisMessageBase) XXX_Size() int { + return m.Size() +} +func (m *AnalysisMessageBase) XXX_DiscardUnknown() { + xxx_messageInfo_AnalysisMessageBase.DiscardUnknown(m) +} + +var xxx_messageInfo_AnalysisMessageBase proto.InternalMessageInfo + +func (m *AnalysisMessageBase) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *AnalysisMessageBase) GetCode() string { + if m != nil { + return m.Code + } + return "" +} + +func (m *AnalysisMessageBase) GetLevel() AnalysisMessageBase_Level { + if m != nil { + return m.Level + } + return AnalysisMessageBase_UNKNOWN +} + +func (m *AnalysisMessageBase) GetDocumentationUrl() string { + if m != nil { + return m.DocumentationUrl + } + return "" +} + +// AnalysisMessageWeakSchema is the set of information that's needed to define a +// weakly-typed schema. The purpose of this proto is to provide a mechanism for +// validating istio/istio/galley/pkg/config/analysis/msg/messages.yaml to make +// sure that we don't allow committing underspecified types. +type AnalysisMessageWeakSchema struct { + // Required + MessageBase *AnalysisMessageBase `protobuf:"bytes,1,opt,name=message_base,json=messageBase,proto3" json:"message_base,omitempty"` + // A human readable description of what the error means. Required. + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` + // A go-style template string defining how to combine the args for a + // particular message into a log line. Required. + Template string `protobuf:"bytes,3,opt,name=template,proto3" json:"template,omitempty"` + // A description of the arguments for a particular message type + Args []*AnalysisMessageWeakSchema_ArgType `protobuf:"bytes,4,rep,name=args,proto3" json:"args,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *AnalysisMessageWeakSchema) Reset() { *m = AnalysisMessageWeakSchema{} } +func (m *AnalysisMessageWeakSchema) String() string { return proto.CompactTextString(m) } +func (*AnalysisMessageWeakSchema) ProtoMessage() {} +func (*AnalysisMessageWeakSchema) Descriptor() ([]byte, []int) { + return fileDescriptor_4d6fd1414dfe3800, []int{1} +} +func (m *AnalysisMessageWeakSchema) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *AnalysisMessageWeakSchema) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_AnalysisMessageWeakSchema.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *AnalysisMessageWeakSchema) XXX_Merge(src proto.Message) { + xxx_messageInfo_AnalysisMessageWeakSchema.Merge(m, src) +} +func (m *AnalysisMessageWeakSchema) XXX_Size() int { + return m.Size() +} +func (m *AnalysisMessageWeakSchema) XXX_DiscardUnknown() { + xxx_messageInfo_AnalysisMessageWeakSchema.DiscardUnknown(m) +} + +var xxx_messageInfo_AnalysisMessageWeakSchema proto.InternalMessageInfo + +func (m *AnalysisMessageWeakSchema) GetMessageBase() *AnalysisMessageBase { + if m != nil { + return m.MessageBase + } + return nil +} + +func (m *AnalysisMessageWeakSchema) GetDescription() string { + if m != nil { + return m.Description + } + return "" +} + +func (m *AnalysisMessageWeakSchema) GetTemplate() string { + if m != nil { + return m.Template + } + return "" +} + +func (m *AnalysisMessageWeakSchema) GetArgs() []*AnalysisMessageWeakSchema_ArgType { + if m != nil { + return m.Args + } + return nil +} + +type AnalysisMessageWeakSchema_ArgType struct { + // Required + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Required. Should be a golang type, used in code generation + GoType string `protobuf:"bytes,2,opt,name=go_type,json=goType,proto3" json:"go_type,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *AnalysisMessageWeakSchema_ArgType) Reset() { *m = AnalysisMessageWeakSchema_ArgType{} } +func (m *AnalysisMessageWeakSchema_ArgType) String() string { return proto.CompactTextString(m) } +func (*AnalysisMessageWeakSchema_ArgType) ProtoMessage() {} +func (*AnalysisMessageWeakSchema_ArgType) Descriptor() ([]byte, []int) { + return fileDescriptor_4d6fd1414dfe3800, []int{1, 0} +} +func (m *AnalysisMessageWeakSchema_ArgType) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *AnalysisMessageWeakSchema_ArgType) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_AnalysisMessageWeakSchema_ArgType.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *AnalysisMessageWeakSchema_ArgType) XXX_Merge(src proto.Message) { + xxx_messageInfo_AnalysisMessageWeakSchema_ArgType.Merge(m, src) +} +func (m *AnalysisMessageWeakSchema_ArgType) XXX_Size() int { + return m.Size() +} +func (m *AnalysisMessageWeakSchema_ArgType) XXX_DiscardUnknown() { + xxx_messageInfo_AnalysisMessageWeakSchema_ArgType.DiscardUnknown(m) +} + +var xxx_messageInfo_AnalysisMessageWeakSchema_ArgType proto.InternalMessageInfo + +func (m *AnalysisMessageWeakSchema_ArgType) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *AnalysisMessageWeakSchema_ArgType) GetGoType() string { + if m != nil { + return m.GoType + } + return "" +} + +// GenericAnalysisMessage is an instance of an AnalysisMessage defined by a +// schema, whose metaschema is AnalysisMessageWeakSchema. (Names are hard.) Code +// should be able to perform validation of arguments as needed by using the +// message type information to look at the AnalysisMessageWeakSchema and examine the +// list of args at runtime. Developers can also create stronger-typed versions +// of GenericAnalysisMessage for well-known and stable message types. +type GenericAnalysisMessage struct { + // Required + MessageBase *AnalysisMessageBase `protobuf:"bytes,1,opt,name=message_base,json=messageBase,proto3" json:"message_base,omitempty"` + // Any message-type specific arguments that need to get codified. Optional. + Args *types.Struct `protobuf:"bytes,2,opt,name=args,proto3" json:"args,omitempty"` + // A list of strings specifying the path for resources which were the cause of + // message generation. At least one is required. + ResourcePaths []string `protobuf:"bytes,3,rep,name=resource_paths,json=resourcePaths,proto3" json:"resource_paths,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GenericAnalysisMessage) Reset() { *m = GenericAnalysisMessage{} } +func (m *GenericAnalysisMessage) String() string { return proto.CompactTextString(m) } +func (*GenericAnalysisMessage) ProtoMessage() {} +func (*GenericAnalysisMessage) Descriptor() ([]byte, []int) { + return fileDescriptor_4d6fd1414dfe3800, []int{2} +} +func (m *GenericAnalysisMessage) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GenericAnalysisMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GenericAnalysisMessage.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *GenericAnalysisMessage) XXX_Merge(src proto.Message) { + xxx_messageInfo_GenericAnalysisMessage.Merge(m, src) +} +func (m *GenericAnalysisMessage) XXX_Size() int { + return m.Size() +} +func (m *GenericAnalysisMessage) XXX_DiscardUnknown() { + xxx_messageInfo_GenericAnalysisMessage.DiscardUnknown(m) +} + +var xxx_messageInfo_GenericAnalysisMessage proto.InternalMessageInfo + +func (m *GenericAnalysisMessage) GetMessageBase() *AnalysisMessageBase { + if m != nil { + return m.MessageBase + } + return nil +} + +func (m *GenericAnalysisMessage) GetArgs() *types.Struct { + if m != nil { + return m.Args + } + return nil +} + +func (m *GenericAnalysisMessage) GetResourcePaths() []string { + if m != nil { + return m.ResourcePaths + } + return nil +} + +// InternalErrorAnalysisMessage is a strongly-typed message representing some +// error in Istio code that prevented us from performing analysis at all. +type InternalErrorAnalysisMessage struct { + // Required + MessageBase *AnalysisMessageBase `protobuf:"bytes,1,opt,name=message_base,json=messageBase,proto3" json:"message_base,omitempty"` + // Any detail regarding specifics of the error. Should be human-readable. + Detail string `protobuf:"bytes,2,opt,name=detail,proto3" json:"detail,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *InternalErrorAnalysisMessage) Reset() { *m = InternalErrorAnalysisMessage{} } +func (m *InternalErrorAnalysisMessage) String() string { return proto.CompactTextString(m) } +func (*InternalErrorAnalysisMessage) ProtoMessage() {} +func (*InternalErrorAnalysisMessage) Descriptor() ([]byte, []int) { + return fileDescriptor_4d6fd1414dfe3800, []int{3} +} +func (m *InternalErrorAnalysisMessage) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *InternalErrorAnalysisMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_InternalErrorAnalysisMessage.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *InternalErrorAnalysisMessage) XXX_Merge(src proto.Message) { + xxx_messageInfo_InternalErrorAnalysisMessage.Merge(m, src) +} +func (m *InternalErrorAnalysisMessage) XXX_Size() int { + return m.Size() +} +func (m *InternalErrorAnalysisMessage) XXX_DiscardUnknown() { + xxx_messageInfo_InternalErrorAnalysisMessage.DiscardUnknown(m) +} + +var xxx_messageInfo_InternalErrorAnalysisMessage proto.InternalMessageInfo + +func (m *InternalErrorAnalysisMessage) GetMessageBase() *AnalysisMessageBase { + if m != nil { + return m.MessageBase + } + return nil +} + +func (m *InternalErrorAnalysisMessage) GetDetail() string { + if m != nil { + return m.Detail + } + return "" +} + +func init() { + proto.RegisterEnum("istio.analysis.v1alpha1.AnalysisMessageBase_Level", AnalysisMessageBase_Level_name, AnalysisMessageBase_Level_value) + proto.RegisterType((*AnalysisMessageBase)(nil), "istio.analysis.v1alpha1.AnalysisMessageBase") + proto.RegisterType((*AnalysisMessageWeakSchema)(nil), "istio.analysis.v1alpha1.AnalysisMessageWeakSchema") + proto.RegisterType((*AnalysisMessageWeakSchema_ArgType)(nil), "istio.analysis.v1alpha1.AnalysisMessageWeakSchema.ArgType") + proto.RegisterType((*GenericAnalysisMessage)(nil), "istio.analysis.v1alpha1.GenericAnalysisMessage") + proto.RegisterType((*InternalErrorAnalysisMessage)(nil), "istio.analysis.v1alpha1.InternalErrorAnalysisMessage") +} + +func init() { proto.RegisterFile("analysis/v1alpha1/message.proto", fileDescriptor_4d6fd1414dfe3800) } + +var fileDescriptor_4d6fd1414dfe3800 = []byte{ + // 493 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x53, 0x5d, 0x6b, 0x13, 0x41, + 0x14, 0x75, 0x9b, 0xef, 0x9b, 0x5a, 0xe2, 0x08, 0xcd, 0x1a, 0x4a, 0x0c, 0x01, 0x21, 0xd0, 0x32, + 0x4b, 0x23, 0xf4, 0xc1, 0xb7, 0x14, 0x6a, 0x0d, 0xea, 0x46, 0xa6, 0x96, 0x80, 0x2f, 0x61, 0xb2, + 0xb9, 0x6e, 0x16, 0x67, 0x77, 0x96, 0x99, 0xd9, 0x42, 0x7e, 0x81, 0xff, 0xc7, 0x77, 0xdf, 0x7d, + 0xf4, 0x27, 0x48, 0x9e, 0xfd, 0x11, 0xb2, 0x5f, 0x5a, 0x6b, 0x05, 0x05, 0x7d, 0x9b, 0x39, 0x7b, + 0xef, 0xb9, 0xe7, 0x9c, 0xb9, 0x0b, 0x0f, 0x79, 0xc4, 0xc5, 0x46, 0x07, 0xda, 0xb9, 0x3a, 0xe6, + 0x22, 0x5e, 0xf3, 0x63, 0x27, 0x44, 0xad, 0xb9, 0x8f, 0x34, 0x56, 0xd2, 0x48, 0xd2, 0x0d, 0xb4, + 0x09, 0x24, 0x2d, 0xcb, 0x68, 0x59, 0xd6, 0x3b, 0xf0, 0xa5, 0xf4, 0x05, 0x3a, 0x59, 0xd9, 0x32, + 0x79, 0xeb, 0x68, 0xa3, 0x12, 0xcf, 0xe4, 0x6d, 0xc3, 0xaf, 0x16, 0xdc, 0x9f, 0x14, 0x3d, 0x2f, + 0x73, 0xc2, 0x53, 0xae, 0x91, 0x10, 0xa8, 0x46, 0x3c, 0x44, 0xdb, 0x1a, 0x58, 0xa3, 0x16, 0xcb, + 0xce, 0x29, 0xe6, 0xc9, 0x15, 0xda, 0x3b, 0x39, 0x96, 0x9e, 0xc9, 0x33, 0xa8, 0x09, 0xbc, 0x42, + 0x61, 0x57, 0x06, 0xd6, 0x68, 0x6f, 0x3c, 0xa6, 0xbf, 0x91, 0x41, 0x6f, 0x19, 0x42, 0x5f, 0xa4, + 0x9d, 0x2c, 0x27, 0x20, 0x87, 0x70, 0x6f, 0x25, 0xbd, 0x24, 0xc4, 0xc8, 0x70, 0x13, 0xc8, 0x68, + 0x91, 0x28, 0x61, 0x57, 0xb3, 0x51, 0x9d, 0x9f, 0x3e, 0x5c, 0x2a, 0x31, 0x3c, 0x81, 0x5a, 0xd6, + 0x4c, 0xda, 0xd0, 0xb8, 0x74, 0x9f, 0xbb, 0xb3, 0xb9, 0xdb, 0xb9, 0x43, 0x5a, 0x50, 0x3b, 0x63, + 0x6c, 0xc6, 0x3a, 0x95, 0x14, 0x9f, 0x4f, 0x98, 0x3b, 0x75, 0xcf, 0x3b, 0x4d, 0xd2, 0x84, 0xea, + 0xd4, 0x7d, 0x3a, 0xeb, 0xec, 0x0e, 0x3f, 0xec, 0xc0, 0x83, 0x1b, 0x4a, 0xe6, 0xc8, 0xdf, 0x5d, + 0x78, 0x6b, 0x0c, 0x39, 0x99, 0xc1, 0x6e, 0x11, 0xea, 0x62, 0xc9, 0x75, 0x6e, 0xbe, 0x3d, 0x3e, + 0xfa, 0x1b, 0x4f, 0xac, 0x1d, 0x5e, 0x4b, 0x71, 0x00, 0xed, 0x15, 0x6a, 0x4f, 0x05, 0x71, 0x2a, + 0xbc, 0x08, 0xee, 0x3a, 0x44, 0x7a, 0xd0, 0x34, 0x18, 0xc6, 0x82, 0x1b, 0xcc, 0x22, 0x6c, 0xb1, + 0xef, 0x77, 0xe2, 0x42, 0x95, 0x2b, 0x5f, 0xdb, 0xd5, 0x41, 0x65, 0xd4, 0x1e, 0x3f, 0xf9, 0x53, + 0x19, 0x3f, 0x0c, 0xd1, 0x89, 0xf2, 0x5f, 0x6f, 0x62, 0x64, 0x19, 0x4f, 0xef, 0x04, 0x1a, 0x05, + 0x70, 0xeb, 0xf3, 0x76, 0xa1, 0xe1, 0xcb, 0x85, 0xd9, 0xc4, 0xe5, 0x0b, 0xd7, 0x7d, 0x99, 0x16, + 0x0f, 0x3f, 0x5a, 0xb0, 0x7f, 0x8e, 0x11, 0xaa, 0xc0, 0xbb, 0x31, 0xea, 0xdf, 0x27, 0x76, 0x58, + 0x78, 0xde, 0xc9, 0x88, 0xba, 0x34, 0x5f, 0x5e, 0x5a, 0x2e, 0x2f, 0xbd, 0xc8, 0x96, 0x37, 0x37, + 0x44, 0x1e, 0xc1, 0x9e, 0x42, 0x2d, 0x13, 0xe5, 0xe1, 0x22, 0xe6, 0x66, 0xad, 0xed, 0xca, 0xa0, + 0x32, 0x6a, 0xb1, 0xbb, 0x25, 0xfa, 0x2a, 0x05, 0x87, 0xef, 0x2d, 0x38, 0x98, 0x46, 0x06, 0x55, + 0xc4, 0xc5, 0x99, 0x52, 0x52, 0xfd, 0x77, 0x17, 0xfb, 0x50, 0x5f, 0xa1, 0xe1, 0x81, 0x28, 0x93, + 0xcc, 0x6f, 0xa7, 0x47, 0x9f, 0xb6, 0x7d, 0xeb, 0xf3, 0xb6, 0x6f, 0x7d, 0xd9, 0xf6, 0xad, 0x37, + 0xfd, 0x9c, 0x3f, 0x90, 0x0e, 0x8f, 0x03, 0xe7, 0x97, 0x1f, 0x7c, 0x59, 0xcf, 0x5c, 0x3f, 0xfe, + 0x16, 0x00, 0x00, 0xff, 0xff, 0x2d, 0x1b, 0x42, 0xc2, 0xfc, 0x03, 0x00, 0x00, +} + +func (m *AnalysisMessageBase) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *AnalysisMessageBase) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *AnalysisMessageBase) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if len(m.DocumentationUrl) > 0 { + i -= len(m.DocumentationUrl) + copy(dAtA[i:], m.DocumentationUrl) + i = encodeVarintMessage(dAtA, i, uint64(len(m.DocumentationUrl))) + i-- + dAtA[i] = 0x22 + } + if m.Level != 0 { + i = encodeVarintMessage(dAtA, i, uint64(m.Level)) + i-- + dAtA[i] = 0x18 + } + if len(m.Code) > 0 { + i -= len(m.Code) + copy(dAtA[i:], m.Code) + i = encodeVarintMessage(dAtA, i, uint64(len(m.Code))) + i-- + dAtA[i] = 0x12 + } + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintMessage(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *AnalysisMessageWeakSchema) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *AnalysisMessageWeakSchema) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *AnalysisMessageWeakSchema) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if len(m.Args) > 0 { + for iNdEx := len(m.Args) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Args[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintMessage(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + } + if len(m.Template) > 0 { + i -= len(m.Template) + copy(dAtA[i:], m.Template) + i = encodeVarintMessage(dAtA, i, uint64(len(m.Template))) + i-- + dAtA[i] = 0x1a + } + if len(m.Description) > 0 { + i -= len(m.Description) + copy(dAtA[i:], m.Description) + i = encodeVarintMessage(dAtA, i, uint64(len(m.Description))) + i-- + dAtA[i] = 0x12 + } + if m.MessageBase != nil { + { + size, err := m.MessageBase.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintMessage(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *AnalysisMessageWeakSchema_ArgType) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *AnalysisMessageWeakSchema_ArgType) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *AnalysisMessageWeakSchema_ArgType) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if len(m.GoType) > 0 { + i -= len(m.GoType) + copy(dAtA[i:], m.GoType) + i = encodeVarintMessage(dAtA, i, uint64(len(m.GoType))) + i-- + dAtA[i] = 0x12 + } + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintMessage(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *GenericAnalysisMessage) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GenericAnalysisMessage) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GenericAnalysisMessage) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if len(m.ResourcePaths) > 0 { + for iNdEx := len(m.ResourcePaths) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.ResourcePaths[iNdEx]) + copy(dAtA[i:], m.ResourcePaths[iNdEx]) + i = encodeVarintMessage(dAtA, i, uint64(len(m.ResourcePaths[iNdEx]))) + i-- + dAtA[i] = 0x1a + } + } + if m.Args != nil { + { + size, err := m.Args.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintMessage(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if m.MessageBase != nil { + { + size, err := m.MessageBase.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintMessage(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *InternalErrorAnalysisMessage) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *InternalErrorAnalysisMessage) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *InternalErrorAnalysisMessage) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if len(m.Detail) > 0 { + i -= len(m.Detail) + copy(dAtA[i:], m.Detail) + i = encodeVarintMessage(dAtA, i, uint64(len(m.Detail))) + i-- + dAtA[i] = 0x12 + } + if m.MessageBase != nil { + { + size, err := m.MessageBase.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintMessage(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintMessage(dAtA []byte, offset int, v uint64) int { + offset -= sovMessage(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *AnalysisMessageBase) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Name) + if l > 0 { + n += 1 + l + sovMessage(uint64(l)) + } + l = len(m.Code) + if l > 0 { + n += 1 + l + sovMessage(uint64(l)) + } + if m.Level != 0 { + n += 1 + sovMessage(uint64(m.Level)) + } + l = len(m.DocumentationUrl) + if l > 0 { + n += 1 + l + sovMessage(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *AnalysisMessageWeakSchema) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.MessageBase != nil { + l = m.MessageBase.Size() + n += 1 + l + sovMessage(uint64(l)) + } + l = len(m.Description) + if l > 0 { + n += 1 + l + sovMessage(uint64(l)) + } + l = len(m.Template) + if l > 0 { + n += 1 + l + sovMessage(uint64(l)) + } + if len(m.Args) > 0 { + for _, e := range m.Args { + l = e.Size() + n += 1 + l + sovMessage(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *AnalysisMessageWeakSchema_ArgType) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Name) + if l > 0 { + n += 1 + l + sovMessage(uint64(l)) + } + l = len(m.GoType) + if l > 0 { + n += 1 + l + sovMessage(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *GenericAnalysisMessage) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.MessageBase != nil { + l = m.MessageBase.Size() + n += 1 + l + sovMessage(uint64(l)) + } + if m.Args != nil { + l = m.Args.Size() + n += 1 + l + sovMessage(uint64(l)) + } + if len(m.ResourcePaths) > 0 { + for _, s := range m.ResourcePaths { + l = len(s) + n += 1 + l + sovMessage(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *InternalErrorAnalysisMessage) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.MessageBase != nil { + l = m.MessageBase.Size() + n += 1 + l + sovMessage(uint64(l)) + } + l = len(m.Detail) + if l > 0 { + n += 1 + l + sovMessage(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovMessage(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozMessage(x uint64) (n int) { + return sovMessage(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *AnalysisMessageBase) 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 ErrIntOverflowMessage + } + 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: AnalysisMessageBase: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AnalysisMessageBase: 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 ErrIntOverflowMessage + } + 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 ErrInvalidLengthMessage + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMessage + } + 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 Code", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessage + } + 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 ErrInvalidLengthMessage + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMessage + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Code = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Level", wireType) + } + m.Level = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Level |= AnalysisMessageBase_Level(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DocumentationUrl", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessage + } + 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 ErrInvalidLengthMessage + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMessage + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DocumentationUrl = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMessage(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMessage + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthMessage + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AnalysisMessageWeakSchema) 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 ErrIntOverflowMessage + } + 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: AnalysisMessageWeakSchema: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AnalysisMessageWeakSchema: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MessageBase", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMessage + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMessage + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.MessageBase == nil { + m.MessageBase = &AnalysisMessageBase{} + } + if err := m.MessageBase.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessage + } + 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 ErrInvalidLengthMessage + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMessage + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Description = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Template", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessage + } + 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 ErrInvalidLengthMessage + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMessage + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Template = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Args", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMessage + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMessage + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Args = append(m.Args, &AnalysisMessageWeakSchema_ArgType{}) + if err := m.Args[len(m.Args)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMessage(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMessage + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthMessage + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AnalysisMessageWeakSchema_ArgType) 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 ErrIntOverflowMessage + } + 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: ArgType: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ArgType: 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 ErrIntOverflowMessage + } + 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 ErrInvalidLengthMessage + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMessage + } + 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 GoType", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessage + } + 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 ErrInvalidLengthMessage + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMessage + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.GoType = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMessage(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMessage + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthMessage + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GenericAnalysisMessage) 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 ErrIntOverflowMessage + } + 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: GenericAnalysisMessage: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GenericAnalysisMessage: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MessageBase", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMessage + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMessage + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.MessageBase == nil { + m.MessageBase = &AnalysisMessageBase{} + } + if err := m.MessageBase.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Args", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMessage + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMessage + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Args == nil { + m.Args = &types.Struct{} + } + if err := m.Args.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ResourcePaths", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessage + } + 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 ErrInvalidLengthMessage + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMessage + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ResourcePaths = append(m.ResourcePaths, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMessage(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMessage + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthMessage + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *InternalErrorAnalysisMessage) 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 ErrIntOverflowMessage + } + 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: InternalErrorAnalysisMessage: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: InternalErrorAnalysisMessage: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MessageBase", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMessage + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMessage + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.MessageBase == nil { + m.MessageBase = &AnalysisMessageBase{} + } + if err := m.MessageBase.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Detail", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessage + } + 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 ErrInvalidLengthMessage + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMessage + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Detail = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMessage(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMessage + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthMessage + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipMessage(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, ErrIntOverflowMessage + } + 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, ErrIntOverflowMessage + } + 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, ErrIntOverflowMessage + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthMessage + } + iNdEx += length + if iNdEx < 0 { + return 0, ErrInvalidLengthMessage + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowMessage + } + 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 := skipMessage(dAtA[start:]) + if err != nil { + return 0, err + } + iNdEx = start + next + if iNdEx < 0 { + return 0, ErrInvalidLengthMessage + } + } + 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 ( + ErrInvalidLengthMessage = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowMessage = fmt.Errorf("proto: integer overflow") +) diff --git a/analysis/v1alpha1/message.pb.html b/analysis/v1alpha1/message.pb.html new file mode 100644 index 00000000000..3f144597ab9 --- /dev/null +++ b/analysis/v1alpha1/message.pb.html @@ -0,0 +1,316 @@ +--- +title: Analysis Messages +description: Describes the structure of messages generated by Istio analyzers. +location: https://istio.io/docs/reference/config/istio.analysis.v1alpha1.html +layout: protoc-gen-docs +generator: protoc-gen-docs +weight: 20 +number_of_entries: 6 +--- +

Describes the structure of messages generated by Istio analyzers.

+ +

AnalysisMessageBase

+
+

AnalysisMessageBase describes some common information that is needed for all +messages. All information should be static with respect to the error code.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeDescriptionRequired
namestring +

A human-readable name for the message type. e.g. “InternalError”, +“PodMissingProxy”. This should be the same for all messages of the same type. +Required.

+ +
+No +
codestring +

A 7 character code matching ^IST[0-9]{4}$ intended to uniquely identify +the message type. (e.g. “IST0001” is mapped to the “InternalError” message +type.) 0000-0100 are reserved. Required.

+ +
+No +
levelLevel +

Represents how severe a message is. Required.

+ +
+No +
documentationUrlstring +

A url pointing to the Istio documentation for this specific error type. +Should be of the form +^http(s)?://(preliminary\.)?istio.io/docs/reference/config/analysis/ +Required.

+ +
+No +
+
+

AnalysisMessageBase.Level

+
+

The values here are chosen so that more severe messages get sorted higher, +as well as leaving space in between to add more later

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescription
UNKNOWN +

invalid, but included for proto compatibility for 0 values

+ +
ERROR +
WARNING +
INFO +
+
+

AnalysisMessageWeakSchema

+
+

AnalysisMessageWeakSchema is the set of information that’s needed to define a +weakly-typed schema. The purpose of this proto is to provide a mechanism for +validating istio/istio/galley/pkg/config/analysis/msg/messages.yaml to make +sure that we don’t allow committing underspecified types.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeDescriptionRequired
messageBaseAnalysisMessageBase +

Required

+ +
+No +
descriptionstring +

A human readable description of what the error means. Required.

+ +
+No +
templatestring +

A go-style template string defining how to combine the args for a +particular message into a log line. Required.

+ +
+No +
argsArgType[] +

A description of the arguments for a particular message type

+ +
+No +
+
+

AnalysisMessageWeakSchema.ArgType

+
+ + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeDescriptionRequired
namestring +

Required

+ +
+No +
goTypestring +

Required. Should be a golang type, used in code generation

+ +
+No +
+
+

GenericAnalysisMessage

+
+

GenericAnalysisMessage is an instance of an AnalysisMessage defined by a +schema, whose metaschema is AnalysisMessageWeakSchema. (Names are hard.) Code +should be able to perform validation of arguments as needed by using the +message type information to look at the AnalysisMessageWeakSchema and examine the +list of args at runtime. Developers can also create stronger-typed versions +of GenericAnalysisMessage for well-known and stable message types.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeDescriptionRequired
messageBaseAnalysisMessageBase +

Required

+ +
+No +
argsStruct +

Any message-type specific arguments that need to get codified. Optional.

+ +
+No +
resourcePathsstring[] +

A list of strings specifying the path for resources which were the cause of +message generation. At least one is required.

+ +
+No +
+
+

InternalErrorAnalysisMessage

+
+

InternalErrorAnalysisMessage is a strongly-typed message representing some +error in Istio code that prevented us from performing analysis at all.

+ + + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeDescriptionRequired
messageBaseAnalysisMessageBase +

Required

+ +
+No +
detailstring +

Any detail regarding specifics of the error. Should be human-readable.

+ +
+No +
+
diff --git a/cue.yaml b/cue.yaml index a1dd17bdd4a..33ae4c58257 100644 --- a/cue.yaml +++ b/cue.yaml @@ -31,6 +31,8 @@ directories: - mode: all security/v1beta1: - mode: perFile + analysis/v1alpha1: + - mode: perFile # All is used when generating all types referenced in the above directories to diff --git a/python/istio_api/analysis/v1alpha1/message_pb2.py b/python/istio_api/analysis/v1alpha1/message_pb2.py new file mode 100644 index 00000000000..623649d546d --- /dev/null +++ b/python/istio_api/analysis/v1alpha1/message_pb2.py @@ -0,0 +1,337 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: analysis/v1alpha1/message.proto + +import sys +_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from google.protobuf import struct_pb2 as google_dot_protobuf_dot_struct__pb2 + + +DESCRIPTOR = _descriptor.FileDescriptor( + name='analysis/v1alpha1/message.proto', + package='istio.analysis.v1alpha1', + syntax='proto3', + serialized_options=_b('Z\036istio.io/api/analysis/v1alpha1'), + serialized_pb=_b('\n\x1f\x61nalysis/v1alpha1/message.proto\x12\x17istio.analysis.v1alpha1\x1a\x1cgoogle/protobuf/struct.proto\"\xc7\x01\n\x13\x41nalysisMessageBase\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0c\n\x04\x63ode\x18\x02 \x01(\t\x12\x41\n\x05level\x18\x03 \x01(\x0e\x32\x32.istio.analysis.v1alpha1.AnalysisMessageBase.Level\x12\x19\n\x11\x64ocumentation_url\x18\x04 \x01(\t\"6\n\x05Level\x12\x0b\n\x07UNKNOWN\x10\x00\x12\t\n\x05\x45RROR\x10\x03\x12\x0b\n\x07WARNING\x10\x08\x12\x08\n\x04INFO\x10\x0c\"\xfa\x01\n\x19\x41nalysisMessageWeakSchema\x12\x42\n\x0cmessage_base\x18\x01 \x01(\x0b\x32,.istio.analysis.v1alpha1.AnalysisMessageBase\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x10\n\x08template\x18\x03 \x01(\t\x12H\n\x04\x61rgs\x18\x04 \x03(\x0b\x32:.istio.analysis.v1alpha1.AnalysisMessageWeakSchema.ArgType\x1a(\n\x07\x41rgType\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0f\n\x07go_type\x18\x02 \x01(\t\"\x9b\x01\n\x16GenericAnalysisMessage\x12\x42\n\x0cmessage_base\x18\x01 \x01(\x0b\x32,.istio.analysis.v1alpha1.AnalysisMessageBase\x12%\n\x04\x61rgs\x18\x02 \x01(\x0b\x32\x17.google.protobuf.Struct\x12\x16\n\x0eresource_paths\x18\x03 \x03(\t\"r\n\x1cInternalErrorAnalysisMessage\x12\x42\n\x0cmessage_base\x18\x01 \x01(\x0b\x32,.istio.analysis.v1alpha1.AnalysisMessageBase\x12\x0e\n\x06\x64\x65tail\x18\x02 \x01(\tB Z\x1eistio.io/api/analysis/v1alpha1b\x06proto3') + , + dependencies=[google_dot_protobuf_dot_struct__pb2.DESCRIPTOR,]) + + + +_ANALYSISMESSAGEBASE_LEVEL = _descriptor.EnumDescriptor( + name='Level', + full_name='istio.analysis.v1alpha1.AnalysisMessageBase.Level', + filename=None, + file=DESCRIPTOR, + values=[ + _descriptor.EnumValueDescriptor( + name='UNKNOWN', index=0, number=0, + serialized_options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='ERROR', index=1, number=3, + serialized_options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='WARNING', index=2, number=8, + serialized_options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='INFO', index=3, number=12, + serialized_options=None, + type=None), + ], + containing_type=None, + serialized_options=None, + serialized_start=236, + serialized_end=290, +) +_sym_db.RegisterEnumDescriptor(_ANALYSISMESSAGEBASE_LEVEL) + + +_ANALYSISMESSAGEBASE = _descriptor.Descriptor( + name='AnalysisMessageBase', + full_name='istio.analysis.v1alpha1.AnalysisMessageBase', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='name', full_name='istio.analysis.v1alpha1.AnalysisMessageBase.name', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='code', full_name='istio.analysis.v1alpha1.AnalysisMessageBase.code', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='level', full_name='istio.analysis.v1alpha1.AnalysisMessageBase.level', index=2, + number=3, type=14, cpp_type=8, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='documentation_url', full_name='istio.analysis.v1alpha1.AnalysisMessageBase.documentation_url', index=3, + number=4, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + _ANALYSISMESSAGEBASE_LEVEL, + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=91, + serialized_end=290, +) + + +_ANALYSISMESSAGEWEAKSCHEMA_ARGTYPE = _descriptor.Descriptor( + name='ArgType', + full_name='istio.analysis.v1alpha1.AnalysisMessageWeakSchema.ArgType', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='name', full_name='istio.analysis.v1alpha1.AnalysisMessageWeakSchema.ArgType.name', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='go_type', full_name='istio.analysis.v1alpha1.AnalysisMessageWeakSchema.ArgType.go_type', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=503, + serialized_end=543, +) + +_ANALYSISMESSAGEWEAKSCHEMA = _descriptor.Descriptor( + name='AnalysisMessageWeakSchema', + full_name='istio.analysis.v1alpha1.AnalysisMessageWeakSchema', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='message_base', full_name='istio.analysis.v1alpha1.AnalysisMessageWeakSchema.message_base', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='description', full_name='istio.analysis.v1alpha1.AnalysisMessageWeakSchema.description', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='template', full_name='istio.analysis.v1alpha1.AnalysisMessageWeakSchema.template', index=2, + number=3, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='args', full_name='istio.analysis.v1alpha1.AnalysisMessageWeakSchema.args', index=3, + number=4, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + ], + extensions=[ + ], + nested_types=[_ANALYSISMESSAGEWEAKSCHEMA_ARGTYPE, ], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=293, + serialized_end=543, +) + + +_GENERICANALYSISMESSAGE = _descriptor.Descriptor( + name='GenericAnalysisMessage', + full_name='istio.analysis.v1alpha1.GenericAnalysisMessage', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='message_base', full_name='istio.analysis.v1alpha1.GenericAnalysisMessage.message_base', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='args', full_name='istio.analysis.v1alpha1.GenericAnalysisMessage.args', index=1, + number=2, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='resource_paths', full_name='istio.analysis.v1alpha1.GenericAnalysisMessage.resource_paths', index=2, + number=3, type=9, cpp_type=9, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=546, + serialized_end=701, +) + + +_INTERNALERRORANALYSISMESSAGE = _descriptor.Descriptor( + name='InternalErrorAnalysisMessage', + full_name='istio.analysis.v1alpha1.InternalErrorAnalysisMessage', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='message_base', full_name='istio.analysis.v1alpha1.InternalErrorAnalysisMessage.message_base', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='detail', full_name='istio.analysis.v1alpha1.InternalErrorAnalysisMessage.detail', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=703, + serialized_end=817, +) + +_ANALYSISMESSAGEBASE.fields_by_name['level'].enum_type = _ANALYSISMESSAGEBASE_LEVEL +_ANALYSISMESSAGEBASE_LEVEL.containing_type = _ANALYSISMESSAGEBASE +_ANALYSISMESSAGEWEAKSCHEMA_ARGTYPE.containing_type = _ANALYSISMESSAGEWEAKSCHEMA +_ANALYSISMESSAGEWEAKSCHEMA.fields_by_name['message_base'].message_type = _ANALYSISMESSAGEBASE +_ANALYSISMESSAGEWEAKSCHEMA.fields_by_name['args'].message_type = _ANALYSISMESSAGEWEAKSCHEMA_ARGTYPE +_GENERICANALYSISMESSAGE.fields_by_name['message_base'].message_type = _ANALYSISMESSAGEBASE +_GENERICANALYSISMESSAGE.fields_by_name['args'].message_type = google_dot_protobuf_dot_struct__pb2._STRUCT +_INTERNALERRORANALYSISMESSAGE.fields_by_name['message_base'].message_type = _ANALYSISMESSAGEBASE +DESCRIPTOR.message_types_by_name['AnalysisMessageBase'] = _ANALYSISMESSAGEBASE +DESCRIPTOR.message_types_by_name['AnalysisMessageWeakSchema'] = _ANALYSISMESSAGEWEAKSCHEMA +DESCRIPTOR.message_types_by_name['GenericAnalysisMessage'] = _GENERICANALYSISMESSAGE +DESCRIPTOR.message_types_by_name['InternalErrorAnalysisMessage'] = _INTERNALERRORANALYSISMESSAGE +_sym_db.RegisterFileDescriptor(DESCRIPTOR) + +AnalysisMessageBase = _reflection.GeneratedProtocolMessageType('AnalysisMessageBase', (_message.Message,), { + 'DESCRIPTOR' : _ANALYSISMESSAGEBASE, + '__module__' : 'analysis.v1alpha1.message_pb2' + # @@protoc_insertion_point(class_scope:istio.analysis.v1alpha1.AnalysisMessageBase) + }) +_sym_db.RegisterMessage(AnalysisMessageBase) + +AnalysisMessageWeakSchema = _reflection.GeneratedProtocolMessageType('AnalysisMessageWeakSchema', (_message.Message,), { + + 'ArgType' : _reflection.GeneratedProtocolMessageType('ArgType', (_message.Message,), { + 'DESCRIPTOR' : _ANALYSISMESSAGEWEAKSCHEMA_ARGTYPE, + '__module__' : 'analysis.v1alpha1.message_pb2' + # @@protoc_insertion_point(class_scope:istio.analysis.v1alpha1.AnalysisMessageWeakSchema.ArgType) + }) + , + 'DESCRIPTOR' : _ANALYSISMESSAGEWEAKSCHEMA, + '__module__' : 'analysis.v1alpha1.message_pb2' + # @@protoc_insertion_point(class_scope:istio.analysis.v1alpha1.AnalysisMessageWeakSchema) + }) +_sym_db.RegisterMessage(AnalysisMessageWeakSchema) +_sym_db.RegisterMessage(AnalysisMessageWeakSchema.ArgType) + +GenericAnalysisMessage = _reflection.GeneratedProtocolMessageType('GenericAnalysisMessage', (_message.Message,), { + 'DESCRIPTOR' : _GENERICANALYSISMESSAGE, + '__module__' : 'analysis.v1alpha1.message_pb2' + # @@protoc_insertion_point(class_scope:istio.analysis.v1alpha1.GenericAnalysisMessage) + }) +_sym_db.RegisterMessage(GenericAnalysisMessage) + +InternalErrorAnalysisMessage = _reflection.GeneratedProtocolMessageType('InternalErrorAnalysisMessage', (_message.Message,), { + 'DESCRIPTOR' : _INTERNALERRORANALYSISMESSAGE, + '__module__' : 'analysis.v1alpha1.message_pb2' + # @@protoc_insertion_point(class_scope:istio.analysis.v1alpha1.InternalErrorAnalysisMessage) + }) +_sym_db.RegisterMessage(InternalErrorAnalysisMessage) + + +DESCRIPTOR._options = None +# @@protoc_insertion_point(module_scope) From 9ab99ef383774e830e01c14f32cd13d3fdd1339d Mon Sep 17 00:00:00 2001 From: Clayton Pence Date: Wed, 18 Dec 2019 11:13:11 -0800 Subject: [PATCH 3/3] Better comments, clearer intention with code/name --- analysis/v1alpha1/message.gen.json | 31 +- analysis/v1alpha1/message.pb.go | 371 ++++++++++++++---- analysis/v1alpha1/message.pb.html | 89 +++-- analysis/v1alpha1/message.proto | 46 ++- proto.lock | 30 +- .../analysis/v1alpha1/message_pb2.py | 84 ++-- 6 files changed, 486 insertions(+), 165 deletions(-) diff --git a/analysis/v1alpha1/message.gen.json b/analysis/v1alpha1/message.gen.json index 5b42b98b07d..cb231e26f79 100644 --- a/analysis/v1alpha1/message.gen.json +++ b/analysis/v1alpha1/message.gen.json @@ -9,6 +9,23 @@ "istio.analysis.v1alpha1.AnalysisMessageBase": { "description": "AnalysisMessageBase describes some common information that is needed for all messages. All information should be static with respect to the error code.", "type": "object", + "properties": { + "type": { + "$ref": "#/components/schemas/istio.analysis.v1alpha1.AnalysisMessageBase.Type" + }, + "level": { + "$ref": "#/components/schemas/istio.analysis.v1alpha1.AnalysisMessageBase.Level" + }, + "documentationUrl": { + "description": "A url pointing to the Istio documentation for this specific error type. Should be of the form `^http(s)?://(preliminary\\.)?istio.io/docs/reference/config/analysis/` Required.", + "type": "string", + "format": "string" + } + } + }, + "istio.analysis.v1alpha1.AnalysisMessageBase.Type": { + "description": "A unique identifier for the type of message. Name is intended to be human-readable, code is intended to be machine readable. There should be a one-to-one mapping between name and code. (i.e. do not re-use names or codes between message types.)", + "type": "object", "properties": { "name": { "description": "A human-readable name for the message type. e.g. \"InternalError\", \"PodMissingProxy\". This should be the same for all messages of the same type. Required.", @@ -19,14 +36,6 @@ "description": "A 7 character code matching `^IST[0-9]{4}$` intended to uniquely identify the message type. (e.g. \"IST0001\" is mapped to the \"InternalError\" message type.) 0000-0100 are reserved. Required.", "type": "string", "format": "string" - }, - "level": { - "$ref": "#/components/schemas/istio.analysis.v1alpha1.AnalysisMessageBase.Level" - }, - "documentationUrl": { - "description": "A url pointing to the Istio documentation for this specific error type. Should be of the form `^http(s)?://(preliminary\\.)?istio.io/docs/reference/config/analysis/` Required.", - "type": "string", - "format": "string" } } }, @@ -53,7 +62,7 @@ "format": "string" }, "template": { - "description": "A go-style template string defining how to combine the args for a particular message into a log line. Required.", + "description": "A go-style template string (https://golang.org/pkg/fmt/#hdr-Printing) defining how to combine the args for a particular message into a log line. Required.", "type": "string", "format": "string" }, @@ -75,7 +84,7 @@ "format": "string" }, "goType": { - "description": "Required. Should be a golang type, used in code generation", + "description": "Required. Should be a golang type, used in code generation. Ideally this will change to a less language-pinned type before this gets out of alpha, but for compatibility with current istio/istio code it's go_type for now.", "type": "string", "format": "string" } @@ -93,7 +102,7 @@ "type": "object" }, "resourcePaths": { - "description": "A list of strings specifying the path for resources which were the cause of message generation. At least one is required.", + "description": "A list of strings specifying the resource identifiers that were the cause of message generation. A \"path\" here is a (NAMESPACE\\/)?RESOURCETYPE/NAME tuple that uniquely identifies a particular resource. There doesn't seem to be a single concept for this, but this is intuitively taken from https://kubernetes.io/docs/reference/using-api/api-concepts/#standard-api-terminology At least one is required.", "type": "array", "items": { "type": "string", diff --git a/analysis/v1alpha1/message.pb.go b/analysis/v1alpha1/message.pb.go index 46d4600aee3..358d2dfe3a7 100644 --- a/analysis/v1alpha1/message.pb.go +++ b/analysis/v1alpha1/message.pb.go @@ -61,21 +61,14 @@ func (AnalysisMessageBase_Level) EnumDescriptor() ([]byte, []int) { // AnalysisMessageBase describes some common information that is needed for all // messages. All information should be static with respect to the error code. type AnalysisMessageBase struct { - // A human-readable name for the message type. e.g. "InternalError", - // "PodMissingProxy". This should be the same for all messages of the same type. - // Required. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // A 7 character code matching `^IST[0-9]{4}$` intended to uniquely identify - // the message type. (e.g. "IST0001" is mapped to the "InternalError" message - // type.) 0000-0100 are reserved. Required. - Code string `protobuf:"bytes,2,opt,name=code,proto3" json:"code,omitempty"` + Type *AnalysisMessageBase_Type `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` // Represents how severe a message is. Required. - Level AnalysisMessageBase_Level `protobuf:"varint,3,opt,name=level,proto3,enum=istio.analysis.v1alpha1.AnalysisMessageBase_Level" json:"level,omitempty"` + Level AnalysisMessageBase_Level `protobuf:"varint,2,opt,name=level,proto3,enum=istio.analysis.v1alpha1.AnalysisMessageBase_Level" json:"level,omitempty"` // A url pointing to the Istio documentation for this specific error type. // Should be of the form // `^http(s)?://(preliminary\.)?istio.io/docs/reference/config/analysis/` // Required. - DocumentationUrl string `protobuf:"bytes,4,opt,name=documentation_url,json=documentationUrl,proto3" json:"documentation_url,omitempty"` + DocumentationUrl string `protobuf:"bytes,3,opt,name=documentation_url,json=documentationUrl,proto3" json:"documentation_url,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -114,18 +107,11 @@ func (m *AnalysisMessageBase) XXX_DiscardUnknown() { var xxx_messageInfo_AnalysisMessageBase proto.InternalMessageInfo -func (m *AnalysisMessageBase) GetName() string { +func (m *AnalysisMessageBase) GetType() *AnalysisMessageBase_Type { if m != nil { - return m.Name + return m.Type } - return "" -} - -func (m *AnalysisMessageBase) GetCode() string { - if m != nil { - return m.Code - } - return "" + return nil } func (m *AnalysisMessageBase) GetLevel() AnalysisMessageBase_Level { @@ -142,6 +128,71 @@ func (m *AnalysisMessageBase) GetDocumentationUrl() string { return "" } +// A unique identifier for the type of message. Name is intended to be +// human-readable, code is intended to be machine readable. There should be a +// one-to-one mapping between name and code. (i.e. do not re-use names or +// codes between message types.) +type AnalysisMessageBase_Type struct { + // A human-readable name for the message type. e.g. "InternalError", + // "PodMissingProxy". This should be the same for all messages of the same type. + // Required. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // A 7 character code matching `^IST[0-9]{4}$` intended to uniquely identify + // the message type. (e.g. "IST0001" is mapped to the "InternalError" message + // type.) 0000-0100 are reserved. Required. + Code string `protobuf:"bytes,2,opt,name=code,proto3" json:"code,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *AnalysisMessageBase_Type) Reset() { *m = AnalysisMessageBase_Type{} } +func (m *AnalysisMessageBase_Type) String() string { return proto.CompactTextString(m) } +func (*AnalysisMessageBase_Type) ProtoMessage() {} +func (*AnalysisMessageBase_Type) Descriptor() ([]byte, []int) { + return fileDescriptor_4d6fd1414dfe3800, []int{0, 0} +} +func (m *AnalysisMessageBase_Type) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *AnalysisMessageBase_Type) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_AnalysisMessageBase_Type.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *AnalysisMessageBase_Type) XXX_Merge(src proto.Message) { + xxx_messageInfo_AnalysisMessageBase_Type.Merge(m, src) +} +func (m *AnalysisMessageBase_Type) XXX_Size() int { + return m.Size() +} +func (m *AnalysisMessageBase_Type) XXX_DiscardUnknown() { + xxx_messageInfo_AnalysisMessageBase_Type.DiscardUnknown(m) +} + +var xxx_messageInfo_AnalysisMessageBase_Type proto.InternalMessageInfo + +func (m *AnalysisMessageBase_Type) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *AnalysisMessageBase_Type) GetCode() string { + if m != nil { + return m.Code + } + return "" +} + // AnalysisMessageWeakSchema is the set of information that's needed to define a // weakly-typed schema. The purpose of this proto is to provide a mechanism for // validating istio/istio/galley/pkg/config/analysis/msg/messages.yaml to make @@ -151,8 +202,9 @@ type AnalysisMessageWeakSchema struct { MessageBase *AnalysisMessageBase `protobuf:"bytes,1,opt,name=message_base,json=messageBase,proto3" json:"message_base,omitempty"` // A human readable description of what the error means. Required. Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` - // A go-style template string defining how to combine the args for a - // particular message into a log line. Required. + // A go-style template string (https://golang.org/pkg/fmt/#hdr-Printing) + // defining how to combine the args for a particular message into a log line. + // Required. Template string `protobuf:"bytes,3,opt,name=template,proto3" json:"template,omitempty"` // A description of the arguments for a particular message type Args []*AnalysisMessageWeakSchema_ArgType `protobuf:"bytes,4,rep,name=args,proto3" json:"args,omitempty"` @@ -225,7 +277,10 @@ func (m *AnalysisMessageWeakSchema) GetArgs() []*AnalysisMessageWeakSchema_ArgTy type AnalysisMessageWeakSchema_ArgType struct { // Required Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // Required. Should be a golang type, used in code generation + // Required. Should be a golang type, used in code generation. + // Ideally this will change to a less language-pinned type before this gets + // out of alpha, but for compatibility with current istio/istio code it's + // go_type for now. GoType string `protobuf:"bytes,2,opt,name=go_type,json=goType,proto3" json:"go_type,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -290,8 +345,12 @@ type GenericAnalysisMessage struct { MessageBase *AnalysisMessageBase `protobuf:"bytes,1,opt,name=message_base,json=messageBase,proto3" json:"message_base,omitempty"` // Any message-type specific arguments that need to get codified. Optional. Args *types.Struct `protobuf:"bytes,2,opt,name=args,proto3" json:"args,omitempty"` - // A list of strings specifying the path for resources which were the cause of - // message generation. At least one is required. + // A list of strings specifying the resource identifiers that were the cause + // of message generation. A "path" here is a (NAMESPACE\/)?RESOURCETYPE/NAME + // tuple that uniquely identifies a particular resource. There doesn't seem to + // be a single concept for this, but this is intuitively taken from + // https://kubernetes.io/docs/reference/using-api/api-concepts/#standard-api-terminology + // At least one is required. ResourcePaths []string `protobuf:"bytes,3,rep,name=resource_paths,json=resourcePaths,proto3" json:"resource_paths,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -414,6 +473,7 @@ func (m *InternalErrorAnalysisMessage) GetDetail() string { func init() { proto.RegisterEnum("istio.analysis.v1alpha1.AnalysisMessageBase_Level", AnalysisMessageBase_Level_name, AnalysisMessageBase_Level_value) proto.RegisterType((*AnalysisMessageBase)(nil), "istio.analysis.v1alpha1.AnalysisMessageBase") + proto.RegisterType((*AnalysisMessageBase_Type)(nil), "istio.analysis.v1alpha1.AnalysisMessageBase.Type") proto.RegisterType((*AnalysisMessageWeakSchema)(nil), "istio.analysis.v1alpha1.AnalysisMessageWeakSchema") proto.RegisterType((*AnalysisMessageWeakSchema_ArgType)(nil), "istio.analysis.v1alpha1.AnalysisMessageWeakSchema.ArgType") proto.RegisterType((*GenericAnalysisMessage)(nil), "istio.analysis.v1alpha1.GenericAnalysisMessage") @@ -423,38 +483,40 @@ func init() { func init() { proto.RegisterFile("analysis/v1alpha1/message.proto", fileDescriptor_4d6fd1414dfe3800) } var fileDescriptor_4d6fd1414dfe3800 = []byte{ - // 493 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x53, 0x5d, 0x6b, 0x13, 0x41, - 0x14, 0x75, 0x9b, 0xef, 0x9b, 0x5a, 0xe2, 0x08, 0xcd, 0x1a, 0x4a, 0x0c, 0x01, 0x21, 0xd0, 0x32, - 0x4b, 0x23, 0xf4, 0xc1, 0xb7, 0x14, 0x6a, 0x0d, 0xea, 0x46, 0xa6, 0x96, 0x80, 0x2f, 0x61, 0xb2, - 0xb9, 0x6e, 0x16, 0x67, 0x77, 0x96, 0x99, 0xd9, 0x42, 0x7e, 0x81, 0xff, 0xc7, 0x77, 0xdf, 0x7d, - 0xf4, 0x27, 0x48, 0x9e, 0xfd, 0x11, 0xb2, 0x5f, 0x5a, 0x6b, 0x05, 0x05, 0x7d, 0x9b, 0x39, 0x7b, - 0xef, 0xb9, 0xe7, 0x9c, 0xb9, 0x0b, 0x0f, 0x79, 0xc4, 0xc5, 0x46, 0x07, 0xda, 0xb9, 0x3a, 0xe6, - 0x22, 0x5e, 0xf3, 0x63, 0x27, 0x44, 0xad, 0xb9, 0x8f, 0x34, 0x56, 0xd2, 0x48, 0xd2, 0x0d, 0xb4, - 0x09, 0x24, 0x2d, 0xcb, 0x68, 0x59, 0xd6, 0x3b, 0xf0, 0xa5, 0xf4, 0x05, 0x3a, 0x59, 0xd9, 0x32, - 0x79, 0xeb, 0x68, 0xa3, 0x12, 0xcf, 0xe4, 0x6d, 0xc3, 0xaf, 0x16, 0xdc, 0x9f, 0x14, 0x3d, 0x2f, - 0x73, 0xc2, 0x53, 0xae, 0x91, 0x10, 0xa8, 0x46, 0x3c, 0x44, 0xdb, 0x1a, 0x58, 0xa3, 0x16, 0xcb, - 0xce, 0x29, 0xe6, 0xc9, 0x15, 0xda, 0x3b, 0x39, 0x96, 0x9e, 0xc9, 0x33, 0xa8, 0x09, 0xbc, 0x42, - 0x61, 0x57, 0x06, 0xd6, 0x68, 0x6f, 0x3c, 0xa6, 0xbf, 0x91, 0x41, 0x6f, 0x19, 0x42, 0x5f, 0xa4, - 0x9d, 0x2c, 0x27, 0x20, 0x87, 0x70, 0x6f, 0x25, 0xbd, 0x24, 0xc4, 0xc8, 0x70, 0x13, 0xc8, 0x68, - 0x91, 0x28, 0x61, 0x57, 0xb3, 0x51, 0x9d, 0x9f, 0x3e, 0x5c, 0x2a, 0x31, 0x3c, 0x81, 0x5a, 0xd6, - 0x4c, 0xda, 0xd0, 0xb8, 0x74, 0x9f, 0xbb, 0xb3, 0xb9, 0xdb, 0xb9, 0x43, 0x5a, 0x50, 0x3b, 0x63, - 0x6c, 0xc6, 0x3a, 0x95, 0x14, 0x9f, 0x4f, 0x98, 0x3b, 0x75, 0xcf, 0x3b, 0x4d, 0xd2, 0x84, 0xea, - 0xd4, 0x7d, 0x3a, 0xeb, 0xec, 0x0e, 0x3f, 0xec, 0xc0, 0x83, 0x1b, 0x4a, 0xe6, 0xc8, 0xdf, 0x5d, - 0x78, 0x6b, 0x0c, 0x39, 0x99, 0xc1, 0x6e, 0x11, 0xea, 0x62, 0xc9, 0x75, 0x6e, 0xbe, 0x3d, 0x3e, - 0xfa, 0x1b, 0x4f, 0xac, 0x1d, 0x5e, 0x4b, 0x71, 0x00, 0xed, 0x15, 0x6a, 0x4f, 0x05, 0x71, 0x2a, - 0xbc, 0x08, 0xee, 0x3a, 0x44, 0x7a, 0xd0, 0x34, 0x18, 0xc6, 0x82, 0x1b, 0xcc, 0x22, 0x6c, 0xb1, - 0xef, 0x77, 0xe2, 0x42, 0x95, 0x2b, 0x5f, 0xdb, 0xd5, 0x41, 0x65, 0xd4, 0x1e, 0x3f, 0xf9, 0x53, - 0x19, 0x3f, 0x0c, 0xd1, 0x89, 0xf2, 0x5f, 0x6f, 0x62, 0x64, 0x19, 0x4f, 0xef, 0x04, 0x1a, 0x05, - 0x70, 0xeb, 0xf3, 0x76, 0xa1, 0xe1, 0xcb, 0x85, 0xd9, 0xc4, 0xe5, 0x0b, 0xd7, 0x7d, 0x99, 0x16, - 0x0f, 0x3f, 0x5a, 0xb0, 0x7f, 0x8e, 0x11, 0xaa, 0xc0, 0xbb, 0x31, 0xea, 0xdf, 0x27, 0x76, 0x58, - 0x78, 0xde, 0xc9, 0x88, 0xba, 0x34, 0x5f, 0x5e, 0x5a, 0x2e, 0x2f, 0xbd, 0xc8, 0x96, 0x37, 0x37, - 0x44, 0x1e, 0xc1, 0x9e, 0x42, 0x2d, 0x13, 0xe5, 0xe1, 0x22, 0xe6, 0x66, 0xad, 0xed, 0xca, 0xa0, - 0x32, 0x6a, 0xb1, 0xbb, 0x25, 0xfa, 0x2a, 0x05, 0x87, 0xef, 0x2d, 0x38, 0x98, 0x46, 0x06, 0x55, - 0xc4, 0xc5, 0x99, 0x52, 0x52, 0xfd, 0x77, 0x17, 0xfb, 0x50, 0x5f, 0xa1, 0xe1, 0x81, 0x28, 0x93, - 0xcc, 0x6f, 0xa7, 0x47, 0x9f, 0xb6, 0x7d, 0xeb, 0xf3, 0xb6, 0x6f, 0x7d, 0xd9, 0xf6, 0xad, 0x37, - 0xfd, 0x9c, 0x3f, 0x90, 0x0e, 0x8f, 0x03, 0xe7, 0x97, 0x1f, 0x7c, 0x59, 0xcf, 0x5c, 0x3f, 0xfe, - 0x16, 0x00, 0x00, 0xff, 0xff, 0x2d, 0x1b, 0x42, 0xc2, 0xfc, 0x03, 0x00, 0x00, + // 514 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x54, 0x5d, 0x6b, 0x13, 0x41, + 0x14, 0x75, 0x93, 0xcd, 0xd7, 0x4d, 0x2d, 0x71, 0x84, 0x26, 0x86, 0x12, 0x97, 0x80, 0x10, 0x68, + 0x99, 0x25, 0x11, 0xfa, 0xe0, 0x5b, 0x0a, 0xb1, 0x06, 0x75, 0x23, 0x53, 0x4b, 0xc0, 0x97, 0x30, + 0xd9, 0x5c, 0x37, 0x8b, 0xbb, 0x3b, 0xcb, 0xcc, 0xa4, 0x90, 0x5f, 0xe0, 0xff, 0xf1, 0x55, 0x7c, + 0xf7, 0xd1, 0x9f, 0x20, 0xf9, 0x25, 0xb2, 0x5f, 0x5a, 0x6b, 0x05, 0x0b, 0xf6, 0x6d, 0xe6, 0xe4, + 0xde, 0x33, 0xe7, 0x9c, 0x9b, 0xbb, 0xf0, 0x98, 0x47, 0x3c, 0xd8, 0x2a, 0x5f, 0xd9, 0x97, 0x43, + 0x1e, 0xc4, 0x6b, 0x3e, 0xb4, 0x43, 0x54, 0x8a, 0x7b, 0x48, 0x63, 0x29, 0xb4, 0x20, 0x6d, 0x5f, + 0x69, 0x5f, 0xd0, 0xa2, 0x8c, 0x16, 0x65, 0xdd, 0x43, 0x4f, 0x08, 0x2f, 0x40, 0x3b, 0x2d, 0x5b, + 0x6e, 0xde, 0xdb, 0x4a, 0xcb, 0x8d, 0xab, 0xb3, 0xb6, 0xfe, 0xe7, 0x12, 0x3c, 0x1c, 0xe7, 0x3d, + 0xaf, 0x33, 0xc2, 0x53, 0xae, 0x90, 0x4c, 0xc0, 0xd4, 0xdb, 0x18, 0x3b, 0x86, 0x65, 0x0c, 0x9a, + 0xa3, 0x21, 0xfd, 0x0b, 0x3b, 0xbd, 0xa1, 0x97, 0xbe, 0xdd, 0xc6, 0xc8, 0xd2, 0x76, 0xf2, 0x02, + 0x2a, 0x01, 0x5e, 0x62, 0xd0, 0x29, 0x59, 0xc6, 0x60, 0x7f, 0x34, 0xba, 0x15, 0xcf, 0xab, 0xa4, + 0x93, 0x65, 0x04, 0xe4, 0x08, 0x1e, 0xac, 0x84, 0xbb, 0x09, 0x31, 0xd2, 0x5c, 0xfb, 0x22, 0x5a, + 0x6c, 0x64, 0xd0, 0x29, 0x5b, 0xc6, 0xa0, 0xc1, 0x5a, 0xbf, 0xfd, 0x70, 0x21, 0x83, 0x2e, 0x05, + 0x33, 0x11, 0x41, 0x08, 0x98, 0x11, 0x0f, 0x33, 0x17, 0x0d, 0x96, 0x9e, 0x13, 0xcc, 0x15, 0x2b, + 0x4c, 0x15, 0x35, 0x58, 0x7a, 0xee, 0x9f, 0x40, 0x25, 0x7d, 0x8c, 0x34, 0xa1, 0x76, 0xe1, 0xbc, + 0x74, 0x66, 0x73, 0xa7, 0x75, 0x8f, 0x34, 0xa0, 0x32, 0x61, 0x6c, 0xc6, 0x5a, 0xe5, 0x04, 0x9f, + 0x8f, 0x99, 0x33, 0x75, 0xce, 0x5a, 0x75, 0x52, 0x07, 0x73, 0xea, 0x3c, 0x9f, 0xb5, 0xf6, 0xfa, + 0x9f, 0x4a, 0xf0, 0xe8, 0x9a, 0xf2, 0x39, 0xf2, 0x0f, 0xe7, 0xee, 0x1a, 0x43, 0x4e, 0x66, 0xb0, + 0x97, 0xcf, 0x68, 0xb1, 0xe4, 0xaa, 0xc8, 0xf2, 0xf8, 0x36, 0x19, 0xb0, 0x66, 0x78, 0x65, 0x28, + 0x16, 0x34, 0x57, 0xa8, 0x5c, 0xe9, 0xc7, 0x89, 0xd1, 0xdc, 0xc1, 0x55, 0x88, 0x74, 0xa1, 0xae, + 0x31, 0x8c, 0x03, 0xae, 0x31, 0x0f, 0xe7, 0xe7, 0x9d, 0x38, 0x60, 0x72, 0xe9, 0xa9, 0x8e, 0x69, + 0x95, 0x07, 0xcd, 0xd1, 0xb3, 0x7f, 0x95, 0xf1, 0xcb, 0x10, 0x1d, 0x4b, 0x2f, 0x9b, 0x6d, 0xc2, + 0xd3, 0x3d, 0x81, 0x5a, 0x0e, 0xdc, 0x98, 0x73, 0x1b, 0x6a, 0x9e, 0x58, 0xa4, 0x7f, 0xa2, 0x4c, + 0x68, 0xd5, 0x13, 0x49, 0x71, 0xff, 0x8b, 0x01, 0x07, 0x67, 0x18, 0xa1, 0xf4, 0xdd, 0x6b, 0x4f, + 0xfd, 0xff, 0xc4, 0x8e, 0x72, 0xcf, 0xa5, 0x94, 0xa8, 0x4d, 0xb3, 0x5d, 0xa0, 0xc5, 0x2e, 0xd0, + 0xf3, 0x74, 0x17, 0x32, 0x43, 0xe4, 0x09, 0xec, 0x4b, 0x54, 0x62, 0x23, 0x5d, 0x5c, 0xc4, 0x5c, + 0xaf, 0x55, 0xa7, 0x6c, 0x95, 0x07, 0x0d, 0x76, 0xbf, 0x40, 0xdf, 0x24, 0x60, 0xff, 0xa3, 0x01, + 0x87, 0xd3, 0x48, 0xa3, 0x8c, 0x78, 0x30, 0x91, 0x52, 0xc8, 0x3b, 0x77, 0x71, 0x00, 0xd5, 0x15, + 0x6a, 0xee, 0x07, 0x45, 0x92, 0xd9, 0xed, 0xf4, 0xf8, 0xeb, 0xae, 0x67, 0x7c, 0xdb, 0xf5, 0x8c, + 0xef, 0xbb, 0x9e, 0xf1, 0xae, 0x97, 0xf1, 0xfb, 0xc2, 0xe6, 0xb1, 0x6f, 0xff, 0xf1, 0xbd, 0x58, + 0x56, 0x53, 0xd7, 0x4f, 0x7f, 0x04, 0x00, 0x00, 0xff, 0xff, 0x82, 0x20, 0xa3, 0x36, 0x4b, 0x04, + 0x00, 0x00, } func (m *AnalysisMessageBase) Marshal() (dAtA []byte, err error) { @@ -486,12 +548,51 @@ func (m *AnalysisMessageBase) MarshalToSizedBuffer(dAtA []byte) (int, error) { copy(dAtA[i:], m.DocumentationUrl) i = encodeVarintMessage(dAtA, i, uint64(len(m.DocumentationUrl))) i-- - dAtA[i] = 0x22 + dAtA[i] = 0x1a } if m.Level != 0 { i = encodeVarintMessage(dAtA, i, uint64(m.Level)) i-- - dAtA[i] = 0x18 + dAtA[i] = 0x10 + } + if m.Type != nil { + { + size, err := m.Type.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintMessage(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *AnalysisMessageBase_Type) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *AnalysisMessageBase_Type) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *AnalysisMessageBase_Type) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if len(m.Code) > 0 { i -= len(m.Code) @@ -741,12 +842,8 @@ func (m *AnalysisMessageBase) Size() (n int) { } var l int _ = l - l = len(m.Name) - if l > 0 { - n += 1 + l + sovMessage(uint64(l)) - } - l = len(m.Code) - if l > 0 { + if m.Type != nil { + l = m.Type.Size() n += 1 + l + sovMessage(uint64(l)) } if m.Level != 0 { @@ -762,6 +859,26 @@ func (m *AnalysisMessageBase) Size() (n int) { return n } +func (m *AnalysisMessageBase_Type) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Name) + if l > 0 { + n += 1 + l + sovMessage(uint64(l)) + } + l = len(m.Code) + if l > 0 { + n += 1 + l + sovMessage(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + func (m *AnalysisMessageWeakSchema) Size() (n int) { if m == nil { return 0 @@ -895,9 +1012,9 @@ func (m *AnalysisMessageBase) Unmarshal(dAtA []byte) error { switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowMessage @@ -907,27 +1024,50 @@ func (m *AnalysisMessageBase) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthMessage } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthMessage } if postIndex > l { return io.ErrUnexpectedEOF } - m.Name = string(dAtA[iNdEx:postIndex]) + if m.Type == nil { + m.Type = &AnalysisMessageBase_Type{} + } + if err := m.Type.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Level", wireType) + } + m.Level = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Level |= AnalysisMessageBase_Level(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field DocumentationUrl", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -955,13 +1095,67 @@ func (m *AnalysisMessageBase) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Code = string(dAtA[iNdEx:postIndex]) + m.DocumentationUrl = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Level", wireType) + default: + iNdEx = preIndex + skippy, err := skipMessage(dAtA[iNdEx:]) + if err != nil { + return err } - m.Level = 0 + if skippy < 0 { + return ErrInvalidLengthMessage + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthMessage + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AnalysisMessageBase_Type) 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 ErrIntOverflowMessage + } + 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: Type: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Type: 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 ErrIntOverflowMessage @@ -971,14 +1165,27 @@ func (m *AnalysisMessageBase) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Level |= AnalysisMessageBase_Level(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - case 4: + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMessage + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMessage + } + 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 DocumentationUrl", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -1006,7 +1213,7 @@ func (m *AnalysisMessageBase) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.DocumentationUrl = string(dAtA[iNdEx:postIndex]) + m.Code = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex diff --git a/analysis/v1alpha1/message.pb.html b/analysis/v1alpha1/message.pb.html index 3f144597ab9..87dd4cef39a 100644 --- a/analysis/v1alpha1/message.pb.html +++ b/analysis/v1alpha1/message.pb.html @@ -5,7 +5,7 @@ layout: protoc-gen-docs generator: protoc-gen-docs weight: 20 -number_of_entries: 6 +number_of_entries: 7 ---

Describes the structure of messages generated by Istio analyzers.

@@ -24,27 +24,10 @@

AnalysisMessageBase

- -name -string + +type +Type -

A human-readable name for the message type. e.g. “InternalError”, -“PodMissingProxy”. This should be the same for all messages of the same type. -Required.

- - - -No - - - -code -string - -

A 7 character code matching ^IST[0-9]{4}$ intended to uniquely identify -the message type. (e.g. “IST0001” is mapped to the “InternalError” message -type.) 0000-0100 are reserved. Required.

- No @@ -116,6 +99,52 @@

AnalysisMessageBase.Level

+

AnalysisMessageBase.Type

+
+

A unique identifier for the type of message. Name is intended to be +human-readable, code is intended to be machine readable. There should be a +one-to-one mapping between name and code. (i.e. do not re-use names or +codes between message types.)

+ + + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeDescriptionRequired
namestring +

A human-readable name for the message type. e.g. “InternalError”, +“PodMissingProxy”. This should be the same for all messages of the same type. +Required.

+ +
+No +
codestring +

A 7 character code matching ^IST[0-9]{4}$ intended to uniquely identify +the message type. (e.g. “IST0001” is mapped to the “InternalError” message +type.) 0000-0100 are reserved. Required.

+ +
+No +
+

AnalysisMessageWeakSchema

AnalysisMessageWeakSchema is the set of information that’s needed to define a @@ -159,8 +188,9 @@

AnalysisMessageWeakSchema

template string -

A go-style template string defining how to combine the args for a -particular message into a log line. Required.

+

A go-style template string (https://golang.org/pkg/fmt/#hdr-Printing) +defining how to combine the args for a particular message into a log line. +Required.

@@ -208,7 +238,10 @@

AnalysisMessageWeakSchema.ArgType

goType string -

Required. Should be a golang type, used in code generation

+

Required. Should be a golang type, used in code generation. +Ideally this will change to a less language-pinned type before this gets +out of alpha, but for compatibility with current istio/istio code it’s +go_type for now.

@@ -263,8 +296,12 @@

GenericAnalysisMessage

resourcePaths string[] -

A list of strings specifying the path for resources which were the cause of -message generation. At least one is required.

+

A list of strings specifying the resource identifiers that were the cause +of message generation. A “path” here is a (NAMESPACE\/)?RESOURCETYPE/NAME +tuple that uniquely identifies a particular resource. There doesn’t seem to +be a single concept for this, but this is intuitively taken from +https://kubernetes.io/docs/reference/using-api/api-concepts/#standard-api-terminology +At least one is required.

diff --git a/analysis/v1alpha1/message.proto b/analysis/v1alpha1/message.proto index d1f4d7f4834..60798f095e5 100644 --- a/analysis/v1alpha1/message.proto +++ b/analysis/v1alpha1/message.proto @@ -43,15 +43,23 @@ option go_package="istio.io/api/analysis/v1alpha1"; // AnalysisMessageBase describes some common information that is needed for all // messages. All information should be static with respect to the error code. message AnalysisMessageBase { - // A human-readable name for the message type. e.g. "InternalError", - // "PodMissingProxy". This should be the same for all messages of the same type. - // Required. - string name = 1; + // A unique identifier for the type of message. Name is intended to be + // human-readable, code is intended to be machine readable. There should be a + // one-to-one mapping between name and code. (i.e. do not re-use names or + // codes between message types.) + message Type { + // A human-readable name for the message type. e.g. "InternalError", + // "PodMissingProxy". This should be the same for all messages of the same type. + // Required. + string name = 1; - // A 7 character code matching `^IST[0-9]{4}$` intended to uniquely identify - // the message type. (e.g. "IST0001" is mapped to the "InternalError" message - // type.) 0000-0100 are reserved. Required. - string code = 2; + // A 7 character code matching `^IST[0-9]{4}$` intended to uniquely identify + // the message type. (e.g. "IST0001" is mapped to the "InternalError" message + // type.) 0000-0100 are reserved. Required. + string code = 2; + } + + Type type = 1; // The values here are chosen so that more severe messages get sorted higher, // as well as leaving space in between to add more later @@ -63,13 +71,13 @@ message AnalysisMessageBase { } // Represents how severe a message is. Required. - Level level = 3; + Level level = 2; // A url pointing to the Istio documentation for this specific error type. // Should be of the form // `^http(s)?://(preliminary\.)?istio.io/docs/reference/config/analysis/` // Required. - string documentation_url = 4; + string documentation_url = 3; } @@ -84,14 +92,18 @@ message AnalysisMessageWeakSchema { // A human readable description of what the error means. Required. string description = 2; - // A go-style template string defining how to combine the args for a - // particular message into a log line. Required. + // A go-style template string (https://golang.org/pkg/fmt/#hdr-Printing) + // defining how to combine the args for a particular message into a log line. + // Required. string template = 3; message ArgType { // Required string name = 1; - // Required. Should be a golang type, used in code generation + // Required. Should be a golang type, used in code generation. + // Ideally this will change to a less language-pinned type before this gets + // out of alpha, but for compatibility with current istio/istio code it's + // go_type for now. string go_type = 2; } @@ -112,8 +124,12 @@ message GenericAnalysisMessage { // Any message-type specific arguments that need to get codified. Optional. google.protobuf.Struct args = 2; - // A list of strings specifying the path for resources which were the cause of - // message generation. At least one is required. + // A list of strings specifying the resource identifiers that were the cause + // of message generation. A "path" here is a (NAMESPACE\/)?RESOURCETYPE/NAME + // tuple that uniquely identifies a particular resource. There doesn't seem to + // be a single concept for this, but this is intuitively taken from + // https://kubernetes.io/docs/reference/using-api/api-concepts/#standard-api-terminology + // At least one is required. repeated string resource_paths = 3; } diff --git a/proto.lock b/proto.lock index 286c5581a81..252c52a3bbd 100644 --- a/proto.lock +++ b/proto.lock @@ -31,24 +31,36 @@ "fields": [ { "id": 1, - "name": "name", - "type": "string" + "name": "type", + "type": "Type" }, { "id": 2, - "name": "code", - "type": "string" - }, - { - "id": 3, "name": "level", "type": "Level" }, { - "id": 4, + "id": 3, "name": "documentation_url", "type": "string" } + ], + "messages": [ + { + "name": "Type", + "fields": [ + { + "id": 1, + "name": "name", + "type": "string" + }, + { + "id": 2, + "name": "code", + "type": "string" + } + ] + } ] }, { @@ -42960,4 +42972,4 @@ } } ] -} \ No newline at end of file +} diff --git a/python/istio_api/analysis/v1alpha1/message_pb2.py b/python/istio_api/analysis/v1alpha1/message_pb2.py index 623649d546d..9ccd801157a 100644 --- a/python/istio_api/analysis/v1alpha1/message_pb2.py +++ b/python/istio_api/analysis/v1alpha1/message_pb2.py @@ -21,7 +21,7 @@ package='istio.analysis.v1alpha1', syntax='proto3', serialized_options=_b('Z\036istio.io/api/analysis/v1alpha1'), - serialized_pb=_b('\n\x1f\x61nalysis/v1alpha1/message.proto\x12\x17istio.analysis.v1alpha1\x1a\x1cgoogle/protobuf/struct.proto\"\xc7\x01\n\x13\x41nalysisMessageBase\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0c\n\x04\x63ode\x18\x02 \x01(\t\x12\x41\n\x05level\x18\x03 \x01(\x0e\x32\x32.istio.analysis.v1alpha1.AnalysisMessageBase.Level\x12\x19\n\x11\x64ocumentation_url\x18\x04 \x01(\t\"6\n\x05Level\x12\x0b\n\x07UNKNOWN\x10\x00\x12\t\n\x05\x45RROR\x10\x03\x12\x0b\n\x07WARNING\x10\x08\x12\x08\n\x04INFO\x10\x0c\"\xfa\x01\n\x19\x41nalysisMessageWeakSchema\x12\x42\n\x0cmessage_base\x18\x01 \x01(\x0b\x32,.istio.analysis.v1alpha1.AnalysisMessageBase\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x10\n\x08template\x18\x03 \x01(\t\x12H\n\x04\x61rgs\x18\x04 \x03(\x0b\x32:.istio.analysis.v1alpha1.AnalysisMessageWeakSchema.ArgType\x1a(\n\x07\x41rgType\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0f\n\x07go_type\x18\x02 \x01(\t\"\x9b\x01\n\x16GenericAnalysisMessage\x12\x42\n\x0cmessage_base\x18\x01 \x01(\x0b\x32,.istio.analysis.v1alpha1.AnalysisMessageBase\x12%\n\x04\x61rgs\x18\x02 \x01(\x0b\x32\x17.google.protobuf.Struct\x12\x16\n\x0eresource_paths\x18\x03 \x03(\t\"r\n\x1cInternalErrorAnalysisMessage\x12\x42\n\x0cmessage_base\x18\x01 \x01(\x0b\x32,.istio.analysis.v1alpha1.AnalysisMessageBase\x12\x0e\n\x06\x64\x65tail\x18\x02 \x01(\tB Z\x1eistio.io/api/analysis/v1alpha1b\x06proto3') + serialized_pb=_b('\n\x1f\x61nalysis/v1alpha1/message.proto\x12\x17istio.analysis.v1alpha1\x1a\x1cgoogle/protobuf/struct.proto\"\x90\x02\n\x13\x41nalysisMessageBase\x12?\n\x04type\x18\x01 \x01(\x0b\x32\x31.istio.analysis.v1alpha1.AnalysisMessageBase.Type\x12\x41\n\x05level\x18\x02 \x01(\x0e\x32\x32.istio.analysis.v1alpha1.AnalysisMessageBase.Level\x12\x19\n\x11\x64ocumentation_url\x18\x03 \x01(\t\x1a\"\n\x04Type\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0c\n\x04\x63ode\x18\x02 \x01(\t\"6\n\x05Level\x12\x0b\n\x07UNKNOWN\x10\x00\x12\t\n\x05\x45RROR\x10\x03\x12\x0b\n\x07WARNING\x10\x08\x12\x08\n\x04INFO\x10\x0c\"\xfa\x01\n\x19\x41nalysisMessageWeakSchema\x12\x42\n\x0cmessage_base\x18\x01 \x01(\x0b\x32,.istio.analysis.v1alpha1.AnalysisMessageBase\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x10\n\x08template\x18\x03 \x01(\t\x12H\n\x04\x61rgs\x18\x04 \x03(\x0b\x32:.istio.analysis.v1alpha1.AnalysisMessageWeakSchema.ArgType\x1a(\n\x07\x41rgType\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0f\n\x07go_type\x18\x02 \x01(\t\"\x9b\x01\n\x16GenericAnalysisMessage\x12\x42\n\x0cmessage_base\x18\x01 \x01(\x0b\x32,.istio.analysis.v1alpha1.AnalysisMessageBase\x12%\n\x04\x61rgs\x18\x02 \x01(\x0b\x32\x17.google.protobuf.Struct\x12\x16\n\x0eresource_paths\x18\x03 \x03(\t\"r\n\x1cInternalErrorAnalysisMessage\x12\x42\n\x0cmessage_base\x18\x01 \x01(\x0b\x32,.istio.analysis.v1alpha1.AnalysisMessageBase\x12\x0e\n\x06\x64\x65tail\x18\x02 \x01(\tB Z\x1eistio.io/api/analysis/v1alpha1b\x06proto3') , dependencies=[google_dot_protobuf_dot_struct__pb2.DESCRIPTOR,]) @@ -52,43 +52,73 @@ ], containing_type=None, serialized_options=None, - serialized_start=236, - serialized_end=290, + serialized_start=309, + serialized_end=363, ) _sym_db.RegisterEnumDescriptor(_ANALYSISMESSAGEBASE_LEVEL) -_ANALYSISMESSAGEBASE = _descriptor.Descriptor( - name='AnalysisMessageBase', - full_name='istio.analysis.v1alpha1.AnalysisMessageBase', +_ANALYSISMESSAGEBASE_TYPE = _descriptor.Descriptor( + name='Type', + full_name='istio.analysis.v1alpha1.AnalysisMessageBase.Type', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( - name='name', full_name='istio.analysis.v1alpha1.AnalysisMessageBase.name', index=0, + name='name', full_name='istio.analysis.v1alpha1.AnalysisMessageBase.Type.name', index=0, number=1, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( - name='code', full_name='istio.analysis.v1alpha1.AnalysisMessageBase.code', index=1, + name='code', full_name='istio.analysis.v1alpha1.AnalysisMessageBase.Type.code', index=1, number=2, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=273, + serialized_end=307, +) + +_ANALYSISMESSAGEBASE = _descriptor.Descriptor( + name='AnalysisMessageBase', + full_name='istio.analysis.v1alpha1.AnalysisMessageBase', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='type', full_name='istio.analysis.v1alpha1.AnalysisMessageBase.type', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( - name='level', full_name='istio.analysis.v1alpha1.AnalysisMessageBase.level', index=2, - number=3, type=14, cpp_type=8, label=1, + name='level', full_name='istio.analysis.v1alpha1.AnalysisMessageBase.level', index=1, + number=2, type=14, cpp_type=8, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( - name='documentation_url', full_name='istio.analysis.v1alpha1.AnalysisMessageBase.documentation_url', index=3, - number=4, type=9, cpp_type=9, label=1, + name='documentation_url', full_name='istio.analysis.v1alpha1.AnalysisMessageBase.documentation_url', index=2, + number=3, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, @@ -96,7 +126,7 @@ ], extensions=[ ], - nested_types=[], + nested_types=[_ANALYSISMESSAGEBASE_TYPE, ], enum_types=[ _ANALYSISMESSAGEBASE_LEVEL, ], @@ -107,7 +137,7 @@ oneofs=[ ], serialized_start=91, - serialized_end=290, + serialized_end=363, ) @@ -144,8 +174,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=503, - serialized_end=543, + serialized_start=576, + serialized_end=616, ) _ANALYSISMESSAGEWEAKSCHEMA = _descriptor.Descriptor( @@ -195,8 +225,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=293, - serialized_end=543, + serialized_start=366, + serialized_end=616, ) @@ -240,8 +270,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=546, - serialized_end=701, + serialized_start=619, + serialized_end=774, ) @@ -278,10 +308,12 @@ extension_ranges=[], oneofs=[ ], - serialized_start=703, - serialized_end=817, + serialized_start=776, + serialized_end=890, ) +_ANALYSISMESSAGEBASE_TYPE.containing_type = _ANALYSISMESSAGEBASE +_ANALYSISMESSAGEBASE.fields_by_name['type'].message_type = _ANALYSISMESSAGEBASE_TYPE _ANALYSISMESSAGEBASE.fields_by_name['level'].enum_type = _ANALYSISMESSAGEBASE_LEVEL _ANALYSISMESSAGEBASE_LEVEL.containing_type = _ANALYSISMESSAGEBASE _ANALYSISMESSAGEWEAKSCHEMA_ARGTYPE.containing_type = _ANALYSISMESSAGEWEAKSCHEMA @@ -297,11 +329,19 @@ _sym_db.RegisterFileDescriptor(DESCRIPTOR) AnalysisMessageBase = _reflection.GeneratedProtocolMessageType('AnalysisMessageBase', (_message.Message,), { + + 'Type' : _reflection.GeneratedProtocolMessageType('Type', (_message.Message,), { + 'DESCRIPTOR' : _ANALYSISMESSAGEBASE_TYPE, + '__module__' : 'analysis.v1alpha1.message_pb2' + # @@protoc_insertion_point(class_scope:istio.analysis.v1alpha1.AnalysisMessageBase.Type) + }) + , 'DESCRIPTOR' : _ANALYSISMESSAGEBASE, '__module__' : 'analysis.v1alpha1.message_pb2' # @@protoc_insertion_point(class_scope:istio.analysis.v1alpha1.AnalysisMessageBase) }) _sym_db.RegisterMessage(AnalysisMessageBase) +_sym_db.RegisterMessage(AnalysisMessageBase.Type) AnalysisMessageWeakSchema = _reflection.GeneratedProtocolMessageType('AnalysisMessageWeakSchema', (_message.Message,), {