feat: add vendor

This commit is contained in:
fengcaiwen
2023-10-21 20:48:01 +08:00
parent 1c637f45b5
commit 6a6c4e3257
8701 changed files with 2400820 additions and 1 deletions

201
vendor/github.com/cncf/xds/go/LICENSE generated vendored Normal file
View File

@@ -0,0 +1,201 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
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.

View File

@@ -0,0 +1,415 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.25.0
// protoc v3.18.0
// source: udpa/annotations/migrate.proto
package annotations
import (
proto "github.com/golang/protobuf/proto"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
descriptorpb "google.golang.org/protobuf/types/descriptorpb"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// This is a compile-time assertion that a sufficiently up-to-date version
// of the legacy proto package is being used.
const _ = proto.ProtoPackageIsVersion4
type MigrateAnnotation struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Rename string `protobuf:"bytes,1,opt,name=rename,proto3" json:"rename,omitempty"`
}
func (x *MigrateAnnotation) Reset() {
*x = MigrateAnnotation{}
if protoimpl.UnsafeEnabled {
mi := &file_udpa_annotations_migrate_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MigrateAnnotation) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MigrateAnnotation) ProtoMessage() {}
func (x *MigrateAnnotation) ProtoReflect() protoreflect.Message {
mi := &file_udpa_annotations_migrate_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use MigrateAnnotation.ProtoReflect.Descriptor instead.
func (*MigrateAnnotation) Descriptor() ([]byte, []int) {
return file_udpa_annotations_migrate_proto_rawDescGZIP(), []int{0}
}
func (x *MigrateAnnotation) GetRename() string {
if x != nil {
return x.Rename
}
return ""
}
type FieldMigrateAnnotation struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Rename string `protobuf:"bytes,1,opt,name=rename,proto3" json:"rename,omitempty"`
OneofPromotion string `protobuf:"bytes,2,opt,name=oneof_promotion,json=oneofPromotion,proto3" json:"oneof_promotion,omitempty"`
}
func (x *FieldMigrateAnnotation) Reset() {
*x = FieldMigrateAnnotation{}
if protoimpl.UnsafeEnabled {
mi := &file_udpa_annotations_migrate_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *FieldMigrateAnnotation) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*FieldMigrateAnnotation) ProtoMessage() {}
func (x *FieldMigrateAnnotation) ProtoReflect() protoreflect.Message {
mi := &file_udpa_annotations_migrate_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use FieldMigrateAnnotation.ProtoReflect.Descriptor instead.
func (*FieldMigrateAnnotation) Descriptor() ([]byte, []int) {
return file_udpa_annotations_migrate_proto_rawDescGZIP(), []int{1}
}
func (x *FieldMigrateAnnotation) GetRename() string {
if x != nil {
return x.Rename
}
return ""
}
func (x *FieldMigrateAnnotation) GetOneofPromotion() string {
if x != nil {
return x.OneofPromotion
}
return ""
}
type FileMigrateAnnotation struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
MoveToPackage string `protobuf:"bytes,2,opt,name=move_to_package,json=moveToPackage,proto3" json:"move_to_package,omitempty"`
}
func (x *FileMigrateAnnotation) Reset() {
*x = FileMigrateAnnotation{}
if protoimpl.UnsafeEnabled {
mi := &file_udpa_annotations_migrate_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *FileMigrateAnnotation) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*FileMigrateAnnotation) ProtoMessage() {}
func (x *FileMigrateAnnotation) ProtoReflect() protoreflect.Message {
mi := &file_udpa_annotations_migrate_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use FileMigrateAnnotation.ProtoReflect.Descriptor instead.
func (*FileMigrateAnnotation) Descriptor() ([]byte, []int) {
return file_udpa_annotations_migrate_proto_rawDescGZIP(), []int{2}
}
func (x *FileMigrateAnnotation) GetMoveToPackage() string {
if x != nil {
return x.MoveToPackage
}
return ""
}
var file_udpa_annotations_migrate_proto_extTypes = []protoimpl.ExtensionInfo{
{
ExtendedType: (*descriptorpb.MessageOptions)(nil),
ExtensionType: (*MigrateAnnotation)(nil),
Field: 171962766,
Name: "udpa.annotations.message_migrate",
Tag: "bytes,171962766,opt,name=message_migrate",
Filename: "udpa/annotations/migrate.proto",
},
{
ExtendedType: (*descriptorpb.FieldOptions)(nil),
ExtensionType: (*FieldMigrateAnnotation)(nil),
Field: 171962766,
Name: "udpa.annotations.field_migrate",
Tag: "bytes,171962766,opt,name=field_migrate",
Filename: "udpa/annotations/migrate.proto",
},
{
ExtendedType: (*descriptorpb.EnumOptions)(nil),
ExtensionType: (*MigrateAnnotation)(nil),
Field: 171962766,
Name: "udpa.annotations.enum_migrate",
Tag: "bytes,171962766,opt,name=enum_migrate",
Filename: "udpa/annotations/migrate.proto",
},
{
ExtendedType: (*descriptorpb.EnumValueOptions)(nil),
ExtensionType: (*MigrateAnnotation)(nil),
Field: 171962766,
Name: "udpa.annotations.enum_value_migrate",
Tag: "bytes,171962766,opt,name=enum_value_migrate",
Filename: "udpa/annotations/migrate.proto",
},
{
ExtendedType: (*descriptorpb.FileOptions)(nil),
ExtensionType: (*FileMigrateAnnotation)(nil),
Field: 171962766,
Name: "udpa.annotations.file_migrate",
Tag: "bytes,171962766,opt,name=file_migrate",
Filename: "udpa/annotations/migrate.proto",
},
}
// Extension fields to descriptorpb.MessageOptions.
var (
// optional udpa.annotations.MigrateAnnotation message_migrate = 171962766;
E_MessageMigrate = &file_udpa_annotations_migrate_proto_extTypes[0]
)
// Extension fields to descriptorpb.FieldOptions.
var (
// optional udpa.annotations.FieldMigrateAnnotation field_migrate = 171962766;
E_FieldMigrate = &file_udpa_annotations_migrate_proto_extTypes[1]
)
// Extension fields to descriptorpb.EnumOptions.
var (
// optional udpa.annotations.MigrateAnnotation enum_migrate = 171962766;
E_EnumMigrate = &file_udpa_annotations_migrate_proto_extTypes[2]
)
// Extension fields to descriptorpb.EnumValueOptions.
var (
// optional udpa.annotations.MigrateAnnotation enum_value_migrate = 171962766;
E_EnumValueMigrate = &file_udpa_annotations_migrate_proto_extTypes[3]
)
// Extension fields to descriptorpb.FileOptions.
var (
// optional udpa.annotations.FileMigrateAnnotation file_migrate = 171962766;
E_FileMigrate = &file_udpa_annotations_migrate_proto_extTypes[4]
)
var File_udpa_annotations_migrate_proto protoreflect.FileDescriptor
var file_udpa_annotations_migrate_proto_rawDesc = []byte{
0x0a, 0x1e, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x73, 0x2f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x12, 0x10, 0x75, 0x64, 0x70, 0x61, 0x2e, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x73, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x62, 0x75, 0x66, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x2e, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x22, 0x2b, 0x0a, 0x11, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x41,
0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x6e,
0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x6e, 0x61, 0x6d,
0x65, 0x22, 0x59, 0x0a, 0x16, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74,
0x65, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x72,
0x65, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x6e,
0x61, 0x6d, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x5f, 0x70, 0x72, 0x6f,
0x6d, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6f, 0x6e,
0x65, 0x6f, 0x66, 0x50, 0x72, 0x6f, 0x6d, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3f, 0x0a, 0x15,
0x46, 0x69, 0x6c, 0x65, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x41, 0x6e, 0x6e, 0x6f, 0x74,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x26, 0x0a, 0x0f, 0x6d, 0x6f, 0x76, 0x65, 0x5f, 0x74, 0x6f,
0x5f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d,
0x6d, 0x6f, 0x76, 0x65, 0x54, 0x6f, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x3a, 0x70, 0x0a,
0x0f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65,
0x12, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
0x75, 0x66, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e,
0x73, 0x18, 0x8e, 0xe3, 0xff, 0x51, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x75, 0x64, 0x70,
0x61, 0x2e, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4d, 0x69,
0x67, 0x72, 0x61, 0x74, 0x65, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52,
0x0e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x3a,
0x6f, 0x0a, 0x0d, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65,
0x12, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18,
0x8e, 0xe3, 0xff, 0x51, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x75, 0x64, 0x70, 0x61, 0x2e,
0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x46, 0x69, 0x65, 0x6c,
0x64, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x52, 0x0c, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65,
0x3a, 0x67, 0x0a, 0x0c, 0x65, 0x6e, 0x75, 0x6d, 0x5f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65,
0x12, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
0x75, 0x66, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x8e,
0xe3, 0xff, 0x51, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x75, 0x64, 0x70, 0x61, 0x2e, 0x61,
0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4d, 0x69, 0x67, 0x72, 0x61,
0x74, 0x65, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x65, 0x6e,
0x75, 0x6d, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x3a, 0x77, 0x0a, 0x12, 0x65, 0x6e, 0x75,
0x6d, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x12,
0x21, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,
0x66, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f,
0x6e, 0x73, 0x18, 0x8e, 0xe3, 0xff, 0x51, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x75, 0x64,
0x70, 0x61, 0x2e, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4d,
0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x52, 0x10, 0x65, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4d, 0x69, 0x67, 0x72, 0x61,
0x74, 0x65, 0x3a, 0x6b, 0x0a, 0x0c, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x6d, 0x69, 0x67, 0x72, 0x61,
0x74, 0x65, 0x12, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73,
0x18, 0x8e, 0xe3, 0xff, 0x51, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x75, 0x64, 0x70, 0x61,
0x2e, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x46, 0x69, 0x6c,
0x65, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x52, 0x0b, 0x66, 0x69, 0x6c, 0x65, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x42,
0x24, 0x5a, 0x22, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6e,
0x63, 0x66, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x67, 0x6f, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_udpa_annotations_migrate_proto_rawDescOnce sync.Once
file_udpa_annotations_migrate_proto_rawDescData = file_udpa_annotations_migrate_proto_rawDesc
)
func file_udpa_annotations_migrate_proto_rawDescGZIP() []byte {
file_udpa_annotations_migrate_proto_rawDescOnce.Do(func() {
file_udpa_annotations_migrate_proto_rawDescData = protoimpl.X.CompressGZIP(file_udpa_annotations_migrate_proto_rawDescData)
})
return file_udpa_annotations_migrate_proto_rawDescData
}
var file_udpa_annotations_migrate_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
var file_udpa_annotations_migrate_proto_goTypes = []interface{}{
(*MigrateAnnotation)(nil), // 0: udpa.annotations.MigrateAnnotation
(*FieldMigrateAnnotation)(nil), // 1: udpa.annotations.FieldMigrateAnnotation
(*FileMigrateAnnotation)(nil), // 2: udpa.annotations.FileMigrateAnnotation
(*descriptorpb.MessageOptions)(nil), // 3: google.protobuf.MessageOptions
(*descriptorpb.FieldOptions)(nil), // 4: google.protobuf.FieldOptions
(*descriptorpb.EnumOptions)(nil), // 5: google.protobuf.EnumOptions
(*descriptorpb.EnumValueOptions)(nil), // 6: google.protobuf.EnumValueOptions
(*descriptorpb.FileOptions)(nil), // 7: google.protobuf.FileOptions
}
var file_udpa_annotations_migrate_proto_depIdxs = []int32{
3, // 0: udpa.annotations.message_migrate:extendee -> google.protobuf.MessageOptions
4, // 1: udpa.annotations.field_migrate:extendee -> google.protobuf.FieldOptions
5, // 2: udpa.annotations.enum_migrate:extendee -> google.protobuf.EnumOptions
6, // 3: udpa.annotations.enum_value_migrate:extendee -> google.protobuf.EnumValueOptions
7, // 4: udpa.annotations.file_migrate:extendee -> google.protobuf.FileOptions
0, // 5: udpa.annotations.message_migrate:type_name -> udpa.annotations.MigrateAnnotation
1, // 6: udpa.annotations.field_migrate:type_name -> udpa.annotations.FieldMigrateAnnotation
0, // 7: udpa.annotations.enum_migrate:type_name -> udpa.annotations.MigrateAnnotation
0, // 8: udpa.annotations.enum_value_migrate:type_name -> udpa.annotations.MigrateAnnotation
2, // 9: udpa.annotations.file_migrate:type_name -> udpa.annotations.FileMigrateAnnotation
10, // [10:10] is the sub-list for method output_type
10, // [10:10] is the sub-list for method input_type
5, // [5:10] is the sub-list for extension type_name
0, // [0:5] is the sub-list for extension extendee
0, // [0:0] is the sub-list for field type_name
}
func init() { file_udpa_annotations_migrate_proto_init() }
func file_udpa_annotations_migrate_proto_init() {
if File_udpa_annotations_migrate_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_udpa_annotations_migrate_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MigrateAnnotation); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_udpa_annotations_migrate_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*FieldMigrateAnnotation); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_udpa_annotations_migrate_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*FileMigrateAnnotation); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_udpa_annotations_migrate_proto_rawDesc,
NumEnums: 0,
NumMessages: 3,
NumExtensions: 5,
NumServices: 0,
},
GoTypes: file_udpa_annotations_migrate_proto_goTypes,
DependencyIndexes: file_udpa_annotations_migrate_proto_depIdxs,
MessageInfos: file_udpa_annotations_migrate_proto_msgTypes,
ExtensionInfos: file_udpa_annotations_migrate_proto_extTypes,
}.Build()
File_udpa_annotations_migrate_proto = out.File
file_udpa_annotations_migrate_proto_rawDesc = nil
file_udpa_annotations_migrate_proto_goTypes = nil
file_udpa_annotations_migrate_proto_depIdxs = nil
}

View File

@@ -0,0 +1,243 @@
// Code generated by protoc-gen-validate. DO NOT EDIT.
// source: udpa/annotations/migrate.proto
package annotations
import (
"bytes"
"errors"
"fmt"
"net"
"net/mail"
"net/url"
"regexp"
"strings"
"time"
"unicode/utf8"
"google.golang.org/protobuf/types/known/anypb"
)
// ensure the imports are used
var (
_ = bytes.MinRead
_ = errors.New("")
_ = fmt.Print
_ = utf8.UTFMax
_ = (*regexp.Regexp)(nil)
_ = (*strings.Reader)(nil)
_ = net.IPv4len
_ = time.Duration(0)
_ = (*url.URL)(nil)
_ = (*mail.Address)(nil)
_ = anypb.Any{}
)
// Validate checks the field values on MigrateAnnotation with the rules defined
// in the proto definition for this message. If any rules are violated, an
// error is returned.
func (m *MigrateAnnotation) Validate() error {
if m == nil {
return nil
}
// no validation rules for Rename
return nil
}
// MigrateAnnotationValidationError is the validation error returned by
// MigrateAnnotation.Validate if the designated constraints aren't met.
type MigrateAnnotationValidationError struct {
field string
reason string
cause error
key bool
}
// Field function returns field value.
func (e MigrateAnnotationValidationError) Field() string { return e.field }
// Reason function returns reason value.
func (e MigrateAnnotationValidationError) Reason() string { return e.reason }
// Cause function returns cause value.
func (e MigrateAnnotationValidationError) Cause() error { return e.cause }
// Key function returns key value.
func (e MigrateAnnotationValidationError) Key() bool { return e.key }
// ErrorName returns error name.
func (e MigrateAnnotationValidationError) ErrorName() string {
return "MigrateAnnotationValidationError"
}
// Error satisfies the builtin error interface
func (e MigrateAnnotationValidationError) Error() string {
cause := ""
if e.cause != nil {
cause = fmt.Sprintf(" | caused by: %v", e.cause)
}
key := ""
if e.key {
key = "key for "
}
return fmt.Sprintf(
"invalid %sMigrateAnnotation.%s: %s%s",
key,
e.field,
e.reason,
cause)
}
var _ error = MigrateAnnotationValidationError{}
var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = MigrateAnnotationValidationError{}
// Validate checks the field values on FieldMigrateAnnotation with the rules
// defined in the proto definition for this message. If any rules are
// violated, an error is returned.
func (m *FieldMigrateAnnotation) Validate() error {
if m == nil {
return nil
}
// no validation rules for Rename
// no validation rules for OneofPromotion
return nil
}
// FieldMigrateAnnotationValidationError is the validation error returned by
// FieldMigrateAnnotation.Validate if the designated constraints aren't met.
type FieldMigrateAnnotationValidationError struct {
field string
reason string
cause error
key bool
}
// Field function returns field value.
func (e FieldMigrateAnnotationValidationError) Field() string { return e.field }
// Reason function returns reason value.
func (e FieldMigrateAnnotationValidationError) Reason() string { return e.reason }
// Cause function returns cause value.
func (e FieldMigrateAnnotationValidationError) Cause() error { return e.cause }
// Key function returns key value.
func (e FieldMigrateAnnotationValidationError) Key() bool { return e.key }
// ErrorName returns error name.
func (e FieldMigrateAnnotationValidationError) ErrorName() string {
return "FieldMigrateAnnotationValidationError"
}
// Error satisfies the builtin error interface
func (e FieldMigrateAnnotationValidationError) Error() string {
cause := ""
if e.cause != nil {
cause = fmt.Sprintf(" | caused by: %v", e.cause)
}
key := ""
if e.key {
key = "key for "
}
return fmt.Sprintf(
"invalid %sFieldMigrateAnnotation.%s: %s%s",
key,
e.field,
e.reason,
cause)
}
var _ error = FieldMigrateAnnotationValidationError{}
var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = FieldMigrateAnnotationValidationError{}
// Validate checks the field values on FileMigrateAnnotation with the rules
// defined in the proto definition for this message. If any rules are
// violated, an error is returned.
func (m *FileMigrateAnnotation) Validate() error {
if m == nil {
return nil
}
// no validation rules for MoveToPackage
return nil
}
// FileMigrateAnnotationValidationError is the validation error returned by
// FileMigrateAnnotation.Validate if the designated constraints aren't met.
type FileMigrateAnnotationValidationError struct {
field string
reason string
cause error
key bool
}
// Field function returns field value.
func (e FileMigrateAnnotationValidationError) Field() string { return e.field }
// Reason function returns reason value.
func (e FileMigrateAnnotationValidationError) Reason() string { return e.reason }
// Cause function returns cause value.
func (e FileMigrateAnnotationValidationError) Cause() error { return e.cause }
// Key function returns key value.
func (e FileMigrateAnnotationValidationError) Key() bool { return e.key }
// ErrorName returns error name.
func (e FileMigrateAnnotationValidationError) ErrorName() string {
return "FileMigrateAnnotationValidationError"
}
// Error satisfies the builtin error interface
func (e FileMigrateAnnotationValidationError) Error() string {
cause := ""
if e.cause != nil {
cause = fmt.Sprintf(" | caused by: %v", e.cause)
}
key := ""
if e.key {
key = "key for "
}
return fmt.Sprintf(
"invalid %sFileMigrateAnnotation.%s: %s%s",
key,
e.field,
e.reason,
cause)
}
var _ error = FileMigrateAnnotationValidationError{}
var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = FileMigrateAnnotationValidationError{}

View File

@@ -0,0 +1,201 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.25.0
// protoc v3.18.0
// source: udpa/annotations/security.proto
package annotations
import (
proto "github.com/golang/protobuf/proto"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
descriptorpb "google.golang.org/protobuf/types/descriptorpb"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// This is a compile-time assertion that a sufficiently up-to-date version
// of the legacy proto package is being used.
const _ = proto.ProtoPackageIsVersion4
type FieldSecurityAnnotation struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
ConfigureForUntrustedDownstream bool `protobuf:"varint,1,opt,name=configure_for_untrusted_downstream,json=configureForUntrustedDownstream,proto3" json:"configure_for_untrusted_downstream,omitempty"`
ConfigureForUntrustedUpstream bool `protobuf:"varint,2,opt,name=configure_for_untrusted_upstream,json=configureForUntrustedUpstream,proto3" json:"configure_for_untrusted_upstream,omitempty"`
}
func (x *FieldSecurityAnnotation) Reset() {
*x = FieldSecurityAnnotation{}
if protoimpl.UnsafeEnabled {
mi := &file_udpa_annotations_security_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *FieldSecurityAnnotation) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*FieldSecurityAnnotation) ProtoMessage() {}
func (x *FieldSecurityAnnotation) ProtoReflect() protoreflect.Message {
mi := &file_udpa_annotations_security_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use FieldSecurityAnnotation.ProtoReflect.Descriptor instead.
func (*FieldSecurityAnnotation) Descriptor() ([]byte, []int) {
return file_udpa_annotations_security_proto_rawDescGZIP(), []int{0}
}
func (x *FieldSecurityAnnotation) GetConfigureForUntrustedDownstream() bool {
if x != nil {
return x.ConfigureForUntrustedDownstream
}
return false
}
func (x *FieldSecurityAnnotation) GetConfigureForUntrustedUpstream() bool {
if x != nil {
return x.ConfigureForUntrustedUpstream
}
return false
}
var file_udpa_annotations_security_proto_extTypes = []protoimpl.ExtensionInfo{
{
ExtendedType: (*descriptorpb.FieldOptions)(nil),
ExtensionType: (*FieldSecurityAnnotation)(nil),
Field: 11122993,
Name: "udpa.annotations.security",
Tag: "bytes,11122993,opt,name=security",
Filename: "udpa/annotations/security.proto",
},
}
// Extension fields to descriptorpb.FieldOptions.
var (
// optional udpa.annotations.FieldSecurityAnnotation security = 11122993;
E_Security = &file_udpa_annotations_security_proto_extTypes[0]
)
var File_udpa_annotations_security_proto protoreflect.FileDescriptor
var file_udpa_annotations_security_proto_rawDesc = []byte{
0x0a, 0x1f, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x73, 0x2f, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x12, 0x10, 0x75, 0x64, 0x70, 0x61, 0x2e, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x73, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x62, 0x75, 0x66, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x2e, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x22, 0xaf, 0x01, 0x0a, 0x17, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x53, 0x65,
0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x12, 0x4b, 0x0a, 0x22, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x65, 0x5f, 0x66, 0x6f,
0x72, 0x5f, 0x75, 0x6e, 0x74, 0x72, 0x75, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x64, 0x6f, 0x77, 0x6e,
0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1f, 0x63, 0x6f,
0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x65, 0x46, 0x6f, 0x72, 0x55, 0x6e, 0x74, 0x72, 0x75, 0x73,
0x74, 0x65, 0x64, 0x44, 0x6f, 0x77, 0x6e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x12, 0x47, 0x0a,
0x20, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x65, 0x5f, 0x66, 0x6f, 0x72, 0x5f, 0x75,
0x6e, 0x74, 0x72, 0x75, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61,
0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1d, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75,
0x72, 0x65, 0x46, 0x6f, 0x72, 0x55, 0x6e, 0x74, 0x72, 0x75, 0x73, 0x74, 0x65, 0x64, 0x55, 0x70,
0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x3a, 0x67, 0x0a, 0x08, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69,
0x74, 0x79, 0x12, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e,
0x73, 0x18, 0xb1, 0xf2, 0xa6, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x75, 0x64, 0x70,
0x61, 0x2e, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x46, 0x69,
0x65, 0x6c, 0x64, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x41, 0x6e, 0x6e, 0x6f, 0x74,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x42,
0x2c, 0x5a, 0x22, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6e,
0x63, 0x66, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x67, 0x6f, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x73, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x08, 0x01, 0x62, 0x06, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_udpa_annotations_security_proto_rawDescOnce sync.Once
file_udpa_annotations_security_proto_rawDescData = file_udpa_annotations_security_proto_rawDesc
)
func file_udpa_annotations_security_proto_rawDescGZIP() []byte {
file_udpa_annotations_security_proto_rawDescOnce.Do(func() {
file_udpa_annotations_security_proto_rawDescData = protoimpl.X.CompressGZIP(file_udpa_annotations_security_proto_rawDescData)
})
return file_udpa_annotations_security_proto_rawDescData
}
var file_udpa_annotations_security_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_udpa_annotations_security_proto_goTypes = []interface{}{
(*FieldSecurityAnnotation)(nil), // 0: udpa.annotations.FieldSecurityAnnotation
(*descriptorpb.FieldOptions)(nil), // 1: google.protobuf.FieldOptions
}
var file_udpa_annotations_security_proto_depIdxs = []int32{
1, // 0: udpa.annotations.security:extendee -> google.protobuf.FieldOptions
0, // 1: udpa.annotations.security:type_name -> udpa.annotations.FieldSecurityAnnotation
2, // [2:2] is the sub-list for method output_type
2, // [2:2] is the sub-list for method input_type
1, // [1:2] is the sub-list for extension type_name
0, // [0:1] is the sub-list for extension extendee
0, // [0:0] is the sub-list for field type_name
}
func init() { file_udpa_annotations_security_proto_init() }
func file_udpa_annotations_security_proto_init() {
if File_udpa_annotations_security_proto != nil {
return
}
file_udpa_annotations_status_proto_init()
if !protoimpl.UnsafeEnabled {
file_udpa_annotations_security_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*FieldSecurityAnnotation); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_udpa_annotations_security_proto_rawDesc,
NumEnums: 0,
NumMessages: 1,
NumExtensions: 1,
NumServices: 0,
},
GoTypes: file_udpa_annotations_security_proto_goTypes,
DependencyIndexes: file_udpa_annotations_security_proto_depIdxs,
MessageInfos: file_udpa_annotations_security_proto_msgTypes,
ExtensionInfos: file_udpa_annotations_security_proto_extTypes,
}.Build()
File_udpa_annotations_security_proto = out.File
file_udpa_annotations_security_proto_rawDesc = nil
file_udpa_annotations_security_proto_goTypes = nil
file_udpa_annotations_security_proto_depIdxs = nil
}

View File

@@ -0,0 +1,105 @@
// Code generated by protoc-gen-validate. DO NOT EDIT.
// source: udpa/annotations/security.proto
package annotations
import (
"bytes"
"errors"
"fmt"
"net"
"net/mail"
"net/url"
"regexp"
"strings"
"time"
"unicode/utf8"
"google.golang.org/protobuf/types/known/anypb"
)
// ensure the imports are used
var (
_ = bytes.MinRead
_ = errors.New("")
_ = fmt.Print
_ = utf8.UTFMax
_ = (*regexp.Regexp)(nil)
_ = (*strings.Reader)(nil)
_ = net.IPv4len
_ = time.Duration(0)
_ = (*url.URL)(nil)
_ = (*mail.Address)(nil)
_ = anypb.Any{}
)
// Validate checks the field values on FieldSecurityAnnotation with the rules
// defined in the proto definition for this message. If any rules are
// violated, an error is returned.
func (m *FieldSecurityAnnotation) Validate() error {
if m == nil {
return nil
}
// no validation rules for ConfigureForUntrustedDownstream
// no validation rules for ConfigureForUntrustedUpstream
return nil
}
// FieldSecurityAnnotationValidationError is the validation error returned by
// FieldSecurityAnnotation.Validate if the designated constraints aren't met.
type FieldSecurityAnnotationValidationError struct {
field string
reason string
cause error
key bool
}
// Field function returns field value.
func (e FieldSecurityAnnotationValidationError) Field() string { return e.field }
// Reason function returns reason value.
func (e FieldSecurityAnnotationValidationError) Reason() string { return e.reason }
// Cause function returns cause value.
func (e FieldSecurityAnnotationValidationError) Cause() error { return e.cause }
// Key function returns key value.
func (e FieldSecurityAnnotationValidationError) Key() bool { return e.key }
// ErrorName returns error name.
func (e FieldSecurityAnnotationValidationError) ErrorName() string {
return "FieldSecurityAnnotationValidationError"
}
// Error satisfies the builtin error interface
func (e FieldSecurityAnnotationValidationError) Error() string {
cause := ""
if e.cause != nil {
cause = fmt.Sprintf(" | caused by: %v", e.cause)
}
key := ""
if e.key {
key = "key for "
}
return fmt.Sprintf(
"invalid %sFieldSecurityAnnotation.%s: %s%s",
key,
e.field,
e.reason,
cause)
}
var _ error = FieldSecurityAnnotationValidationError{}
var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = FieldSecurityAnnotationValidationError{}

View File

@@ -0,0 +1,98 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.25.0
// protoc v3.18.0
// source: udpa/annotations/sensitive.proto
package annotations
import (
proto "github.com/golang/protobuf/proto"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
descriptorpb "google.golang.org/protobuf/types/descriptorpb"
reflect "reflect"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// This is a compile-time assertion that a sufficiently up-to-date version
// of the legacy proto package is being used.
const _ = proto.ProtoPackageIsVersion4
var file_udpa_annotations_sensitive_proto_extTypes = []protoimpl.ExtensionInfo{
{
ExtendedType: (*descriptorpb.FieldOptions)(nil),
ExtensionType: (*bool)(nil),
Field: 76569463,
Name: "udpa.annotations.sensitive",
Tag: "varint,76569463,opt,name=sensitive",
Filename: "udpa/annotations/sensitive.proto",
},
}
// Extension fields to descriptorpb.FieldOptions.
var (
// optional bool sensitive = 76569463;
E_Sensitive = &file_udpa_annotations_sensitive_proto_extTypes[0]
)
var File_udpa_annotations_sensitive_proto protoreflect.FileDescriptor
var file_udpa_annotations_sensitive_proto_rawDesc = []byte{
0x0a, 0x20, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x73, 0x2f, 0x73, 0x65, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x2e, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x12, 0x10, 0x75, 0x64, 0x70, 0x61, 0x2e, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72,
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x3a, 0x3e, 0x0a, 0x09, 0x73, 0x65, 0x6e, 0x73, 0x69, 0x74,
0x69, 0x76, 0x65, 0x12, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f,
0x6e, 0x73, 0x18, 0xf7, 0xb6, 0xc1, 0x24, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x73, 0x65, 0x6e,
0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x42, 0x24, 0x5a, 0x22, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62,
0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6e, 0x63, 0x66, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x67, 0x6f,
0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x62, 0x06, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x33,
}
var file_udpa_annotations_sensitive_proto_goTypes = []interface{}{
(*descriptorpb.FieldOptions)(nil), // 0: google.protobuf.FieldOptions
}
var file_udpa_annotations_sensitive_proto_depIdxs = []int32{
0, // 0: udpa.annotations.sensitive:extendee -> google.protobuf.FieldOptions
1, // [1:1] is the sub-list for method output_type
1, // [1:1] is the sub-list for method input_type
1, // [1:1] is the sub-list for extension type_name
0, // [0:1] is the sub-list for extension extendee
0, // [0:0] is the sub-list for field type_name
}
func init() { file_udpa_annotations_sensitive_proto_init() }
func file_udpa_annotations_sensitive_proto_init() {
if File_udpa_annotations_sensitive_proto != nil {
return
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_udpa_annotations_sensitive_proto_rawDesc,
NumEnums: 0,
NumMessages: 0,
NumExtensions: 1,
NumServices: 0,
},
GoTypes: file_udpa_annotations_sensitive_proto_goTypes,
DependencyIndexes: file_udpa_annotations_sensitive_proto_depIdxs,
ExtensionInfos: file_udpa_annotations_sensitive_proto_extTypes,
}.Build()
File_udpa_annotations_sensitive_proto = out.File
file_udpa_annotations_sensitive_proto_rawDesc = nil
file_udpa_annotations_sensitive_proto_goTypes = nil
file_udpa_annotations_sensitive_proto_depIdxs = nil
}

View File

@@ -0,0 +1,34 @@
// Code generated by protoc-gen-validate. DO NOT EDIT.
// source: udpa/annotations/sensitive.proto
package annotations
import (
"bytes"
"errors"
"fmt"
"net"
"net/mail"
"net/url"
"regexp"
"strings"
"time"
"unicode/utf8"
"google.golang.org/protobuf/types/known/anypb"
)
// ensure the imports are used
var (
_ = bytes.MinRead
_ = errors.New("")
_ = fmt.Print
_ = utf8.UTFMax
_ = (*regexp.Regexp)(nil)
_ = (*strings.Reader)(nil)
_ = net.IPv4len
_ = time.Duration(0)
_ = (*url.URL)(nil)
_ = (*mail.Address)(nil)
_ = anypb.Any{}
)

View File

@@ -0,0 +1,258 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.25.0
// protoc v3.18.0
// source: udpa/annotations/status.proto
package annotations
import (
proto "github.com/golang/protobuf/proto"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
descriptorpb "google.golang.org/protobuf/types/descriptorpb"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// This is a compile-time assertion that a sufficiently up-to-date version
// of the legacy proto package is being used.
const _ = proto.ProtoPackageIsVersion4
type PackageVersionStatus int32
const (
PackageVersionStatus_UNKNOWN PackageVersionStatus = 0
PackageVersionStatus_FROZEN PackageVersionStatus = 1
PackageVersionStatus_ACTIVE PackageVersionStatus = 2
PackageVersionStatus_NEXT_MAJOR_VERSION_CANDIDATE PackageVersionStatus = 3
)
// Enum value maps for PackageVersionStatus.
var (
PackageVersionStatus_name = map[int32]string{
0: "UNKNOWN",
1: "FROZEN",
2: "ACTIVE",
3: "NEXT_MAJOR_VERSION_CANDIDATE",
}
PackageVersionStatus_value = map[string]int32{
"UNKNOWN": 0,
"FROZEN": 1,
"ACTIVE": 2,
"NEXT_MAJOR_VERSION_CANDIDATE": 3,
}
)
func (x PackageVersionStatus) Enum() *PackageVersionStatus {
p := new(PackageVersionStatus)
*p = x
return p
}
func (x PackageVersionStatus) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (PackageVersionStatus) Descriptor() protoreflect.EnumDescriptor {
return file_udpa_annotations_status_proto_enumTypes[0].Descriptor()
}
func (PackageVersionStatus) Type() protoreflect.EnumType {
return &file_udpa_annotations_status_proto_enumTypes[0]
}
func (x PackageVersionStatus) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use PackageVersionStatus.Descriptor instead.
func (PackageVersionStatus) EnumDescriptor() ([]byte, []int) {
return file_udpa_annotations_status_proto_rawDescGZIP(), []int{0}
}
type StatusAnnotation struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
WorkInProgress bool `protobuf:"varint,1,opt,name=work_in_progress,json=workInProgress,proto3" json:"work_in_progress,omitempty"`
PackageVersionStatus PackageVersionStatus `protobuf:"varint,2,opt,name=package_version_status,json=packageVersionStatus,proto3,enum=udpa.annotations.PackageVersionStatus" json:"package_version_status,omitempty"`
}
func (x *StatusAnnotation) Reset() {
*x = StatusAnnotation{}
if protoimpl.UnsafeEnabled {
mi := &file_udpa_annotations_status_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *StatusAnnotation) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*StatusAnnotation) ProtoMessage() {}
func (x *StatusAnnotation) ProtoReflect() protoreflect.Message {
mi := &file_udpa_annotations_status_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use StatusAnnotation.ProtoReflect.Descriptor instead.
func (*StatusAnnotation) Descriptor() ([]byte, []int) {
return file_udpa_annotations_status_proto_rawDescGZIP(), []int{0}
}
func (x *StatusAnnotation) GetWorkInProgress() bool {
if x != nil {
return x.WorkInProgress
}
return false
}
func (x *StatusAnnotation) GetPackageVersionStatus() PackageVersionStatus {
if x != nil {
return x.PackageVersionStatus
}
return PackageVersionStatus_UNKNOWN
}
var file_udpa_annotations_status_proto_extTypes = []protoimpl.ExtensionInfo{
{
ExtendedType: (*descriptorpb.FileOptions)(nil),
ExtensionType: (*StatusAnnotation)(nil),
Field: 222707719,
Name: "udpa.annotations.file_status",
Tag: "bytes,222707719,opt,name=file_status",
Filename: "udpa/annotations/status.proto",
},
}
// Extension fields to descriptorpb.FileOptions.
var (
// optional udpa.annotations.StatusAnnotation file_status = 222707719;
E_FileStatus = &file_udpa_annotations_status_proto_extTypes[0]
)
var File_udpa_annotations_status_proto protoreflect.FileDescriptor
var file_udpa_annotations_status_proto_rawDesc = []byte{
0x0a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12,
0x10, 0x75, 0x64, 0x70, 0x61, 0x2e, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x73, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
0x75, 0x66, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x22, 0x9a, 0x01, 0x0a, 0x10, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x41, 0x6e,
0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x28, 0x0a, 0x10, 0x77, 0x6f, 0x72, 0x6b,
0x5f, 0x69, 0x6e, 0x5f, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01,
0x28, 0x08, 0x52, 0x0e, 0x77, 0x6f, 0x72, 0x6b, 0x49, 0x6e, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x65,
0x73, 0x73, 0x12, 0x5c, 0x0a, 0x16, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x5f, 0x76, 0x65,
0x72, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01,
0x28, 0x0e, 0x32, 0x26, 0x2e, 0x75, 0x64, 0x70, 0x61, 0x2e, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x56, 0x65, 0x72,
0x73, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x14, 0x70, 0x61, 0x63, 0x6b,
0x61, 0x67, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73,
0x2a, 0x5d, 0x0a, 0x14, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69,
0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e,
0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x46, 0x52, 0x4f, 0x5a, 0x45, 0x4e, 0x10,
0x01, 0x12, 0x0a, 0x0a, 0x06, 0x41, 0x43, 0x54, 0x49, 0x56, 0x45, 0x10, 0x02, 0x12, 0x20, 0x0a,
0x1c, 0x4e, 0x45, 0x58, 0x54, 0x5f, 0x4d, 0x41, 0x4a, 0x4f, 0x52, 0x5f, 0x56, 0x45, 0x52, 0x53,
0x49, 0x4f, 0x4e, 0x5f, 0x43, 0x41, 0x4e, 0x44, 0x49, 0x44, 0x41, 0x54, 0x45, 0x10, 0x03, 0x3a,
0x64, 0x0a, 0x0b, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1c,
0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
0x2e, 0x46, 0x69, 0x6c, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x87, 0x80, 0x99,
0x6a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x75, 0x64, 0x70, 0x61, 0x2e, 0x61, 0x6e, 0x6e,
0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x41,
0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x66, 0x69, 0x6c, 0x65, 0x53,
0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x24, 0x5a, 0x22, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e,
0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6e, 0x63, 0x66, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x67, 0x6f, 0x2f,
0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x33,
}
var (
file_udpa_annotations_status_proto_rawDescOnce sync.Once
file_udpa_annotations_status_proto_rawDescData = file_udpa_annotations_status_proto_rawDesc
)
func file_udpa_annotations_status_proto_rawDescGZIP() []byte {
file_udpa_annotations_status_proto_rawDescOnce.Do(func() {
file_udpa_annotations_status_proto_rawDescData = protoimpl.X.CompressGZIP(file_udpa_annotations_status_proto_rawDescData)
})
return file_udpa_annotations_status_proto_rawDescData
}
var file_udpa_annotations_status_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_udpa_annotations_status_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_udpa_annotations_status_proto_goTypes = []interface{}{
(PackageVersionStatus)(0), // 0: udpa.annotations.PackageVersionStatus
(*StatusAnnotation)(nil), // 1: udpa.annotations.StatusAnnotation
(*descriptorpb.FileOptions)(nil), // 2: google.protobuf.FileOptions
}
var file_udpa_annotations_status_proto_depIdxs = []int32{
0, // 0: udpa.annotations.StatusAnnotation.package_version_status:type_name -> udpa.annotations.PackageVersionStatus
2, // 1: udpa.annotations.file_status:extendee -> google.protobuf.FileOptions
1, // 2: udpa.annotations.file_status:type_name -> udpa.annotations.StatusAnnotation
3, // [3:3] is the sub-list for method output_type
3, // [3:3] is the sub-list for method input_type
2, // [2:3] is the sub-list for extension type_name
1, // [1:2] is the sub-list for extension extendee
0, // [0:1] is the sub-list for field type_name
}
func init() { file_udpa_annotations_status_proto_init() }
func file_udpa_annotations_status_proto_init() {
if File_udpa_annotations_status_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_udpa_annotations_status_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*StatusAnnotation); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_udpa_annotations_status_proto_rawDesc,
NumEnums: 1,
NumMessages: 1,
NumExtensions: 1,
NumServices: 0,
},
GoTypes: file_udpa_annotations_status_proto_goTypes,
DependencyIndexes: file_udpa_annotations_status_proto_depIdxs,
EnumInfos: file_udpa_annotations_status_proto_enumTypes,
MessageInfos: file_udpa_annotations_status_proto_msgTypes,
ExtensionInfos: file_udpa_annotations_status_proto_extTypes,
}.Build()
File_udpa_annotations_status_proto = out.File
file_udpa_annotations_status_proto_rawDesc = nil
file_udpa_annotations_status_proto_goTypes = nil
file_udpa_annotations_status_proto_depIdxs = nil
}

View File

@@ -0,0 +1,103 @@
// Code generated by protoc-gen-validate. DO NOT EDIT.
// source: udpa/annotations/status.proto
package annotations
import (
"bytes"
"errors"
"fmt"
"net"
"net/mail"
"net/url"
"regexp"
"strings"
"time"
"unicode/utf8"
"google.golang.org/protobuf/types/known/anypb"
)
// ensure the imports are used
var (
_ = bytes.MinRead
_ = errors.New("")
_ = fmt.Print
_ = utf8.UTFMax
_ = (*regexp.Regexp)(nil)
_ = (*strings.Reader)(nil)
_ = net.IPv4len
_ = time.Duration(0)
_ = (*url.URL)(nil)
_ = (*mail.Address)(nil)
_ = anypb.Any{}
)
// Validate checks the field values on StatusAnnotation with the rules defined
// in the proto definition for this message. If any rules are violated, an
// error is returned.
func (m *StatusAnnotation) Validate() error {
if m == nil {
return nil
}
// no validation rules for WorkInProgress
// no validation rules for PackageVersionStatus
return nil
}
// StatusAnnotationValidationError is the validation error returned by
// StatusAnnotation.Validate if the designated constraints aren't met.
type StatusAnnotationValidationError struct {
field string
reason string
cause error
key bool
}
// Field function returns field value.
func (e StatusAnnotationValidationError) Field() string { return e.field }
// Reason function returns reason value.
func (e StatusAnnotationValidationError) Reason() string { return e.reason }
// Cause function returns cause value.
func (e StatusAnnotationValidationError) Cause() error { return e.cause }
// Key function returns key value.
func (e StatusAnnotationValidationError) Key() bool { return e.key }
// ErrorName returns error name.
func (e StatusAnnotationValidationError) ErrorName() string { return "StatusAnnotationValidationError" }
// Error satisfies the builtin error interface
func (e StatusAnnotationValidationError) Error() string {
cause := ""
if e.cause != nil {
cause = fmt.Sprintf(" | caused by: %v", e.cause)
}
key := ""
if e.key {
key = "key for "
}
return fmt.Sprintf(
"invalid %sStatusAnnotation.%s: %s%s",
key,
e.field,
e.reason,
cause)
}
var _ error = StatusAnnotationValidationError{}
var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = StatusAnnotationValidationError{}

View File

@@ -0,0 +1,183 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.25.0
// protoc v3.18.0
// source: udpa/annotations/versioning.proto
package annotations
import (
proto "github.com/golang/protobuf/proto"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
descriptorpb "google.golang.org/protobuf/types/descriptorpb"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// This is a compile-time assertion that a sufficiently up-to-date version
// of the legacy proto package is being used.
const _ = proto.ProtoPackageIsVersion4
type VersioningAnnotation struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
PreviousMessageType string `protobuf:"bytes,1,opt,name=previous_message_type,json=previousMessageType,proto3" json:"previous_message_type,omitempty"`
}
func (x *VersioningAnnotation) Reset() {
*x = VersioningAnnotation{}
if protoimpl.UnsafeEnabled {
mi := &file_udpa_annotations_versioning_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *VersioningAnnotation) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*VersioningAnnotation) ProtoMessage() {}
func (x *VersioningAnnotation) ProtoReflect() protoreflect.Message {
mi := &file_udpa_annotations_versioning_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use VersioningAnnotation.ProtoReflect.Descriptor instead.
func (*VersioningAnnotation) Descriptor() ([]byte, []int) {
return file_udpa_annotations_versioning_proto_rawDescGZIP(), []int{0}
}
func (x *VersioningAnnotation) GetPreviousMessageType() string {
if x != nil {
return x.PreviousMessageType
}
return ""
}
var file_udpa_annotations_versioning_proto_extTypes = []protoimpl.ExtensionInfo{
{
ExtendedType: (*descriptorpb.MessageOptions)(nil),
ExtensionType: (*VersioningAnnotation)(nil),
Field: 7881811,
Name: "udpa.annotations.versioning",
Tag: "bytes,7881811,opt,name=versioning",
Filename: "udpa/annotations/versioning.proto",
},
}
// Extension fields to descriptorpb.MessageOptions.
var (
// optional udpa.annotations.VersioningAnnotation versioning = 7881811;
E_Versioning = &file_udpa_annotations_versioning_proto_extTypes[0]
)
var File_udpa_annotations_versioning_proto protoreflect.FileDescriptor
var file_udpa_annotations_versioning_proto_rawDesc = []byte{
0x0a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x12, 0x10, 0x75, 0x64, 0x70, 0x61, 0x2e, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f,
0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x4a, 0x0a, 0x14, 0x56, 0x65, 0x72, 0x73, 0x69,
0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12,
0x32, 0x0a, 0x15, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x6d, 0x65, 0x73, 0x73,
0x61, 0x67, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13,
0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54,
0x79, 0x70, 0x65, 0x3a, 0x6a, 0x0a, 0x0a, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e,
0x67, 0x12, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f,
0x6e, 0x73, 0x18, 0xd3, 0x88, 0xe1, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x75, 0x64,
0x70, 0x61, 0x2e, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x56,
0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x42,
0x24, 0x5a, 0x22, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6e,
0x63, 0x66, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x67, 0x6f, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_udpa_annotations_versioning_proto_rawDescOnce sync.Once
file_udpa_annotations_versioning_proto_rawDescData = file_udpa_annotations_versioning_proto_rawDesc
)
func file_udpa_annotations_versioning_proto_rawDescGZIP() []byte {
file_udpa_annotations_versioning_proto_rawDescOnce.Do(func() {
file_udpa_annotations_versioning_proto_rawDescData = protoimpl.X.CompressGZIP(file_udpa_annotations_versioning_proto_rawDescData)
})
return file_udpa_annotations_versioning_proto_rawDescData
}
var file_udpa_annotations_versioning_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_udpa_annotations_versioning_proto_goTypes = []interface{}{
(*VersioningAnnotation)(nil), // 0: udpa.annotations.VersioningAnnotation
(*descriptorpb.MessageOptions)(nil), // 1: google.protobuf.MessageOptions
}
var file_udpa_annotations_versioning_proto_depIdxs = []int32{
1, // 0: udpa.annotations.versioning:extendee -> google.protobuf.MessageOptions
0, // 1: udpa.annotations.versioning:type_name -> udpa.annotations.VersioningAnnotation
2, // [2:2] is the sub-list for method output_type
2, // [2:2] is the sub-list for method input_type
1, // [1:2] is the sub-list for extension type_name
0, // [0:1] is the sub-list for extension extendee
0, // [0:0] is the sub-list for field type_name
}
func init() { file_udpa_annotations_versioning_proto_init() }
func file_udpa_annotations_versioning_proto_init() {
if File_udpa_annotations_versioning_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_udpa_annotations_versioning_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*VersioningAnnotation); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_udpa_annotations_versioning_proto_rawDesc,
NumEnums: 0,
NumMessages: 1,
NumExtensions: 1,
NumServices: 0,
},
GoTypes: file_udpa_annotations_versioning_proto_goTypes,
DependencyIndexes: file_udpa_annotations_versioning_proto_depIdxs,
MessageInfos: file_udpa_annotations_versioning_proto_msgTypes,
ExtensionInfos: file_udpa_annotations_versioning_proto_extTypes,
}.Build()
File_udpa_annotations_versioning_proto = out.File
file_udpa_annotations_versioning_proto_rawDesc = nil
file_udpa_annotations_versioning_proto_goTypes = nil
file_udpa_annotations_versioning_proto_depIdxs = nil
}

View File

@@ -0,0 +1,103 @@
// Code generated by protoc-gen-validate. DO NOT EDIT.
// source: udpa/annotations/versioning.proto
package annotations
import (
"bytes"
"errors"
"fmt"
"net"
"net/mail"
"net/url"
"regexp"
"strings"
"time"
"unicode/utf8"
"google.golang.org/protobuf/types/known/anypb"
)
// ensure the imports are used
var (
_ = bytes.MinRead
_ = errors.New("")
_ = fmt.Print
_ = utf8.UTFMax
_ = (*regexp.Regexp)(nil)
_ = (*strings.Reader)(nil)
_ = net.IPv4len
_ = time.Duration(0)
_ = (*url.URL)(nil)
_ = (*mail.Address)(nil)
_ = anypb.Any{}
)
// Validate checks the field values on VersioningAnnotation with the rules
// defined in the proto definition for this message. If any rules are
// violated, an error is returned.
func (m *VersioningAnnotation) Validate() error {
if m == nil {
return nil
}
// no validation rules for PreviousMessageType
return nil
}
// VersioningAnnotationValidationError is the validation error returned by
// VersioningAnnotation.Validate if the designated constraints aren't met.
type VersioningAnnotationValidationError struct {
field string
reason string
cause error
key bool
}
// Field function returns field value.
func (e VersioningAnnotationValidationError) Field() string { return e.field }
// Reason function returns reason value.
func (e VersioningAnnotationValidationError) Reason() string { return e.reason }
// Cause function returns cause value.
func (e VersioningAnnotationValidationError) Cause() error { return e.cause }
// Key function returns key value.
func (e VersioningAnnotationValidationError) Key() bool { return e.key }
// ErrorName returns error name.
func (e VersioningAnnotationValidationError) ErrorName() string {
return "VersioningAnnotationValidationError"
}
// Error satisfies the builtin error interface
func (e VersioningAnnotationValidationError) Error() string {
cause := ""
if e.cause != nil {
cause = fmt.Sprintf(" | caused by: %v", e.cause)
}
key := ""
if e.key {
key = "key for "
}
return fmt.Sprintf(
"invalid %sVersioningAnnotation.%s: %s%s",
key,
e.field,
e.reason,
cause)
}
var _ error = VersioningAnnotationValidationError{}
var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = VersioningAnnotationValidationError{}

View File

@@ -0,0 +1,417 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.25.0
// protoc v3.18.0
// source: xds/annotations/v3/migrate.proto
package v3
import (
proto "github.com/golang/protobuf/proto"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
descriptorpb "google.golang.org/protobuf/types/descriptorpb"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// This is a compile-time assertion that a sufficiently up-to-date version
// of the legacy proto package is being used.
const _ = proto.ProtoPackageIsVersion4
type MigrateAnnotation struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Rename string `protobuf:"bytes,1,opt,name=rename,proto3" json:"rename,omitempty"`
}
func (x *MigrateAnnotation) Reset() {
*x = MigrateAnnotation{}
if protoimpl.UnsafeEnabled {
mi := &file_xds_annotations_v3_migrate_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MigrateAnnotation) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MigrateAnnotation) ProtoMessage() {}
func (x *MigrateAnnotation) ProtoReflect() protoreflect.Message {
mi := &file_xds_annotations_v3_migrate_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use MigrateAnnotation.ProtoReflect.Descriptor instead.
func (*MigrateAnnotation) Descriptor() ([]byte, []int) {
return file_xds_annotations_v3_migrate_proto_rawDescGZIP(), []int{0}
}
func (x *MigrateAnnotation) GetRename() string {
if x != nil {
return x.Rename
}
return ""
}
type FieldMigrateAnnotation struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Rename string `protobuf:"bytes,1,opt,name=rename,proto3" json:"rename,omitempty"`
OneofPromotion string `protobuf:"bytes,2,opt,name=oneof_promotion,json=oneofPromotion,proto3" json:"oneof_promotion,omitempty"`
}
func (x *FieldMigrateAnnotation) Reset() {
*x = FieldMigrateAnnotation{}
if protoimpl.UnsafeEnabled {
mi := &file_xds_annotations_v3_migrate_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *FieldMigrateAnnotation) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*FieldMigrateAnnotation) ProtoMessage() {}
func (x *FieldMigrateAnnotation) ProtoReflect() protoreflect.Message {
mi := &file_xds_annotations_v3_migrate_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use FieldMigrateAnnotation.ProtoReflect.Descriptor instead.
func (*FieldMigrateAnnotation) Descriptor() ([]byte, []int) {
return file_xds_annotations_v3_migrate_proto_rawDescGZIP(), []int{1}
}
func (x *FieldMigrateAnnotation) GetRename() string {
if x != nil {
return x.Rename
}
return ""
}
func (x *FieldMigrateAnnotation) GetOneofPromotion() string {
if x != nil {
return x.OneofPromotion
}
return ""
}
type FileMigrateAnnotation struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
MoveToPackage string `protobuf:"bytes,2,opt,name=move_to_package,json=moveToPackage,proto3" json:"move_to_package,omitempty"`
}
func (x *FileMigrateAnnotation) Reset() {
*x = FileMigrateAnnotation{}
if protoimpl.UnsafeEnabled {
mi := &file_xds_annotations_v3_migrate_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *FileMigrateAnnotation) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*FileMigrateAnnotation) ProtoMessage() {}
func (x *FileMigrateAnnotation) ProtoReflect() protoreflect.Message {
mi := &file_xds_annotations_v3_migrate_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use FileMigrateAnnotation.ProtoReflect.Descriptor instead.
func (*FileMigrateAnnotation) Descriptor() ([]byte, []int) {
return file_xds_annotations_v3_migrate_proto_rawDescGZIP(), []int{2}
}
func (x *FileMigrateAnnotation) GetMoveToPackage() string {
if x != nil {
return x.MoveToPackage
}
return ""
}
var file_xds_annotations_v3_migrate_proto_extTypes = []protoimpl.ExtensionInfo{
{
ExtendedType: (*descriptorpb.MessageOptions)(nil),
ExtensionType: (*MigrateAnnotation)(nil),
Field: 112948430,
Name: "xds.annotations.v3.message_migrate",
Tag: "bytes,112948430,opt,name=message_migrate",
Filename: "xds/annotations/v3/migrate.proto",
},
{
ExtendedType: (*descriptorpb.FieldOptions)(nil),
ExtensionType: (*FieldMigrateAnnotation)(nil),
Field: 112948430,
Name: "xds.annotations.v3.field_migrate",
Tag: "bytes,112948430,opt,name=field_migrate",
Filename: "xds/annotations/v3/migrate.proto",
},
{
ExtendedType: (*descriptorpb.EnumOptions)(nil),
ExtensionType: (*MigrateAnnotation)(nil),
Field: 112948430,
Name: "xds.annotations.v3.enum_migrate",
Tag: "bytes,112948430,opt,name=enum_migrate",
Filename: "xds/annotations/v3/migrate.proto",
},
{
ExtendedType: (*descriptorpb.EnumValueOptions)(nil),
ExtensionType: (*MigrateAnnotation)(nil),
Field: 112948430,
Name: "xds.annotations.v3.enum_value_migrate",
Tag: "bytes,112948430,opt,name=enum_value_migrate",
Filename: "xds/annotations/v3/migrate.proto",
},
{
ExtendedType: (*descriptorpb.FileOptions)(nil),
ExtensionType: (*FileMigrateAnnotation)(nil),
Field: 112948430,
Name: "xds.annotations.v3.file_migrate",
Tag: "bytes,112948430,opt,name=file_migrate",
Filename: "xds/annotations/v3/migrate.proto",
},
}
// Extension fields to descriptorpb.MessageOptions.
var (
// optional xds.annotations.v3.MigrateAnnotation message_migrate = 112948430;
E_MessageMigrate = &file_xds_annotations_v3_migrate_proto_extTypes[0]
)
// Extension fields to descriptorpb.FieldOptions.
var (
// optional xds.annotations.v3.FieldMigrateAnnotation field_migrate = 112948430;
E_FieldMigrate = &file_xds_annotations_v3_migrate_proto_extTypes[1]
)
// Extension fields to descriptorpb.EnumOptions.
var (
// optional xds.annotations.v3.MigrateAnnotation enum_migrate = 112948430;
E_EnumMigrate = &file_xds_annotations_v3_migrate_proto_extTypes[2]
)
// Extension fields to descriptorpb.EnumValueOptions.
var (
// optional xds.annotations.v3.MigrateAnnotation enum_value_migrate = 112948430;
E_EnumValueMigrate = &file_xds_annotations_v3_migrate_proto_extTypes[3]
)
// Extension fields to descriptorpb.FileOptions.
var (
// optional xds.annotations.v3.FileMigrateAnnotation file_migrate = 112948430;
E_FileMigrate = &file_xds_annotations_v3_migrate_proto_extTypes[4]
)
var File_xds_annotations_v3_migrate_proto protoreflect.FileDescriptor
var file_xds_annotations_v3_migrate_proto_rawDesc = []byte{
0x0a, 0x20, 0x78, 0x64, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x73, 0x2f, 0x76, 0x33, 0x2f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x12, 0x12, 0x78, 0x64, 0x73, 0x2e, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74,
0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x2b, 0x0a, 0x11, 0x4d, 0x69, 0x67, 0x72,
0x61, 0x74, 0x65, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a,
0x06, 0x72, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72,
0x65, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x59, 0x0a, 0x16, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x69,
0x67, 0x72, 0x61, 0x74, 0x65, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12,
0x16, 0x0a, 0x06, 0x72, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
0x06, 0x72, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x6f, 0x6e, 0x65, 0x6f, 0x66,
0x5f, 0x70, 0x72, 0x6f, 0x6d, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
0x52, 0x0e, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x50, 0x72, 0x6f, 0x6d, 0x6f, 0x74, 0x69, 0x6f, 0x6e,
0x22, 0x3f, 0x0a, 0x15, 0x46, 0x69, 0x6c, 0x65, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x41,
0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x26, 0x0a, 0x0f, 0x6d, 0x6f, 0x76,
0x65, 0x5f, 0x74, 0x6f, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01,
0x28, 0x09, 0x52, 0x0d, 0x6d, 0x6f, 0x76, 0x65, 0x54, 0x6f, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67,
0x65, 0x3a, 0x72, 0x0a, 0x0f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x6d, 0x69, 0x67,
0x72, 0x61, 0x74, 0x65, 0x12, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4f, 0x70,
0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xce, 0xe9, 0xed, 0x35, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25,
0x2e, 0x78, 0x64, 0x73, 0x2e, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73,
0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x41, 0x6e, 0x6e, 0x6f, 0x74,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4d, 0x69,
0x67, 0x72, 0x61, 0x74, 0x65, 0x3a, 0x71, 0x0a, 0x0d, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x6d,
0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x12, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70,
0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xce, 0xe9, 0xed, 0x35, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a,
0x2e, 0x78, 0x64, 0x73, 0x2e, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73,
0x2e, 0x76, 0x33, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65,
0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x66, 0x69, 0x65, 0x6c,
0x64, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x3a, 0x69, 0x0a, 0x0c, 0x65, 0x6e, 0x75, 0x6d,
0x5f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x12, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x4f,
0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xce, 0xe9, 0xed, 0x35, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x25, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x73, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x41, 0x6e, 0x6e, 0x6f,
0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x65, 0x6e, 0x75, 0x6d, 0x4d, 0x69, 0x67, 0x72,
0x61, 0x74, 0x65, 0x3a, 0x79, 0x0a, 0x12, 0x65, 0x6e, 0x75, 0x6d, 0x5f, 0x76, 0x61, 0x6c, 0x75,
0x65, 0x5f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x12, 0x21, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6e, 0x75, 0x6d,
0x56, 0x61, 0x6c, 0x75, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xce, 0xe9, 0xed,
0x35, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x61, 0x6e, 0x6e, 0x6f,
0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x69, 0x67, 0x72, 0x61,
0x74, 0x65, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x10, 0x65, 0x6e,
0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x3a, 0x6d,
0x0a, 0x0c, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x12, 0x1c,
0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
0x2e, 0x46, 0x69, 0x6c, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xce, 0xe9, 0xed,
0x35, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x61, 0x6e, 0x6e, 0x6f,
0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x4d,
0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x52, 0x0b, 0x66, 0x69, 0x6c, 0x65, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x42, 0x2b, 0x5a,
0x29, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6e, 0x63, 0x66,
0x2f, 0x78, 0x64, 0x73, 0x2f, 0x67, 0x6f, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f,
0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x33, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x33,
}
var (
file_xds_annotations_v3_migrate_proto_rawDescOnce sync.Once
file_xds_annotations_v3_migrate_proto_rawDescData = file_xds_annotations_v3_migrate_proto_rawDesc
)
func file_xds_annotations_v3_migrate_proto_rawDescGZIP() []byte {
file_xds_annotations_v3_migrate_proto_rawDescOnce.Do(func() {
file_xds_annotations_v3_migrate_proto_rawDescData = protoimpl.X.CompressGZIP(file_xds_annotations_v3_migrate_proto_rawDescData)
})
return file_xds_annotations_v3_migrate_proto_rawDescData
}
var file_xds_annotations_v3_migrate_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
var file_xds_annotations_v3_migrate_proto_goTypes = []interface{}{
(*MigrateAnnotation)(nil), // 0: xds.annotations.v3.MigrateAnnotation
(*FieldMigrateAnnotation)(nil), // 1: xds.annotations.v3.FieldMigrateAnnotation
(*FileMigrateAnnotation)(nil), // 2: xds.annotations.v3.FileMigrateAnnotation
(*descriptorpb.MessageOptions)(nil), // 3: google.protobuf.MessageOptions
(*descriptorpb.FieldOptions)(nil), // 4: google.protobuf.FieldOptions
(*descriptorpb.EnumOptions)(nil), // 5: google.protobuf.EnumOptions
(*descriptorpb.EnumValueOptions)(nil), // 6: google.protobuf.EnumValueOptions
(*descriptorpb.FileOptions)(nil), // 7: google.protobuf.FileOptions
}
var file_xds_annotations_v3_migrate_proto_depIdxs = []int32{
3, // 0: xds.annotations.v3.message_migrate:extendee -> google.protobuf.MessageOptions
4, // 1: xds.annotations.v3.field_migrate:extendee -> google.protobuf.FieldOptions
5, // 2: xds.annotations.v3.enum_migrate:extendee -> google.protobuf.EnumOptions
6, // 3: xds.annotations.v3.enum_value_migrate:extendee -> google.protobuf.EnumValueOptions
7, // 4: xds.annotations.v3.file_migrate:extendee -> google.protobuf.FileOptions
0, // 5: xds.annotations.v3.message_migrate:type_name -> xds.annotations.v3.MigrateAnnotation
1, // 6: xds.annotations.v3.field_migrate:type_name -> xds.annotations.v3.FieldMigrateAnnotation
0, // 7: xds.annotations.v3.enum_migrate:type_name -> xds.annotations.v3.MigrateAnnotation
0, // 8: xds.annotations.v3.enum_value_migrate:type_name -> xds.annotations.v3.MigrateAnnotation
2, // 9: xds.annotations.v3.file_migrate:type_name -> xds.annotations.v3.FileMigrateAnnotation
10, // [10:10] is the sub-list for method output_type
10, // [10:10] is the sub-list for method input_type
5, // [5:10] is the sub-list for extension type_name
0, // [0:5] is the sub-list for extension extendee
0, // [0:0] is the sub-list for field type_name
}
func init() { file_xds_annotations_v3_migrate_proto_init() }
func file_xds_annotations_v3_migrate_proto_init() {
if File_xds_annotations_v3_migrate_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_xds_annotations_v3_migrate_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MigrateAnnotation); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_xds_annotations_v3_migrate_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*FieldMigrateAnnotation); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_xds_annotations_v3_migrate_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*FileMigrateAnnotation); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_xds_annotations_v3_migrate_proto_rawDesc,
NumEnums: 0,
NumMessages: 3,
NumExtensions: 5,
NumServices: 0,
},
GoTypes: file_xds_annotations_v3_migrate_proto_goTypes,
DependencyIndexes: file_xds_annotations_v3_migrate_proto_depIdxs,
MessageInfos: file_xds_annotations_v3_migrate_proto_msgTypes,
ExtensionInfos: file_xds_annotations_v3_migrate_proto_extTypes,
}.Build()
File_xds_annotations_v3_migrate_proto = out.File
file_xds_annotations_v3_migrate_proto_rawDesc = nil
file_xds_annotations_v3_migrate_proto_goTypes = nil
file_xds_annotations_v3_migrate_proto_depIdxs = nil
}

View File

@@ -0,0 +1,243 @@
// Code generated by protoc-gen-validate. DO NOT EDIT.
// source: xds/annotations/v3/migrate.proto
package v3
import (
"bytes"
"errors"
"fmt"
"net"
"net/mail"
"net/url"
"regexp"
"strings"
"time"
"unicode/utf8"
"google.golang.org/protobuf/types/known/anypb"
)
// ensure the imports are used
var (
_ = bytes.MinRead
_ = errors.New("")
_ = fmt.Print
_ = utf8.UTFMax
_ = (*regexp.Regexp)(nil)
_ = (*strings.Reader)(nil)
_ = net.IPv4len
_ = time.Duration(0)
_ = (*url.URL)(nil)
_ = (*mail.Address)(nil)
_ = anypb.Any{}
)
// Validate checks the field values on MigrateAnnotation with the rules defined
// in the proto definition for this message. If any rules are violated, an
// error is returned.
func (m *MigrateAnnotation) Validate() error {
if m == nil {
return nil
}
// no validation rules for Rename
return nil
}
// MigrateAnnotationValidationError is the validation error returned by
// MigrateAnnotation.Validate if the designated constraints aren't met.
type MigrateAnnotationValidationError struct {
field string
reason string
cause error
key bool
}
// Field function returns field value.
func (e MigrateAnnotationValidationError) Field() string { return e.field }
// Reason function returns reason value.
func (e MigrateAnnotationValidationError) Reason() string { return e.reason }
// Cause function returns cause value.
func (e MigrateAnnotationValidationError) Cause() error { return e.cause }
// Key function returns key value.
func (e MigrateAnnotationValidationError) Key() bool { return e.key }
// ErrorName returns error name.
func (e MigrateAnnotationValidationError) ErrorName() string {
return "MigrateAnnotationValidationError"
}
// Error satisfies the builtin error interface
func (e MigrateAnnotationValidationError) Error() string {
cause := ""
if e.cause != nil {
cause = fmt.Sprintf(" | caused by: %v", e.cause)
}
key := ""
if e.key {
key = "key for "
}
return fmt.Sprintf(
"invalid %sMigrateAnnotation.%s: %s%s",
key,
e.field,
e.reason,
cause)
}
var _ error = MigrateAnnotationValidationError{}
var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = MigrateAnnotationValidationError{}
// Validate checks the field values on FieldMigrateAnnotation with the rules
// defined in the proto definition for this message. If any rules are
// violated, an error is returned.
func (m *FieldMigrateAnnotation) Validate() error {
if m == nil {
return nil
}
// no validation rules for Rename
// no validation rules for OneofPromotion
return nil
}
// FieldMigrateAnnotationValidationError is the validation error returned by
// FieldMigrateAnnotation.Validate if the designated constraints aren't met.
type FieldMigrateAnnotationValidationError struct {
field string
reason string
cause error
key bool
}
// Field function returns field value.
func (e FieldMigrateAnnotationValidationError) Field() string { return e.field }
// Reason function returns reason value.
func (e FieldMigrateAnnotationValidationError) Reason() string { return e.reason }
// Cause function returns cause value.
func (e FieldMigrateAnnotationValidationError) Cause() error { return e.cause }
// Key function returns key value.
func (e FieldMigrateAnnotationValidationError) Key() bool { return e.key }
// ErrorName returns error name.
func (e FieldMigrateAnnotationValidationError) ErrorName() string {
return "FieldMigrateAnnotationValidationError"
}
// Error satisfies the builtin error interface
func (e FieldMigrateAnnotationValidationError) Error() string {
cause := ""
if e.cause != nil {
cause = fmt.Sprintf(" | caused by: %v", e.cause)
}
key := ""
if e.key {
key = "key for "
}
return fmt.Sprintf(
"invalid %sFieldMigrateAnnotation.%s: %s%s",
key,
e.field,
e.reason,
cause)
}
var _ error = FieldMigrateAnnotationValidationError{}
var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = FieldMigrateAnnotationValidationError{}
// Validate checks the field values on FileMigrateAnnotation with the rules
// defined in the proto definition for this message. If any rules are
// violated, an error is returned.
func (m *FileMigrateAnnotation) Validate() error {
if m == nil {
return nil
}
// no validation rules for MoveToPackage
return nil
}
// FileMigrateAnnotationValidationError is the validation error returned by
// FileMigrateAnnotation.Validate if the designated constraints aren't met.
type FileMigrateAnnotationValidationError struct {
field string
reason string
cause error
key bool
}
// Field function returns field value.
func (e FileMigrateAnnotationValidationError) Field() string { return e.field }
// Reason function returns reason value.
func (e FileMigrateAnnotationValidationError) Reason() string { return e.reason }
// Cause function returns cause value.
func (e FileMigrateAnnotationValidationError) Cause() error { return e.cause }
// Key function returns key value.
func (e FileMigrateAnnotationValidationError) Key() bool { return e.key }
// ErrorName returns error name.
func (e FileMigrateAnnotationValidationError) ErrorName() string {
return "FileMigrateAnnotationValidationError"
}
// Error satisfies the builtin error interface
func (e FileMigrateAnnotationValidationError) Error() string {
cause := ""
if e.cause != nil {
cause = fmt.Sprintf(" | caused by: %v", e.cause)
}
key := ""
if e.key {
key = "key for "
}
return fmt.Sprintf(
"invalid %sFileMigrateAnnotation.%s: %s%s",
key,
e.field,
e.reason,
cause)
}
var _ error = FileMigrateAnnotationValidationError{}
var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = FileMigrateAnnotationValidationError{}

View File

@@ -0,0 +1,202 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.25.0
// protoc v3.18.0
// source: xds/annotations/v3/security.proto
package v3
import (
proto "github.com/golang/protobuf/proto"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
descriptorpb "google.golang.org/protobuf/types/descriptorpb"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// This is a compile-time assertion that a sufficiently up-to-date version
// of the legacy proto package is being used.
const _ = proto.ProtoPackageIsVersion4
type FieldSecurityAnnotation struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
ConfigureForUntrustedDownstream bool `protobuf:"varint,1,opt,name=configure_for_untrusted_downstream,json=configureForUntrustedDownstream,proto3" json:"configure_for_untrusted_downstream,omitempty"`
ConfigureForUntrustedUpstream bool `protobuf:"varint,2,opt,name=configure_for_untrusted_upstream,json=configureForUntrustedUpstream,proto3" json:"configure_for_untrusted_upstream,omitempty"`
}
func (x *FieldSecurityAnnotation) Reset() {
*x = FieldSecurityAnnotation{}
if protoimpl.UnsafeEnabled {
mi := &file_xds_annotations_v3_security_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *FieldSecurityAnnotation) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*FieldSecurityAnnotation) ProtoMessage() {}
func (x *FieldSecurityAnnotation) ProtoReflect() protoreflect.Message {
mi := &file_xds_annotations_v3_security_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use FieldSecurityAnnotation.ProtoReflect.Descriptor instead.
func (*FieldSecurityAnnotation) Descriptor() ([]byte, []int) {
return file_xds_annotations_v3_security_proto_rawDescGZIP(), []int{0}
}
func (x *FieldSecurityAnnotation) GetConfigureForUntrustedDownstream() bool {
if x != nil {
return x.ConfigureForUntrustedDownstream
}
return false
}
func (x *FieldSecurityAnnotation) GetConfigureForUntrustedUpstream() bool {
if x != nil {
return x.ConfigureForUntrustedUpstream
}
return false
}
var file_xds_annotations_v3_security_proto_extTypes = []protoimpl.ExtensionInfo{
{
ExtendedType: (*descriptorpb.FieldOptions)(nil),
ExtensionType: (*FieldSecurityAnnotation)(nil),
Field: 99044135,
Name: "xds.annotations.v3.security",
Tag: "bytes,99044135,opt,name=security",
Filename: "xds/annotations/v3/security.proto",
},
}
// Extension fields to descriptorpb.FieldOptions.
var (
// optional xds.annotations.v3.FieldSecurityAnnotation security = 99044135;
E_Security = &file_xds_annotations_v3_security_proto_extTypes[0]
)
var File_xds_annotations_v3_security_proto protoreflect.FileDescriptor
var file_xds_annotations_v3_security_proto_rawDesc = []byte{
0x0a, 0x21, 0x78, 0x64, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x73, 0x2f, 0x76, 0x33, 0x2f, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x2e, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x12, 0x12, 0x78, 0x64, 0x73, 0x2e, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x1a, 0x1f, 0x78, 0x64, 0x73, 0x2f, 0x61, 0x6e, 0x6e,
0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x33, 0x2f, 0x73, 0x74, 0x61, 0x74,
0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69,
0x70, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xaf, 0x01, 0x0a, 0x17, 0x46,
0x69, 0x65, 0x6c, 0x64, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x41, 0x6e, 0x6e, 0x6f,
0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x4b, 0x0a, 0x22, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67,
0x75, 0x72, 0x65, 0x5f, 0x66, 0x6f, 0x72, 0x5f, 0x75, 0x6e, 0x74, 0x72, 0x75, 0x73, 0x74, 0x65,
0x64, 0x5f, 0x64, 0x6f, 0x77, 0x6e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x18, 0x01, 0x20, 0x01,
0x28, 0x08, 0x52, 0x1f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x65, 0x46, 0x6f, 0x72,
0x55, 0x6e, 0x74, 0x72, 0x75, 0x73, 0x74, 0x65, 0x64, 0x44, 0x6f, 0x77, 0x6e, 0x73, 0x74, 0x72,
0x65, 0x61, 0x6d, 0x12, 0x47, 0x0a, 0x20, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x65,
0x5f, 0x66, 0x6f, 0x72, 0x5f, 0x75, 0x6e, 0x74, 0x72, 0x75, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x75,
0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1d, 0x63,
0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x65, 0x46, 0x6f, 0x72, 0x55, 0x6e, 0x74, 0x72, 0x75,
0x73, 0x74, 0x65, 0x64, 0x55, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x3a, 0x69, 0x0a, 0x08,
0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x12, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64,
0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xa7, 0x96, 0x9d, 0x2f, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x2b, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x53, 0x65, 0x63, 0x75, 0x72,
0x69, 0x74, 0x79, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x73,
0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x42, 0x33, 0x5a, 0x29, 0x67, 0x69, 0x74, 0x68, 0x75,
0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6e, 0x63, 0x66, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x67,
0x6f, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x73, 0x2f, 0x76, 0x33, 0xd2, 0xc6, 0xa4, 0xe1, 0x06, 0x02, 0x08, 0x01, 0x62, 0x06, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x33,
}
var (
file_xds_annotations_v3_security_proto_rawDescOnce sync.Once
file_xds_annotations_v3_security_proto_rawDescData = file_xds_annotations_v3_security_proto_rawDesc
)
func file_xds_annotations_v3_security_proto_rawDescGZIP() []byte {
file_xds_annotations_v3_security_proto_rawDescOnce.Do(func() {
file_xds_annotations_v3_security_proto_rawDescData = protoimpl.X.CompressGZIP(file_xds_annotations_v3_security_proto_rawDescData)
})
return file_xds_annotations_v3_security_proto_rawDescData
}
var file_xds_annotations_v3_security_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_xds_annotations_v3_security_proto_goTypes = []interface{}{
(*FieldSecurityAnnotation)(nil), // 0: xds.annotations.v3.FieldSecurityAnnotation
(*descriptorpb.FieldOptions)(nil), // 1: google.protobuf.FieldOptions
}
var file_xds_annotations_v3_security_proto_depIdxs = []int32{
1, // 0: xds.annotations.v3.security:extendee -> google.protobuf.FieldOptions
0, // 1: xds.annotations.v3.security:type_name -> xds.annotations.v3.FieldSecurityAnnotation
2, // [2:2] is the sub-list for method output_type
2, // [2:2] is the sub-list for method input_type
1, // [1:2] is the sub-list for extension type_name
0, // [0:1] is the sub-list for extension extendee
0, // [0:0] is the sub-list for field type_name
}
func init() { file_xds_annotations_v3_security_proto_init() }
func file_xds_annotations_v3_security_proto_init() {
if File_xds_annotations_v3_security_proto != nil {
return
}
file_xds_annotations_v3_status_proto_init()
if !protoimpl.UnsafeEnabled {
file_xds_annotations_v3_security_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*FieldSecurityAnnotation); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_xds_annotations_v3_security_proto_rawDesc,
NumEnums: 0,
NumMessages: 1,
NumExtensions: 1,
NumServices: 0,
},
GoTypes: file_xds_annotations_v3_security_proto_goTypes,
DependencyIndexes: file_xds_annotations_v3_security_proto_depIdxs,
MessageInfos: file_xds_annotations_v3_security_proto_msgTypes,
ExtensionInfos: file_xds_annotations_v3_security_proto_extTypes,
}.Build()
File_xds_annotations_v3_security_proto = out.File
file_xds_annotations_v3_security_proto_rawDesc = nil
file_xds_annotations_v3_security_proto_goTypes = nil
file_xds_annotations_v3_security_proto_depIdxs = nil
}

View File

@@ -0,0 +1,105 @@
// Code generated by protoc-gen-validate. DO NOT EDIT.
// source: xds/annotations/v3/security.proto
package v3
import (
"bytes"
"errors"
"fmt"
"net"
"net/mail"
"net/url"
"regexp"
"strings"
"time"
"unicode/utf8"
"google.golang.org/protobuf/types/known/anypb"
)
// ensure the imports are used
var (
_ = bytes.MinRead
_ = errors.New("")
_ = fmt.Print
_ = utf8.UTFMax
_ = (*regexp.Regexp)(nil)
_ = (*strings.Reader)(nil)
_ = net.IPv4len
_ = time.Duration(0)
_ = (*url.URL)(nil)
_ = (*mail.Address)(nil)
_ = anypb.Any{}
)
// Validate checks the field values on FieldSecurityAnnotation with the rules
// defined in the proto definition for this message. If any rules are
// violated, an error is returned.
func (m *FieldSecurityAnnotation) Validate() error {
if m == nil {
return nil
}
// no validation rules for ConfigureForUntrustedDownstream
// no validation rules for ConfigureForUntrustedUpstream
return nil
}
// FieldSecurityAnnotationValidationError is the validation error returned by
// FieldSecurityAnnotation.Validate if the designated constraints aren't met.
type FieldSecurityAnnotationValidationError struct {
field string
reason string
cause error
key bool
}
// Field function returns field value.
func (e FieldSecurityAnnotationValidationError) Field() string { return e.field }
// Reason function returns reason value.
func (e FieldSecurityAnnotationValidationError) Reason() string { return e.reason }
// Cause function returns cause value.
func (e FieldSecurityAnnotationValidationError) Cause() error { return e.cause }
// Key function returns key value.
func (e FieldSecurityAnnotationValidationError) Key() bool { return e.key }
// ErrorName returns error name.
func (e FieldSecurityAnnotationValidationError) ErrorName() string {
return "FieldSecurityAnnotationValidationError"
}
// Error satisfies the builtin error interface
func (e FieldSecurityAnnotationValidationError) Error() string {
cause := ""
if e.cause != nil {
cause = fmt.Sprintf(" | caused by: %v", e.cause)
}
key := ""
if e.key {
key = "key for "
}
return fmt.Sprintf(
"invalid %sFieldSecurityAnnotation.%s: %s%s",
key,
e.field,
e.reason,
cause)
}
var _ error = FieldSecurityAnnotationValidationError{}
var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = FieldSecurityAnnotationValidationError{}

View File

@@ -0,0 +1,98 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.25.0
// protoc v3.18.0
// source: xds/annotations/v3/sensitive.proto
package v3
import (
proto "github.com/golang/protobuf/proto"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
descriptorpb "google.golang.org/protobuf/types/descriptorpb"
reflect "reflect"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// This is a compile-time assertion that a sufficiently up-to-date version
// of the legacy proto package is being used.
const _ = proto.ProtoPackageIsVersion4
var file_xds_annotations_v3_sensitive_proto_extTypes = []protoimpl.ExtensionInfo{
{
ExtendedType: (*descriptorpb.FieldOptions)(nil),
ExtensionType: (*bool)(nil),
Field: 61008053,
Name: "xds.annotations.v3.sensitive",
Tag: "varint,61008053,opt,name=sensitive",
Filename: "xds/annotations/v3/sensitive.proto",
},
}
// Extension fields to descriptorpb.FieldOptions.
var (
// optional bool sensitive = 61008053;
E_Sensitive = &file_xds_annotations_v3_sensitive_proto_extTypes[0]
)
var File_xds_annotations_v3_sensitive_proto protoreflect.FileDescriptor
var file_xds_annotations_v3_sensitive_proto_rawDesc = []byte{
0x0a, 0x22, 0x78, 0x64, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x73, 0x2f, 0x76, 0x33, 0x2f, 0x73, 0x65, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x2e, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x78, 0x64, 0x73, 0x2e, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69,
0x70, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x3a, 0x3e, 0x0a, 0x09, 0x73, 0x65,
0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x12, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f,
0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xb5, 0xd1, 0x8b, 0x1d, 0x20, 0x01, 0x28, 0x08, 0x52,
0x09, 0x73, 0x65, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x42, 0x2b, 0x5a, 0x29, 0x67, 0x69,
0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6e, 0x63, 0x66, 0x2f, 0x78, 0x64,
0x73, 0x2f, 0x67, 0x6f, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x33, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var file_xds_annotations_v3_sensitive_proto_goTypes = []interface{}{
(*descriptorpb.FieldOptions)(nil), // 0: google.protobuf.FieldOptions
}
var file_xds_annotations_v3_sensitive_proto_depIdxs = []int32{
0, // 0: xds.annotations.v3.sensitive:extendee -> google.protobuf.FieldOptions
1, // [1:1] is the sub-list for method output_type
1, // [1:1] is the sub-list for method input_type
1, // [1:1] is the sub-list for extension type_name
0, // [0:1] is the sub-list for extension extendee
0, // [0:0] is the sub-list for field type_name
}
func init() { file_xds_annotations_v3_sensitive_proto_init() }
func file_xds_annotations_v3_sensitive_proto_init() {
if File_xds_annotations_v3_sensitive_proto != nil {
return
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_xds_annotations_v3_sensitive_proto_rawDesc,
NumEnums: 0,
NumMessages: 0,
NumExtensions: 1,
NumServices: 0,
},
GoTypes: file_xds_annotations_v3_sensitive_proto_goTypes,
DependencyIndexes: file_xds_annotations_v3_sensitive_proto_depIdxs,
ExtensionInfos: file_xds_annotations_v3_sensitive_proto_extTypes,
}.Build()
File_xds_annotations_v3_sensitive_proto = out.File
file_xds_annotations_v3_sensitive_proto_rawDesc = nil
file_xds_annotations_v3_sensitive_proto_goTypes = nil
file_xds_annotations_v3_sensitive_proto_depIdxs = nil
}

View File

@@ -0,0 +1,34 @@
// Code generated by protoc-gen-validate. DO NOT EDIT.
// source: xds/annotations/v3/sensitive.proto
package v3
import (
"bytes"
"errors"
"fmt"
"net"
"net/mail"
"net/url"
"regexp"
"strings"
"time"
"unicode/utf8"
"google.golang.org/protobuf/types/known/anypb"
)
// ensure the imports are used
var (
_ = bytes.MinRead
_ = errors.New("")
_ = fmt.Print
_ = utf8.UTFMax
_ = (*regexp.Regexp)(nil)
_ = (*strings.Reader)(nil)
_ = net.IPv4len
_ = time.Duration(0)
_ = (*url.URL)(nil)
_ = (*mail.Address)(nil)
_ = anypb.Any{}
)

View File

@@ -0,0 +1,500 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.25.0
// protoc v3.18.0
// source: xds/annotations/v3/status.proto
package v3
import (
proto "github.com/golang/protobuf/proto"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
descriptorpb "google.golang.org/protobuf/types/descriptorpb"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// This is a compile-time assertion that a sufficiently up-to-date version
// of the legacy proto package is being used.
const _ = proto.ProtoPackageIsVersion4
type PackageVersionStatus int32
const (
PackageVersionStatus_UNKNOWN PackageVersionStatus = 0
PackageVersionStatus_FROZEN PackageVersionStatus = 1
PackageVersionStatus_ACTIVE PackageVersionStatus = 2
PackageVersionStatus_NEXT_MAJOR_VERSION_CANDIDATE PackageVersionStatus = 3
)
// Enum value maps for PackageVersionStatus.
var (
PackageVersionStatus_name = map[int32]string{
0: "UNKNOWN",
1: "FROZEN",
2: "ACTIVE",
3: "NEXT_MAJOR_VERSION_CANDIDATE",
}
PackageVersionStatus_value = map[string]int32{
"UNKNOWN": 0,
"FROZEN": 1,
"ACTIVE": 2,
"NEXT_MAJOR_VERSION_CANDIDATE": 3,
}
)
func (x PackageVersionStatus) Enum() *PackageVersionStatus {
p := new(PackageVersionStatus)
*p = x
return p
}
func (x PackageVersionStatus) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (PackageVersionStatus) Descriptor() protoreflect.EnumDescriptor {
return file_xds_annotations_v3_status_proto_enumTypes[0].Descriptor()
}
func (PackageVersionStatus) Type() protoreflect.EnumType {
return &file_xds_annotations_v3_status_proto_enumTypes[0]
}
func (x PackageVersionStatus) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use PackageVersionStatus.Descriptor instead.
func (PackageVersionStatus) EnumDescriptor() ([]byte, []int) {
return file_xds_annotations_v3_status_proto_rawDescGZIP(), []int{0}
}
type FileStatusAnnotation struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
WorkInProgress bool `protobuf:"varint,1,opt,name=work_in_progress,json=workInProgress,proto3" json:"work_in_progress,omitempty"`
}
func (x *FileStatusAnnotation) Reset() {
*x = FileStatusAnnotation{}
if protoimpl.UnsafeEnabled {
mi := &file_xds_annotations_v3_status_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *FileStatusAnnotation) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*FileStatusAnnotation) ProtoMessage() {}
func (x *FileStatusAnnotation) ProtoReflect() protoreflect.Message {
mi := &file_xds_annotations_v3_status_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use FileStatusAnnotation.ProtoReflect.Descriptor instead.
func (*FileStatusAnnotation) Descriptor() ([]byte, []int) {
return file_xds_annotations_v3_status_proto_rawDescGZIP(), []int{0}
}
func (x *FileStatusAnnotation) GetWorkInProgress() bool {
if x != nil {
return x.WorkInProgress
}
return false
}
type MessageStatusAnnotation struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
WorkInProgress bool `protobuf:"varint,1,opt,name=work_in_progress,json=workInProgress,proto3" json:"work_in_progress,omitempty"`
}
func (x *MessageStatusAnnotation) Reset() {
*x = MessageStatusAnnotation{}
if protoimpl.UnsafeEnabled {
mi := &file_xds_annotations_v3_status_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MessageStatusAnnotation) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MessageStatusAnnotation) ProtoMessage() {}
func (x *MessageStatusAnnotation) ProtoReflect() protoreflect.Message {
mi := &file_xds_annotations_v3_status_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use MessageStatusAnnotation.ProtoReflect.Descriptor instead.
func (*MessageStatusAnnotation) Descriptor() ([]byte, []int) {
return file_xds_annotations_v3_status_proto_rawDescGZIP(), []int{1}
}
func (x *MessageStatusAnnotation) GetWorkInProgress() bool {
if x != nil {
return x.WorkInProgress
}
return false
}
type FieldStatusAnnotation struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
WorkInProgress bool `protobuf:"varint,1,opt,name=work_in_progress,json=workInProgress,proto3" json:"work_in_progress,omitempty"`
}
func (x *FieldStatusAnnotation) Reset() {
*x = FieldStatusAnnotation{}
if protoimpl.UnsafeEnabled {
mi := &file_xds_annotations_v3_status_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *FieldStatusAnnotation) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*FieldStatusAnnotation) ProtoMessage() {}
func (x *FieldStatusAnnotation) ProtoReflect() protoreflect.Message {
mi := &file_xds_annotations_v3_status_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use FieldStatusAnnotation.ProtoReflect.Descriptor instead.
func (*FieldStatusAnnotation) Descriptor() ([]byte, []int) {
return file_xds_annotations_v3_status_proto_rawDescGZIP(), []int{2}
}
func (x *FieldStatusAnnotation) GetWorkInProgress() bool {
if x != nil {
return x.WorkInProgress
}
return false
}
type StatusAnnotation struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
WorkInProgress bool `protobuf:"varint,1,opt,name=work_in_progress,json=workInProgress,proto3" json:"work_in_progress,omitempty"`
PackageVersionStatus PackageVersionStatus `protobuf:"varint,2,opt,name=package_version_status,json=packageVersionStatus,proto3,enum=xds.annotations.v3.PackageVersionStatus" json:"package_version_status,omitempty"`
}
func (x *StatusAnnotation) Reset() {
*x = StatusAnnotation{}
if protoimpl.UnsafeEnabled {
mi := &file_xds_annotations_v3_status_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *StatusAnnotation) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*StatusAnnotation) ProtoMessage() {}
func (x *StatusAnnotation) ProtoReflect() protoreflect.Message {
mi := &file_xds_annotations_v3_status_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use StatusAnnotation.ProtoReflect.Descriptor instead.
func (*StatusAnnotation) Descriptor() ([]byte, []int) {
return file_xds_annotations_v3_status_proto_rawDescGZIP(), []int{3}
}
func (x *StatusAnnotation) GetWorkInProgress() bool {
if x != nil {
return x.WorkInProgress
}
return false
}
func (x *StatusAnnotation) GetPackageVersionStatus() PackageVersionStatus {
if x != nil {
return x.PackageVersionStatus
}
return PackageVersionStatus_UNKNOWN
}
var file_xds_annotations_v3_status_proto_extTypes = []protoimpl.ExtensionInfo{
{
ExtendedType: (*descriptorpb.FileOptions)(nil),
ExtensionType: (*FileStatusAnnotation)(nil),
Field: 226829418,
Name: "xds.annotations.v3.file_status",
Tag: "bytes,226829418,opt,name=file_status",
Filename: "xds/annotations/v3/status.proto",
},
{
ExtendedType: (*descriptorpb.MessageOptions)(nil),
ExtensionType: (*MessageStatusAnnotation)(nil),
Field: 226829418,
Name: "xds.annotations.v3.message_status",
Tag: "bytes,226829418,opt,name=message_status",
Filename: "xds/annotations/v3/status.proto",
},
{
ExtendedType: (*descriptorpb.FieldOptions)(nil),
ExtensionType: (*FieldStatusAnnotation)(nil),
Field: 226829418,
Name: "xds.annotations.v3.field_status",
Tag: "bytes,226829418,opt,name=field_status",
Filename: "xds/annotations/v3/status.proto",
},
}
// Extension fields to descriptorpb.FileOptions.
var (
// optional xds.annotations.v3.FileStatusAnnotation file_status = 226829418;
E_FileStatus = &file_xds_annotations_v3_status_proto_extTypes[0]
)
// Extension fields to descriptorpb.MessageOptions.
var (
// optional xds.annotations.v3.MessageStatusAnnotation message_status = 226829418;
E_MessageStatus = &file_xds_annotations_v3_status_proto_extTypes[1]
)
// Extension fields to descriptorpb.FieldOptions.
var (
// optional xds.annotations.v3.FieldStatusAnnotation field_status = 226829418;
E_FieldStatus = &file_xds_annotations_v3_status_proto_extTypes[2]
)
var File_xds_annotations_v3_status_proto protoreflect.FileDescriptor
var file_xds_annotations_v3_status_proto_rawDesc = []byte{
0x0a, 0x1f, 0x78, 0x64, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x73, 0x2f, 0x76, 0x33, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x12, 0x12, 0x78, 0x64, 0x73, 0x2e, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x73, 0x2e, 0x76, 0x33, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f,
0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x40, 0x0a, 0x14, 0x46, 0x69, 0x6c, 0x65, 0x53,
0x74, 0x61, 0x74, 0x75, 0x73, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12,
0x28, 0x0a, 0x10, 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x69, 0x6e, 0x5f, 0x70, 0x72, 0x6f, 0x67, 0x72,
0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x77, 0x6f, 0x72, 0x6b, 0x49,
0x6e, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x22, 0x43, 0x0a, 0x17, 0x4d, 0x65, 0x73,
0x73, 0x61, 0x67, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x12, 0x28, 0x0a, 0x10, 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x69, 0x6e, 0x5f,
0x70, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e,
0x77, 0x6f, 0x72, 0x6b, 0x49, 0x6e, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x22, 0x41,
0x0a, 0x15, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x41, 0x6e, 0x6e,
0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x28, 0x0a, 0x10, 0x77, 0x6f, 0x72, 0x6b, 0x5f,
0x69, 0x6e, 0x5f, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28,
0x08, 0x52, 0x0e, 0x77, 0x6f, 0x72, 0x6b, 0x49, 0x6e, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73,
0x73, 0x22, 0x9c, 0x01, 0x0a, 0x10, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x41, 0x6e, 0x6e, 0x6f,
0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x28, 0x0a, 0x10, 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x69,
0x6e, 0x5f, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08,
0x52, 0x0e, 0x77, 0x6f, 0x72, 0x6b, 0x49, 0x6e, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73,
0x12, 0x5e, 0x0a, 0x16, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x5f, 0x76, 0x65, 0x72, 0x73,
0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e,
0x32, 0x28, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x56, 0x65, 0x72,
0x73, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x14, 0x70, 0x61, 0x63, 0x6b,
0x61, 0x67, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73,
0x2a, 0x5d, 0x0a, 0x14, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69,
0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e,
0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x46, 0x52, 0x4f, 0x5a, 0x45, 0x4e, 0x10,
0x01, 0x12, 0x0a, 0x0a, 0x06, 0x41, 0x43, 0x54, 0x49, 0x56, 0x45, 0x10, 0x02, 0x12, 0x20, 0x0a,
0x1c, 0x4e, 0x45, 0x58, 0x54, 0x5f, 0x4d, 0x41, 0x4a, 0x4f, 0x52, 0x5f, 0x56, 0x45, 0x52, 0x53,
0x49, 0x4f, 0x4e, 0x5f, 0x43, 0x41, 0x4e, 0x44, 0x49, 0x44, 0x41, 0x54, 0x45, 0x10, 0x03, 0x3a,
0x6a, 0x0a, 0x0b, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1c,
0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
0x2e, 0x46, 0x69, 0x6c, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xea, 0xc8, 0x94,
0x6c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x61, 0x6e, 0x6e, 0x6f,
0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x53,
0x74, 0x61, 0x74, 0x75, 0x73, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52,
0x0a, 0x66, 0x69, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x3a, 0x76, 0x0a, 0x0e, 0x6d,
0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1f, 0x2e,
0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e,
0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xea,
0xc8, 0x94, 0x6c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x61, 0x6e,
0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x65, 0x73,
0x73, 0x61, 0x67, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0d, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, 0x74, 0x61,
0x74, 0x75, 0x73, 0x3a, 0x6e, 0x0a, 0x0c, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x73, 0x74, 0x61,
0x74, 0x75, 0x73, 0x12, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f,
0x6e, 0x73, 0x18, 0xea, 0xc8, 0x94, 0x6c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x78, 0x64,
0x73, 0x2e, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x33,
0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x41, 0x6e, 0x6e, 0x6f,
0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x53, 0x74, 0x61,
0x74, 0x75, 0x73, 0x42, 0x2b, 0x5a, 0x29, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f,
0x6d, 0x2f, 0x63, 0x6e, 0x63, 0x66, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x67, 0x6f, 0x2f, 0x78, 0x64,
0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x33,
0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_xds_annotations_v3_status_proto_rawDescOnce sync.Once
file_xds_annotations_v3_status_proto_rawDescData = file_xds_annotations_v3_status_proto_rawDesc
)
func file_xds_annotations_v3_status_proto_rawDescGZIP() []byte {
file_xds_annotations_v3_status_proto_rawDescOnce.Do(func() {
file_xds_annotations_v3_status_proto_rawDescData = protoimpl.X.CompressGZIP(file_xds_annotations_v3_status_proto_rawDescData)
})
return file_xds_annotations_v3_status_proto_rawDescData
}
var file_xds_annotations_v3_status_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_xds_annotations_v3_status_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
var file_xds_annotations_v3_status_proto_goTypes = []interface{}{
(PackageVersionStatus)(0), // 0: xds.annotations.v3.PackageVersionStatus
(*FileStatusAnnotation)(nil), // 1: xds.annotations.v3.FileStatusAnnotation
(*MessageStatusAnnotation)(nil), // 2: xds.annotations.v3.MessageStatusAnnotation
(*FieldStatusAnnotation)(nil), // 3: xds.annotations.v3.FieldStatusAnnotation
(*StatusAnnotation)(nil), // 4: xds.annotations.v3.StatusAnnotation
(*descriptorpb.FileOptions)(nil), // 5: google.protobuf.FileOptions
(*descriptorpb.MessageOptions)(nil), // 6: google.protobuf.MessageOptions
(*descriptorpb.FieldOptions)(nil), // 7: google.protobuf.FieldOptions
}
var file_xds_annotations_v3_status_proto_depIdxs = []int32{
0, // 0: xds.annotations.v3.StatusAnnotation.package_version_status:type_name -> xds.annotations.v3.PackageVersionStatus
5, // 1: xds.annotations.v3.file_status:extendee -> google.protobuf.FileOptions
6, // 2: xds.annotations.v3.message_status:extendee -> google.protobuf.MessageOptions
7, // 3: xds.annotations.v3.field_status:extendee -> google.protobuf.FieldOptions
1, // 4: xds.annotations.v3.file_status:type_name -> xds.annotations.v3.FileStatusAnnotation
2, // 5: xds.annotations.v3.message_status:type_name -> xds.annotations.v3.MessageStatusAnnotation
3, // 6: xds.annotations.v3.field_status:type_name -> xds.annotations.v3.FieldStatusAnnotation
7, // [7:7] is the sub-list for method output_type
7, // [7:7] is the sub-list for method input_type
4, // [4:7] is the sub-list for extension type_name
1, // [1:4] is the sub-list for extension extendee
0, // [0:1] is the sub-list for field type_name
}
func init() { file_xds_annotations_v3_status_proto_init() }
func file_xds_annotations_v3_status_proto_init() {
if File_xds_annotations_v3_status_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_xds_annotations_v3_status_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*FileStatusAnnotation); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_xds_annotations_v3_status_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MessageStatusAnnotation); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_xds_annotations_v3_status_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*FieldStatusAnnotation); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_xds_annotations_v3_status_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*StatusAnnotation); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_xds_annotations_v3_status_proto_rawDesc,
NumEnums: 1,
NumMessages: 4,
NumExtensions: 3,
NumServices: 0,
},
GoTypes: file_xds_annotations_v3_status_proto_goTypes,
DependencyIndexes: file_xds_annotations_v3_status_proto_depIdxs,
EnumInfos: file_xds_annotations_v3_status_proto_enumTypes,
MessageInfos: file_xds_annotations_v3_status_proto_msgTypes,
ExtensionInfos: file_xds_annotations_v3_status_proto_extTypes,
}.Build()
File_xds_annotations_v3_status_proto = out.File
file_xds_annotations_v3_status_proto_rawDesc = nil
file_xds_annotations_v3_status_proto_goTypes = nil
file_xds_annotations_v3_status_proto_depIdxs = nil
}

View File

@@ -0,0 +1,310 @@
// Code generated by protoc-gen-validate. DO NOT EDIT.
// source: xds/annotations/v3/status.proto
package v3
import (
"bytes"
"errors"
"fmt"
"net"
"net/mail"
"net/url"
"regexp"
"strings"
"time"
"unicode/utf8"
"google.golang.org/protobuf/types/known/anypb"
)
// ensure the imports are used
var (
_ = bytes.MinRead
_ = errors.New("")
_ = fmt.Print
_ = utf8.UTFMax
_ = (*regexp.Regexp)(nil)
_ = (*strings.Reader)(nil)
_ = net.IPv4len
_ = time.Duration(0)
_ = (*url.URL)(nil)
_ = (*mail.Address)(nil)
_ = anypb.Any{}
)
// Validate checks the field values on FileStatusAnnotation with the rules
// defined in the proto definition for this message. If any rules are
// violated, an error is returned.
func (m *FileStatusAnnotation) Validate() error {
if m == nil {
return nil
}
// no validation rules for WorkInProgress
return nil
}
// FileStatusAnnotationValidationError is the validation error returned by
// FileStatusAnnotation.Validate if the designated constraints aren't met.
type FileStatusAnnotationValidationError struct {
field string
reason string
cause error
key bool
}
// Field function returns field value.
func (e FileStatusAnnotationValidationError) Field() string { return e.field }
// Reason function returns reason value.
func (e FileStatusAnnotationValidationError) Reason() string { return e.reason }
// Cause function returns cause value.
func (e FileStatusAnnotationValidationError) Cause() error { return e.cause }
// Key function returns key value.
func (e FileStatusAnnotationValidationError) Key() bool { return e.key }
// ErrorName returns error name.
func (e FileStatusAnnotationValidationError) ErrorName() string {
return "FileStatusAnnotationValidationError"
}
// Error satisfies the builtin error interface
func (e FileStatusAnnotationValidationError) Error() string {
cause := ""
if e.cause != nil {
cause = fmt.Sprintf(" | caused by: %v", e.cause)
}
key := ""
if e.key {
key = "key for "
}
return fmt.Sprintf(
"invalid %sFileStatusAnnotation.%s: %s%s",
key,
e.field,
e.reason,
cause)
}
var _ error = FileStatusAnnotationValidationError{}
var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = FileStatusAnnotationValidationError{}
// Validate checks the field values on MessageStatusAnnotation with the rules
// defined in the proto definition for this message. If any rules are
// violated, an error is returned.
func (m *MessageStatusAnnotation) Validate() error {
if m == nil {
return nil
}
// no validation rules for WorkInProgress
return nil
}
// MessageStatusAnnotationValidationError is the validation error returned by
// MessageStatusAnnotation.Validate if the designated constraints aren't met.
type MessageStatusAnnotationValidationError struct {
field string
reason string
cause error
key bool
}
// Field function returns field value.
func (e MessageStatusAnnotationValidationError) Field() string { return e.field }
// Reason function returns reason value.
func (e MessageStatusAnnotationValidationError) Reason() string { return e.reason }
// Cause function returns cause value.
func (e MessageStatusAnnotationValidationError) Cause() error { return e.cause }
// Key function returns key value.
func (e MessageStatusAnnotationValidationError) Key() bool { return e.key }
// ErrorName returns error name.
func (e MessageStatusAnnotationValidationError) ErrorName() string {
return "MessageStatusAnnotationValidationError"
}
// Error satisfies the builtin error interface
func (e MessageStatusAnnotationValidationError) Error() string {
cause := ""
if e.cause != nil {
cause = fmt.Sprintf(" | caused by: %v", e.cause)
}
key := ""
if e.key {
key = "key for "
}
return fmt.Sprintf(
"invalid %sMessageStatusAnnotation.%s: %s%s",
key,
e.field,
e.reason,
cause)
}
var _ error = MessageStatusAnnotationValidationError{}
var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = MessageStatusAnnotationValidationError{}
// Validate checks the field values on FieldStatusAnnotation with the rules
// defined in the proto definition for this message. If any rules are
// violated, an error is returned.
func (m *FieldStatusAnnotation) Validate() error {
if m == nil {
return nil
}
// no validation rules for WorkInProgress
return nil
}
// FieldStatusAnnotationValidationError is the validation error returned by
// FieldStatusAnnotation.Validate if the designated constraints aren't met.
type FieldStatusAnnotationValidationError struct {
field string
reason string
cause error
key bool
}
// Field function returns field value.
func (e FieldStatusAnnotationValidationError) Field() string { return e.field }
// Reason function returns reason value.
func (e FieldStatusAnnotationValidationError) Reason() string { return e.reason }
// Cause function returns cause value.
func (e FieldStatusAnnotationValidationError) Cause() error { return e.cause }
// Key function returns key value.
func (e FieldStatusAnnotationValidationError) Key() bool { return e.key }
// ErrorName returns error name.
func (e FieldStatusAnnotationValidationError) ErrorName() string {
return "FieldStatusAnnotationValidationError"
}
// Error satisfies the builtin error interface
func (e FieldStatusAnnotationValidationError) Error() string {
cause := ""
if e.cause != nil {
cause = fmt.Sprintf(" | caused by: %v", e.cause)
}
key := ""
if e.key {
key = "key for "
}
return fmt.Sprintf(
"invalid %sFieldStatusAnnotation.%s: %s%s",
key,
e.field,
e.reason,
cause)
}
var _ error = FieldStatusAnnotationValidationError{}
var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = FieldStatusAnnotationValidationError{}
// Validate checks the field values on StatusAnnotation with the rules defined
// in the proto definition for this message. If any rules are violated, an
// error is returned.
func (m *StatusAnnotation) Validate() error {
if m == nil {
return nil
}
// no validation rules for WorkInProgress
// no validation rules for PackageVersionStatus
return nil
}
// StatusAnnotationValidationError is the validation error returned by
// StatusAnnotation.Validate if the designated constraints aren't met.
type StatusAnnotationValidationError struct {
field string
reason string
cause error
key bool
}
// Field function returns field value.
func (e StatusAnnotationValidationError) Field() string { return e.field }
// Reason function returns reason value.
func (e StatusAnnotationValidationError) Reason() string { return e.reason }
// Cause function returns cause value.
func (e StatusAnnotationValidationError) Cause() error { return e.cause }
// Key function returns key value.
func (e StatusAnnotationValidationError) Key() bool { return e.key }
// ErrorName returns error name.
func (e StatusAnnotationValidationError) ErrorName() string { return "StatusAnnotationValidationError" }
// Error satisfies the builtin error interface
func (e StatusAnnotationValidationError) Error() string {
cause := ""
if e.cause != nil {
cause = fmt.Sprintf(" | caused by: %v", e.cause)
}
key := ""
if e.key {
key = "key for "
}
return fmt.Sprintf(
"invalid %sStatusAnnotation.%s: %s%s",
key,
e.field,
e.reason,
cause)
}
var _ error = StatusAnnotationValidationError{}
var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = StatusAnnotationValidationError{}

View File

@@ -0,0 +1,184 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.25.0
// protoc v3.18.0
// source: xds/annotations/v3/versioning.proto
package v3
import (
proto "github.com/golang/protobuf/proto"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
descriptorpb "google.golang.org/protobuf/types/descriptorpb"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// This is a compile-time assertion that a sufficiently up-to-date version
// of the legacy proto package is being used.
const _ = proto.ProtoPackageIsVersion4
type VersioningAnnotation struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
PreviousMessageType string `protobuf:"bytes,1,opt,name=previous_message_type,json=previousMessageType,proto3" json:"previous_message_type,omitempty"`
}
func (x *VersioningAnnotation) Reset() {
*x = VersioningAnnotation{}
if protoimpl.UnsafeEnabled {
mi := &file_xds_annotations_v3_versioning_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *VersioningAnnotation) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*VersioningAnnotation) ProtoMessage() {}
func (x *VersioningAnnotation) ProtoReflect() protoreflect.Message {
mi := &file_xds_annotations_v3_versioning_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use VersioningAnnotation.ProtoReflect.Descriptor instead.
func (*VersioningAnnotation) Descriptor() ([]byte, []int) {
return file_xds_annotations_v3_versioning_proto_rawDescGZIP(), []int{0}
}
func (x *VersioningAnnotation) GetPreviousMessageType() string {
if x != nil {
return x.PreviousMessageType
}
return ""
}
var file_xds_annotations_v3_versioning_proto_extTypes = []protoimpl.ExtensionInfo{
{
ExtendedType: (*descriptorpb.MessageOptions)(nil),
ExtensionType: (*VersioningAnnotation)(nil),
Field: 92389011,
Name: "xds.annotations.v3.versioning",
Tag: "bytes,92389011,opt,name=versioning",
Filename: "xds/annotations/v3/versioning.proto",
},
}
// Extension fields to descriptorpb.MessageOptions.
var (
// optional xds.annotations.v3.VersioningAnnotation versioning = 92389011;
E_Versioning = &file_xds_annotations_v3_versioning_proto_extTypes[0]
)
var File_xds_annotations_v3_versioning_proto protoreflect.FileDescriptor
var file_xds_annotations_v3_versioning_proto_rawDesc = []byte{
0x0a, 0x23, 0x78, 0x64, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x73, 0x2f, 0x76, 0x33, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x78, 0x64, 0x73, 0x2e, 0x61, 0x6e, 0x6e, 0x6f, 0x74,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72,
0x69, 0x70, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x4a, 0x0a, 0x14, 0x56,
0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x12, 0x32, 0x0a, 0x15, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f,
0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01,
0x28, 0x09, 0x52, 0x13, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x4d, 0x65, 0x73, 0x73,
0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x3a, 0x6c, 0x0a, 0x0a, 0x76, 0x65, 0x72, 0x73, 0x69,
0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x12, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4f,
0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x93, 0xfd, 0x86, 0x2c, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x28, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x73, 0x2e, 0x76, 0x33, 0x2e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x41,
0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x76, 0x65, 0x72, 0x73, 0x69,
0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x42, 0x2b, 0x5a, 0x29, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e,
0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6e, 0x63, 0x66, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x67, 0x6f, 0x2f,
0x78, 0x64, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f,
0x76, 0x33, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_xds_annotations_v3_versioning_proto_rawDescOnce sync.Once
file_xds_annotations_v3_versioning_proto_rawDescData = file_xds_annotations_v3_versioning_proto_rawDesc
)
func file_xds_annotations_v3_versioning_proto_rawDescGZIP() []byte {
file_xds_annotations_v3_versioning_proto_rawDescOnce.Do(func() {
file_xds_annotations_v3_versioning_proto_rawDescData = protoimpl.X.CompressGZIP(file_xds_annotations_v3_versioning_proto_rawDescData)
})
return file_xds_annotations_v3_versioning_proto_rawDescData
}
var file_xds_annotations_v3_versioning_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_xds_annotations_v3_versioning_proto_goTypes = []interface{}{
(*VersioningAnnotation)(nil), // 0: xds.annotations.v3.VersioningAnnotation
(*descriptorpb.MessageOptions)(nil), // 1: google.protobuf.MessageOptions
}
var file_xds_annotations_v3_versioning_proto_depIdxs = []int32{
1, // 0: xds.annotations.v3.versioning:extendee -> google.protobuf.MessageOptions
0, // 1: xds.annotations.v3.versioning:type_name -> xds.annotations.v3.VersioningAnnotation
2, // [2:2] is the sub-list for method output_type
2, // [2:2] is the sub-list for method input_type
1, // [1:2] is the sub-list for extension type_name
0, // [0:1] is the sub-list for extension extendee
0, // [0:0] is the sub-list for field type_name
}
func init() { file_xds_annotations_v3_versioning_proto_init() }
func file_xds_annotations_v3_versioning_proto_init() {
if File_xds_annotations_v3_versioning_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_xds_annotations_v3_versioning_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*VersioningAnnotation); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_xds_annotations_v3_versioning_proto_rawDesc,
NumEnums: 0,
NumMessages: 1,
NumExtensions: 1,
NumServices: 0,
},
GoTypes: file_xds_annotations_v3_versioning_proto_goTypes,
DependencyIndexes: file_xds_annotations_v3_versioning_proto_depIdxs,
MessageInfos: file_xds_annotations_v3_versioning_proto_msgTypes,
ExtensionInfos: file_xds_annotations_v3_versioning_proto_extTypes,
}.Build()
File_xds_annotations_v3_versioning_proto = out.File
file_xds_annotations_v3_versioning_proto_rawDesc = nil
file_xds_annotations_v3_versioning_proto_goTypes = nil
file_xds_annotations_v3_versioning_proto_depIdxs = nil
}

View File

@@ -0,0 +1,103 @@
// Code generated by protoc-gen-validate. DO NOT EDIT.
// source: xds/annotations/v3/versioning.proto
package v3
import (
"bytes"
"errors"
"fmt"
"net"
"net/mail"
"net/url"
"regexp"
"strings"
"time"
"unicode/utf8"
"google.golang.org/protobuf/types/known/anypb"
)
// ensure the imports are used
var (
_ = bytes.MinRead
_ = errors.New("")
_ = fmt.Print
_ = utf8.UTFMax
_ = (*regexp.Regexp)(nil)
_ = (*strings.Reader)(nil)
_ = net.IPv4len
_ = time.Duration(0)
_ = (*url.URL)(nil)
_ = (*mail.Address)(nil)
_ = anypb.Any{}
)
// Validate checks the field values on VersioningAnnotation with the rules
// defined in the proto definition for this message. If any rules are
// violated, an error is returned.
func (m *VersioningAnnotation) Validate() error {
if m == nil {
return nil
}
// no validation rules for PreviousMessageType
return nil
}
// VersioningAnnotationValidationError is the validation error returned by
// VersioningAnnotation.Validate if the designated constraints aren't met.
type VersioningAnnotationValidationError struct {
field string
reason string
cause error
key bool
}
// Field function returns field value.
func (e VersioningAnnotationValidationError) Field() string { return e.field }
// Reason function returns reason value.
func (e VersioningAnnotationValidationError) Reason() string { return e.reason }
// Cause function returns cause value.
func (e VersioningAnnotationValidationError) Cause() error { return e.cause }
// Key function returns key value.
func (e VersioningAnnotationValidationError) Key() bool { return e.key }
// ErrorName returns error name.
func (e VersioningAnnotationValidationError) ErrorName() string {
return "VersioningAnnotationValidationError"
}
// Error satisfies the builtin error interface
func (e VersioningAnnotationValidationError) Error() string {
cause := ""
if e.cause != nil {
cause = fmt.Sprintf(" | caused by: %v", e.cause)
}
key := ""
if e.key {
key = "key for "
}
return fmt.Sprintf(
"invalid %sVersioningAnnotation.%s: %s%s",
key,
e.field,
e.reason,
cause)
}
var _ error = VersioningAnnotationValidationError{}
var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = VersioningAnnotationValidationError{}

View File

@@ -0,0 +1,158 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.25.0
// protoc v3.18.0
// source: xds/core/v3/authority.proto
package v3
import (
_ "github.com/cncf/xds/go/xds/annotations/v3"
_ "github.com/envoyproxy/protoc-gen-validate/validate"
proto "github.com/golang/protobuf/proto"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// This is a compile-time assertion that a sufficiently up-to-date version
// of the legacy proto package is being used.
const _ = proto.ProtoPackageIsVersion4
type Authority struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
}
func (x *Authority) Reset() {
*x = Authority{}
if protoimpl.UnsafeEnabled {
mi := &file_xds_core_v3_authority_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Authority) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Authority) ProtoMessage() {}
func (x *Authority) ProtoReflect() protoreflect.Message {
mi := &file_xds_core_v3_authority_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Authority.ProtoReflect.Descriptor instead.
func (*Authority) Descriptor() ([]byte, []int) {
return file_xds_core_v3_authority_proto_rawDescGZIP(), []int{0}
}
func (x *Authority) GetName() string {
if x != nil {
return x.Name
}
return ""
}
var File_xds_core_v3_authority_proto protoreflect.FileDescriptor
var file_xds_core_v3_authority_proto_rawDesc = []byte{
0x0a, 0x1b, 0x78, 0x64, 0x73, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x61, 0x75,
0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0b, 0x78,
0x64, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x1a, 0x1f, 0x78, 0x64, 0x73, 0x2f,
0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x33, 0x2f, 0x73,
0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c,
0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x22, 0x28, 0x0a, 0x09, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74,
0x79, 0x12, 0x1b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42,
0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x56,
0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x78, 0x64, 0x73,
0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x42, 0x0e, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72,
0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x22, 0x67, 0x69, 0x74, 0x68,
0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6e, 0x63, 0x66, 0x2f, 0x78, 0x64, 0x73, 0x2f,
0x67, 0x6f, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0xd2, 0xc6,
0xa4, 0xe1, 0x06, 0x02, 0x08, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_xds_core_v3_authority_proto_rawDescOnce sync.Once
file_xds_core_v3_authority_proto_rawDescData = file_xds_core_v3_authority_proto_rawDesc
)
func file_xds_core_v3_authority_proto_rawDescGZIP() []byte {
file_xds_core_v3_authority_proto_rawDescOnce.Do(func() {
file_xds_core_v3_authority_proto_rawDescData = protoimpl.X.CompressGZIP(file_xds_core_v3_authority_proto_rawDescData)
})
return file_xds_core_v3_authority_proto_rawDescData
}
var file_xds_core_v3_authority_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_xds_core_v3_authority_proto_goTypes = []interface{}{
(*Authority)(nil), // 0: xds.core.v3.Authority
}
var file_xds_core_v3_authority_proto_depIdxs = []int32{
0, // [0:0] is the sub-list for method output_type
0, // [0:0] is the sub-list for method input_type
0, // [0:0] is the sub-list for extension type_name
0, // [0:0] is the sub-list for extension extendee
0, // [0:0] is the sub-list for field type_name
}
func init() { file_xds_core_v3_authority_proto_init() }
func file_xds_core_v3_authority_proto_init() {
if File_xds_core_v3_authority_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_xds_core_v3_authority_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Authority); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_xds_core_v3_authority_proto_rawDesc,
NumEnums: 0,
NumMessages: 1,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_xds_core_v3_authority_proto_goTypes,
DependencyIndexes: file_xds_core_v3_authority_proto_depIdxs,
MessageInfos: file_xds_core_v3_authority_proto_msgTypes,
}.Build()
File_xds_core_v3_authority_proto = out.File
file_xds_core_v3_authority_proto_rawDesc = nil
file_xds_core_v3_authority_proto_goTypes = nil
file_xds_core_v3_authority_proto_depIdxs = nil
}

View File

@@ -0,0 +1,105 @@
// Code generated by protoc-gen-validate. DO NOT EDIT.
// source: xds/core/v3/authority.proto
package v3
import (
"bytes"
"errors"
"fmt"
"net"
"net/mail"
"net/url"
"regexp"
"strings"
"time"
"unicode/utf8"
"google.golang.org/protobuf/types/known/anypb"
)
// ensure the imports are used
var (
_ = bytes.MinRead
_ = errors.New("")
_ = fmt.Print
_ = utf8.UTFMax
_ = (*regexp.Regexp)(nil)
_ = (*strings.Reader)(nil)
_ = net.IPv4len
_ = time.Duration(0)
_ = (*url.URL)(nil)
_ = (*mail.Address)(nil)
_ = anypb.Any{}
)
// Validate checks the field values on Authority with the rules defined in the
// proto definition for this message. If any rules are violated, an error is returned.
func (m *Authority) Validate() error {
if m == nil {
return nil
}
if utf8.RuneCountInString(m.GetName()) < 1 {
return AuthorityValidationError{
field: "Name",
reason: "value length must be at least 1 runes",
}
}
return nil
}
// AuthorityValidationError is the validation error returned by
// Authority.Validate if the designated constraints aren't met.
type AuthorityValidationError struct {
field string
reason string
cause error
key bool
}
// Field function returns field value.
func (e AuthorityValidationError) Field() string { return e.field }
// Reason function returns reason value.
func (e AuthorityValidationError) Reason() string { return e.reason }
// Cause function returns cause value.
func (e AuthorityValidationError) Cause() error { return e.cause }
// Key function returns key value.
func (e AuthorityValidationError) Key() bool { return e.key }
// ErrorName returns error name.
func (e AuthorityValidationError) ErrorName() string { return "AuthorityValidationError" }
// Error satisfies the builtin error interface
func (e AuthorityValidationError) Error() string {
cause := ""
if e.cause != nil {
cause = fmt.Sprintf(" | caused by: %v", e.cause)
}
key := ""
if e.key {
key = "key for "
}
return fmt.Sprintf(
"invalid %sAuthority.%s: %s%s",
key,
e.field,
e.reason,
cause)
}
var _ error = AuthorityValidationError{}
var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = AuthorityValidationError{}

177
vendor/github.com/cncf/xds/go/xds/core/v3/cidr.pb.go generated vendored Normal file
View File

@@ -0,0 +1,177 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.25.0
// protoc v3.18.0
// source: xds/core/v3/cidr.proto
package v3
import (
_ "github.com/cncf/xds/go/xds/annotations/v3"
_ "github.com/envoyproxy/protoc-gen-validate/validate"
proto "github.com/golang/protobuf/proto"
wrappers "github.com/golang/protobuf/ptypes/wrappers"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// This is a compile-time assertion that a sufficiently up-to-date version
// of the legacy proto package is being used.
const _ = proto.ProtoPackageIsVersion4
type CidrRange struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
AddressPrefix string `protobuf:"bytes,1,opt,name=address_prefix,json=addressPrefix,proto3" json:"address_prefix,omitempty"`
PrefixLen *wrappers.UInt32Value `protobuf:"bytes,2,opt,name=prefix_len,json=prefixLen,proto3" json:"prefix_len,omitempty"`
}
func (x *CidrRange) Reset() {
*x = CidrRange{}
if protoimpl.UnsafeEnabled {
mi := &file_xds_core_v3_cidr_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CidrRange) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CidrRange) ProtoMessage() {}
func (x *CidrRange) ProtoReflect() protoreflect.Message {
mi := &file_xds_core_v3_cidr_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CidrRange.ProtoReflect.Descriptor instead.
func (*CidrRange) Descriptor() ([]byte, []int) {
return file_xds_core_v3_cidr_proto_rawDescGZIP(), []int{0}
}
func (x *CidrRange) GetAddressPrefix() string {
if x != nil {
return x.AddressPrefix
}
return ""
}
func (x *CidrRange) GetPrefixLen() *wrappers.UInt32Value {
if x != nil {
return x.PrefixLen
}
return nil
}
var File_xds_core_v3_cidr_proto protoreflect.FileDescriptor
var file_xds_core_v3_cidr_proto_rawDesc = []byte{
0x0a, 0x16, 0x78, 0x64, 0x73, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x63, 0x69,
0x64, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0b, 0x78, 0x64, 0x73, 0x2e, 0x63, 0x6f,
0x72, 0x65, 0x2e, 0x76, 0x33, 0x1a, 0x1f, 0x78, 0x64, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x33, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73,
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73,
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65,
0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22,
0x82, 0x01, 0x0a, 0x09, 0x43, 0x69, 0x64, 0x72, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x2e, 0x0a,
0x0e, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18,
0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0d,
0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x45, 0x0a,
0x0a, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x5f, 0x6c, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42,
0x08, 0xfa, 0x42, 0x05, 0x2a, 0x03, 0x18, 0x80, 0x01, 0x52, 0x09, 0x70, 0x72, 0x65, 0x66, 0x69,
0x78, 0x4c, 0x65, 0x6e, 0x42, 0x56, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x69, 0x74, 0x68,
0x75, 0x62, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x42, 0x0e,
0x43, 0x69, 0x64, 0x72, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01,
0x5a, 0x22, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6e, 0x63,
0x66, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x67, 0x6f, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x63, 0x6f, 0x72,
0x65, 0x2f, 0x76, 0x33, 0xd2, 0xc6, 0xa4, 0xe1, 0x06, 0x02, 0x08, 0x01, 0x62, 0x06, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x33,
}
var (
file_xds_core_v3_cidr_proto_rawDescOnce sync.Once
file_xds_core_v3_cidr_proto_rawDescData = file_xds_core_v3_cidr_proto_rawDesc
)
func file_xds_core_v3_cidr_proto_rawDescGZIP() []byte {
file_xds_core_v3_cidr_proto_rawDescOnce.Do(func() {
file_xds_core_v3_cidr_proto_rawDescData = protoimpl.X.CompressGZIP(file_xds_core_v3_cidr_proto_rawDescData)
})
return file_xds_core_v3_cidr_proto_rawDescData
}
var file_xds_core_v3_cidr_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_xds_core_v3_cidr_proto_goTypes = []interface{}{
(*CidrRange)(nil), // 0: xds.core.v3.CidrRange
(*wrappers.UInt32Value)(nil), // 1: google.protobuf.UInt32Value
}
var file_xds_core_v3_cidr_proto_depIdxs = []int32{
1, // 0: xds.core.v3.CidrRange.prefix_len:type_name -> google.protobuf.UInt32Value
1, // [1:1] is the sub-list for method output_type
1, // [1:1] is the sub-list for method input_type
1, // [1:1] is the sub-list for extension type_name
1, // [1:1] is the sub-list for extension extendee
0, // [0:1] is the sub-list for field type_name
}
func init() { file_xds_core_v3_cidr_proto_init() }
func file_xds_core_v3_cidr_proto_init() {
if File_xds_core_v3_cidr_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_xds_core_v3_cidr_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CidrRange); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_xds_core_v3_cidr_proto_rawDesc,
NumEnums: 0,
NumMessages: 1,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_xds_core_v3_cidr_proto_goTypes,
DependencyIndexes: file_xds_core_v3_cidr_proto_depIdxs,
MessageInfos: file_xds_core_v3_cidr_proto_msgTypes,
}.Build()
File_xds_core_v3_cidr_proto = out.File
file_xds_core_v3_cidr_proto_rawDesc = nil
file_xds_core_v3_cidr_proto_goTypes = nil
file_xds_core_v3_cidr_proto_depIdxs = nil
}

View File

@@ -0,0 +1,116 @@
// Code generated by protoc-gen-validate. DO NOT EDIT.
// source: xds/core/v3/cidr.proto
package v3
import (
"bytes"
"errors"
"fmt"
"net"
"net/mail"
"net/url"
"regexp"
"strings"
"time"
"unicode/utf8"
"google.golang.org/protobuf/types/known/anypb"
)
// ensure the imports are used
var (
_ = bytes.MinRead
_ = errors.New("")
_ = fmt.Print
_ = utf8.UTFMax
_ = (*regexp.Regexp)(nil)
_ = (*strings.Reader)(nil)
_ = net.IPv4len
_ = time.Duration(0)
_ = (*url.URL)(nil)
_ = (*mail.Address)(nil)
_ = anypb.Any{}
)
// Validate checks the field values on CidrRange with the rules defined in the
// proto definition for this message. If any rules are violated, an error is returned.
func (m *CidrRange) Validate() error {
if m == nil {
return nil
}
if utf8.RuneCountInString(m.GetAddressPrefix()) < 1 {
return CidrRangeValidationError{
field: "AddressPrefix",
reason: "value length must be at least 1 runes",
}
}
if wrapper := m.GetPrefixLen(); wrapper != nil {
if wrapper.GetValue() > 128 {
return CidrRangeValidationError{
field: "PrefixLen",
reason: "value must be less than or equal to 128",
}
}
}
return nil
}
// CidrRangeValidationError is the validation error returned by
// CidrRange.Validate if the designated constraints aren't met.
type CidrRangeValidationError struct {
field string
reason string
cause error
key bool
}
// Field function returns field value.
func (e CidrRangeValidationError) Field() string { return e.field }
// Reason function returns reason value.
func (e CidrRangeValidationError) Reason() string { return e.reason }
// Cause function returns cause value.
func (e CidrRangeValidationError) Cause() error { return e.cause }
// Key function returns key value.
func (e CidrRangeValidationError) Key() bool { return e.key }
// ErrorName returns error name.
func (e CidrRangeValidationError) ErrorName() string { return "CidrRangeValidationError" }
// Error satisfies the builtin error interface
func (e CidrRangeValidationError) Error() string {
cause := ""
if e.cause != nil {
cause = fmt.Sprintf(" | caused by: %v", e.cause)
}
key := ""
if e.key {
key = "key for "
}
return fmt.Sprintf(
"invalid %sCidrRange.%s: %s%s",
key,
e.field,
e.reason,
cause)
}
var _ error = CidrRangeValidationError{}
var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = CidrRangeValidationError{}

View File

@@ -0,0 +1,301 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.25.0
// protoc v3.18.0
// source: xds/core/v3/collection_entry.proto
package v3
import (
_ "github.com/cncf/xds/go/xds/annotations/v3"
_ "github.com/envoyproxy/protoc-gen-validate/validate"
proto "github.com/golang/protobuf/proto"
any "github.com/golang/protobuf/ptypes/any"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// This is a compile-time assertion that a sufficiently up-to-date version
// of the legacy proto package is being used.
const _ = proto.ProtoPackageIsVersion4
type CollectionEntry struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Types that are assignable to ResourceSpecifier:
// *CollectionEntry_Locator
// *CollectionEntry_InlineEntry_
ResourceSpecifier isCollectionEntry_ResourceSpecifier `protobuf_oneof:"resource_specifier"`
}
func (x *CollectionEntry) Reset() {
*x = CollectionEntry{}
if protoimpl.UnsafeEnabled {
mi := &file_xds_core_v3_collection_entry_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CollectionEntry) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CollectionEntry) ProtoMessage() {}
func (x *CollectionEntry) ProtoReflect() protoreflect.Message {
mi := &file_xds_core_v3_collection_entry_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CollectionEntry.ProtoReflect.Descriptor instead.
func (*CollectionEntry) Descriptor() ([]byte, []int) {
return file_xds_core_v3_collection_entry_proto_rawDescGZIP(), []int{0}
}
func (m *CollectionEntry) GetResourceSpecifier() isCollectionEntry_ResourceSpecifier {
if m != nil {
return m.ResourceSpecifier
}
return nil
}
func (x *CollectionEntry) GetLocator() *ResourceLocator {
if x, ok := x.GetResourceSpecifier().(*CollectionEntry_Locator); ok {
return x.Locator
}
return nil
}
func (x *CollectionEntry) GetInlineEntry() *CollectionEntry_InlineEntry {
if x, ok := x.GetResourceSpecifier().(*CollectionEntry_InlineEntry_); ok {
return x.InlineEntry
}
return nil
}
type isCollectionEntry_ResourceSpecifier interface {
isCollectionEntry_ResourceSpecifier()
}
type CollectionEntry_Locator struct {
Locator *ResourceLocator `protobuf:"bytes,1,opt,name=locator,proto3,oneof"`
}
type CollectionEntry_InlineEntry_ struct {
InlineEntry *CollectionEntry_InlineEntry `protobuf:"bytes,2,opt,name=inline_entry,json=inlineEntry,proto3,oneof"`
}
func (*CollectionEntry_Locator) isCollectionEntry_ResourceSpecifier() {}
func (*CollectionEntry_InlineEntry_) isCollectionEntry_ResourceSpecifier() {}
type CollectionEntry_InlineEntry struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"`
Resource *any.Any `protobuf:"bytes,3,opt,name=resource,proto3" json:"resource,omitempty"`
}
func (x *CollectionEntry_InlineEntry) Reset() {
*x = CollectionEntry_InlineEntry{}
if protoimpl.UnsafeEnabled {
mi := &file_xds_core_v3_collection_entry_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CollectionEntry_InlineEntry) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CollectionEntry_InlineEntry) ProtoMessage() {}
func (x *CollectionEntry_InlineEntry) ProtoReflect() protoreflect.Message {
mi := &file_xds_core_v3_collection_entry_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CollectionEntry_InlineEntry.ProtoReflect.Descriptor instead.
func (*CollectionEntry_InlineEntry) Descriptor() ([]byte, []int) {
return file_xds_core_v3_collection_entry_proto_rawDescGZIP(), []int{0, 0}
}
func (x *CollectionEntry_InlineEntry) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *CollectionEntry_InlineEntry) GetVersion() string {
if x != nil {
return x.Version
}
return ""
}
func (x *CollectionEntry_InlineEntry) GetResource() *any.Any {
if x != nil {
return x.Resource
}
return nil
}
var File_xds_core_v3_collection_entry_proto protoreflect.FileDescriptor
var file_xds_core_v3_collection_entry_proto_rawDesc = []byte{
0x0a, 0x22, 0x78, 0x64, 0x73, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x63, 0x6f,
0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0b, 0x78, 0x64, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76,
0x33, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x78, 0x64,
0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x33,
0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x22, 0x78,
0x64, 0x73, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75,
0x72, 0x63, 0x65, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69,
0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc3, 0x02, 0x0a, 0x0f, 0x43,
0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x38,
0x0a, 0x07, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x1c, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65,
0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x6f, 0x72, 0x48, 0x00, 0x52,
0x07, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x4d, 0x0a, 0x0c, 0x69, 0x6e, 0x6c, 0x69,
0x6e, 0x65, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28,
0x2e, 0x78, 0x64, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6f, 0x6c,
0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x49, 0x6e, 0x6c,
0x69, 0x6e, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x48, 0x00, 0x52, 0x0b, 0x69, 0x6e, 0x6c, 0x69,
0x6e, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x1a, 0x8b, 0x01, 0x0a, 0x0b, 0x49, 0x6e, 0x6c, 0x69,
0x6e, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x30, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18,
0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x1c, 0xfa, 0x42, 0x19, 0x72, 0x17, 0x32, 0x15, 0x5e, 0x5b,
0x30, 0x2d, 0x39, 0x61, 0x2d, 0x7a, 0x41, 0x2d, 0x5a, 0x5f, 0x5c, 0x2d, 0x5c, 0x2e, 0x7e, 0x3a,
0x5d, 0x2b, 0x24, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72,
0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73,
0x69, 0x6f, 0x6e, 0x12, 0x30, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18,
0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x08, 0x72, 0x65, 0x73,
0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x19, 0x0a, 0x12, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63,
0x65, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x03, 0xf8, 0x42, 0x01,
0x42, 0x5c, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x78,
0x64, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x42, 0x14, 0x43, 0x6f, 0x6c, 0x6c,
0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f,
0x50, 0x01, 0x5a, 0x22, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63,
0x6e, 0x63, 0x66, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x67, 0x6f, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x63,
0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0xd2, 0xc6, 0xa4, 0xe1, 0x06, 0x02, 0x08, 0x01, 0x62, 0x06,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_xds_core_v3_collection_entry_proto_rawDescOnce sync.Once
file_xds_core_v3_collection_entry_proto_rawDescData = file_xds_core_v3_collection_entry_proto_rawDesc
)
func file_xds_core_v3_collection_entry_proto_rawDescGZIP() []byte {
file_xds_core_v3_collection_entry_proto_rawDescOnce.Do(func() {
file_xds_core_v3_collection_entry_proto_rawDescData = protoimpl.X.CompressGZIP(file_xds_core_v3_collection_entry_proto_rawDescData)
})
return file_xds_core_v3_collection_entry_proto_rawDescData
}
var file_xds_core_v3_collection_entry_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_xds_core_v3_collection_entry_proto_goTypes = []interface{}{
(*CollectionEntry)(nil), // 0: xds.core.v3.CollectionEntry
(*CollectionEntry_InlineEntry)(nil), // 1: xds.core.v3.CollectionEntry.InlineEntry
(*ResourceLocator)(nil), // 2: xds.core.v3.ResourceLocator
(*any.Any)(nil), // 3: google.protobuf.Any
}
var file_xds_core_v3_collection_entry_proto_depIdxs = []int32{
2, // 0: xds.core.v3.CollectionEntry.locator:type_name -> xds.core.v3.ResourceLocator
1, // 1: xds.core.v3.CollectionEntry.inline_entry:type_name -> xds.core.v3.CollectionEntry.InlineEntry
3, // 2: xds.core.v3.CollectionEntry.InlineEntry.resource:type_name -> google.protobuf.Any
3, // [3:3] is the sub-list for method output_type
3, // [3:3] is the sub-list for method input_type
3, // [3:3] is the sub-list for extension type_name
3, // [3:3] is the sub-list for extension extendee
0, // [0:3] is the sub-list for field type_name
}
func init() { file_xds_core_v3_collection_entry_proto_init() }
func file_xds_core_v3_collection_entry_proto_init() {
if File_xds_core_v3_collection_entry_proto != nil {
return
}
file_xds_core_v3_resource_locator_proto_init()
if !protoimpl.UnsafeEnabled {
file_xds_core_v3_collection_entry_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CollectionEntry); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_xds_core_v3_collection_entry_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CollectionEntry_InlineEntry); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
file_xds_core_v3_collection_entry_proto_msgTypes[0].OneofWrappers = []interface{}{
(*CollectionEntry_Locator)(nil),
(*CollectionEntry_InlineEntry_)(nil),
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_xds_core_v3_collection_entry_proto_rawDesc,
NumEnums: 0,
NumMessages: 2,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_xds_core_v3_collection_entry_proto_goTypes,
DependencyIndexes: file_xds_core_v3_collection_entry_proto_depIdxs,
MessageInfos: file_xds_core_v3_collection_entry_proto_msgTypes,
}.Build()
File_xds_core_v3_collection_entry_proto = out.File
file_xds_core_v3_collection_entry_proto_rawDesc = nil
file_xds_core_v3_collection_entry_proto_goTypes = nil
file_xds_core_v3_collection_entry_proto_depIdxs = nil
}

View File

@@ -0,0 +1,222 @@
// Code generated by protoc-gen-validate. DO NOT EDIT.
// source: xds/core/v3/collection_entry.proto
package v3
import (
"bytes"
"errors"
"fmt"
"net"
"net/mail"
"net/url"
"regexp"
"strings"
"time"
"unicode/utf8"
"google.golang.org/protobuf/types/known/anypb"
)
// ensure the imports are used
var (
_ = bytes.MinRead
_ = errors.New("")
_ = fmt.Print
_ = utf8.UTFMax
_ = (*regexp.Regexp)(nil)
_ = (*strings.Reader)(nil)
_ = net.IPv4len
_ = time.Duration(0)
_ = (*url.URL)(nil)
_ = (*mail.Address)(nil)
_ = anypb.Any{}
)
// Validate checks the field values on CollectionEntry with the rules defined
// in the proto definition for this message. If any rules are violated, an
// error is returned.
func (m *CollectionEntry) Validate() error {
if m == nil {
return nil
}
switch m.ResourceSpecifier.(type) {
case *CollectionEntry_Locator:
if v, ok := interface{}(m.GetLocator()).(interface{ Validate() error }); ok {
if err := v.Validate(); err != nil {
return CollectionEntryValidationError{
field: "Locator",
reason: "embedded message failed validation",
cause: err,
}
}
}
case *CollectionEntry_InlineEntry_:
if v, ok := interface{}(m.GetInlineEntry()).(interface{ Validate() error }); ok {
if err := v.Validate(); err != nil {
return CollectionEntryValidationError{
field: "InlineEntry",
reason: "embedded message failed validation",
cause: err,
}
}
}
default:
return CollectionEntryValidationError{
field: "ResourceSpecifier",
reason: "value is required",
}
}
return nil
}
// CollectionEntryValidationError is the validation error returned by
// CollectionEntry.Validate if the designated constraints aren't met.
type CollectionEntryValidationError struct {
field string
reason string
cause error
key bool
}
// Field function returns field value.
func (e CollectionEntryValidationError) Field() string { return e.field }
// Reason function returns reason value.
func (e CollectionEntryValidationError) Reason() string { return e.reason }
// Cause function returns cause value.
func (e CollectionEntryValidationError) Cause() error { return e.cause }
// Key function returns key value.
func (e CollectionEntryValidationError) Key() bool { return e.key }
// ErrorName returns error name.
func (e CollectionEntryValidationError) ErrorName() string { return "CollectionEntryValidationError" }
// Error satisfies the builtin error interface
func (e CollectionEntryValidationError) Error() string {
cause := ""
if e.cause != nil {
cause = fmt.Sprintf(" | caused by: %v", e.cause)
}
key := ""
if e.key {
key = "key for "
}
return fmt.Sprintf(
"invalid %sCollectionEntry.%s: %s%s",
key,
e.field,
e.reason,
cause)
}
var _ error = CollectionEntryValidationError{}
var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = CollectionEntryValidationError{}
// Validate checks the field values on CollectionEntry_InlineEntry with the
// rules defined in the proto definition for this message. If any rules are
// violated, an error is returned.
func (m *CollectionEntry_InlineEntry) Validate() error {
if m == nil {
return nil
}
if !_CollectionEntry_InlineEntry_Name_Pattern.MatchString(m.GetName()) {
return CollectionEntry_InlineEntryValidationError{
field: "Name",
reason: "value does not match regex pattern \"^[0-9a-zA-Z_\\\\-\\\\.~:]+$\"",
}
}
// no validation rules for Version
if v, ok := interface{}(m.GetResource()).(interface{ Validate() error }); ok {
if err := v.Validate(); err != nil {
return CollectionEntry_InlineEntryValidationError{
field: "Resource",
reason: "embedded message failed validation",
cause: err,
}
}
}
return nil
}
// CollectionEntry_InlineEntryValidationError is the validation error returned
// by CollectionEntry_InlineEntry.Validate if the designated constraints
// aren't met.
type CollectionEntry_InlineEntryValidationError struct {
field string
reason string
cause error
key bool
}
// Field function returns field value.
func (e CollectionEntry_InlineEntryValidationError) Field() string { return e.field }
// Reason function returns reason value.
func (e CollectionEntry_InlineEntryValidationError) Reason() string { return e.reason }
// Cause function returns cause value.
func (e CollectionEntry_InlineEntryValidationError) Cause() error { return e.cause }
// Key function returns key value.
func (e CollectionEntry_InlineEntryValidationError) Key() bool { return e.key }
// ErrorName returns error name.
func (e CollectionEntry_InlineEntryValidationError) ErrorName() string {
return "CollectionEntry_InlineEntryValidationError"
}
// Error satisfies the builtin error interface
func (e CollectionEntry_InlineEntryValidationError) Error() string {
cause := ""
if e.cause != nil {
cause = fmt.Sprintf(" | caused by: %v", e.cause)
}
key := ""
if e.key {
key = "key for "
}
return fmt.Sprintf(
"invalid %sCollectionEntry_InlineEntry.%s: %s%s",
key,
e.field,
e.reason,
cause)
}
var _ error = CollectionEntry_InlineEntryValidationError{}
var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = CollectionEntry_InlineEntryValidationError{}
var _CollectionEntry_InlineEntry_Name_Pattern = regexp.MustCompile("^[0-9a-zA-Z_\\-\\.~:]+$")

View File

@@ -0,0 +1,165 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.25.0
// protoc v3.18.0
// source: xds/core/v3/context_params.proto
package v3
import (
_ "github.com/cncf/xds/go/xds/annotations/v3"
proto "github.com/golang/protobuf/proto"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// This is a compile-time assertion that a sufficiently up-to-date version
// of the legacy proto package is being used.
const _ = proto.ProtoPackageIsVersion4
type ContextParams struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Params map[string]string `protobuf:"bytes,1,rep,name=params,proto3" json:"params,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
}
func (x *ContextParams) Reset() {
*x = ContextParams{}
if protoimpl.UnsafeEnabled {
mi := &file_xds_core_v3_context_params_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ContextParams) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ContextParams) ProtoMessage() {}
func (x *ContextParams) ProtoReflect() protoreflect.Message {
mi := &file_xds_core_v3_context_params_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ContextParams.ProtoReflect.Descriptor instead.
func (*ContextParams) Descriptor() ([]byte, []int) {
return file_xds_core_v3_context_params_proto_rawDescGZIP(), []int{0}
}
func (x *ContextParams) GetParams() map[string]string {
if x != nil {
return x.Params
}
return nil
}
var File_xds_core_v3_context_params_proto protoreflect.FileDescriptor
var file_xds_core_v3_context_params_proto_rawDesc = []byte{
0x0a, 0x20, 0x78, 0x64, 0x73, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x63, 0x6f,
0x6e, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x12, 0x0b, 0x78, 0x64, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x1a,
0x1f, 0x78, 0x64, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73,
0x2f, 0x76, 0x33, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x22, 0x8a, 0x01, 0x0a, 0x0d, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x50, 0x61, 0x72, 0x61,
0x6d, 0x73, 0x12, 0x3e, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x03,
0x28, 0x0b, 0x32, 0x26, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33,
0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x50,
0x61, 0x72, 0x61, 0x6d, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61,
0x6d, 0x73, 0x1a, 0x39, 0x0a, 0x0b, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x45, 0x6e, 0x74, 0x72,
0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03,
0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01,
0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x5a, 0x0a,
0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x78, 0x64, 0x73, 0x2e,
0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x42, 0x12, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74,
0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x22, 0x67,
0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6e, 0x63, 0x66, 0x2f, 0x78,
0x64, 0x73, 0x2f, 0x67, 0x6f, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76,
0x33, 0xd2, 0xc6, 0xa4, 0xe1, 0x06, 0x02, 0x08, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x33,
}
var (
file_xds_core_v3_context_params_proto_rawDescOnce sync.Once
file_xds_core_v3_context_params_proto_rawDescData = file_xds_core_v3_context_params_proto_rawDesc
)
func file_xds_core_v3_context_params_proto_rawDescGZIP() []byte {
file_xds_core_v3_context_params_proto_rawDescOnce.Do(func() {
file_xds_core_v3_context_params_proto_rawDescData = protoimpl.X.CompressGZIP(file_xds_core_v3_context_params_proto_rawDescData)
})
return file_xds_core_v3_context_params_proto_rawDescData
}
var file_xds_core_v3_context_params_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_xds_core_v3_context_params_proto_goTypes = []interface{}{
(*ContextParams)(nil), // 0: xds.core.v3.ContextParams
nil, // 1: xds.core.v3.ContextParams.ParamsEntry
}
var file_xds_core_v3_context_params_proto_depIdxs = []int32{
1, // 0: xds.core.v3.ContextParams.params:type_name -> xds.core.v3.ContextParams.ParamsEntry
1, // [1:1] is the sub-list for method output_type
1, // [1:1] is the sub-list for method input_type
1, // [1:1] is the sub-list for extension type_name
1, // [1:1] is the sub-list for extension extendee
0, // [0:1] is the sub-list for field type_name
}
func init() { file_xds_core_v3_context_params_proto_init() }
func file_xds_core_v3_context_params_proto_init() {
if File_xds_core_v3_context_params_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_xds_core_v3_context_params_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ContextParams); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_xds_core_v3_context_params_proto_rawDesc,
NumEnums: 0,
NumMessages: 2,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_xds_core_v3_context_params_proto_goTypes,
DependencyIndexes: file_xds_core_v3_context_params_proto_depIdxs,
MessageInfos: file_xds_core_v3_context_params_proto_msgTypes,
}.Build()
File_xds_core_v3_context_params_proto = out.File
file_xds_core_v3_context_params_proto_rawDesc = nil
file_xds_core_v3_context_params_proto_goTypes = nil
file_xds_core_v3_context_params_proto_depIdxs = nil
}

View File

@@ -0,0 +1,101 @@
// Code generated by protoc-gen-validate. DO NOT EDIT.
// source: xds/core/v3/context_params.proto
package v3
import (
"bytes"
"errors"
"fmt"
"net"
"net/mail"
"net/url"
"regexp"
"strings"
"time"
"unicode/utf8"
"google.golang.org/protobuf/types/known/anypb"
)
// ensure the imports are used
var (
_ = bytes.MinRead
_ = errors.New("")
_ = fmt.Print
_ = utf8.UTFMax
_ = (*regexp.Regexp)(nil)
_ = (*strings.Reader)(nil)
_ = net.IPv4len
_ = time.Duration(0)
_ = (*url.URL)(nil)
_ = (*mail.Address)(nil)
_ = anypb.Any{}
)
// Validate checks the field values on ContextParams with the rules defined in
// the proto definition for this message. If any rules are violated, an error
// is returned.
func (m *ContextParams) Validate() error {
if m == nil {
return nil
}
// no validation rules for Params
return nil
}
// ContextParamsValidationError is the validation error returned by
// ContextParams.Validate if the designated constraints aren't met.
type ContextParamsValidationError struct {
field string
reason string
cause error
key bool
}
// Field function returns field value.
func (e ContextParamsValidationError) Field() string { return e.field }
// Reason function returns reason value.
func (e ContextParamsValidationError) Reason() string { return e.reason }
// Cause function returns cause value.
func (e ContextParamsValidationError) Cause() error { return e.cause }
// Key function returns key value.
func (e ContextParamsValidationError) Key() bool { return e.key }
// ErrorName returns error name.
func (e ContextParamsValidationError) ErrorName() string { return "ContextParamsValidationError" }
// Error satisfies the builtin error interface
func (e ContextParamsValidationError) Error() string {
cause := ""
if e.cause != nil {
cause = fmt.Sprintf(" | caused by: %v", e.cause)
}
key := ""
if e.key {
key = "key for "
}
return fmt.Sprintf(
"invalid %sContextParams.%s: %s%s",
key,
e.field,
e.reason,
cause)
}
var _ error = ContextParamsValidationError{}
var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = ContextParamsValidationError{}

View File

@@ -0,0 +1,172 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.25.0
// protoc v3.18.0
// source: xds/core/v3/extension.proto
package v3
import (
_ "github.com/envoyproxy/protoc-gen-validate/validate"
proto "github.com/golang/protobuf/proto"
any "github.com/golang/protobuf/ptypes/any"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// This is a compile-time assertion that a sufficiently up-to-date version
// of the legacy proto package is being used.
const _ = proto.ProtoPackageIsVersion4
type TypedExtensionConfig struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
TypedConfig *any.Any `protobuf:"bytes,2,opt,name=typed_config,json=typedConfig,proto3" json:"typed_config,omitempty"`
}
func (x *TypedExtensionConfig) Reset() {
*x = TypedExtensionConfig{}
if protoimpl.UnsafeEnabled {
mi := &file_xds_core_v3_extension_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *TypedExtensionConfig) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*TypedExtensionConfig) ProtoMessage() {}
func (x *TypedExtensionConfig) ProtoReflect() protoreflect.Message {
mi := &file_xds_core_v3_extension_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use TypedExtensionConfig.ProtoReflect.Descriptor instead.
func (*TypedExtensionConfig) Descriptor() ([]byte, []int) {
return file_xds_core_v3_extension_proto_rawDescGZIP(), []int{0}
}
func (x *TypedExtensionConfig) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *TypedExtensionConfig) GetTypedConfig() *any.Any {
if x != nil {
return x.TypedConfig
}
return nil
}
var File_xds_core_v3_extension_proto protoreflect.FileDescriptor
var file_xds_core_v3_extension_proto_rawDesc = []byte{
0x0a, 0x1b, 0x78, 0x64, 0x73, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x65, 0x78,
0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0b, 0x78,
0x64, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69,
0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x76,
0x0a, 0x14, 0x54, 0x79, 0x70, 0x65, 0x64, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e,
0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01,
0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x04, 0x6e,
0x61, 0x6d, 0x65, 0x12, 0x41, 0x0a, 0x0c, 0x74, 0x79, 0x70, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6e,
0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x42,
0x08, 0xfa, 0x42, 0x05, 0xa2, 0x01, 0x02, 0x08, 0x01, 0x52, 0x0b, 0x74, 0x79, 0x70, 0x65, 0x64,
0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x4e, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x69,
0x74, 0x68, 0x75, 0x62, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33,
0x42, 0x0e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f,
0x50, 0x01, 0x5a, 0x22, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63,
0x6e, 0x63, 0x66, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x67, 0x6f, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x63,
0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_xds_core_v3_extension_proto_rawDescOnce sync.Once
file_xds_core_v3_extension_proto_rawDescData = file_xds_core_v3_extension_proto_rawDesc
)
func file_xds_core_v3_extension_proto_rawDescGZIP() []byte {
file_xds_core_v3_extension_proto_rawDescOnce.Do(func() {
file_xds_core_v3_extension_proto_rawDescData = protoimpl.X.CompressGZIP(file_xds_core_v3_extension_proto_rawDescData)
})
return file_xds_core_v3_extension_proto_rawDescData
}
var file_xds_core_v3_extension_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_xds_core_v3_extension_proto_goTypes = []interface{}{
(*TypedExtensionConfig)(nil), // 0: xds.core.v3.TypedExtensionConfig
(*any.Any)(nil), // 1: google.protobuf.Any
}
var file_xds_core_v3_extension_proto_depIdxs = []int32{
1, // 0: xds.core.v3.TypedExtensionConfig.typed_config:type_name -> google.protobuf.Any
1, // [1:1] is the sub-list for method output_type
1, // [1:1] is the sub-list for method input_type
1, // [1:1] is the sub-list for extension type_name
1, // [1:1] is the sub-list for extension extendee
0, // [0:1] is the sub-list for field type_name
}
func init() { file_xds_core_v3_extension_proto_init() }
func file_xds_core_v3_extension_proto_init() {
if File_xds_core_v3_extension_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_xds_core_v3_extension_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*TypedExtensionConfig); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_xds_core_v3_extension_proto_rawDesc,
NumEnums: 0,
NumMessages: 1,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_xds_core_v3_extension_proto_goTypes,
DependencyIndexes: file_xds_core_v3_extension_proto_depIdxs,
MessageInfos: file_xds_core_v3_extension_proto_msgTypes,
}.Build()
File_xds_core_v3_extension_proto = out.File
file_xds_core_v3_extension_proto_rawDesc = nil
file_xds_core_v3_extension_proto_goTypes = nil
file_xds_core_v3_extension_proto_depIdxs = nil
}

View File

@@ -0,0 +1,119 @@
// Code generated by protoc-gen-validate. DO NOT EDIT.
// source: xds/core/v3/extension.proto
package v3
import (
"bytes"
"errors"
"fmt"
"net"
"net/mail"
"net/url"
"regexp"
"strings"
"time"
"unicode/utf8"
"google.golang.org/protobuf/types/known/anypb"
)
// ensure the imports are used
var (
_ = bytes.MinRead
_ = errors.New("")
_ = fmt.Print
_ = utf8.UTFMax
_ = (*regexp.Regexp)(nil)
_ = (*strings.Reader)(nil)
_ = net.IPv4len
_ = time.Duration(0)
_ = (*url.URL)(nil)
_ = (*mail.Address)(nil)
_ = anypb.Any{}
)
// Validate checks the field values on TypedExtensionConfig with the rules
// defined in the proto definition for this message. If any rules are
// violated, an error is returned.
func (m *TypedExtensionConfig) Validate() error {
if m == nil {
return nil
}
if utf8.RuneCountInString(m.GetName()) < 1 {
return TypedExtensionConfigValidationError{
field: "Name",
reason: "value length must be at least 1 runes",
}
}
if m.GetTypedConfig() == nil {
return TypedExtensionConfigValidationError{
field: "TypedConfig",
reason: "value is required",
}
}
if a := m.GetTypedConfig(); a != nil {
}
return nil
}
// TypedExtensionConfigValidationError is the validation error returned by
// TypedExtensionConfig.Validate if the designated constraints aren't met.
type TypedExtensionConfigValidationError struct {
field string
reason string
cause error
key bool
}
// Field function returns field value.
func (e TypedExtensionConfigValidationError) Field() string { return e.field }
// Reason function returns reason value.
func (e TypedExtensionConfigValidationError) Reason() string { return e.reason }
// Cause function returns cause value.
func (e TypedExtensionConfigValidationError) Cause() error { return e.cause }
// Key function returns key value.
func (e TypedExtensionConfigValidationError) Key() bool { return e.key }
// ErrorName returns error name.
func (e TypedExtensionConfigValidationError) ErrorName() string {
return "TypedExtensionConfigValidationError"
}
// Error satisfies the builtin error interface
func (e TypedExtensionConfigValidationError) Error() string {
cause := ""
if e.cause != nil {
cause = fmt.Sprintf(" | caused by: %v", e.cause)
}
key := ""
if e.key {
key = "key for "
}
return fmt.Sprintf(
"invalid %sTypedExtensionConfig.%s: %s%s",
key,
e.field,
e.reason,
cause)
}
var _ error = TypedExtensionConfigValidationError{}
var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = TypedExtensionConfigValidationError{}

View File

@@ -0,0 +1,187 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.25.0
// protoc v3.18.0
// source: xds/core/v3/resource.proto
package v3
import (
_ "github.com/cncf/xds/go/xds/annotations/v3"
proto "github.com/golang/protobuf/proto"
any "github.com/golang/protobuf/ptypes/any"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// This is a compile-time assertion that a sufficiently up-to-date version
// of the legacy proto package is being used.
const _ = proto.ProtoPackageIsVersion4
type Resource struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Name *ResourceName `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"`
Resource *any.Any `protobuf:"bytes,3,opt,name=resource,proto3" json:"resource,omitempty"`
}
func (x *Resource) Reset() {
*x = Resource{}
if protoimpl.UnsafeEnabled {
mi := &file_xds_core_v3_resource_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Resource) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Resource) ProtoMessage() {}
func (x *Resource) ProtoReflect() protoreflect.Message {
mi := &file_xds_core_v3_resource_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Resource.ProtoReflect.Descriptor instead.
func (*Resource) Descriptor() ([]byte, []int) {
return file_xds_core_v3_resource_proto_rawDescGZIP(), []int{0}
}
func (x *Resource) GetName() *ResourceName {
if x != nil {
return x.Name
}
return nil
}
func (x *Resource) GetVersion() string {
if x != nil {
return x.Version
}
return ""
}
func (x *Resource) GetResource() *any.Any {
if x != nil {
return x.Resource
}
return nil
}
var File_xds_core_v3_resource_proto protoreflect.FileDescriptor
var file_xds_core_v3_resource_proto_rawDesc = []byte{
0x0a, 0x1a, 0x78, 0x64, 0x73, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x65,
0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0b, 0x78, 0x64,
0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x78, 0x64, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x33, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x78, 0x64, 0x73, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f,
0x76, 0x33, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65,
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x85, 0x01, 0x0a, 0x08, 0x52, 0x65, 0x73, 0x6f, 0x75,
0x72, 0x63, 0x65, 0x12, 0x2d, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x19, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e,
0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x04, 0x6e, 0x61,
0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20,
0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x30, 0x0a, 0x08,
0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14,
0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
0x2e, 0x41, 0x6e, 0x79, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x55,
0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x78, 0x64, 0x73,
0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x42, 0x0d, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72,
0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x22, 0x67, 0x69, 0x74, 0x68, 0x75,
0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6e, 0x63, 0x66, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x67,
0x6f, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0xd2, 0xc6, 0xa4,
0xe1, 0x06, 0x02, 0x08, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_xds_core_v3_resource_proto_rawDescOnce sync.Once
file_xds_core_v3_resource_proto_rawDescData = file_xds_core_v3_resource_proto_rawDesc
)
func file_xds_core_v3_resource_proto_rawDescGZIP() []byte {
file_xds_core_v3_resource_proto_rawDescOnce.Do(func() {
file_xds_core_v3_resource_proto_rawDescData = protoimpl.X.CompressGZIP(file_xds_core_v3_resource_proto_rawDescData)
})
return file_xds_core_v3_resource_proto_rawDescData
}
var file_xds_core_v3_resource_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_xds_core_v3_resource_proto_goTypes = []interface{}{
(*Resource)(nil), // 0: xds.core.v3.Resource
(*ResourceName)(nil), // 1: xds.core.v3.ResourceName
(*any.Any)(nil), // 2: google.protobuf.Any
}
var file_xds_core_v3_resource_proto_depIdxs = []int32{
1, // 0: xds.core.v3.Resource.name:type_name -> xds.core.v3.ResourceName
2, // 1: xds.core.v3.Resource.resource:type_name -> google.protobuf.Any
2, // [2:2] is the sub-list for method output_type
2, // [2:2] is the sub-list for method input_type
2, // [2:2] is the sub-list for extension type_name
2, // [2:2] is the sub-list for extension extendee
0, // [0:2] is the sub-list for field type_name
}
func init() { file_xds_core_v3_resource_proto_init() }
func file_xds_core_v3_resource_proto_init() {
if File_xds_core_v3_resource_proto != nil {
return
}
file_xds_core_v3_resource_name_proto_init()
if !protoimpl.UnsafeEnabled {
file_xds_core_v3_resource_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Resource); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_xds_core_v3_resource_proto_rawDesc,
NumEnums: 0,
NumMessages: 1,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_xds_core_v3_resource_proto_goTypes,
DependencyIndexes: file_xds_core_v3_resource_proto_depIdxs,
MessageInfos: file_xds_core_v3_resource_proto_msgTypes,
}.Build()
File_xds_core_v3_resource_proto = out.File
file_xds_core_v3_resource_proto_rawDesc = nil
file_xds_core_v3_resource_proto_goTypes = nil
file_xds_core_v3_resource_proto_depIdxs = nil
}

View File

@@ -0,0 +1,120 @@
// Code generated by protoc-gen-validate. DO NOT EDIT.
// source: xds/core/v3/resource.proto
package v3
import (
"bytes"
"errors"
"fmt"
"net"
"net/mail"
"net/url"
"regexp"
"strings"
"time"
"unicode/utf8"
"google.golang.org/protobuf/types/known/anypb"
)
// ensure the imports are used
var (
_ = bytes.MinRead
_ = errors.New("")
_ = fmt.Print
_ = utf8.UTFMax
_ = (*regexp.Regexp)(nil)
_ = (*strings.Reader)(nil)
_ = net.IPv4len
_ = time.Duration(0)
_ = (*url.URL)(nil)
_ = (*mail.Address)(nil)
_ = anypb.Any{}
)
// Validate checks the field values on Resource with the rules defined in the
// proto definition for this message. If any rules are violated, an error is returned.
func (m *Resource) Validate() error {
if m == nil {
return nil
}
if v, ok := interface{}(m.GetName()).(interface{ Validate() error }); ok {
if err := v.Validate(); err != nil {
return ResourceValidationError{
field: "Name",
reason: "embedded message failed validation",
cause: err,
}
}
}
// no validation rules for Version
if v, ok := interface{}(m.GetResource()).(interface{ Validate() error }); ok {
if err := v.Validate(); err != nil {
return ResourceValidationError{
field: "Resource",
reason: "embedded message failed validation",
cause: err,
}
}
}
return nil
}
// ResourceValidationError is the validation error returned by
// Resource.Validate if the designated constraints aren't met.
type ResourceValidationError struct {
field string
reason string
cause error
key bool
}
// Field function returns field value.
func (e ResourceValidationError) Field() string { return e.field }
// Reason function returns reason value.
func (e ResourceValidationError) Reason() string { return e.reason }
// Cause function returns cause value.
func (e ResourceValidationError) Cause() error { return e.cause }
// Key function returns key value.
func (e ResourceValidationError) Key() bool { return e.key }
// ErrorName returns error name.
func (e ResourceValidationError) ErrorName() string { return "ResourceValidationError" }
// Error satisfies the builtin error interface
func (e ResourceValidationError) Error() string {
cause := ""
if e.cause != nil {
cause = fmt.Sprintf(" | caused by: %v", e.cause)
}
key := ""
if e.key {
key = "key for "
}
return fmt.Sprintf(
"invalid %sResource.%s: %s%s",
key,
e.field,
e.reason,
cause)
}
var _ error = ResourceValidationError{}
var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = ResourceValidationError{}

View File

@@ -0,0 +1,409 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.25.0
// protoc v3.18.0
// source: xds/core/v3/resource_locator.proto
package v3
import (
_ "github.com/cncf/xds/go/xds/annotations/v3"
_ "github.com/envoyproxy/protoc-gen-validate/validate"
proto "github.com/golang/protobuf/proto"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// This is a compile-time assertion that a sufficiently up-to-date version
// of the legacy proto package is being used.
const _ = proto.ProtoPackageIsVersion4
type ResourceLocator_Scheme int32
const (
ResourceLocator_XDSTP ResourceLocator_Scheme = 0
ResourceLocator_HTTP ResourceLocator_Scheme = 1
ResourceLocator_FILE ResourceLocator_Scheme = 2
)
// Enum value maps for ResourceLocator_Scheme.
var (
ResourceLocator_Scheme_name = map[int32]string{
0: "XDSTP",
1: "HTTP",
2: "FILE",
}
ResourceLocator_Scheme_value = map[string]int32{
"XDSTP": 0,
"HTTP": 1,
"FILE": 2,
}
)
func (x ResourceLocator_Scheme) Enum() *ResourceLocator_Scheme {
p := new(ResourceLocator_Scheme)
*p = x
return p
}
func (x ResourceLocator_Scheme) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (ResourceLocator_Scheme) Descriptor() protoreflect.EnumDescriptor {
return file_xds_core_v3_resource_locator_proto_enumTypes[0].Descriptor()
}
func (ResourceLocator_Scheme) Type() protoreflect.EnumType {
return &file_xds_core_v3_resource_locator_proto_enumTypes[0]
}
func (x ResourceLocator_Scheme) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use ResourceLocator_Scheme.Descriptor instead.
func (ResourceLocator_Scheme) EnumDescriptor() ([]byte, []int) {
return file_xds_core_v3_resource_locator_proto_rawDescGZIP(), []int{0, 0}
}
type ResourceLocator struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Scheme ResourceLocator_Scheme `protobuf:"varint,1,opt,name=scheme,proto3,enum=xds.core.v3.ResourceLocator_Scheme" json:"scheme,omitempty"`
Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
Authority string `protobuf:"bytes,3,opt,name=authority,proto3" json:"authority,omitempty"`
ResourceType string `protobuf:"bytes,4,opt,name=resource_type,json=resourceType,proto3" json:"resource_type,omitempty"`
// Types that are assignable to ContextParamSpecifier:
// *ResourceLocator_ExactContext
ContextParamSpecifier isResourceLocator_ContextParamSpecifier `protobuf_oneof:"context_param_specifier"`
Directives []*ResourceLocator_Directive `protobuf:"bytes,6,rep,name=directives,proto3" json:"directives,omitempty"`
}
func (x *ResourceLocator) Reset() {
*x = ResourceLocator{}
if protoimpl.UnsafeEnabled {
mi := &file_xds_core_v3_resource_locator_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ResourceLocator) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ResourceLocator) ProtoMessage() {}
func (x *ResourceLocator) ProtoReflect() protoreflect.Message {
mi := &file_xds_core_v3_resource_locator_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ResourceLocator.ProtoReflect.Descriptor instead.
func (*ResourceLocator) Descriptor() ([]byte, []int) {
return file_xds_core_v3_resource_locator_proto_rawDescGZIP(), []int{0}
}
func (x *ResourceLocator) GetScheme() ResourceLocator_Scheme {
if x != nil {
return x.Scheme
}
return ResourceLocator_XDSTP
}
func (x *ResourceLocator) GetId() string {
if x != nil {
return x.Id
}
return ""
}
func (x *ResourceLocator) GetAuthority() string {
if x != nil {
return x.Authority
}
return ""
}
func (x *ResourceLocator) GetResourceType() string {
if x != nil {
return x.ResourceType
}
return ""
}
func (m *ResourceLocator) GetContextParamSpecifier() isResourceLocator_ContextParamSpecifier {
if m != nil {
return m.ContextParamSpecifier
}
return nil
}
func (x *ResourceLocator) GetExactContext() *ContextParams {
if x, ok := x.GetContextParamSpecifier().(*ResourceLocator_ExactContext); ok {
return x.ExactContext
}
return nil
}
func (x *ResourceLocator) GetDirectives() []*ResourceLocator_Directive {
if x != nil {
return x.Directives
}
return nil
}
type isResourceLocator_ContextParamSpecifier interface {
isResourceLocator_ContextParamSpecifier()
}
type ResourceLocator_ExactContext struct {
ExactContext *ContextParams `protobuf:"bytes,5,opt,name=exact_context,json=exactContext,proto3,oneof"`
}
func (*ResourceLocator_ExactContext) isResourceLocator_ContextParamSpecifier() {}
type ResourceLocator_Directive struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Types that are assignable to Directive:
// *ResourceLocator_Directive_Alt
// *ResourceLocator_Directive_Entry
Directive isResourceLocator_Directive_Directive `protobuf_oneof:"directive"`
}
func (x *ResourceLocator_Directive) Reset() {
*x = ResourceLocator_Directive{}
if protoimpl.UnsafeEnabled {
mi := &file_xds_core_v3_resource_locator_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ResourceLocator_Directive) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ResourceLocator_Directive) ProtoMessage() {}
func (x *ResourceLocator_Directive) ProtoReflect() protoreflect.Message {
mi := &file_xds_core_v3_resource_locator_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ResourceLocator_Directive.ProtoReflect.Descriptor instead.
func (*ResourceLocator_Directive) Descriptor() ([]byte, []int) {
return file_xds_core_v3_resource_locator_proto_rawDescGZIP(), []int{0, 0}
}
func (m *ResourceLocator_Directive) GetDirective() isResourceLocator_Directive_Directive {
if m != nil {
return m.Directive
}
return nil
}
func (x *ResourceLocator_Directive) GetAlt() *ResourceLocator {
if x, ok := x.GetDirective().(*ResourceLocator_Directive_Alt); ok {
return x.Alt
}
return nil
}
func (x *ResourceLocator_Directive) GetEntry() string {
if x, ok := x.GetDirective().(*ResourceLocator_Directive_Entry); ok {
return x.Entry
}
return ""
}
type isResourceLocator_Directive_Directive interface {
isResourceLocator_Directive_Directive()
}
type ResourceLocator_Directive_Alt struct {
Alt *ResourceLocator `protobuf:"bytes,1,opt,name=alt,proto3,oneof"`
}
type ResourceLocator_Directive_Entry struct {
Entry string `protobuf:"bytes,2,opt,name=entry,proto3,oneof"`
}
func (*ResourceLocator_Directive_Alt) isResourceLocator_Directive_Directive() {}
func (*ResourceLocator_Directive_Entry) isResourceLocator_Directive_Directive() {}
var File_xds_core_v3_resource_locator_proto protoreflect.FileDescriptor
var file_xds_core_v3_resource_locator_proto_rawDesc = []byte{
0x0a, 0x22, 0x78, 0x64, 0x73, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x65,
0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0b, 0x78, 0x64, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76,
0x33, 0x1a, 0x1f, 0x78, 0x64, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x73, 0x2f, 0x76, 0x33, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x1a, 0x20, 0x78, 0x64, 0x73, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f,
0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76,
0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x8e, 0x04,
0x0a, 0x0f, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x6f,
0x72, 0x12, 0x45, 0x0a, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
0x0e, 0x32, 0x23, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e,
0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x6f, 0x72, 0x2e,
0x53, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01,
0x52, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02,
0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68,
0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x75, 0x74,
0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x2c, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72,
0x63, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa,
0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
0x54, 0x79, 0x70, 0x65, 0x12, 0x41, 0x0a, 0x0d, 0x65, 0x78, 0x61, 0x63, 0x74, 0x5f, 0x63, 0x6f,
0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x78, 0x64,
0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78,
0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x48, 0x00, 0x52, 0x0c, 0x65, 0x78, 0x61, 0x63, 0x74,
0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x46, 0x0a, 0x0a, 0x64, 0x69, 0x72, 0x65, 0x63,
0x74, 0x69, 0x76, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x78, 0x64,
0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72,
0x63, 0x65, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74,
0x69, 0x76, 0x65, 0x52, 0x0a, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x73, 0x1a,
0x88, 0x01, 0x0a, 0x09, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x12, 0x30, 0x0a,
0x03, 0x61, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x78, 0x64, 0x73,
0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63,
0x65, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x6f, 0x72, 0x48, 0x00, 0x52, 0x03, 0x61, 0x6c, 0x74, 0x12,
0x37, 0x0a, 0x05, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x1f,
0xfa, 0x42, 0x1c, 0x72, 0x1a, 0x10, 0x01, 0x32, 0x16, 0x5e, 0x5b, 0x30, 0x2d, 0x39, 0x61, 0x2d,
0x7a, 0x41, 0x2d, 0x5a, 0x5f, 0x5c, 0x2d, 0x5c, 0x2e, 0x2f, 0x7e, 0x3a, 0x5d, 0x2b, 0x24, 0x48,
0x00, 0x52, 0x05, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x42, 0x10, 0x0a, 0x09, 0x64, 0x69, 0x72, 0x65,
0x63, 0x74, 0x69, 0x76, 0x65, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x22, 0x27, 0x0a, 0x06, 0x53, 0x63,
0x68, 0x65, 0x6d, 0x65, 0x12, 0x09, 0x0a, 0x05, 0x58, 0x44, 0x53, 0x54, 0x50, 0x10, 0x00, 0x12,
0x08, 0x0a, 0x04, 0x48, 0x54, 0x54, 0x50, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x46, 0x49, 0x4c,
0x45, 0x10, 0x02, 0x42, 0x19, 0x0a, 0x17, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x70,
0x61, 0x72, 0x61, 0x6d, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x42, 0x5c,
0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x78, 0x64, 0x73,
0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x42, 0x14, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72,
0x63, 0x65, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01,
0x5a, 0x22, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6e, 0x63,
0x66, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x67, 0x6f, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x63, 0x6f, 0x72,
0x65, 0x2f, 0x76, 0x33, 0xd2, 0xc6, 0xa4, 0xe1, 0x06, 0x02, 0x08, 0x01, 0x62, 0x06, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x33,
}
var (
file_xds_core_v3_resource_locator_proto_rawDescOnce sync.Once
file_xds_core_v3_resource_locator_proto_rawDescData = file_xds_core_v3_resource_locator_proto_rawDesc
)
func file_xds_core_v3_resource_locator_proto_rawDescGZIP() []byte {
file_xds_core_v3_resource_locator_proto_rawDescOnce.Do(func() {
file_xds_core_v3_resource_locator_proto_rawDescData = protoimpl.X.CompressGZIP(file_xds_core_v3_resource_locator_proto_rawDescData)
})
return file_xds_core_v3_resource_locator_proto_rawDescData
}
var file_xds_core_v3_resource_locator_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_xds_core_v3_resource_locator_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_xds_core_v3_resource_locator_proto_goTypes = []interface{}{
(ResourceLocator_Scheme)(0), // 0: xds.core.v3.ResourceLocator.Scheme
(*ResourceLocator)(nil), // 1: xds.core.v3.ResourceLocator
(*ResourceLocator_Directive)(nil), // 2: xds.core.v3.ResourceLocator.Directive
(*ContextParams)(nil), // 3: xds.core.v3.ContextParams
}
var file_xds_core_v3_resource_locator_proto_depIdxs = []int32{
0, // 0: xds.core.v3.ResourceLocator.scheme:type_name -> xds.core.v3.ResourceLocator.Scheme
3, // 1: xds.core.v3.ResourceLocator.exact_context:type_name -> xds.core.v3.ContextParams
2, // 2: xds.core.v3.ResourceLocator.directives:type_name -> xds.core.v3.ResourceLocator.Directive
1, // 3: xds.core.v3.ResourceLocator.Directive.alt:type_name -> xds.core.v3.ResourceLocator
4, // [4:4] is the sub-list for method output_type
4, // [4:4] is the sub-list for method input_type
4, // [4:4] is the sub-list for extension type_name
4, // [4:4] is the sub-list for extension extendee
0, // [0:4] is the sub-list for field type_name
}
func init() { file_xds_core_v3_resource_locator_proto_init() }
func file_xds_core_v3_resource_locator_proto_init() {
if File_xds_core_v3_resource_locator_proto != nil {
return
}
file_xds_core_v3_context_params_proto_init()
if !protoimpl.UnsafeEnabled {
file_xds_core_v3_resource_locator_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ResourceLocator); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_xds_core_v3_resource_locator_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ResourceLocator_Directive); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
file_xds_core_v3_resource_locator_proto_msgTypes[0].OneofWrappers = []interface{}{
(*ResourceLocator_ExactContext)(nil),
}
file_xds_core_v3_resource_locator_proto_msgTypes[1].OneofWrappers = []interface{}{
(*ResourceLocator_Directive_Alt)(nil),
(*ResourceLocator_Directive_Entry)(nil),
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_xds_core_v3_resource_locator_proto_rawDesc,
NumEnums: 1,
NumMessages: 2,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_xds_core_v3_resource_locator_proto_goTypes,
DependencyIndexes: file_xds_core_v3_resource_locator_proto_depIdxs,
EnumInfos: file_xds_core_v3_resource_locator_proto_enumTypes,
MessageInfos: file_xds_core_v3_resource_locator_proto_msgTypes,
}.Build()
File_xds_core_v3_resource_locator_proto = out.File
file_xds_core_v3_resource_locator_proto_rawDesc = nil
file_xds_core_v3_resource_locator_proto_goTypes = nil
file_xds_core_v3_resource_locator_proto_depIdxs = nil
}

View File

@@ -0,0 +1,255 @@
// Code generated by protoc-gen-validate. DO NOT EDIT.
// source: xds/core/v3/resource_locator.proto
package v3
import (
"bytes"
"errors"
"fmt"
"net"
"net/mail"
"net/url"
"regexp"
"strings"
"time"
"unicode/utf8"
"google.golang.org/protobuf/types/known/anypb"
)
// ensure the imports are used
var (
_ = bytes.MinRead
_ = errors.New("")
_ = fmt.Print
_ = utf8.UTFMax
_ = (*regexp.Regexp)(nil)
_ = (*strings.Reader)(nil)
_ = net.IPv4len
_ = time.Duration(0)
_ = (*url.URL)(nil)
_ = (*mail.Address)(nil)
_ = anypb.Any{}
)
// Validate checks the field values on ResourceLocator with the rules defined
// in the proto definition for this message. If any rules are violated, an
// error is returned.
func (m *ResourceLocator) Validate() error {
if m == nil {
return nil
}
if _, ok := ResourceLocator_Scheme_name[int32(m.GetScheme())]; !ok {
return ResourceLocatorValidationError{
field: "Scheme",
reason: "value must be one of the defined enum values",
}
}
// no validation rules for Id
// no validation rules for Authority
if utf8.RuneCountInString(m.GetResourceType()) < 1 {
return ResourceLocatorValidationError{
field: "ResourceType",
reason: "value length must be at least 1 runes",
}
}
for idx, item := range m.GetDirectives() {
_, _ = idx, item
if v, ok := interface{}(item).(interface{ Validate() error }); ok {
if err := v.Validate(); err != nil {
return ResourceLocatorValidationError{
field: fmt.Sprintf("Directives[%v]", idx),
reason: "embedded message failed validation",
cause: err,
}
}
}
}
switch m.ContextParamSpecifier.(type) {
case *ResourceLocator_ExactContext:
if v, ok := interface{}(m.GetExactContext()).(interface{ Validate() error }); ok {
if err := v.Validate(); err != nil {
return ResourceLocatorValidationError{
field: "ExactContext",
reason: "embedded message failed validation",
cause: err,
}
}
}
}
return nil
}
// ResourceLocatorValidationError is the validation error returned by
// ResourceLocator.Validate if the designated constraints aren't met.
type ResourceLocatorValidationError struct {
field string
reason string
cause error
key bool
}
// Field function returns field value.
func (e ResourceLocatorValidationError) Field() string { return e.field }
// Reason function returns reason value.
func (e ResourceLocatorValidationError) Reason() string { return e.reason }
// Cause function returns cause value.
func (e ResourceLocatorValidationError) Cause() error { return e.cause }
// Key function returns key value.
func (e ResourceLocatorValidationError) Key() bool { return e.key }
// ErrorName returns error name.
func (e ResourceLocatorValidationError) ErrorName() string { return "ResourceLocatorValidationError" }
// Error satisfies the builtin error interface
func (e ResourceLocatorValidationError) Error() string {
cause := ""
if e.cause != nil {
cause = fmt.Sprintf(" | caused by: %v", e.cause)
}
key := ""
if e.key {
key = "key for "
}
return fmt.Sprintf(
"invalid %sResourceLocator.%s: %s%s",
key,
e.field,
e.reason,
cause)
}
var _ error = ResourceLocatorValidationError{}
var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = ResourceLocatorValidationError{}
// Validate checks the field values on ResourceLocator_Directive with the rules
// defined in the proto definition for this message. If any rules are
// violated, an error is returned.
func (m *ResourceLocator_Directive) Validate() error {
if m == nil {
return nil
}
switch m.Directive.(type) {
case *ResourceLocator_Directive_Alt:
if v, ok := interface{}(m.GetAlt()).(interface{ Validate() error }); ok {
if err := v.Validate(); err != nil {
return ResourceLocator_DirectiveValidationError{
field: "Alt",
reason: "embedded message failed validation",
cause: err,
}
}
}
case *ResourceLocator_Directive_Entry:
if utf8.RuneCountInString(m.GetEntry()) < 1 {
return ResourceLocator_DirectiveValidationError{
field: "Entry",
reason: "value length must be at least 1 runes",
}
}
if !_ResourceLocator_Directive_Entry_Pattern.MatchString(m.GetEntry()) {
return ResourceLocator_DirectiveValidationError{
field: "Entry",
reason: "value does not match regex pattern \"^[0-9a-zA-Z_\\\\-\\\\./~:]+$\"",
}
}
default:
return ResourceLocator_DirectiveValidationError{
field: "Directive",
reason: "value is required",
}
}
return nil
}
// ResourceLocator_DirectiveValidationError is the validation error returned by
// ResourceLocator_Directive.Validate if the designated constraints aren't met.
type ResourceLocator_DirectiveValidationError struct {
field string
reason string
cause error
key bool
}
// Field function returns field value.
func (e ResourceLocator_DirectiveValidationError) Field() string { return e.field }
// Reason function returns reason value.
func (e ResourceLocator_DirectiveValidationError) Reason() string { return e.reason }
// Cause function returns cause value.
func (e ResourceLocator_DirectiveValidationError) Cause() error { return e.cause }
// Key function returns key value.
func (e ResourceLocator_DirectiveValidationError) Key() bool { return e.key }
// ErrorName returns error name.
func (e ResourceLocator_DirectiveValidationError) ErrorName() string {
return "ResourceLocator_DirectiveValidationError"
}
// Error satisfies the builtin error interface
func (e ResourceLocator_DirectiveValidationError) Error() string {
cause := ""
if e.cause != nil {
cause = fmt.Sprintf(" | caused by: %v", e.cause)
}
key := ""
if e.key {
key = "key for "
}
return fmt.Sprintf(
"invalid %sResourceLocator_Directive.%s: %s%s",
key,
e.field,
e.reason,
cause)
}
var _ error = ResourceLocator_DirectiveValidationError{}
var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = ResourceLocator_DirectiveValidationError{}
var _ResourceLocator_Directive_Entry_Pattern = regexp.MustCompile("^[0-9a-zA-Z_\\-\\./~:]+$")

View File

@@ -0,0 +1,195 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.25.0
// protoc v3.18.0
// source: xds/core/v3/resource_name.proto
package v3
import (
_ "github.com/cncf/xds/go/xds/annotations/v3"
_ "github.com/envoyproxy/protoc-gen-validate/validate"
proto "github.com/golang/protobuf/proto"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// This is a compile-time assertion that a sufficiently up-to-date version
// of the legacy proto package is being used.
const _ = proto.ProtoPackageIsVersion4
type ResourceName struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
Authority string `protobuf:"bytes,2,opt,name=authority,proto3" json:"authority,omitempty"`
ResourceType string `protobuf:"bytes,3,opt,name=resource_type,json=resourceType,proto3" json:"resource_type,omitempty"`
Context *ContextParams `protobuf:"bytes,4,opt,name=context,proto3" json:"context,omitempty"`
}
func (x *ResourceName) Reset() {
*x = ResourceName{}
if protoimpl.UnsafeEnabled {
mi := &file_xds_core_v3_resource_name_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ResourceName) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ResourceName) ProtoMessage() {}
func (x *ResourceName) ProtoReflect() protoreflect.Message {
mi := &file_xds_core_v3_resource_name_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ResourceName.ProtoReflect.Descriptor instead.
func (*ResourceName) Descriptor() ([]byte, []int) {
return file_xds_core_v3_resource_name_proto_rawDescGZIP(), []int{0}
}
func (x *ResourceName) GetId() string {
if x != nil {
return x.Id
}
return ""
}
func (x *ResourceName) GetAuthority() string {
if x != nil {
return x.Authority
}
return ""
}
func (x *ResourceName) GetResourceType() string {
if x != nil {
return x.ResourceType
}
return ""
}
func (x *ResourceName) GetContext() *ContextParams {
if x != nil {
return x.Context
}
return nil
}
var File_xds_core_v3_resource_name_proto protoreflect.FileDescriptor
var file_xds_core_v3_resource_name_proto_rawDesc = []byte{
0x0a, 0x1f, 0x78, 0x64, 0x73, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x65,
0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x12, 0x0b, 0x78, 0x64, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x1a, 0x1f,
0x78, 0x64, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f,
0x76, 0x33, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a,
0x20, 0x78, 0x64, 0x73, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x63, 0x6f, 0x6e,
0x74, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69,
0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa0, 0x01, 0x0a, 0x0c, 0x52,
0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69,
0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x61,
0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09,
0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x2c, 0x0a, 0x0d, 0x72, 0x65, 0x73,
0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09,
0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x6f, 0x75,
0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x34, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65,
0x78, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x63,
0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x50, 0x61,
0x72, 0x61, 0x6d, 0x73, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x42, 0x59, 0x0a,
0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x78, 0x64, 0x73, 0x2e,
0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x42, 0x11, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63,
0x65, 0x4e, 0x61, 0x6d, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x22, 0x67, 0x69,
0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6e, 0x63, 0x66, 0x2f, 0x78, 0x64,
0x73, 0x2f, 0x67, 0x6f, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33,
0xd2, 0xc6, 0xa4, 0xe1, 0x06, 0x02, 0x08, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_xds_core_v3_resource_name_proto_rawDescOnce sync.Once
file_xds_core_v3_resource_name_proto_rawDescData = file_xds_core_v3_resource_name_proto_rawDesc
)
func file_xds_core_v3_resource_name_proto_rawDescGZIP() []byte {
file_xds_core_v3_resource_name_proto_rawDescOnce.Do(func() {
file_xds_core_v3_resource_name_proto_rawDescData = protoimpl.X.CompressGZIP(file_xds_core_v3_resource_name_proto_rawDescData)
})
return file_xds_core_v3_resource_name_proto_rawDescData
}
var file_xds_core_v3_resource_name_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_xds_core_v3_resource_name_proto_goTypes = []interface{}{
(*ResourceName)(nil), // 0: xds.core.v3.ResourceName
(*ContextParams)(nil), // 1: xds.core.v3.ContextParams
}
var file_xds_core_v3_resource_name_proto_depIdxs = []int32{
1, // 0: xds.core.v3.ResourceName.context:type_name -> xds.core.v3.ContextParams
1, // [1:1] is the sub-list for method output_type
1, // [1:1] is the sub-list for method input_type
1, // [1:1] is the sub-list for extension type_name
1, // [1:1] is the sub-list for extension extendee
0, // [0:1] is the sub-list for field type_name
}
func init() { file_xds_core_v3_resource_name_proto_init() }
func file_xds_core_v3_resource_name_proto_init() {
if File_xds_core_v3_resource_name_proto != nil {
return
}
file_xds_core_v3_context_params_proto_init()
if !protoimpl.UnsafeEnabled {
file_xds_core_v3_resource_name_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ResourceName); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_xds_core_v3_resource_name_proto_rawDesc,
NumEnums: 0,
NumMessages: 1,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_xds_core_v3_resource_name_proto_goTypes,
DependencyIndexes: file_xds_core_v3_resource_name_proto_depIdxs,
MessageInfos: file_xds_core_v3_resource_name_proto_msgTypes,
}.Build()
File_xds_core_v3_resource_name_proto = out.File
file_xds_core_v3_resource_name_proto_rawDesc = nil
file_xds_core_v3_resource_name_proto_goTypes = nil
file_xds_core_v3_resource_name_proto_depIdxs = nil
}

View File

@@ -0,0 +1,120 @@
// Code generated by protoc-gen-validate. DO NOT EDIT.
// source: xds/core/v3/resource_name.proto
package v3
import (
"bytes"
"errors"
"fmt"
"net"
"net/mail"
"net/url"
"regexp"
"strings"
"time"
"unicode/utf8"
"google.golang.org/protobuf/types/known/anypb"
)
// ensure the imports are used
var (
_ = bytes.MinRead
_ = errors.New("")
_ = fmt.Print
_ = utf8.UTFMax
_ = (*regexp.Regexp)(nil)
_ = (*strings.Reader)(nil)
_ = net.IPv4len
_ = time.Duration(0)
_ = (*url.URL)(nil)
_ = (*mail.Address)(nil)
_ = anypb.Any{}
)
// Validate checks the field values on ResourceName with the rules defined in
// the proto definition for this message. If any rules are violated, an error
// is returned.
func (m *ResourceName) Validate() error {
if m == nil {
return nil
}
// no validation rules for Id
// no validation rules for Authority
if utf8.RuneCountInString(m.GetResourceType()) < 1 {
return ResourceNameValidationError{
field: "ResourceType",
reason: "value length must be at least 1 runes",
}
}
if v, ok := interface{}(m.GetContext()).(interface{ Validate() error }); ok {
if err := v.Validate(); err != nil {
return ResourceNameValidationError{
field: "Context",
reason: "embedded message failed validation",
cause: err,
}
}
}
return nil
}
// ResourceNameValidationError is the validation error returned by
// ResourceName.Validate if the designated constraints aren't met.
type ResourceNameValidationError struct {
field string
reason string
cause error
key bool
}
// Field function returns field value.
func (e ResourceNameValidationError) Field() string { return e.field }
// Reason function returns reason value.
func (e ResourceNameValidationError) Reason() string { return e.reason }
// Cause function returns cause value.
func (e ResourceNameValidationError) Cause() error { return e.cause }
// Key function returns key value.
func (e ResourceNameValidationError) Key() bool { return e.key }
// ErrorName returns error name.
func (e ResourceNameValidationError) ErrorName() string { return "ResourceNameValidationError" }
// Error satisfies the builtin error interface
func (e ResourceNameValidationError) Error() string {
cause := ""
if e.cause != nil {
cause = fmt.Sprintf(" | caused by: %v", e.cause)
}
key := ""
if e.key {
key = "key for "
}
return fmt.Sprintf(
"invalid %sResourceName.%s: %s%s",
key,
e.field,
e.reason,
cause)
}
var _ error = ResourceNameValidationError{}
var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = ResourceNameValidationError{}

View File

@@ -0,0 +1,167 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.25.0
// protoc v3.18.0
// source: xds/type/matcher/v3/cel.proto
package v3
import (
_ "github.com/cncf/xds/go/xds/annotations/v3"
v3 "github.com/cncf/xds/go/xds/type/v3"
_ "github.com/envoyproxy/protoc-gen-validate/validate"
proto "github.com/golang/protobuf/proto"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// This is a compile-time assertion that a sufficiently up-to-date version
// of the legacy proto package is being used.
const _ = proto.ProtoPackageIsVersion4
type CelMatcher struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
ExprMatch *v3.CelExpression `protobuf:"bytes,1,opt,name=expr_match,json=exprMatch,proto3" json:"expr_match,omitempty"`
}
func (x *CelMatcher) Reset() {
*x = CelMatcher{}
if protoimpl.UnsafeEnabled {
mi := &file_xds_type_matcher_v3_cel_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CelMatcher) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CelMatcher) ProtoMessage() {}
func (x *CelMatcher) ProtoReflect() protoreflect.Message {
mi := &file_xds_type_matcher_v3_cel_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CelMatcher.ProtoReflect.Descriptor instead.
func (*CelMatcher) Descriptor() ([]byte, []int) {
return file_xds_type_matcher_v3_cel_proto_rawDescGZIP(), []int{0}
}
func (x *CelMatcher) GetExprMatch() *v3.CelExpression {
if x != nil {
return x.ExprMatch
}
return nil
}
var File_xds_type_matcher_v3_cel_proto protoreflect.FileDescriptor
var file_xds_type_matcher_v3_cel_proto_rawDesc = []byte{
0x0a, 0x1d, 0x78, 0x64, 0x73, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68,
0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x63, 0x65, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12,
0x13, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65,
0x72, 0x2e, 0x76, 0x33, 0x1a, 0x1f, 0x78, 0x64, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x33, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x15, 0x78, 0x64, 0x73, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f,
0x76, 0x33, 0x2f, 0x63, 0x65, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61,
0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x51, 0x0a, 0x0a, 0x43, 0x65, 0x6c, 0x4d, 0x61, 0x74, 0x63,
0x68, 0x65, 0x72, 0x12, 0x43, 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x72, 0x5f, 0x6d, 0x61, 0x74, 0x63,
0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79,
0x70, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x65, 0x6c, 0x45, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73,
0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x09, 0x65,
0x78, 0x70, 0x72, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x60, 0x0a, 0x1e, 0x63, 0x6f, 0x6d, 0x2e,
0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e,
0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x42, 0x08, 0x43, 0x65, 0x6c, 0x50,
0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63,
0x6f, 0x6d, 0x2f, 0x63, 0x6e, 0x63, 0x66, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x67, 0x6f, 0x2f, 0x78,
0x64, 0x73, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f,
0x76, 0x33, 0xd2, 0xc6, 0xa4, 0xe1, 0x06, 0x02, 0x08, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x33,
}
var (
file_xds_type_matcher_v3_cel_proto_rawDescOnce sync.Once
file_xds_type_matcher_v3_cel_proto_rawDescData = file_xds_type_matcher_v3_cel_proto_rawDesc
)
func file_xds_type_matcher_v3_cel_proto_rawDescGZIP() []byte {
file_xds_type_matcher_v3_cel_proto_rawDescOnce.Do(func() {
file_xds_type_matcher_v3_cel_proto_rawDescData = protoimpl.X.CompressGZIP(file_xds_type_matcher_v3_cel_proto_rawDescData)
})
return file_xds_type_matcher_v3_cel_proto_rawDescData
}
var file_xds_type_matcher_v3_cel_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_xds_type_matcher_v3_cel_proto_goTypes = []interface{}{
(*CelMatcher)(nil), // 0: xds.type.matcher.v3.CelMatcher
(*v3.CelExpression)(nil), // 1: xds.type.v3.CelExpression
}
var file_xds_type_matcher_v3_cel_proto_depIdxs = []int32{
1, // 0: xds.type.matcher.v3.CelMatcher.expr_match:type_name -> xds.type.v3.CelExpression
1, // [1:1] is the sub-list for method output_type
1, // [1:1] is the sub-list for method input_type
1, // [1:1] is the sub-list for extension type_name
1, // [1:1] is the sub-list for extension extendee
0, // [0:1] is the sub-list for field type_name
}
func init() { file_xds_type_matcher_v3_cel_proto_init() }
func file_xds_type_matcher_v3_cel_proto_init() {
if File_xds_type_matcher_v3_cel_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_xds_type_matcher_v3_cel_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CelMatcher); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_xds_type_matcher_v3_cel_proto_rawDesc,
NumEnums: 0,
NumMessages: 1,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_xds_type_matcher_v3_cel_proto_goTypes,
DependencyIndexes: file_xds_type_matcher_v3_cel_proto_depIdxs,
MessageInfos: file_xds_type_matcher_v3_cel_proto_msgTypes,
}.Build()
File_xds_type_matcher_v3_cel_proto = out.File
file_xds_type_matcher_v3_cel_proto_rawDesc = nil
file_xds_type_matcher_v3_cel_proto_goTypes = nil
file_xds_type_matcher_v3_cel_proto_depIdxs = nil
}

View File

@@ -0,0 +1,115 @@
// Code generated by protoc-gen-validate. DO NOT EDIT.
// source: xds/type/matcher/v3/cel.proto
package v3
import (
"bytes"
"errors"
"fmt"
"net"
"net/mail"
"net/url"
"regexp"
"strings"
"time"
"unicode/utf8"
"google.golang.org/protobuf/types/known/anypb"
)
// ensure the imports are used
var (
_ = bytes.MinRead
_ = errors.New("")
_ = fmt.Print
_ = utf8.UTFMax
_ = (*regexp.Regexp)(nil)
_ = (*strings.Reader)(nil)
_ = net.IPv4len
_ = time.Duration(0)
_ = (*url.URL)(nil)
_ = (*mail.Address)(nil)
_ = anypb.Any{}
)
// Validate checks the field values on CelMatcher with the rules defined in the
// proto definition for this message. If any rules are violated, an error is returned.
func (m *CelMatcher) Validate() error {
if m == nil {
return nil
}
if m.GetExprMatch() == nil {
return CelMatcherValidationError{
field: "ExprMatch",
reason: "value is required",
}
}
if v, ok := interface{}(m.GetExprMatch()).(interface{ Validate() error }); ok {
if err := v.Validate(); err != nil {
return CelMatcherValidationError{
field: "ExprMatch",
reason: "embedded message failed validation",
cause: err,
}
}
}
return nil
}
// CelMatcherValidationError is the validation error returned by
// CelMatcher.Validate if the designated constraints aren't met.
type CelMatcherValidationError struct {
field string
reason string
cause error
key bool
}
// Field function returns field value.
func (e CelMatcherValidationError) Field() string { return e.field }
// Reason function returns reason value.
func (e CelMatcherValidationError) Reason() string { return e.reason }
// Cause function returns cause value.
func (e CelMatcherValidationError) Cause() error { return e.cause }
// Key function returns key value.
func (e CelMatcherValidationError) Key() bool { return e.key }
// ErrorName returns error name.
func (e CelMatcherValidationError) ErrorName() string { return "CelMatcherValidationError" }
// Error satisfies the builtin error interface
func (e CelMatcherValidationError) Error() string {
cause := ""
if e.cause != nil {
cause = fmt.Sprintf(" | caused by: %v", e.cause)
}
key := ""
if e.key {
key = "key for "
}
return fmt.Sprintf(
"invalid %sCelMatcher.%s: %s%s",
key,
e.field,
e.reason,
cause)
}
var _ error = CelMatcherValidationError{}
var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = CelMatcherValidationError{}

View File

@@ -0,0 +1,247 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.25.0
// protoc v3.18.0
// source: xds/type/matcher/v3/domain.proto
package v3
import (
_ "github.com/cncf/xds/go/xds/annotations/v3"
_ "github.com/envoyproxy/protoc-gen-validate/validate"
proto "github.com/golang/protobuf/proto"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// This is a compile-time assertion that a sufficiently up-to-date version
// of the legacy proto package is being used.
const _ = proto.ProtoPackageIsVersion4
type ServerNameMatcher struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
DomainMatchers []*ServerNameMatcher_DomainMatcher `protobuf:"bytes,1,rep,name=domain_matchers,json=domainMatchers,proto3" json:"domain_matchers,omitempty"`
}
func (x *ServerNameMatcher) Reset() {
*x = ServerNameMatcher{}
if protoimpl.UnsafeEnabled {
mi := &file_xds_type_matcher_v3_domain_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ServerNameMatcher) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ServerNameMatcher) ProtoMessage() {}
func (x *ServerNameMatcher) ProtoReflect() protoreflect.Message {
mi := &file_xds_type_matcher_v3_domain_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ServerNameMatcher.ProtoReflect.Descriptor instead.
func (*ServerNameMatcher) Descriptor() ([]byte, []int) {
return file_xds_type_matcher_v3_domain_proto_rawDescGZIP(), []int{0}
}
func (x *ServerNameMatcher) GetDomainMatchers() []*ServerNameMatcher_DomainMatcher {
if x != nil {
return x.DomainMatchers
}
return nil
}
type ServerNameMatcher_DomainMatcher struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Domains []string `protobuf:"bytes,1,rep,name=domains,proto3" json:"domains,omitempty"`
OnMatch *Matcher_OnMatch `protobuf:"bytes,2,opt,name=on_match,json=onMatch,proto3" json:"on_match,omitempty"`
}
func (x *ServerNameMatcher_DomainMatcher) Reset() {
*x = ServerNameMatcher_DomainMatcher{}
if protoimpl.UnsafeEnabled {
mi := &file_xds_type_matcher_v3_domain_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ServerNameMatcher_DomainMatcher) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ServerNameMatcher_DomainMatcher) ProtoMessage() {}
func (x *ServerNameMatcher_DomainMatcher) ProtoReflect() protoreflect.Message {
mi := &file_xds_type_matcher_v3_domain_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ServerNameMatcher_DomainMatcher.ProtoReflect.Descriptor instead.
func (*ServerNameMatcher_DomainMatcher) Descriptor() ([]byte, []int) {
return file_xds_type_matcher_v3_domain_proto_rawDescGZIP(), []int{0, 0}
}
func (x *ServerNameMatcher_DomainMatcher) GetDomains() []string {
if x != nil {
return x.Domains
}
return nil
}
func (x *ServerNameMatcher_DomainMatcher) GetOnMatch() *Matcher_OnMatch {
if x != nil {
return x.OnMatch
}
return nil
}
var File_xds_type_matcher_v3_domain_proto protoreflect.FileDescriptor
var file_xds_type_matcher_v3_domain_proto_rawDesc = []byte{
0x0a, 0x20, 0x78, 0x64, 0x73, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68,
0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x12, 0x13, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74,
0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x1a, 0x1f, 0x78, 0x64, 0x73, 0x2f, 0x61, 0x6e, 0x6e,
0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x33, 0x2f, 0x73, 0x74, 0x61, 0x74,
0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x78, 0x64, 0x73, 0x2f, 0x74, 0x79,
0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x6d, 0x61,
0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c,
0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x22, 0xe8, 0x01, 0x0a, 0x11, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4e,
0x61, 0x6d, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, 0x5d, 0x0a, 0x0f, 0x64, 0x6f,
0x6d, 0x61, 0x69, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20,
0x03, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d,
0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72,
0x4e, 0x61, 0x6d, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x44, 0x6f, 0x6d, 0x61,
0x69, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x52, 0x0e, 0x64, 0x6f, 0x6d, 0x61, 0x69,
0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x73, 0x1a, 0x74, 0x0a, 0x0d, 0x44, 0x6f, 0x6d,
0x61, 0x69, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, 0x22, 0x0a, 0x07, 0x64, 0x6f,
0x6d, 0x61, 0x69, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x42, 0x08, 0xfa, 0x42, 0x05,
0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x07, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x73, 0x12, 0x3f,
0x0a, 0x08, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x24, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63,
0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x4f,
0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x52, 0x07, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x42,
0x6e, 0x0a, 0x1e, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x78, 0x64,
0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76,
0x33, 0x42, 0x16, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x4d, 0x61, 0x74,
0x63, 0x68, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2a, 0x67, 0x69, 0x74,
0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6e, 0x63, 0x66, 0x2f, 0x78, 0x64, 0x73,
0x2f, 0x67, 0x6f, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74,
0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x33, 0xd2, 0xc6, 0xa4, 0xe1, 0x06, 0x02, 0x08, 0x01, 0x62,
0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_xds_type_matcher_v3_domain_proto_rawDescOnce sync.Once
file_xds_type_matcher_v3_domain_proto_rawDescData = file_xds_type_matcher_v3_domain_proto_rawDesc
)
func file_xds_type_matcher_v3_domain_proto_rawDescGZIP() []byte {
file_xds_type_matcher_v3_domain_proto_rawDescOnce.Do(func() {
file_xds_type_matcher_v3_domain_proto_rawDescData = protoimpl.X.CompressGZIP(file_xds_type_matcher_v3_domain_proto_rawDescData)
})
return file_xds_type_matcher_v3_domain_proto_rawDescData
}
var file_xds_type_matcher_v3_domain_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_xds_type_matcher_v3_domain_proto_goTypes = []interface{}{
(*ServerNameMatcher)(nil), // 0: xds.type.matcher.v3.ServerNameMatcher
(*ServerNameMatcher_DomainMatcher)(nil), // 1: xds.type.matcher.v3.ServerNameMatcher.DomainMatcher
(*Matcher_OnMatch)(nil), // 2: xds.type.matcher.v3.Matcher.OnMatch
}
var file_xds_type_matcher_v3_domain_proto_depIdxs = []int32{
1, // 0: xds.type.matcher.v3.ServerNameMatcher.domain_matchers:type_name -> xds.type.matcher.v3.ServerNameMatcher.DomainMatcher
2, // 1: xds.type.matcher.v3.ServerNameMatcher.DomainMatcher.on_match:type_name -> xds.type.matcher.v3.Matcher.OnMatch
2, // [2:2] is the sub-list for method output_type
2, // [2:2] is the sub-list for method input_type
2, // [2:2] is the sub-list for extension type_name
2, // [2:2] is the sub-list for extension extendee
0, // [0:2] is the sub-list for field type_name
}
func init() { file_xds_type_matcher_v3_domain_proto_init() }
func file_xds_type_matcher_v3_domain_proto_init() {
if File_xds_type_matcher_v3_domain_proto != nil {
return
}
file_xds_type_matcher_v3_matcher_proto_init()
if !protoimpl.UnsafeEnabled {
file_xds_type_matcher_v3_domain_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ServerNameMatcher); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_xds_type_matcher_v3_domain_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ServerNameMatcher_DomainMatcher); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_xds_type_matcher_v3_domain_proto_rawDesc,
NumEnums: 0,
NumMessages: 2,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_xds_type_matcher_v3_domain_proto_goTypes,
DependencyIndexes: file_xds_type_matcher_v3_domain_proto_depIdxs,
MessageInfos: file_xds_type_matcher_v3_domain_proto_msgTypes,
}.Build()
File_xds_type_matcher_v3_domain_proto = out.File
file_xds_type_matcher_v3_domain_proto_rawDesc = nil
file_xds_type_matcher_v3_domain_proto_goTypes = nil
file_xds_type_matcher_v3_domain_proto_depIdxs = nil
}

View File

@@ -0,0 +1,201 @@
// Code generated by protoc-gen-validate. DO NOT EDIT.
// source: xds/type/matcher/v3/domain.proto
package v3
import (
"bytes"
"errors"
"fmt"
"net"
"net/mail"
"net/url"
"regexp"
"strings"
"time"
"unicode/utf8"
"google.golang.org/protobuf/types/known/anypb"
)
// ensure the imports are used
var (
_ = bytes.MinRead
_ = errors.New("")
_ = fmt.Print
_ = utf8.UTFMax
_ = (*regexp.Regexp)(nil)
_ = (*strings.Reader)(nil)
_ = net.IPv4len
_ = time.Duration(0)
_ = (*url.URL)(nil)
_ = (*mail.Address)(nil)
_ = anypb.Any{}
)
// Validate checks the field values on ServerNameMatcher with the rules defined
// in the proto definition for this message. If any rules are violated, an
// error is returned.
func (m *ServerNameMatcher) Validate() error {
if m == nil {
return nil
}
for idx, item := range m.GetDomainMatchers() {
_, _ = idx, item
if v, ok := interface{}(item).(interface{ Validate() error }); ok {
if err := v.Validate(); err != nil {
return ServerNameMatcherValidationError{
field: fmt.Sprintf("DomainMatchers[%v]", idx),
reason: "embedded message failed validation",
cause: err,
}
}
}
}
return nil
}
// ServerNameMatcherValidationError is the validation error returned by
// ServerNameMatcher.Validate if the designated constraints aren't met.
type ServerNameMatcherValidationError struct {
field string
reason string
cause error
key bool
}
// Field function returns field value.
func (e ServerNameMatcherValidationError) Field() string { return e.field }
// Reason function returns reason value.
func (e ServerNameMatcherValidationError) Reason() string { return e.reason }
// Cause function returns cause value.
func (e ServerNameMatcherValidationError) Cause() error { return e.cause }
// Key function returns key value.
func (e ServerNameMatcherValidationError) Key() bool { return e.key }
// ErrorName returns error name.
func (e ServerNameMatcherValidationError) ErrorName() string {
return "ServerNameMatcherValidationError"
}
// Error satisfies the builtin error interface
func (e ServerNameMatcherValidationError) Error() string {
cause := ""
if e.cause != nil {
cause = fmt.Sprintf(" | caused by: %v", e.cause)
}
key := ""
if e.key {
key = "key for "
}
return fmt.Sprintf(
"invalid %sServerNameMatcher.%s: %s%s",
key,
e.field,
e.reason,
cause)
}
var _ error = ServerNameMatcherValidationError{}
var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = ServerNameMatcherValidationError{}
// Validate checks the field values on ServerNameMatcher_DomainMatcher with the
// rules defined in the proto definition for this message. If any rules are
// violated, an error is returned.
func (m *ServerNameMatcher_DomainMatcher) Validate() error {
if m == nil {
return nil
}
if len(m.GetDomains()) < 1 {
return ServerNameMatcher_DomainMatcherValidationError{
field: "Domains",
reason: "value must contain at least 1 item(s)",
}
}
if v, ok := interface{}(m.GetOnMatch()).(interface{ Validate() error }); ok {
if err := v.Validate(); err != nil {
return ServerNameMatcher_DomainMatcherValidationError{
field: "OnMatch",
reason: "embedded message failed validation",
cause: err,
}
}
}
return nil
}
// ServerNameMatcher_DomainMatcherValidationError is the validation error
// returned by ServerNameMatcher_DomainMatcher.Validate if the designated
// constraints aren't met.
type ServerNameMatcher_DomainMatcherValidationError struct {
field string
reason string
cause error
key bool
}
// Field function returns field value.
func (e ServerNameMatcher_DomainMatcherValidationError) Field() string { return e.field }
// Reason function returns reason value.
func (e ServerNameMatcher_DomainMatcherValidationError) Reason() string { return e.reason }
// Cause function returns cause value.
func (e ServerNameMatcher_DomainMatcherValidationError) Cause() error { return e.cause }
// Key function returns key value.
func (e ServerNameMatcher_DomainMatcherValidationError) Key() bool { return e.key }
// ErrorName returns error name.
func (e ServerNameMatcher_DomainMatcherValidationError) ErrorName() string {
return "ServerNameMatcher_DomainMatcherValidationError"
}
// Error satisfies the builtin error interface
func (e ServerNameMatcher_DomainMatcherValidationError) Error() string {
cause := ""
if e.cause != nil {
cause = fmt.Sprintf(" | caused by: %v", e.cause)
}
key := ""
if e.key {
key = "key for "
}
return fmt.Sprintf(
"invalid %sServerNameMatcher_DomainMatcher.%s: %s%s",
key,
e.field,
e.reason,
cause)
}
var _ error = ServerNameMatcher_DomainMatcherValidationError{}
var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = ServerNameMatcher_DomainMatcherValidationError{}

View File

@@ -0,0 +1,148 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.25.0
// protoc v3.18.0
// source: xds/type/matcher/v3/http_inputs.proto
package v3
import (
_ "github.com/cncf/xds/go/xds/annotations/v3"
proto "github.com/golang/protobuf/proto"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// This is a compile-time assertion that a sufficiently up-to-date version
// of the legacy proto package is being used.
const _ = proto.ProtoPackageIsVersion4
type HttpAttributesCelMatchInput struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *HttpAttributesCelMatchInput) Reset() {
*x = HttpAttributesCelMatchInput{}
if protoimpl.UnsafeEnabled {
mi := &file_xds_type_matcher_v3_http_inputs_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *HttpAttributesCelMatchInput) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*HttpAttributesCelMatchInput) ProtoMessage() {}
func (x *HttpAttributesCelMatchInput) ProtoReflect() protoreflect.Message {
mi := &file_xds_type_matcher_v3_http_inputs_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use HttpAttributesCelMatchInput.ProtoReflect.Descriptor instead.
func (*HttpAttributesCelMatchInput) Descriptor() ([]byte, []int) {
return file_xds_type_matcher_v3_http_inputs_proto_rawDescGZIP(), []int{0}
}
var File_xds_type_matcher_v3_http_inputs_proto protoreflect.FileDescriptor
var file_xds_type_matcher_v3_http_inputs_proto_rawDesc = []byte{
0x0a, 0x25, 0x78, 0x64, 0x73, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68,
0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x69, 0x6e, 0x70, 0x75, 0x74,
0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x13, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70,
0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x1a, 0x1f, 0x78, 0x64,
0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x33,
0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x1d, 0x0a,
0x1b, 0x48, 0x74, 0x74, 0x70, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x43,
0x65, 0x6c, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x42, 0x67, 0x0a, 0x1e,
0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74,
0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x42, 0x0f,
0x48, 0x74, 0x74, 0x70, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50,
0x01, 0x5a, 0x2a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6e,
0x63, 0x66, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x67, 0x6f, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x74, 0x79,
0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x33, 0xd2, 0xc6, 0xa4,
0xe1, 0x06, 0x02, 0x08, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_xds_type_matcher_v3_http_inputs_proto_rawDescOnce sync.Once
file_xds_type_matcher_v3_http_inputs_proto_rawDescData = file_xds_type_matcher_v3_http_inputs_proto_rawDesc
)
func file_xds_type_matcher_v3_http_inputs_proto_rawDescGZIP() []byte {
file_xds_type_matcher_v3_http_inputs_proto_rawDescOnce.Do(func() {
file_xds_type_matcher_v3_http_inputs_proto_rawDescData = protoimpl.X.CompressGZIP(file_xds_type_matcher_v3_http_inputs_proto_rawDescData)
})
return file_xds_type_matcher_v3_http_inputs_proto_rawDescData
}
var file_xds_type_matcher_v3_http_inputs_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_xds_type_matcher_v3_http_inputs_proto_goTypes = []interface{}{
(*HttpAttributesCelMatchInput)(nil), // 0: xds.type.matcher.v3.HttpAttributesCelMatchInput
}
var file_xds_type_matcher_v3_http_inputs_proto_depIdxs = []int32{
0, // [0:0] is the sub-list for method output_type
0, // [0:0] is the sub-list for method input_type
0, // [0:0] is the sub-list for extension type_name
0, // [0:0] is the sub-list for extension extendee
0, // [0:0] is the sub-list for field type_name
}
func init() { file_xds_type_matcher_v3_http_inputs_proto_init() }
func file_xds_type_matcher_v3_http_inputs_proto_init() {
if File_xds_type_matcher_v3_http_inputs_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_xds_type_matcher_v3_http_inputs_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*HttpAttributesCelMatchInput); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_xds_type_matcher_v3_http_inputs_proto_rawDesc,
NumEnums: 0,
NumMessages: 1,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_xds_type_matcher_v3_http_inputs_proto_goTypes,
DependencyIndexes: file_xds_type_matcher_v3_http_inputs_proto_depIdxs,
MessageInfos: file_xds_type_matcher_v3_http_inputs_proto_msgTypes,
}.Build()
File_xds_type_matcher_v3_http_inputs_proto = out.File
file_xds_type_matcher_v3_http_inputs_proto_rawDesc = nil
file_xds_type_matcher_v3_http_inputs_proto_goTypes = nil
file_xds_type_matcher_v3_http_inputs_proto_depIdxs = nil
}

View File

@@ -0,0 +1,102 @@
// Code generated by protoc-gen-validate. DO NOT EDIT.
// source: xds/type/matcher/v3/http_inputs.proto
package v3
import (
"bytes"
"errors"
"fmt"
"net"
"net/mail"
"net/url"
"regexp"
"strings"
"time"
"unicode/utf8"
"google.golang.org/protobuf/types/known/anypb"
)
// ensure the imports are used
var (
_ = bytes.MinRead
_ = errors.New("")
_ = fmt.Print
_ = utf8.UTFMax
_ = (*regexp.Regexp)(nil)
_ = (*strings.Reader)(nil)
_ = net.IPv4len
_ = time.Duration(0)
_ = (*url.URL)(nil)
_ = (*mail.Address)(nil)
_ = anypb.Any{}
)
// Validate checks the field values on HttpAttributesCelMatchInput with the
// rules defined in the proto definition for this message. If any rules are
// violated, an error is returned.
func (m *HttpAttributesCelMatchInput) Validate() error {
if m == nil {
return nil
}
return nil
}
// HttpAttributesCelMatchInputValidationError is the validation error returned
// by HttpAttributesCelMatchInput.Validate if the designated constraints
// aren't met.
type HttpAttributesCelMatchInputValidationError struct {
field string
reason string
cause error
key bool
}
// Field function returns field value.
func (e HttpAttributesCelMatchInputValidationError) Field() string { return e.field }
// Reason function returns reason value.
func (e HttpAttributesCelMatchInputValidationError) Reason() string { return e.reason }
// Cause function returns cause value.
func (e HttpAttributesCelMatchInputValidationError) Cause() error { return e.cause }
// Key function returns key value.
func (e HttpAttributesCelMatchInputValidationError) Key() bool { return e.key }
// ErrorName returns error name.
func (e HttpAttributesCelMatchInputValidationError) ErrorName() string {
return "HttpAttributesCelMatchInputValidationError"
}
// Error satisfies the builtin error interface
func (e HttpAttributesCelMatchInputValidationError) Error() string {
cause := ""
if e.cause != nil {
cause = fmt.Sprintf(" | caused by: %v", e.cause)
}
key := ""
if e.key {
key = "key for "
}
return fmt.Sprintf(
"invalid %sHttpAttributesCelMatchInput.%s: %s%s",
key,
e.field,
e.reason,
cause)
}
var _ error = HttpAttributesCelMatchInputValidationError{}
var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = HttpAttributesCelMatchInputValidationError{}

View File

@@ -0,0 +1,261 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.25.0
// protoc v3.18.0
// source: xds/type/matcher/v3/ip.proto
package v3
import (
_ "github.com/cncf/xds/go/xds/annotations/v3"
v3 "github.com/cncf/xds/go/xds/core/v3"
_ "github.com/envoyproxy/protoc-gen-validate/validate"
proto "github.com/golang/protobuf/proto"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// This is a compile-time assertion that a sufficiently up-to-date version
// of the legacy proto package is being used.
const _ = proto.ProtoPackageIsVersion4
type IPMatcher struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
RangeMatchers []*IPMatcher_IPRangeMatcher `protobuf:"bytes,1,rep,name=range_matchers,json=rangeMatchers,proto3" json:"range_matchers,omitempty"`
}
func (x *IPMatcher) Reset() {
*x = IPMatcher{}
if protoimpl.UnsafeEnabled {
mi := &file_xds_type_matcher_v3_ip_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *IPMatcher) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*IPMatcher) ProtoMessage() {}
func (x *IPMatcher) ProtoReflect() protoreflect.Message {
mi := &file_xds_type_matcher_v3_ip_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use IPMatcher.ProtoReflect.Descriptor instead.
func (*IPMatcher) Descriptor() ([]byte, []int) {
return file_xds_type_matcher_v3_ip_proto_rawDescGZIP(), []int{0}
}
func (x *IPMatcher) GetRangeMatchers() []*IPMatcher_IPRangeMatcher {
if x != nil {
return x.RangeMatchers
}
return nil
}
type IPMatcher_IPRangeMatcher struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Ranges []*v3.CidrRange `protobuf:"bytes,1,rep,name=ranges,proto3" json:"ranges,omitempty"`
OnMatch *Matcher_OnMatch `protobuf:"bytes,2,opt,name=on_match,json=onMatch,proto3" json:"on_match,omitempty"`
Exclusive bool `protobuf:"varint,3,opt,name=exclusive,proto3" json:"exclusive,omitempty"`
}
func (x *IPMatcher_IPRangeMatcher) Reset() {
*x = IPMatcher_IPRangeMatcher{}
if protoimpl.UnsafeEnabled {
mi := &file_xds_type_matcher_v3_ip_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *IPMatcher_IPRangeMatcher) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*IPMatcher_IPRangeMatcher) ProtoMessage() {}
func (x *IPMatcher_IPRangeMatcher) ProtoReflect() protoreflect.Message {
mi := &file_xds_type_matcher_v3_ip_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use IPMatcher_IPRangeMatcher.ProtoReflect.Descriptor instead.
func (*IPMatcher_IPRangeMatcher) Descriptor() ([]byte, []int) {
return file_xds_type_matcher_v3_ip_proto_rawDescGZIP(), []int{0, 0}
}
func (x *IPMatcher_IPRangeMatcher) GetRanges() []*v3.CidrRange {
if x != nil {
return x.Ranges
}
return nil
}
func (x *IPMatcher_IPRangeMatcher) GetOnMatch() *Matcher_OnMatch {
if x != nil {
return x.OnMatch
}
return nil
}
func (x *IPMatcher_IPRangeMatcher) GetExclusive() bool {
if x != nil {
return x.Exclusive
}
return false
}
var File_xds_type_matcher_v3_ip_proto protoreflect.FileDescriptor
var file_xds_type_matcher_v3_ip_proto_rawDesc = []byte{
0x0a, 0x1c, 0x78, 0x64, 0x73, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68,
0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x69, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x13,
0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72,
0x2e, 0x76, 0x33, 0x1a, 0x1f, 0x78, 0x64, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x33, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x16, 0x78, 0x64, 0x73, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76,
0x33, 0x2f, 0x63, 0x69, 0x64, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x78, 0x64,
0x73, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76,
0x33, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a,
0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61,
0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x8d, 0x02, 0x0a, 0x09, 0x49, 0x50, 0x4d,
0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, 0x54, 0x0a, 0x0e, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x5f,
0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d,
0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65,
0x72, 0x2e, 0x76, 0x33, 0x2e, 0x49, 0x50, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x49,
0x50, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x52, 0x0d, 0x72,
0x61, 0x6e, 0x67, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x73, 0x1a, 0xa9, 0x01, 0x0a,
0x0e, 0x49, 0x50, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12,
0x38, 0x0a, 0x06, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32,
0x16, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x69,
0x64, 0x72, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08,
0x01, 0x52, 0x06, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x12, 0x3f, 0x0a, 0x08, 0x6f, 0x6e, 0x5f,
0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x78, 0x64,
0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76,
0x33, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x4f, 0x6e, 0x4d, 0x61, 0x74, 0x63,
0x68, 0x52, 0x07, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x1c, 0x0a, 0x09, 0x65, 0x78,
0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x65,
0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x42, 0x66, 0x0a, 0x1e, 0x63, 0x6f, 0x6d, 0x2e,
0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e,
0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x42, 0x0e, 0x49, 0x50, 0x4d, 0x61,
0x74, 0x63, 0x68, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2a, 0x67, 0x69,
0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6e, 0x63, 0x66, 0x2f, 0x78, 0x64,
0x73, 0x2f, 0x67, 0x6f, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61,
0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x33, 0xd2, 0xc6, 0xa4, 0xe1, 0x06, 0x02, 0x08, 0x01,
0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_xds_type_matcher_v3_ip_proto_rawDescOnce sync.Once
file_xds_type_matcher_v3_ip_proto_rawDescData = file_xds_type_matcher_v3_ip_proto_rawDesc
)
func file_xds_type_matcher_v3_ip_proto_rawDescGZIP() []byte {
file_xds_type_matcher_v3_ip_proto_rawDescOnce.Do(func() {
file_xds_type_matcher_v3_ip_proto_rawDescData = protoimpl.X.CompressGZIP(file_xds_type_matcher_v3_ip_proto_rawDescData)
})
return file_xds_type_matcher_v3_ip_proto_rawDescData
}
var file_xds_type_matcher_v3_ip_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_xds_type_matcher_v3_ip_proto_goTypes = []interface{}{
(*IPMatcher)(nil), // 0: xds.type.matcher.v3.IPMatcher
(*IPMatcher_IPRangeMatcher)(nil), // 1: xds.type.matcher.v3.IPMatcher.IPRangeMatcher
(*v3.CidrRange)(nil), // 2: xds.core.v3.CidrRange
(*Matcher_OnMatch)(nil), // 3: xds.type.matcher.v3.Matcher.OnMatch
}
var file_xds_type_matcher_v3_ip_proto_depIdxs = []int32{
1, // 0: xds.type.matcher.v3.IPMatcher.range_matchers:type_name -> xds.type.matcher.v3.IPMatcher.IPRangeMatcher
2, // 1: xds.type.matcher.v3.IPMatcher.IPRangeMatcher.ranges:type_name -> xds.core.v3.CidrRange
3, // 2: xds.type.matcher.v3.IPMatcher.IPRangeMatcher.on_match:type_name -> xds.type.matcher.v3.Matcher.OnMatch
3, // [3:3] is the sub-list for method output_type
3, // [3:3] is the sub-list for method input_type
3, // [3:3] is the sub-list for extension type_name
3, // [3:3] is the sub-list for extension extendee
0, // [0:3] is the sub-list for field type_name
}
func init() { file_xds_type_matcher_v3_ip_proto_init() }
func file_xds_type_matcher_v3_ip_proto_init() {
if File_xds_type_matcher_v3_ip_proto != nil {
return
}
file_xds_type_matcher_v3_matcher_proto_init()
if !protoimpl.UnsafeEnabled {
file_xds_type_matcher_v3_ip_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*IPMatcher); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_xds_type_matcher_v3_ip_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*IPMatcher_IPRangeMatcher); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_xds_type_matcher_v3_ip_proto_rawDesc,
NumEnums: 0,
NumMessages: 2,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_xds_type_matcher_v3_ip_proto_goTypes,
DependencyIndexes: file_xds_type_matcher_v3_ip_proto_depIdxs,
MessageInfos: file_xds_type_matcher_v3_ip_proto_msgTypes,
}.Build()
File_xds_type_matcher_v3_ip_proto = out.File
file_xds_type_matcher_v3_ip_proto_rawDesc = nil
file_xds_type_matcher_v3_ip_proto_goTypes = nil
file_xds_type_matcher_v3_ip_proto_depIdxs = nil
}

View File

@@ -0,0 +1,214 @@
// Code generated by protoc-gen-validate. DO NOT EDIT.
// source: xds/type/matcher/v3/ip.proto
package v3
import (
"bytes"
"errors"
"fmt"
"net"
"net/mail"
"net/url"
"regexp"
"strings"
"time"
"unicode/utf8"
"google.golang.org/protobuf/types/known/anypb"
)
// ensure the imports are used
var (
_ = bytes.MinRead
_ = errors.New("")
_ = fmt.Print
_ = utf8.UTFMax
_ = (*regexp.Regexp)(nil)
_ = (*strings.Reader)(nil)
_ = net.IPv4len
_ = time.Duration(0)
_ = (*url.URL)(nil)
_ = (*mail.Address)(nil)
_ = anypb.Any{}
)
// Validate checks the field values on IPMatcher with the rules defined in the
// proto definition for this message. If any rules are violated, an error is returned.
func (m *IPMatcher) Validate() error {
if m == nil {
return nil
}
for idx, item := range m.GetRangeMatchers() {
_, _ = idx, item
if v, ok := interface{}(item).(interface{ Validate() error }); ok {
if err := v.Validate(); err != nil {
return IPMatcherValidationError{
field: fmt.Sprintf("RangeMatchers[%v]", idx),
reason: "embedded message failed validation",
cause: err,
}
}
}
}
return nil
}
// IPMatcherValidationError is the validation error returned by
// IPMatcher.Validate if the designated constraints aren't met.
type IPMatcherValidationError struct {
field string
reason string
cause error
key bool
}
// Field function returns field value.
func (e IPMatcherValidationError) Field() string { return e.field }
// Reason function returns reason value.
func (e IPMatcherValidationError) Reason() string { return e.reason }
// Cause function returns cause value.
func (e IPMatcherValidationError) Cause() error { return e.cause }
// Key function returns key value.
func (e IPMatcherValidationError) Key() bool { return e.key }
// ErrorName returns error name.
func (e IPMatcherValidationError) ErrorName() string { return "IPMatcherValidationError" }
// Error satisfies the builtin error interface
func (e IPMatcherValidationError) Error() string {
cause := ""
if e.cause != nil {
cause = fmt.Sprintf(" | caused by: %v", e.cause)
}
key := ""
if e.key {
key = "key for "
}
return fmt.Sprintf(
"invalid %sIPMatcher.%s: %s%s",
key,
e.field,
e.reason,
cause)
}
var _ error = IPMatcherValidationError{}
var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = IPMatcherValidationError{}
// Validate checks the field values on IPMatcher_IPRangeMatcher with the rules
// defined in the proto definition for this message. If any rules are
// violated, an error is returned.
func (m *IPMatcher_IPRangeMatcher) Validate() error {
if m == nil {
return nil
}
if len(m.GetRanges()) < 1 {
return IPMatcher_IPRangeMatcherValidationError{
field: "Ranges",
reason: "value must contain at least 1 item(s)",
}
}
for idx, item := range m.GetRanges() {
_, _ = idx, item
if v, ok := interface{}(item).(interface{ Validate() error }); ok {
if err := v.Validate(); err != nil {
return IPMatcher_IPRangeMatcherValidationError{
field: fmt.Sprintf("Ranges[%v]", idx),
reason: "embedded message failed validation",
cause: err,
}
}
}
}
if v, ok := interface{}(m.GetOnMatch()).(interface{ Validate() error }); ok {
if err := v.Validate(); err != nil {
return IPMatcher_IPRangeMatcherValidationError{
field: "OnMatch",
reason: "embedded message failed validation",
cause: err,
}
}
}
// no validation rules for Exclusive
return nil
}
// IPMatcher_IPRangeMatcherValidationError is the validation error returned by
// IPMatcher_IPRangeMatcher.Validate if the designated constraints aren't met.
type IPMatcher_IPRangeMatcherValidationError struct {
field string
reason string
cause error
key bool
}
// Field function returns field value.
func (e IPMatcher_IPRangeMatcherValidationError) Field() string { return e.field }
// Reason function returns reason value.
func (e IPMatcher_IPRangeMatcherValidationError) Reason() string { return e.reason }
// Cause function returns cause value.
func (e IPMatcher_IPRangeMatcherValidationError) Cause() error { return e.cause }
// Key function returns key value.
func (e IPMatcher_IPRangeMatcherValidationError) Key() bool { return e.key }
// ErrorName returns error name.
func (e IPMatcher_IPRangeMatcherValidationError) ErrorName() string {
return "IPMatcher_IPRangeMatcherValidationError"
}
// Error satisfies the builtin error interface
func (e IPMatcher_IPRangeMatcherValidationError) Error() string {
cause := ""
if e.cause != nil {
cause = fmt.Sprintf(" | caused by: %v", e.cause)
}
key := ""
if e.key {
key = "key for "
}
return fmt.Sprintf(
"invalid %sIPMatcher_IPRangeMatcher.%s: %s%s",
key,
e.field,
e.reason,
cause)
}
var _ error = IPMatcher_IPRangeMatcherValidationError{}
var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = IPMatcher_IPRangeMatcherValidationError{}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,986 @@
// Code generated by protoc-gen-validate. DO NOT EDIT.
// source: xds/type/matcher/v3/matcher.proto
package v3
import (
"bytes"
"errors"
"fmt"
"net"
"net/mail"
"net/url"
"regexp"
"strings"
"time"
"unicode/utf8"
"google.golang.org/protobuf/types/known/anypb"
)
// ensure the imports are used
var (
_ = bytes.MinRead
_ = errors.New("")
_ = fmt.Print
_ = utf8.UTFMax
_ = (*regexp.Regexp)(nil)
_ = (*strings.Reader)(nil)
_ = net.IPv4len
_ = time.Duration(0)
_ = (*url.URL)(nil)
_ = (*mail.Address)(nil)
_ = anypb.Any{}
)
// Validate checks the field values on Matcher with the rules defined in the
// proto definition for this message. If any rules are violated, an error is returned.
func (m *Matcher) Validate() error {
if m == nil {
return nil
}
if v, ok := interface{}(m.GetOnNoMatch()).(interface{ Validate() error }); ok {
if err := v.Validate(); err != nil {
return MatcherValidationError{
field: "OnNoMatch",
reason: "embedded message failed validation",
cause: err,
}
}
}
switch m.MatcherType.(type) {
case *Matcher_MatcherList_:
if v, ok := interface{}(m.GetMatcherList()).(interface{ Validate() error }); ok {
if err := v.Validate(); err != nil {
return MatcherValidationError{
field: "MatcherList",
reason: "embedded message failed validation",
cause: err,
}
}
}
case *Matcher_MatcherTree_:
if v, ok := interface{}(m.GetMatcherTree()).(interface{ Validate() error }); ok {
if err := v.Validate(); err != nil {
return MatcherValidationError{
field: "MatcherTree",
reason: "embedded message failed validation",
cause: err,
}
}
}
}
return nil
}
// MatcherValidationError is the validation error returned by Matcher.Validate
// if the designated constraints aren't met.
type MatcherValidationError struct {
field string
reason string
cause error
key bool
}
// Field function returns field value.
func (e MatcherValidationError) Field() string { return e.field }
// Reason function returns reason value.
func (e MatcherValidationError) Reason() string { return e.reason }
// Cause function returns cause value.
func (e MatcherValidationError) Cause() error { return e.cause }
// Key function returns key value.
func (e MatcherValidationError) Key() bool { return e.key }
// ErrorName returns error name.
func (e MatcherValidationError) ErrorName() string { return "MatcherValidationError" }
// Error satisfies the builtin error interface
func (e MatcherValidationError) Error() string {
cause := ""
if e.cause != nil {
cause = fmt.Sprintf(" | caused by: %v", e.cause)
}
key := ""
if e.key {
key = "key for "
}
return fmt.Sprintf(
"invalid %sMatcher.%s: %s%s",
key,
e.field,
e.reason,
cause)
}
var _ error = MatcherValidationError{}
var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = MatcherValidationError{}
// Validate checks the field values on Matcher_OnMatch with the rules defined
// in the proto definition for this message. If any rules are violated, an
// error is returned.
func (m *Matcher_OnMatch) Validate() error {
if m == nil {
return nil
}
switch m.OnMatch.(type) {
case *Matcher_OnMatch_Matcher:
if v, ok := interface{}(m.GetMatcher()).(interface{ Validate() error }); ok {
if err := v.Validate(); err != nil {
return Matcher_OnMatchValidationError{
field: "Matcher",
reason: "embedded message failed validation",
cause: err,
}
}
}
case *Matcher_OnMatch_Action:
if v, ok := interface{}(m.GetAction()).(interface{ Validate() error }); ok {
if err := v.Validate(); err != nil {
return Matcher_OnMatchValidationError{
field: "Action",
reason: "embedded message failed validation",
cause: err,
}
}
}
default:
return Matcher_OnMatchValidationError{
field: "OnMatch",
reason: "value is required",
}
}
return nil
}
// Matcher_OnMatchValidationError is the validation error returned by
// Matcher_OnMatch.Validate if the designated constraints aren't met.
type Matcher_OnMatchValidationError struct {
field string
reason string
cause error
key bool
}
// Field function returns field value.
func (e Matcher_OnMatchValidationError) Field() string { return e.field }
// Reason function returns reason value.
func (e Matcher_OnMatchValidationError) Reason() string { return e.reason }
// Cause function returns cause value.
func (e Matcher_OnMatchValidationError) Cause() error { return e.cause }
// Key function returns key value.
func (e Matcher_OnMatchValidationError) Key() bool { return e.key }
// ErrorName returns error name.
func (e Matcher_OnMatchValidationError) ErrorName() string { return "Matcher_OnMatchValidationError" }
// Error satisfies the builtin error interface
func (e Matcher_OnMatchValidationError) Error() string {
cause := ""
if e.cause != nil {
cause = fmt.Sprintf(" | caused by: %v", e.cause)
}
key := ""
if e.key {
key = "key for "
}
return fmt.Sprintf(
"invalid %sMatcher_OnMatch.%s: %s%s",
key,
e.field,
e.reason,
cause)
}
var _ error = Matcher_OnMatchValidationError{}
var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = Matcher_OnMatchValidationError{}
// Validate checks the field values on Matcher_MatcherList with the rules
// defined in the proto definition for this message. If any rules are
// violated, an error is returned.
func (m *Matcher_MatcherList) Validate() error {
if m == nil {
return nil
}
if len(m.GetMatchers()) < 1 {
return Matcher_MatcherListValidationError{
field: "Matchers",
reason: "value must contain at least 1 item(s)",
}
}
for idx, item := range m.GetMatchers() {
_, _ = idx, item
if v, ok := interface{}(item).(interface{ Validate() error }); ok {
if err := v.Validate(); err != nil {
return Matcher_MatcherListValidationError{
field: fmt.Sprintf("Matchers[%v]", idx),
reason: "embedded message failed validation",
cause: err,
}
}
}
}
return nil
}
// Matcher_MatcherListValidationError is the validation error returned by
// Matcher_MatcherList.Validate if the designated constraints aren't met.
type Matcher_MatcherListValidationError struct {
field string
reason string
cause error
key bool
}
// Field function returns field value.
func (e Matcher_MatcherListValidationError) Field() string { return e.field }
// Reason function returns reason value.
func (e Matcher_MatcherListValidationError) Reason() string { return e.reason }
// Cause function returns cause value.
func (e Matcher_MatcherListValidationError) Cause() error { return e.cause }
// Key function returns key value.
func (e Matcher_MatcherListValidationError) Key() bool { return e.key }
// ErrorName returns error name.
func (e Matcher_MatcherListValidationError) ErrorName() string {
return "Matcher_MatcherListValidationError"
}
// Error satisfies the builtin error interface
func (e Matcher_MatcherListValidationError) Error() string {
cause := ""
if e.cause != nil {
cause = fmt.Sprintf(" | caused by: %v", e.cause)
}
key := ""
if e.key {
key = "key for "
}
return fmt.Sprintf(
"invalid %sMatcher_MatcherList.%s: %s%s",
key,
e.field,
e.reason,
cause)
}
var _ error = Matcher_MatcherListValidationError{}
var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = Matcher_MatcherListValidationError{}
// Validate checks the field values on Matcher_MatcherTree with the rules
// defined in the proto definition for this message. If any rules are
// violated, an error is returned.
func (m *Matcher_MatcherTree) Validate() error {
if m == nil {
return nil
}
if m.GetInput() == nil {
return Matcher_MatcherTreeValidationError{
field: "Input",
reason: "value is required",
}
}
if v, ok := interface{}(m.GetInput()).(interface{ Validate() error }); ok {
if err := v.Validate(); err != nil {
return Matcher_MatcherTreeValidationError{
field: "Input",
reason: "embedded message failed validation",
cause: err,
}
}
}
switch m.TreeType.(type) {
case *Matcher_MatcherTree_ExactMatchMap:
if v, ok := interface{}(m.GetExactMatchMap()).(interface{ Validate() error }); ok {
if err := v.Validate(); err != nil {
return Matcher_MatcherTreeValidationError{
field: "ExactMatchMap",
reason: "embedded message failed validation",
cause: err,
}
}
}
case *Matcher_MatcherTree_PrefixMatchMap:
if v, ok := interface{}(m.GetPrefixMatchMap()).(interface{ Validate() error }); ok {
if err := v.Validate(); err != nil {
return Matcher_MatcherTreeValidationError{
field: "PrefixMatchMap",
reason: "embedded message failed validation",
cause: err,
}
}
}
case *Matcher_MatcherTree_CustomMatch:
if v, ok := interface{}(m.GetCustomMatch()).(interface{ Validate() error }); ok {
if err := v.Validate(); err != nil {
return Matcher_MatcherTreeValidationError{
field: "CustomMatch",
reason: "embedded message failed validation",
cause: err,
}
}
}
default:
return Matcher_MatcherTreeValidationError{
field: "TreeType",
reason: "value is required",
}
}
return nil
}
// Matcher_MatcherTreeValidationError is the validation error returned by
// Matcher_MatcherTree.Validate if the designated constraints aren't met.
type Matcher_MatcherTreeValidationError struct {
field string
reason string
cause error
key bool
}
// Field function returns field value.
func (e Matcher_MatcherTreeValidationError) Field() string { return e.field }
// Reason function returns reason value.
func (e Matcher_MatcherTreeValidationError) Reason() string { return e.reason }
// Cause function returns cause value.
func (e Matcher_MatcherTreeValidationError) Cause() error { return e.cause }
// Key function returns key value.
func (e Matcher_MatcherTreeValidationError) Key() bool { return e.key }
// ErrorName returns error name.
func (e Matcher_MatcherTreeValidationError) ErrorName() string {
return "Matcher_MatcherTreeValidationError"
}
// Error satisfies the builtin error interface
func (e Matcher_MatcherTreeValidationError) Error() string {
cause := ""
if e.cause != nil {
cause = fmt.Sprintf(" | caused by: %v", e.cause)
}
key := ""
if e.key {
key = "key for "
}
return fmt.Sprintf(
"invalid %sMatcher_MatcherTree.%s: %s%s",
key,
e.field,
e.reason,
cause)
}
var _ error = Matcher_MatcherTreeValidationError{}
var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = Matcher_MatcherTreeValidationError{}
// Validate checks the field values on Matcher_MatcherList_Predicate with the
// rules defined in the proto definition for this message. If any rules are
// violated, an error is returned.
func (m *Matcher_MatcherList_Predicate) Validate() error {
if m == nil {
return nil
}
switch m.MatchType.(type) {
case *Matcher_MatcherList_Predicate_SinglePredicate_:
if v, ok := interface{}(m.GetSinglePredicate()).(interface{ Validate() error }); ok {
if err := v.Validate(); err != nil {
return Matcher_MatcherList_PredicateValidationError{
field: "SinglePredicate",
reason: "embedded message failed validation",
cause: err,
}
}
}
case *Matcher_MatcherList_Predicate_OrMatcher:
if v, ok := interface{}(m.GetOrMatcher()).(interface{ Validate() error }); ok {
if err := v.Validate(); err != nil {
return Matcher_MatcherList_PredicateValidationError{
field: "OrMatcher",
reason: "embedded message failed validation",
cause: err,
}
}
}
case *Matcher_MatcherList_Predicate_AndMatcher:
if v, ok := interface{}(m.GetAndMatcher()).(interface{ Validate() error }); ok {
if err := v.Validate(); err != nil {
return Matcher_MatcherList_PredicateValidationError{
field: "AndMatcher",
reason: "embedded message failed validation",
cause: err,
}
}
}
case *Matcher_MatcherList_Predicate_NotMatcher:
if v, ok := interface{}(m.GetNotMatcher()).(interface{ Validate() error }); ok {
if err := v.Validate(); err != nil {
return Matcher_MatcherList_PredicateValidationError{
field: "NotMatcher",
reason: "embedded message failed validation",
cause: err,
}
}
}
default:
return Matcher_MatcherList_PredicateValidationError{
field: "MatchType",
reason: "value is required",
}
}
return nil
}
// Matcher_MatcherList_PredicateValidationError is the validation error
// returned by Matcher_MatcherList_Predicate.Validate if the designated
// constraints aren't met.
type Matcher_MatcherList_PredicateValidationError struct {
field string
reason string
cause error
key bool
}
// Field function returns field value.
func (e Matcher_MatcherList_PredicateValidationError) Field() string { return e.field }
// Reason function returns reason value.
func (e Matcher_MatcherList_PredicateValidationError) Reason() string { return e.reason }
// Cause function returns cause value.
func (e Matcher_MatcherList_PredicateValidationError) Cause() error { return e.cause }
// Key function returns key value.
func (e Matcher_MatcherList_PredicateValidationError) Key() bool { return e.key }
// ErrorName returns error name.
func (e Matcher_MatcherList_PredicateValidationError) ErrorName() string {
return "Matcher_MatcherList_PredicateValidationError"
}
// Error satisfies the builtin error interface
func (e Matcher_MatcherList_PredicateValidationError) Error() string {
cause := ""
if e.cause != nil {
cause = fmt.Sprintf(" | caused by: %v", e.cause)
}
key := ""
if e.key {
key = "key for "
}
return fmt.Sprintf(
"invalid %sMatcher_MatcherList_Predicate.%s: %s%s",
key,
e.field,
e.reason,
cause)
}
var _ error = Matcher_MatcherList_PredicateValidationError{}
var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = Matcher_MatcherList_PredicateValidationError{}
// Validate checks the field values on Matcher_MatcherList_FieldMatcher with
// the rules defined in the proto definition for this message. If any rules
// are violated, an error is returned.
func (m *Matcher_MatcherList_FieldMatcher) Validate() error {
if m == nil {
return nil
}
if m.GetPredicate() == nil {
return Matcher_MatcherList_FieldMatcherValidationError{
field: "Predicate",
reason: "value is required",
}
}
if v, ok := interface{}(m.GetPredicate()).(interface{ Validate() error }); ok {
if err := v.Validate(); err != nil {
return Matcher_MatcherList_FieldMatcherValidationError{
field: "Predicate",
reason: "embedded message failed validation",
cause: err,
}
}
}
if m.GetOnMatch() == nil {
return Matcher_MatcherList_FieldMatcherValidationError{
field: "OnMatch",
reason: "value is required",
}
}
if v, ok := interface{}(m.GetOnMatch()).(interface{ Validate() error }); ok {
if err := v.Validate(); err != nil {
return Matcher_MatcherList_FieldMatcherValidationError{
field: "OnMatch",
reason: "embedded message failed validation",
cause: err,
}
}
}
return nil
}
// Matcher_MatcherList_FieldMatcherValidationError is the validation error
// returned by Matcher_MatcherList_FieldMatcher.Validate if the designated
// constraints aren't met.
type Matcher_MatcherList_FieldMatcherValidationError struct {
field string
reason string
cause error
key bool
}
// Field function returns field value.
func (e Matcher_MatcherList_FieldMatcherValidationError) Field() string { return e.field }
// Reason function returns reason value.
func (e Matcher_MatcherList_FieldMatcherValidationError) Reason() string { return e.reason }
// Cause function returns cause value.
func (e Matcher_MatcherList_FieldMatcherValidationError) Cause() error { return e.cause }
// Key function returns key value.
func (e Matcher_MatcherList_FieldMatcherValidationError) Key() bool { return e.key }
// ErrorName returns error name.
func (e Matcher_MatcherList_FieldMatcherValidationError) ErrorName() string {
return "Matcher_MatcherList_FieldMatcherValidationError"
}
// Error satisfies the builtin error interface
func (e Matcher_MatcherList_FieldMatcherValidationError) Error() string {
cause := ""
if e.cause != nil {
cause = fmt.Sprintf(" | caused by: %v", e.cause)
}
key := ""
if e.key {
key = "key for "
}
return fmt.Sprintf(
"invalid %sMatcher_MatcherList_FieldMatcher.%s: %s%s",
key,
e.field,
e.reason,
cause)
}
var _ error = Matcher_MatcherList_FieldMatcherValidationError{}
var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = Matcher_MatcherList_FieldMatcherValidationError{}
// Validate checks the field values on
// Matcher_MatcherList_Predicate_SinglePredicate with the rules defined in the
// proto definition for this message. If any rules are violated, an error is returned.
func (m *Matcher_MatcherList_Predicate_SinglePredicate) Validate() error {
if m == nil {
return nil
}
if m.GetInput() == nil {
return Matcher_MatcherList_Predicate_SinglePredicateValidationError{
field: "Input",
reason: "value is required",
}
}
if v, ok := interface{}(m.GetInput()).(interface{ Validate() error }); ok {
if err := v.Validate(); err != nil {
return Matcher_MatcherList_Predicate_SinglePredicateValidationError{
field: "Input",
reason: "embedded message failed validation",
cause: err,
}
}
}
switch m.Matcher.(type) {
case *Matcher_MatcherList_Predicate_SinglePredicate_ValueMatch:
if v, ok := interface{}(m.GetValueMatch()).(interface{ Validate() error }); ok {
if err := v.Validate(); err != nil {
return Matcher_MatcherList_Predicate_SinglePredicateValidationError{
field: "ValueMatch",
reason: "embedded message failed validation",
cause: err,
}
}
}
case *Matcher_MatcherList_Predicate_SinglePredicate_CustomMatch:
if v, ok := interface{}(m.GetCustomMatch()).(interface{ Validate() error }); ok {
if err := v.Validate(); err != nil {
return Matcher_MatcherList_Predicate_SinglePredicateValidationError{
field: "CustomMatch",
reason: "embedded message failed validation",
cause: err,
}
}
}
default:
return Matcher_MatcherList_Predicate_SinglePredicateValidationError{
field: "Matcher",
reason: "value is required",
}
}
return nil
}
// Matcher_MatcherList_Predicate_SinglePredicateValidationError is the
// validation error returned by
// Matcher_MatcherList_Predicate_SinglePredicate.Validate if the designated
// constraints aren't met.
type Matcher_MatcherList_Predicate_SinglePredicateValidationError struct {
field string
reason string
cause error
key bool
}
// Field function returns field value.
func (e Matcher_MatcherList_Predicate_SinglePredicateValidationError) Field() string { return e.field }
// Reason function returns reason value.
func (e Matcher_MatcherList_Predicate_SinglePredicateValidationError) Reason() string {
return e.reason
}
// Cause function returns cause value.
func (e Matcher_MatcherList_Predicate_SinglePredicateValidationError) Cause() error { return e.cause }
// Key function returns key value.
func (e Matcher_MatcherList_Predicate_SinglePredicateValidationError) Key() bool { return e.key }
// ErrorName returns error name.
func (e Matcher_MatcherList_Predicate_SinglePredicateValidationError) ErrorName() string {
return "Matcher_MatcherList_Predicate_SinglePredicateValidationError"
}
// Error satisfies the builtin error interface
func (e Matcher_MatcherList_Predicate_SinglePredicateValidationError) Error() string {
cause := ""
if e.cause != nil {
cause = fmt.Sprintf(" | caused by: %v", e.cause)
}
key := ""
if e.key {
key = "key for "
}
return fmt.Sprintf(
"invalid %sMatcher_MatcherList_Predicate_SinglePredicate.%s: %s%s",
key,
e.field,
e.reason,
cause)
}
var _ error = Matcher_MatcherList_Predicate_SinglePredicateValidationError{}
var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = Matcher_MatcherList_Predicate_SinglePredicateValidationError{}
// Validate checks the field values on
// Matcher_MatcherList_Predicate_PredicateList with the rules defined in the
// proto definition for this message. If any rules are violated, an error is returned.
func (m *Matcher_MatcherList_Predicate_PredicateList) Validate() error {
if m == nil {
return nil
}
if len(m.GetPredicate()) < 2 {
return Matcher_MatcherList_Predicate_PredicateListValidationError{
field: "Predicate",
reason: "value must contain at least 2 item(s)",
}
}
for idx, item := range m.GetPredicate() {
_, _ = idx, item
if v, ok := interface{}(item).(interface{ Validate() error }); ok {
if err := v.Validate(); err != nil {
return Matcher_MatcherList_Predicate_PredicateListValidationError{
field: fmt.Sprintf("Predicate[%v]", idx),
reason: "embedded message failed validation",
cause: err,
}
}
}
}
return nil
}
// Matcher_MatcherList_Predicate_PredicateListValidationError is the validation
// error returned by Matcher_MatcherList_Predicate_PredicateList.Validate if
// the designated constraints aren't met.
type Matcher_MatcherList_Predicate_PredicateListValidationError struct {
field string
reason string
cause error
key bool
}
// Field function returns field value.
func (e Matcher_MatcherList_Predicate_PredicateListValidationError) Field() string { return e.field }
// Reason function returns reason value.
func (e Matcher_MatcherList_Predicate_PredicateListValidationError) Reason() string { return e.reason }
// Cause function returns cause value.
func (e Matcher_MatcherList_Predicate_PredicateListValidationError) Cause() error { return e.cause }
// Key function returns key value.
func (e Matcher_MatcherList_Predicate_PredicateListValidationError) Key() bool { return e.key }
// ErrorName returns error name.
func (e Matcher_MatcherList_Predicate_PredicateListValidationError) ErrorName() string {
return "Matcher_MatcherList_Predicate_PredicateListValidationError"
}
// Error satisfies the builtin error interface
func (e Matcher_MatcherList_Predicate_PredicateListValidationError) Error() string {
cause := ""
if e.cause != nil {
cause = fmt.Sprintf(" | caused by: %v", e.cause)
}
key := ""
if e.key {
key = "key for "
}
return fmt.Sprintf(
"invalid %sMatcher_MatcherList_Predicate_PredicateList.%s: %s%s",
key,
e.field,
e.reason,
cause)
}
var _ error = Matcher_MatcherList_Predicate_PredicateListValidationError{}
var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = Matcher_MatcherList_Predicate_PredicateListValidationError{}
// Validate checks the field values on Matcher_MatcherTree_MatchMap with the
// rules defined in the proto definition for this message. If any rules are
// violated, an error is returned.
func (m *Matcher_MatcherTree_MatchMap) Validate() error {
if m == nil {
return nil
}
if len(m.GetMap()) < 1 {
return Matcher_MatcherTree_MatchMapValidationError{
field: "Map",
reason: "value must contain at least 1 pair(s)",
}
}
for key, val := range m.GetMap() {
_ = val
// no validation rules for Map[key]
if v, ok := interface{}(val).(interface{ Validate() error }); ok {
if err := v.Validate(); err != nil {
return Matcher_MatcherTree_MatchMapValidationError{
field: fmt.Sprintf("Map[%v]", key),
reason: "embedded message failed validation",
cause: err,
}
}
}
}
return nil
}
// Matcher_MatcherTree_MatchMapValidationError is the validation error returned
// by Matcher_MatcherTree_MatchMap.Validate if the designated constraints
// aren't met.
type Matcher_MatcherTree_MatchMapValidationError struct {
field string
reason string
cause error
key bool
}
// Field function returns field value.
func (e Matcher_MatcherTree_MatchMapValidationError) Field() string { return e.field }
// Reason function returns reason value.
func (e Matcher_MatcherTree_MatchMapValidationError) Reason() string { return e.reason }
// Cause function returns cause value.
func (e Matcher_MatcherTree_MatchMapValidationError) Cause() error { return e.cause }
// Key function returns key value.
func (e Matcher_MatcherTree_MatchMapValidationError) Key() bool { return e.key }
// ErrorName returns error name.
func (e Matcher_MatcherTree_MatchMapValidationError) ErrorName() string {
return "Matcher_MatcherTree_MatchMapValidationError"
}
// Error satisfies the builtin error interface
func (e Matcher_MatcherTree_MatchMapValidationError) Error() string {
cause := ""
if e.cause != nil {
cause = fmt.Sprintf(" | caused by: %v", e.cause)
}
key := ""
if e.key {
key = "key for "
}
return fmt.Sprintf(
"invalid %sMatcher_MatcherTree_MatchMap.%s: %s%s",
key,
e.field,
e.reason,
cause)
}
var _ error = Matcher_MatcherTree_MatchMapValidationError{}
var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = Matcher_MatcherTree_MatchMapValidationError{}

View File

@@ -0,0 +1,544 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.25.0
// protoc v3.18.0
// source: xds/type/matcher/v3/range.proto
package v3
import (
v3 "github.com/cncf/xds/go/xds/type/v3"
_ "github.com/envoyproxy/protoc-gen-validate/validate"
proto "github.com/golang/protobuf/proto"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// This is a compile-time assertion that a sufficiently up-to-date version
// of the legacy proto package is being used.
const _ = proto.ProtoPackageIsVersion4
type Int64RangeMatcher struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
RangeMatchers []*Int64RangeMatcher_RangeMatcher `protobuf:"bytes,1,rep,name=range_matchers,json=rangeMatchers,proto3" json:"range_matchers,omitempty"`
}
func (x *Int64RangeMatcher) Reset() {
*x = Int64RangeMatcher{}
if protoimpl.UnsafeEnabled {
mi := &file_xds_type_matcher_v3_range_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Int64RangeMatcher) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Int64RangeMatcher) ProtoMessage() {}
func (x *Int64RangeMatcher) ProtoReflect() protoreflect.Message {
mi := &file_xds_type_matcher_v3_range_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Int64RangeMatcher.ProtoReflect.Descriptor instead.
func (*Int64RangeMatcher) Descriptor() ([]byte, []int) {
return file_xds_type_matcher_v3_range_proto_rawDescGZIP(), []int{0}
}
func (x *Int64RangeMatcher) GetRangeMatchers() []*Int64RangeMatcher_RangeMatcher {
if x != nil {
return x.RangeMatchers
}
return nil
}
type Int32RangeMatcher struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
RangeMatchers []*Int32RangeMatcher_RangeMatcher `protobuf:"bytes,1,rep,name=range_matchers,json=rangeMatchers,proto3" json:"range_matchers,omitempty"`
}
func (x *Int32RangeMatcher) Reset() {
*x = Int32RangeMatcher{}
if protoimpl.UnsafeEnabled {
mi := &file_xds_type_matcher_v3_range_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Int32RangeMatcher) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Int32RangeMatcher) ProtoMessage() {}
func (x *Int32RangeMatcher) ProtoReflect() protoreflect.Message {
mi := &file_xds_type_matcher_v3_range_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Int32RangeMatcher.ProtoReflect.Descriptor instead.
func (*Int32RangeMatcher) Descriptor() ([]byte, []int) {
return file_xds_type_matcher_v3_range_proto_rawDescGZIP(), []int{1}
}
func (x *Int32RangeMatcher) GetRangeMatchers() []*Int32RangeMatcher_RangeMatcher {
if x != nil {
return x.RangeMatchers
}
return nil
}
type DoubleRangeMatcher struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
RangeMatchers []*DoubleRangeMatcher_RangeMatcher `protobuf:"bytes,1,rep,name=range_matchers,json=rangeMatchers,proto3" json:"range_matchers,omitempty"`
}
func (x *DoubleRangeMatcher) Reset() {
*x = DoubleRangeMatcher{}
if protoimpl.UnsafeEnabled {
mi := &file_xds_type_matcher_v3_range_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *DoubleRangeMatcher) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DoubleRangeMatcher) ProtoMessage() {}
func (x *DoubleRangeMatcher) ProtoReflect() protoreflect.Message {
mi := &file_xds_type_matcher_v3_range_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use DoubleRangeMatcher.ProtoReflect.Descriptor instead.
func (*DoubleRangeMatcher) Descriptor() ([]byte, []int) {
return file_xds_type_matcher_v3_range_proto_rawDescGZIP(), []int{2}
}
func (x *DoubleRangeMatcher) GetRangeMatchers() []*DoubleRangeMatcher_RangeMatcher {
if x != nil {
return x.RangeMatchers
}
return nil
}
type Int64RangeMatcher_RangeMatcher struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Ranges []*v3.Int64Range `protobuf:"bytes,1,rep,name=ranges,proto3" json:"ranges,omitempty"`
OnMatch *Matcher_OnMatch `protobuf:"bytes,2,opt,name=on_match,json=onMatch,proto3" json:"on_match,omitempty"`
}
func (x *Int64RangeMatcher_RangeMatcher) Reset() {
*x = Int64RangeMatcher_RangeMatcher{}
if protoimpl.UnsafeEnabled {
mi := &file_xds_type_matcher_v3_range_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Int64RangeMatcher_RangeMatcher) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Int64RangeMatcher_RangeMatcher) ProtoMessage() {}
func (x *Int64RangeMatcher_RangeMatcher) ProtoReflect() protoreflect.Message {
mi := &file_xds_type_matcher_v3_range_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Int64RangeMatcher_RangeMatcher.ProtoReflect.Descriptor instead.
func (*Int64RangeMatcher_RangeMatcher) Descriptor() ([]byte, []int) {
return file_xds_type_matcher_v3_range_proto_rawDescGZIP(), []int{0, 0}
}
func (x *Int64RangeMatcher_RangeMatcher) GetRanges() []*v3.Int64Range {
if x != nil {
return x.Ranges
}
return nil
}
func (x *Int64RangeMatcher_RangeMatcher) GetOnMatch() *Matcher_OnMatch {
if x != nil {
return x.OnMatch
}
return nil
}
type Int32RangeMatcher_RangeMatcher struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Ranges []*v3.Int32Range `protobuf:"bytes,1,rep,name=ranges,proto3" json:"ranges,omitempty"`
OnMatch *Matcher_OnMatch `protobuf:"bytes,2,opt,name=on_match,json=onMatch,proto3" json:"on_match,omitempty"`
}
func (x *Int32RangeMatcher_RangeMatcher) Reset() {
*x = Int32RangeMatcher_RangeMatcher{}
if protoimpl.UnsafeEnabled {
mi := &file_xds_type_matcher_v3_range_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Int32RangeMatcher_RangeMatcher) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Int32RangeMatcher_RangeMatcher) ProtoMessage() {}
func (x *Int32RangeMatcher_RangeMatcher) ProtoReflect() protoreflect.Message {
mi := &file_xds_type_matcher_v3_range_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Int32RangeMatcher_RangeMatcher.ProtoReflect.Descriptor instead.
func (*Int32RangeMatcher_RangeMatcher) Descriptor() ([]byte, []int) {
return file_xds_type_matcher_v3_range_proto_rawDescGZIP(), []int{1, 0}
}
func (x *Int32RangeMatcher_RangeMatcher) GetRanges() []*v3.Int32Range {
if x != nil {
return x.Ranges
}
return nil
}
func (x *Int32RangeMatcher_RangeMatcher) GetOnMatch() *Matcher_OnMatch {
if x != nil {
return x.OnMatch
}
return nil
}
type DoubleRangeMatcher_RangeMatcher struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Ranges []*v3.DoubleRange `protobuf:"bytes,1,rep,name=ranges,proto3" json:"ranges,omitempty"`
OnMatch *Matcher_OnMatch `protobuf:"bytes,2,opt,name=on_match,json=onMatch,proto3" json:"on_match,omitempty"`
}
func (x *DoubleRangeMatcher_RangeMatcher) Reset() {
*x = DoubleRangeMatcher_RangeMatcher{}
if protoimpl.UnsafeEnabled {
mi := &file_xds_type_matcher_v3_range_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *DoubleRangeMatcher_RangeMatcher) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DoubleRangeMatcher_RangeMatcher) ProtoMessage() {}
func (x *DoubleRangeMatcher_RangeMatcher) ProtoReflect() protoreflect.Message {
mi := &file_xds_type_matcher_v3_range_proto_msgTypes[5]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use DoubleRangeMatcher_RangeMatcher.ProtoReflect.Descriptor instead.
func (*DoubleRangeMatcher_RangeMatcher) Descriptor() ([]byte, []int) {
return file_xds_type_matcher_v3_range_proto_rawDescGZIP(), []int{2, 0}
}
func (x *DoubleRangeMatcher_RangeMatcher) GetRanges() []*v3.DoubleRange {
if x != nil {
return x.Ranges
}
return nil
}
func (x *DoubleRangeMatcher_RangeMatcher) GetOnMatch() *Matcher_OnMatch {
if x != nil {
return x.OnMatch
}
return nil
}
var File_xds_type_matcher_v3_range_proto protoreflect.FileDescriptor
var file_xds_type_matcher_v3_range_proto_rawDesc = []byte{
0x0a, 0x1f, 0x78, 0x64, 0x73, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68,
0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x12, 0x13, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63,
0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x1a, 0x17, 0x78, 0x64, 0x73, 0x2f, 0x74, 0x79, 0x70, 0x65,
0x2f, 0x76, 0x33, 0x2f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a,
0x21, 0x78, 0x64, 0x73, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65,
0x72, 0x2f, 0x76, 0x33, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c,
0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xfc, 0x01, 0x0a, 0x11,
0x49, 0x6e, 0x74, 0x36, 0x34, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65,
0x72, 0x12, 0x5a, 0x0a, 0x0e, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68,
0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x78, 0x64, 0x73, 0x2e,
0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e,
0x49, 0x6e, 0x74, 0x36, 0x34, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65,
0x72, 0x2e, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x52, 0x0d,
0x72, 0x61, 0x6e, 0x67, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x73, 0x1a, 0x8a, 0x01,
0x0a, 0x0c, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, 0x39,
0x0a, 0x06, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17,
0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x49, 0x6e, 0x74,
0x36, 0x34, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08,
0x01, 0x52, 0x06, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x12, 0x3f, 0x0a, 0x08, 0x6f, 0x6e, 0x5f,
0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x78, 0x64,
0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76,
0x33, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x4f, 0x6e, 0x4d, 0x61, 0x74, 0x63,
0x68, 0x52, 0x07, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x22, 0xfc, 0x01, 0x0a, 0x11, 0x49,
0x6e, 0x74, 0x33, 0x32, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72,
0x12, 0x5a, 0x0a, 0x0e, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65,
0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74,
0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x49,
0x6e, 0x74, 0x33, 0x32, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72,
0x2e, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x52, 0x0d, 0x72,
0x61, 0x6e, 0x67, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x73, 0x1a, 0x8a, 0x01, 0x0a,
0x0c, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, 0x39, 0x0a,
0x06, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e,
0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x49, 0x6e, 0x74, 0x33,
0x32, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01,
0x52, 0x06, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x12, 0x3f, 0x0a, 0x08, 0x6f, 0x6e, 0x5f, 0x6d,
0x61, 0x74, 0x63, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x78, 0x64, 0x73,
0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33,
0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x4f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68,
0x52, 0x07, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x22, 0xff, 0x01, 0x0a, 0x12, 0x44, 0x6f,
0x75, 0x62, 0x6c, 0x65, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72,
0x12, 0x5b, 0x0a, 0x0e, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65,
0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74,
0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x44,
0x6f, 0x75, 0x62, 0x6c, 0x65, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65,
0x72, 0x2e, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x52, 0x0d,
0x72, 0x61, 0x6e, 0x67, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x73, 0x1a, 0x8b, 0x01,
0x0a, 0x0c, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, 0x3a,
0x0a, 0x06, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18,
0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x6f, 0x75,
0x62, 0x6c, 0x65, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02,
0x08, 0x01, 0x52, 0x06, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x12, 0x3f, 0x0a, 0x08, 0x6f, 0x6e,
0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x78,
0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e,
0x76, 0x33, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x4f, 0x6e, 0x4d, 0x61, 0x74,
0x63, 0x68, 0x52, 0x07, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x5a, 0x0a, 0x1e, 0x63,
0x6f, 0x6d, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79,
0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x42, 0x0a, 0x52,
0x61, 0x6e, 0x67, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2a, 0x67, 0x69, 0x74,
0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6e, 0x63, 0x66, 0x2f, 0x78, 0x64, 0x73,
0x2f, 0x67, 0x6f, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74,
0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_xds_type_matcher_v3_range_proto_rawDescOnce sync.Once
file_xds_type_matcher_v3_range_proto_rawDescData = file_xds_type_matcher_v3_range_proto_rawDesc
)
func file_xds_type_matcher_v3_range_proto_rawDescGZIP() []byte {
file_xds_type_matcher_v3_range_proto_rawDescOnce.Do(func() {
file_xds_type_matcher_v3_range_proto_rawDescData = protoimpl.X.CompressGZIP(file_xds_type_matcher_v3_range_proto_rawDescData)
})
return file_xds_type_matcher_v3_range_proto_rawDescData
}
var file_xds_type_matcher_v3_range_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
var file_xds_type_matcher_v3_range_proto_goTypes = []interface{}{
(*Int64RangeMatcher)(nil), // 0: xds.type.matcher.v3.Int64RangeMatcher
(*Int32RangeMatcher)(nil), // 1: xds.type.matcher.v3.Int32RangeMatcher
(*DoubleRangeMatcher)(nil), // 2: xds.type.matcher.v3.DoubleRangeMatcher
(*Int64RangeMatcher_RangeMatcher)(nil), // 3: xds.type.matcher.v3.Int64RangeMatcher.RangeMatcher
(*Int32RangeMatcher_RangeMatcher)(nil), // 4: xds.type.matcher.v3.Int32RangeMatcher.RangeMatcher
(*DoubleRangeMatcher_RangeMatcher)(nil), // 5: xds.type.matcher.v3.DoubleRangeMatcher.RangeMatcher
(*v3.Int64Range)(nil), // 6: xds.type.v3.Int64Range
(*Matcher_OnMatch)(nil), // 7: xds.type.matcher.v3.Matcher.OnMatch
(*v3.Int32Range)(nil), // 8: xds.type.v3.Int32Range
(*v3.DoubleRange)(nil), // 9: xds.type.v3.DoubleRange
}
var file_xds_type_matcher_v3_range_proto_depIdxs = []int32{
3, // 0: xds.type.matcher.v3.Int64RangeMatcher.range_matchers:type_name -> xds.type.matcher.v3.Int64RangeMatcher.RangeMatcher
4, // 1: xds.type.matcher.v3.Int32RangeMatcher.range_matchers:type_name -> xds.type.matcher.v3.Int32RangeMatcher.RangeMatcher
5, // 2: xds.type.matcher.v3.DoubleRangeMatcher.range_matchers:type_name -> xds.type.matcher.v3.DoubleRangeMatcher.RangeMatcher
6, // 3: xds.type.matcher.v3.Int64RangeMatcher.RangeMatcher.ranges:type_name -> xds.type.v3.Int64Range
7, // 4: xds.type.matcher.v3.Int64RangeMatcher.RangeMatcher.on_match:type_name -> xds.type.matcher.v3.Matcher.OnMatch
8, // 5: xds.type.matcher.v3.Int32RangeMatcher.RangeMatcher.ranges:type_name -> xds.type.v3.Int32Range
7, // 6: xds.type.matcher.v3.Int32RangeMatcher.RangeMatcher.on_match:type_name -> xds.type.matcher.v3.Matcher.OnMatch
9, // 7: xds.type.matcher.v3.DoubleRangeMatcher.RangeMatcher.ranges:type_name -> xds.type.v3.DoubleRange
7, // 8: xds.type.matcher.v3.DoubleRangeMatcher.RangeMatcher.on_match:type_name -> xds.type.matcher.v3.Matcher.OnMatch
9, // [9:9] is the sub-list for method output_type
9, // [9:9] is the sub-list for method input_type
9, // [9:9] is the sub-list for extension type_name
9, // [9:9] is the sub-list for extension extendee
0, // [0:9] is the sub-list for field type_name
}
func init() { file_xds_type_matcher_v3_range_proto_init() }
func file_xds_type_matcher_v3_range_proto_init() {
if File_xds_type_matcher_v3_range_proto != nil {
return
}
file_xds_type_matcher_v3_matcher_proto_init()
if !protoimpl.UnsafeEnabled {
file_xds_type_matcher_v3_range_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Int64RangeMatcher); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_xds_type_matcher_v3_range_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Int32RangeMatcher); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_xds_type_matcher_v3_range_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DoubleRangeMatcher); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_xds_type_matcher_v3_range_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Int64RangeMatcher_RangeMatcher); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_xds_type_matcher_v3_range_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Int32RangeMatcher_RangeMatcher); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_xds_type_matcher_v3_range_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DoubleRangeMatcher_RangeMatcher); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_xds_type_matcher_v3_range_proto_rawDesc,
NumEnums: 0,
NumMessages: 6,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_xds_type_matcher_v3_range_proto_goTypes,
DependencyIndexes: file_xds_type_matcher_v3_range_proto_depIdxs,
MessageInfos: file_xds_type_matcher_v3_range_proto_msgTypes,
}.Build()
File_xds_type_matcher_v3_range_proto = out.File
file_xds_type_matcher_v3_range_proto_rawDesc = nil
file_xds_type_matcher_v3_range_proto_goTypes = nil
file_xds_type_matcher_v3_range_proto_depIdxs = nil
}

View File

@@ -0,0 +1,580 @@
// Code generated by protoc-gen-validate. DO NOT EDIT.
// source: xds/type/matcher/v3/range.proto
package v3
import (
"bytes"
"errors"
"fmt"
"net"
"net/mail"
"net/url"
"regexp"
"strings"
"time"
"unicode/utf8"
"google.golang.org/protobuf/types/known/anypb"
)
// ensure the imports are used
var (
_ = bytes.MinRead
_ = errors.New("")
_ = fmt.Print
_ = utf8.UTFMax
_ = (*regexp.Regexp)(nil)
_ = (*strings.Reader)(nil)
_ = net.IPv4len
_ = time.Duration(0)
_ = (*url.URL)(nil)
_ = (*mail.Address)(nil)
_ = anypb.Any{}
)
// Validate checks the field values on Int64RangeMatcher with the rules defined
// in the proto definition for this message. If any rules are violated, an
// error is returned.
func (m *Int64RangeMatcher) Validate() error {
if m == nil {
return nil
}
for idx, item := range m.GetRangeMatchers() {
_, _ = idx, item
if v, ok := interface{}(item).(interface{ Validate() error }); ok {
if err := v.Validate(); err != nil {
return Int64RangeMatcherValidationError{
field: fmt.Sprintf("RangeMatchers[%v]", idx),
reason: "embedded message failed validation",
cause: err,
}
}
}
}
return nil
}
// Int64RangeMatcherValidationError is the validation error returned by
// Int64RangeMatcher.Validate if the designated constraints aren't met.
type Int64RangeMatcherValidationError struct {
field string
reason string
cause error
key bool
}
// Field function returns field value.
func (e Int64RangeMatcherValidationError) Field() string { return e.field }
// Reason function returns reason value.
func (e Int64RangeMatcherValidationError) Reason() string { return e.reason }
// Cause function returns cause value.
func (e Int64RangeMatcherValidationError) Cause() error { return e.cause }
// Key function returns key value.
func (e Int64RangeMatcherValidationError) Key() bool { return e.key }
// ErrorName returns error name.
func (e Int64RangeMatcherValidationError) ErrorName() string {
return "Int64RangeMatcherValidationError"
}
// Error satisfies the builtin error interface
func (e Int64RangeMatcherValidationError) Error() string {
cause := ""
if e.cause != nil {
cause = fmt.Sprintf(" | caused by: %v", e.cause)
}
key := ""
if e.key {
key = "key for "
}
return fmt.Sprintf(
"invalid %sInt64RangeMatcher.%s: %s%s",
key,
e.field,
e.reason,
cause)
}
var _ error = Int64RangeMatcherValidationError{}
var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = Int64RangeMatcherValidationError{}
// Validate checks the field values on Int32RangeMatcher with the rules defined
// in the proto definition for this message. If any rules are violated, an
// error is returned.
func (m *Int32RangeMatcher) Validate() error {
if m == nil {
return nil
}
for idx, item := range m.GetRangeMatchers() {
_, _ = idx, item
if v, ok := interface{}(item).(interface{ Validate() error }); ok {
if err := v.Validate(); err != nil {
return Int32RangeMatcherValidationError{
field: fmt.Sprintf("RangeMatchers[%v]", idx),
reason: "embedded message failed validation",
cause: err,
}
}
}
}
return nil
}
// Int32RangeMatcherValidationError is the validation error returned by
// Int32RangeMatcher.Validate if the designated constraints aren't met.
type Int32RangeMatcherValidationError struct {
field string
reason string
cause error
key bool
}
// Field function returns field value.
func (e Int32RangeMatcherValidationError) Field() string { return e.field }
// Reason function returns reason value.
func (e Int32RangeMatcherValidationError) Reason() string { return e.reason }
// Cause function returns cause value.
func (e Int32RangeMatcherValidationError) Cause() error { return e.cause }
// Key function returns key value.
func (e Int32RangeMatcherValidationError) Key() bool { return e.key }
// ErrorName returns error name.
func (e Int32RangeMatcherValidationError) ErrorName() string {
return "Int32RangeMatcherValidationError"
}
// Error satisfies the builtin error interface
func (e Int32RangeMatcherValidationError) Error() string {
cause := ""
if e.cause != nil {
cause = fmt.Sprintf(" | caused by: %v", e.cause)
}
key := ""
if e.key {
key = "key for "
}
return fmt.Sprintf(
"invalid %sInt32RangeMatcher.%s: %s%s",
key,
e.field,
e.reason,
cause)
}
var _ error = Int32RangeMatcherValidationError{}
var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = Int32RangeMatcherValidationError{}
// Validate checks the field values on DoubleRangeMatcher with the rules
// defined in the proto definition for this message. If any rules are
// violated, an error is returned.
func (m *DoubleRangeMatcher) Validate() error {
if m == nil {
return nil
}
for idx, item := range m.GetRangeMatchers() {
_, _ = idx, item
if v, ok := interface{}(item).(interface{ Validate() error }); ok {
if err := v.Validate(); err != nil {
return DoubleRangeMatcherValidationError{
field: fmt.Sprintf("RangeMatchers[%v]", idx),
reason: "embedded message failed validation",
cause: err,
}
}
}
}
return nil
}
// DoubleRangeMatcherValidationError is the validation error returned by
// DoubleRangeMatcher.Validate if the designated constraints aren't met.
type DoubleRangeMatcherValidationError struct {
field string
reason string
cause error
key bool
}
// Field function returns field value.
func (e DoubleRangeMatcherValidationError) Field() string { return e.field }
// Reason function returns reason value.
func (e DoubleRangeMatcherValidationError) Reason() string { return e.reason }
// Cause function returns cause value.
func (e DoubleRangeMatcherValidationError) Cause() error { return e.cause }
// Key function returns key value.
func (e DoubleRangeMatcherValidationError) Key() bool { return e.key }
// ErrorName returns error name.
func (e DoubleRangeMatcherValidationError) ErrorName() string {
return "DoubleRangeMatcherValidationError"
}
// Error satisfies the builtin error interface
func (e DoubleRangeMatcherValidationError) Error() string {
cause := ""
if e.cause != nil {
cause = fmt.Sprintf(" | caused by: %v", e.cause)
}
key := ""
if e.key {
key = "key for "
}
return fmt.Sprintf(
"invalid %sDoubleRangeMatcher.%s: %s%s",
key,
e.field,
e.reason,
cause)
}
var _ error = DoubleRangeMatcherValidationError{}
var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = DoubleRangeMatcherValidationError{}
// Validate checks the field values on Int64RangeMatcher_RangeMatcher with the
// rules defined in the proto definition for this message. If any rules are
// violated, an error is returned.
func (m *Int64RangeMatcher_RangeMatcher) Validate() error {
if m == nil {
return nil
}
if len(m.GetRanges()) < 1 {
return Int64RangeMatcher_RangeMatcherValidationError{
field: "Ranges",
reason: "value must contain at least 1 item(s)",
}
}
for idx, item := range m.GetRanges() {
_, _ = idx, item
if v, ok := interface{}(item).(interface{ Validate() error }); ok {
if err := v.Validate(); err != nil {
return Int64RangeMatcher_RangeMatcherValidationError{
field: fmt.Sprintf("Ranges[%v]", idx),
reason: "embedded message failed validation",
cause: err,
}
}
}
}
if v, ok := interface{}(m.GetOnMatch()).(interface{ Validate() error }); ok {
if err := v.Validate(); err != nil {
return Int64RangeMatcher_RangeMatcherValidationError{
field: "OnMatch",
reason: "embedded message failed validation",
cause: err,
}
}
}
return nil
}
// Int64RangeMatcher_RangeMatcherValidationError is the validation error
// returned by Int64RangeMatcher_RangeMatcher.Validate if the designated
// constraints aren't met.
type Int64RangeMatcher_RangeMatcherValidationError struct {
field string
reason string
cause error
key bool
}
// Field function returns field value.
func (e Int64RangeMatcher_RangeMatcherValidationError) Field() string { return e.field }
// Reason function returns reason value.
func (e Int64RangeMatcher_RangeMatcherValidationError) Reason() string { return e.reason }
// Cause function returns cause value.
func (e Int64RangeMatcher_RangeMatcherValidationError) Cause() error { return e.cause }
// Key function returns key value.
func (e Int64RangeMatcher_RangeMatcherValidationError) Key() bool { return e.key }
// ErrorName returns error name.
func (e Int64RangeMatcher_RangeMatcherValidationError) ErrorName() string {
return "Int64RangeMatcher_RangeMatcherValidationError"
}
// Error satisfies the builtin error interface
func (e Int64RangeMatcher_RangeMatcherValidationError) Error() string {
cause := ""
if e.cause != nil {
cause = fmt.Sprintf(" | caused by: %v", e.cause)
}
key := ""
if e.key {
key = "key for "
}
return fmt.Sprintf(
"invalid %sInt64RangeMatcher_RangeMatcher.%s: %s%s",
key,
e.field,
e.reason,
cause)
}
var _ error = Int64RangeMatcher_RangeMatcherValidationError{}
var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = Int64RangeMatcher_RangeMatcherValidationError{}
// Validate checks the field values on Int32RangeMatcher_RangeMatcher with the
// rules defined in the proto definition for this message. If any rules are
// violated, an error is returned.
func (m *Int32RangeMatcher_RangeMatcher) Validate() error {
if m == nil {
return nil
}
if len(m.GetRanges()) < 1 {
return Int32RangeMatcher_RangeMatcherValidationError{
field: "Ranges",
reason: "value must contain at least 1 item(s)",
}
}
for idx, item := range m.GetRanges() {
_, _ = idx, item
if v, ok := interface{}(item).(interface{ Validate() error }); ok {
if err := v.Validate(); err != nil {
return Int32RangeMatcher_RangeMatcherValidationError{
field: fmt.Sprintf("Ranges[%v]", idx),
reason: "embedded message failed validation",
cause: err,
}
}
}
}
if v, ok := interface{}(m.GetOnMatch()).(interface{ Validate() error }); ok {
if err := v.Validate(); err != nil {
return Int32RangeMatcher_RangeMatcherValidationError{
field: "OnMatch",
reason: "embedded message failed validation",
cause: err,
}
}
}
return nil
}
// Int32RangeMatcher_RangeMatcherValidationError is the validation error
// returned by Int32RangeMatcher_RangeMatcher.Validate if the designated
// constraints aren't met.
type Int32RangeMatcher_RangeMatcherValidationError struct {
field string
reason string
cause error
key bool
}
// Field function returns field value.
func (e Int32RangeMatcher_RangeMatcherValidationError) Field() string { return e.field }
// Reason function returns reason value.
func (e Int32RangeMatcher_RangeMatcherValidationError) Reason() string { return e.reason }
// Cause function returns cause value.
func (e Int32RangeMatcher_RangeMatcherValidationError) Cause() error { return e.cause }
// Key function returns key value.
func (e Int32RangeMatcher_RangeMatcherValidationError) Key() bool { return e.key }
// ErrorName returns error name.
func (e Int32RangeMatcher_RangeMatcherValidationError) ErrorName() string {
return "Int32RangeMatcher_RangeMatcherValidationError"
}
// Error satisfies the builtin error interface
func (e Int32RangeMatcher_RangeMatcherValidationError) Error() string {
cause := ""
if e.cause != nil {
cause = fmt.Sprintf(" | caused by: %v", e.cause)
}
key := ""
if e.key {
key = "key for "
}
return fmt.Sprintf(
"invalid %sInt32RangeMatcher_RangeMatcher.%s: %s%s",
key,
e.field,
e.reason,
cause)
}
var _ error = Int32RangeMatcher_RangeMatcherValidationError{}
var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = Int32RangeMatcher_RangeMatcherValidationError{}
// Validate checks the field values on DoubleRangeMatcher_RangeMatcher with the
// rules defined in the proto definition for this message. If any rules are
// violated, an error is returned.
func (m *DoubleRangeMatcher_RangeMatcher) Validate() error {
if m == nil {
return nil
}
if len(m.GetRanges()) < 1 {
return DoubleRangeMatcher_RangeMatcherValidationError{
field: "Ranges",
reason: "value must contain at least 1 item(s)",
}
}
for idx, item := range m.GetRanges() {
_, _ = idx, item
if v, ok := interface{}(item).(interface{ Validate() error }); ok {
if err := v.Validate(); err != nil {
return DoubleRangeMatcher_RangeMatcherValidationError{
field: fmt.Sprintf("Ranges[%v]", idx),
reason: "embedded message failed validation",
cause: err,
}
}
}
}
if v, ok := interface{}(m.GetOnMatch()).(interface{ Validate() error }); ok {
if err := v.Validate(); err != nil {
return DoubleRangeMatcher_RangeMatcherValidationError{
field: "OnMatch",
reason: "embedded message failed validation",
cause: err,
}
}
}
return nil
}
// DoubleRangeMatcher_RangeMatcherValidationError is the validation error
// returned by DoubleRangeMatcher_RangeMatcher.Validate if the designated
// constraints aren't met.
type DoubleRangeMatcher_RangeMatcherValidationError struct {
field string
reason string
cause error
key bool
}
// Field function returns field value.
func (e DoubleRangeMatcher_RangeMatcherValidationError) Field() string { return e.field }
// Reason function returns reason value.
func (e DoubleRangeMatcher_RangeMatcherValidationError) Reason() string { return e.reason }
// Cause function returns cause value.
func (e DoubleRangeMatcher_RangeMatcherValidationError) Cause() error { return e.cause }
// Key function returns key value.
func (e DoubleRangeMatcher_RangeMatcherValidationError) Key() bool { return e.key }
// ErrorName returns error name.
func (e DoubleRangeMatcher_RangeMatcherValidationError) ErrorName() string {
return "DoubleRangeMatcher_RangeMatcherValidationError"
}
// Error satisfies the builtin error interface
func (e DoubleRangeMatcher_RangeMatcherValidationError) Error() string {
cause := ""
if e.cause != nil {
cause = fmt.Sprintf(" | caused by: %v", e.cause)
}
key := ""
if e.key {
key = "key for "
}
return fmt.Sprintf(
"invalid %sDoubleRangeMatcher_RangeMatcher.%s: %s%s",
key,
e.field,
e.reason,
cause)
}
var _ error = DoubleRangeMatcher_RangeMatcherValidationError{}
var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = DoubleRangeMatcher_RangeMatcherValidationError{}

View File

@@ -0,0 +1,246 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.25.0
// protoc v3.18.0
// source: xds/type/matcher/v3/regex.proto
package v3
import (
_ "github.com/envoyproxy/protoc-gen-validate/validate"
proto "github.com/golang/protobuf/proto"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// This is a compile-time assertion that a sufficiently up-to-date version
// of the legacy proto package is being used.
const _ = proto.ProtoPackageIsVersion4
type RegexMatcher struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Types that are assignable to EngineType:
// *RegexMatcher_GoogleRe2
EngineType isRegexMatcher_EngineType `protobuf_oneof:"engine_type"`
Regex string `protobuf:"bytes,2,opt,name=regex,proto3" json:"regex,omitempty"`
}
func (x *RegexMatcher) Reset() {
*x = RegexMatcher{}
if protoimpl.UnsafeEnabled {
mi := &file_xds_type_matcher_v3_regex_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *RegexMatcher) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*RegexMatcher) ProtoMessage() {}
func (x *RegexMatcher) ProtoReflect() protoreflect.Message {
mi := &file_xds_type_matcher_v3_regex_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use RegexMatcher.ProtoReflect.Descriptor instead.
func (*RegexMatcher) Descriptor() ([]byte, []int) {
return file_xds_type_matcher_v3_regex_proto_rawDescGZIP(), []int{0}
}
func (m *RegexMatcher) GetEngineType() isRegexMatcher_EngineType {
if m != nil {
return m.EngineType
}
return nil
}
func (x *RegexMatcher) GetGoogleRe2() *RegexMatcher_GoogleRE2 {
if x, ok := x.GetEngineType().(*RegexMatcher_GoogleRe2); ok {
return x.GoogleRe2
}
return nil
}
func (x *RegexMatcher) GetRegex() string {
if x != nil {
return x.Regex
}
return ""
}
type isRegexMatcher_EngineType interface {
isRegexMatcher_EngineType()
}
type RegexMatcher_GoogleRe2 struct {
GoogleRe2 *RegexMatcher_GoogleRE2 `protobuf:"bytes,1,opt,name=google_re2,json=googleRe2,proto3,oneof"`
}
func (*RegexMatcher_GoogleRe2) isRegexMatcher_EngineType() {}
type RegexMatcher_GoogleRE2 struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *RegexMatcher_GoogleRE2) Reset() {
*x = RegexMatcher_GoogleRE2{}
if protoimpl.UnsafeEnabled {
mi := &file_xds_type_matcher_v3_regex_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *RegexMatcher_GoogleRE2) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*RegexMatcher_GoogleRE2) ProtoMessage() {}
func (x *RegexMatcher_GoogleRE2) ProtoReflect() protoreflect.Message {
mi := &file_xds_type_matcher_v3_regex_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use RegexMatcher_GoogleRE2.ProtoReflect.Descriptor instead.
func (*RegexMatcher_GoogleRE2) Descriptor() ([]byte, []int) {
return file_xds_type_matcher_v3_regex_proto_rawDescGZIP(), []int{0, 0}
}
var File_xds_type_matcher_v3_regex_proto protoreflect.FileDescriptor
var file_xds_type_matcher_v3_regex_proto_rawDesc = []byte{
0x0a, 0x1f, 0x78, 0x64, 0x73, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68,
0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x65, 0x67, 0x65, 0x78, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x12, 0x13, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63,
0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65,
0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22,
0xa6, 0x01, 0x0a, 0x0c, 0x52, 0x65, 0x67, 0x65, 0x78, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72,
0x12, 0x56, 0x0a, 0x0a, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5f, 0x72, 0x65, 0x32, 0x18, 0x01,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e,
0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x67, 0x65, 0x78,
0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x52, 0x45,
0x32, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x09, 0x67,
0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x52, 0x65, 0x32, 0x12, 0x1d, 0x0a, 0x05, 0x72, 0x65, 0x67, 0x65,
0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01,
0x52, 0x05, 0x72, 0x65, 0x67, 0x65, 0x78, 0x1a, 0x0b, 0x0a, 0x09, 0x47, 0x6f, 0x6f, 0x67, 0x6c,
0x65, 0x52, 0x45, 0x32, 0x42, 0x12, 0x0a, 0x0b, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x5f, 0x74,
0x79, 0x70, 0x65, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x42, 0x5a, 0x0a, 0x1e, 0x63, 0x6f, 0x6d, 0x2e,
0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e,
0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x42, 0x0a, 0x52, 0x65, 0x67, 0x65,
0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62,
0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6e, 0x63, 0x66, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x67, 0x6f,
0x2f, 0x78, 0x64, 0x73, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65,
0x72, 0x2f, 0x76, 0x33, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_xds_type_matcher_v3_regex_proto_rawDescOnce sync.Once
file_xds_type_matcher_v3_regex_proto_rawDescData = file_xds_type_matcher_v3_regex_proto_rawDesc
)
func file_xds_type_matcher_v3_regex_proto_rawDescGZIP() []byte {
file_xds_type_matcher_v3_regex_proto_rawDescOnce.Do(func() {
file_xds_type_matcher_v3_regex_proto_rawDescData = protoimpl.X.CompressGZIP(file_xds_type_matcher_v3_regex_proto_rawDescData)
})
return file_xds_type_matcher_v3_regex_proto_rawDescData
}
var file_xds_type_matcher_v3_regex_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_xds_type_matcher_v3_regex_proto_goTypes = []interface{}{
(*RegexMatcher)(nil), // 0: xds.type.matcher.v3.RegexMatcher
(*RegexMatcher_GoogleRE2)(nil), // 1: xds.type.matcher.v3.RegexMatcher.GoogleRE2
}
var file_xds_type_matcher_v3_regex_proto_depIdxs = []int32{
1, // 0: xds.type.matcher.v3.RegexMatcher.google_re2:type_name -> xds.type.matcher.v3.RegexMatcher.GoogleRE2
1, // [1:1] is the sub-list for method output_type
1, // [1:1] is the sub-list for method input_type
1, // [1:1] is the sub-list for extension type_name
1, // [1:1] is the sub-list for extension extendee
0, // [0:1] is the sub-list for field type_name
}
func init() { file_xds_type_matcher_v3_regex_proto_init() }
func file_xds_type_matcher_v3_regex_proto_init() {
if File_xds_type_matcher_v3_regex_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_xds_type_matcher_v3_regex_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*RegexMatcher); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_xds_type_matcher_v3_regex_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*RegexMatcher_GoogleRE2); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
file_xds_type_matcher_v3_regex_proto_msgTypes[0].OneofWrappers = []interface{}{
(*RegexMatcher_GoogleRe2)(nil),
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_xds_type_matcher_v3_regex_proto_rawDesc,
NumEnums: 0,
NumMessages: 2,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_xds_type_matcher_v3_regex_proto_goTypes,
DependencyIndexes: file_xds_type_matcher_v3_regex_proto_depIdxs,
MessageInfos: file_xds_type_matcher_v3_regex_proto_msgTypes,
}.Build()
File_xds_type_matcher_v3_regex_proto = out.File
file_xds_type_matcher_v3_regex_proto_rawDesc = nil
file_xds_type_matcher_v3_regex_proto_goTypes = nil
file_xds_type_matcher_v3_regex_proto_depIdxs = nil
}

View File

@@ -0,0 +1,202 @@
// Code generated by protoc-gen-validate. DO NOT EDIT.
// source: xds/type/matcher/v3/regex.proto
package v3
import (
"bytes"
"errors"
"fmt"
"net"
"net/mail"
"net/url"
"regexp"
"strings"
"time"
"unicode/utf8"
"google.golang.org/protobuf/types/known/anypb"
)
// ensure the imports are used
var (
_ = bytes.MinRead
_ = errors.New("")
_ = fmt.Print
_ = utf8.UTFMax
_ = (*regexp.Regexp)(nil)
_ = (*strings.Reader)(nil)
_ = net.IPv4len
_ = time.Duration(0)
_ = (*url.URL)(nil)
_ = (*mail.Address)(nil)
_ = anypb.Any{}
)
// Validate checks the field values on RegexMatcher with the rules defined in
// the proto definition for this message. If any rules are violated, an error
// is returned.
func (m *RegexMatcher) Validate() error {
if m == nil {
return nil
}
if utf8.RuneCountInString(m.GetRegex()) < 1 {
return RegexMatcherValidationError{
field: "Regex",
reason: "value length must be at least 1 runes",
}
}
switch m.EngineType.(type) {
case *RegexMatcher_GoogleRe2:
if m.GetGoogleRe2() == nil {
return RegexMatcherValidationError{
field: "GoogleRe2",
reason: "value is required",
}
}
if v, ok := interface{}(m.GetGoogleRe2()).(interface{ Validate() error }); ok {
if err := v.Validate(); err != nil {
return RegexMatcherValidationError{
field: "GoogleRe2",
reason: "embedded message failed validation",
cause: err,
}
}
}
default:
return RegexMatcherValidationError{
field: "EngineType",
reason: "value is required",
}
}
return nil
}
// RegexMatcherValidationError is the validation error returned by
// RegexMatcher.Validate if the designated constraints aren't met.
type RegexMatcherValidationError struct {
field string
reason string
cause error
key bool
}
// Field function returns field value.
func (e RegexMatcherValidationError) Field() string { return e.field }
// Reason function returns reason value.
func (e RegexMatcherValidationError) Reason() string { return e.reason }
// Cause function returns cause value.
func (e RegexMatcherValidationError) Cause() error { return e.cause }
// Key function returns key value.
func (e RegexMatcherValidationError) Key() bool { return e.key }
// ErrorName returns error name.
func (e RegexMatcherValidationError) ErrorName() string { return "RegexMatcherValidationError" }
// Error satisfies the builtin error interface
func (e RegexMatcherValidationError) Error() string {
cause := ""
if e.cause != nil {
cause = fmt.Sprintf(" | caused by: %v", e.cause)
}
key := ""
if e.key {
key = "key for "
}
return fmt.Sprintf(
"invalid %sRegexMatcher.%s: %s%s",
key,
e.field,
e.reason,
cause)
}
var _ error = RegexMatcherValidationError{}
var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = RegexMatcherValidationError{}
// Validate checks the field values on RegexMatcher_GoogleRE2 with the rules
// defined in the proto definition for this message. If any rules are
// violated, an error is returned.
func (m *RegexMatcher_GoogleRE2) Validate() error {
if m == nil {
return nil
}
return nil
}
// RegexMatcher_GoogleRE2ValidationError is the validation error returned by
// RegexMatcher_GoogleRE2.Validate if the designated constraints aren't met.
type RegexMatcher_GoogleRE2ValidationError struct {
field string
reason string
cause error
key bool
}
// Field function returns field value.
func (e RegexMatcher_GoogleRE2ValidationError) Field() string { return e.field }
// Reason function returns reason value.
func (e RegexMatcher_GoogleRE2ValidationError) Reason() string { return e.reason }
// Cause function returns cause value.
func (e RegexMatcher_GoogleRE2ValidationError) Cause() error { return e.cause }
// Key function returns key value.
func (e RegexMatcher_GoogleRE2ValidationError) Key() bool { return e.key }
// ErrorName returns error name.
func (e RegexMatcher_GoogleRE2ValidationError) ErrorName() string {
return "RegexMatcher_GoogleRE2ValidationError"
}
// Error satisfies the builtin error interface
func (e RegexMatcher_GoogleRE2ValidationError) Error() string {
cause := ""
if e.cause != nil {
cause = fmt.Sprintf(" | caused by: %v", e.cause)
}
key := ""
if e.key {
key = "key for "
}
return fmt.Sprintf(
"invalid %sRegexMatcher_GoogleRE2.%s: %s%s",
key,
e.field,
e.reason,
cause)
}
var _ error = RegexMatcher_GoogleRE2ValidationError{}
var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = RegexMatcher_GoogleRE2ValidationError{}

View File

@@ -0,0 +1,334 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.25.0
// protoc v3.18.0
// source: xds/type/matcher/v3/string.proto
package v3
import (
_ "github.com/envoyproxy/protoc-gen-validate/validate"
proto "github.com/golang/protobuf/proto"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// This is a compile-time assertion that a sufficiently up-to-date version
// of the legacy proto package is being used.
const _ = proto.ProtoPackageIsVersion4
type StringMatcher struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Types that are assignable to MatchPattern:
// *StringMatcher_Exact
// *StringMatcher_Prefix
// *StringMatcher_Suffix
// *StringMatcher_SafeRegex
// *StringMatcher_Contains
MatchPattern isStringMatcher_MatchPattern `protobuf_oneof:"match_pattern"`
IgnoreCase bool `protobuf:"varint,6,opt,name=ignore_case,json=ignoreCase,proto3" json:"ignore_case,omitempty"`
}
func (x *StringMatcher) Reset() {
*x = StringMatcher{}
if protoimpl.UnsafeEnabled {
mi := &file_xds_type_matcher_v3_string_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *StringMatcher) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*StringMatcher) ProtoMessage() {}
func (x *StringMatcher) ProtoReflect() protoreflect.Message {
mi := &file_xds_type_matcher_v3_string_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use StringMatcher.ProtoReflect.Descriptor instead.
func (*StringMatcher) Descriptor() ([]byte, []int) {
return file_xds_type_matcher_v3_string_proto_rawDescGZIP(), []int{0}
}
func (m *StringMatcher) GetMatchPattern() isStringMatcher_MatchPattern {
if m != nil {
return m.MatchPattern
}
return nil
}
func (x *StringMatcher) GetExact() string {
if x, ok := x.GetMatchPattern().(*StringMatcher_Exact); ok {
return x.Exact
}
return ""
}
func (x *StringMatcher) GetPrefix() string {
if x, ok := x.GetMatchPattern().(*StringMatcher_Prefix); ok {
return x.Prefix
}
return ""
}
func (x *StringMatcher) GetSuffix() string {
if x, ok := x.GetMatchPattern().(*StringMatcher_Suffix); ok {
return x.Suffix
}
return ""
}
func (x *StringMatcher) GetSafeRegex() *RegexMatcher {
if x, ok := x.GetMatchPattern().(*StringMatcher_SafeRegex); ok {
return x.SafeRegex
}
return nil
}
func (x *StringMatcher) GetContains() string {
if x, ok := x.GetMatchPattern().(*StringMatcher_Contains); ok {
return x.Contains
}
return ""
}
func (x *StringMatcher) GetIgnoreCase() bool {
if x != nil {
return x.IgnoreCase
}
return false
}
type isStringMatcher_MatchPattern interface {
isStringMatcher_MatchPattern()
}
type StringMatcher_Exact struct {
Exact string `protobuf:"bytes,1,opt,name=exact,proto3,oneof"`
}
type StringMatcher_Prefix struct {
Prefix string `protobuf:"bytes,2,opt,name=prefix,proto3,oneof"`
}
type StringMatcher_Suffix struct {
Suffix string `protobuf:"bytes,3,opt,name=suffix,proto3,oneof"`
}
type StringMatcher_SafeRegex struct {
SafeRegex *RegexMatcher `protobuf:"bytes,5,opt,name=safe_regex,json=safeRegex,proto3,oneof"`
}
type StringMatcher_Contains struct {
Contains string `protobuf:"bytes,7,opt,name=contains,proto3,oneof"`
}
func (*StringMatcher_Exact) isStringMatcher_MatchPattern() {}
func (*StringMatcher_Prefix) isStringMatcher_MatchPattern() {}
func (*StringMatcher_Suffix) isStringMatcher_MatchPattern() {}
func (*StringMatcher_SafeRegex) isStringMatcher_MatchPattern() {}
func (*StringMatcher_Contains) isStringMatcher_MatchPattern() {}
type ListStringMatcher struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Patterns []*StringMatcher `protobuf:"bytes,1,rep,name=patterns,proto3" json:"patterns,omitempty"`
}
func (x *ListStringMatcher) Reset() {
*x = ListStringMatcher{}
if protoimpl.UnsafeEnabled {
mi := &file_xds_type_matcher_v3_string_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ListStringMatcher) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ListStringMatcher) ProtoMessage() {}
func (x *ListStringMatcher) ProtoReflect() protoreflect.Message {
mi := &file_xds_type_matcher_v3_string_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ListStringMatcher.ProtoReflect.Descriptor instead.
func (*ListStringMatcher) Descriptor() ([]byte, []int) {
return file_xds_type_matcher_v3_string_proto_rawDescGZIP(), []int{1}
}
func (x *ListStringMatcher) GetPatterns() []*StringMatcher {
if x != nil {
return x.Patterns
}
return nil
}
var File_xds_type_matcher_v3_string_proto protoreflect.FileDescriptor
var file_xds_type_matcher_v3_string_proto_rawDesc = []byte{
0x0a, 0x20, 0x78, 0x64, 0x73, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68,
0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x12, 0x13, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74,
0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x1a, 0x1f, 0x78, 0x64, 0x73, 0x2f, 0x74, 0x79, 0x70,
0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x65, 0x67,
0x65, 0x78, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61,
0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x22, 0x99, 0x02, 0x0a, 0x0d, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x74, 0x63,
0x68, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x05, 0x65, 0x78, 0x61, 0x63, 0x74, 0x18, 0x01, 0x20, 0x01,
0x28, 0x09, 0x48, 0x00, 0x52, 0x05, 0x65, 0x78, 0x61, 0x63, 0x74, 0x12, 0x21, 0x0a, 0x06, 0x70,
0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04,
0x72, 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x21,
0x0a, 0x06, 0x73, 0x75, 0x66, 0x66, 0x69, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07,
0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x06, 0x73, 0x75, 0x66, 0x66, 0x69,
0x78, 0x12, 0x4c, 0x0a, 0x0a, 0x73, 0x61, 0x66, 0x65, 0x5f, 0x72, 0x65, 0x67, 0x65, 0x78, 0x18,
0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65,
0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x67, 0x65,
0x78, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02,
0x10, 0x01, 0x48, 0x00, 0x52, 0x09, 0x73, 0x61, 0x66, 0x65, 0x52, 0x65, 0x67, 0x65, 0x78, 0x12,
0x25, 0x0a, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28,
0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x08, 0x63, 0x6f,
0x6e, 0x74, 0x61, 0x69, 0x6e, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65,
0x5f, 0x63, 0x61, 0x73, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x69, 0x67, 0x6e,
0x6f, 0x72, 0x65, 0x43, 0x61, 0x73, 0x65, 0x42, 0x14, 0x0a, 0x0d, 0x6d, 0x61, 0x74, 0x63, 0x68,
0x5f, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x22, 0x5d, 0x0a,
0x11, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x74, 0x63, 0x68,
0x65, 0x72, 0x12, 0x48, 0x0a, 0x08, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x73, 0x18, 0x01,
0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e,
0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e,
0x67, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02,
0x08, 0x01, 0x52, 0x08, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x73, 0x42, 0x5b, 0x0a, 0x1e,
0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74,
0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x42, 0x0b,
0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2a, 0x67,
0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6e, 0x63, 0x66, 0x2f, 0x78,
0x64, 0x73, 0x2f, 0x67, 0x6f, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d,
0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x33,
}
var (
file_xds_type_matcher_v3_string_proto_rawDescOnce sync.Once
file_xds_type_matcher_v3_string_proto_rawDescData = file_xds_type_matcher_v3_string_proto_rawDesc
)
func file_xds_type_matcher_v3_string_proto_rawDescGZIP() []byte {
file_xds_type_matcher_v3_string_proto_rawDescOnce.Do(func() {
file_xds_type_matcher_v3_string_proto_rawDescData = protoimpl.X.CompressGZIP(file_xds_type_matcher_v3_string_proto_rawDescData)
})
return file_xds_type_matcher_v3_string_proto_rawDescData
}
var file_xds_type_matcher_v3_string_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_xds_type_matcher_v3_string_proto_goTypes = []interface{}{
(*StringMatcher)(nil), // 0: xds.type.matcher.v3.StringMatcher
(*ListStringMatcher)(nil), // 1: xds.type.matcher.v3.ListStringMatcher
(*RegexMatcher)(nil), // 2: xds.type.matcher.v3.RegexMatcher
}
var file_xds_type_matcher_v3_string_proto_depIdxs = []int32{
2, // 0: xds.type.matcher.v3.StringMatcher.safe_regex:type_name -> xds.type.matcher.v3.RegexMatcher
0, // 1: xds.type.matcher.v3.ListStringMatcher.patterns:type_name -> xds.type.matcher.v3.StringMatcher
2, // [2:2] is the sub-list for method output_type
2, // [2:2] is the sub-list for method input_type
2, // [2:2] is the sub-list for extension type_name
2, // [2:2] is the sub-list for extension extendee
0, // [0:2] is the sub-list for field type_name
}
func init() { file_xds_type_matcher_v3_string_proto_init() }
func file_xds_type_matcher_v3_string_proto_init() {
if File_xds_type_matcher_v3_string_proto != nil {
return
}
file_xds_type_matcher_v3_regex_proto_init()
if !protoimpl.UnsafeEnabled {
file_xds_type_matcher_v3_string_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*StringMatcher); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_xds_type_matcher_v3_string_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ListStringMatcher); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
file_xds_type_matcher_v3_string_proto_msgTypes[0].OneofWrappers = []interface{}{
(*StringMatcher_Exact)(nil),
(*StringMatcher_Prefix)(nil),
(*StringMatcher_Suffix)(nil),
(*StringMatcher_SafeRegex)(nil),
(*StringMatcher_Contains)(nil),
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_xds_type_matcher_v3_string_proto_rawDesc,
NumEnums: 0,
NumMessages: 2,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_xds_type_matcher_v3_string_proto_goTypes,
DependencyIndexes: file_xds_type_matcher_v3_string_proto_depIdxs,
MessageInfos: file_xds_type_matcher_v3_string_proto_msgTypes,
}.Build()
File_xds_type_matcher_v3_string_proto = out.File
file_xds_type_matcher_v3_string_proto_rawDesc = nil
file_xds_type_matcher_v3_string_proto_goTypes = nil
file_xds_type_matcher_v3_string_proto_depIdxs = nil
}

View File

@@ -0,0 +1,249 @@
// Code generated by protoc-gen-validate. DO NOT EDIT.
// source: xds/type/matcher/v3/string.proto
package v3
import (
"bytes"
"errors"
"fmt"
"net"
"net/mail"
"net/url"
"regexp"
"strings"
"time"
"unicode/utf8"
"google.golang.org/protobuf/types/known/anypb"
)
// ensure the imports are used
var (
_ = bytes.MinRead
_ = errors.New("")
_ = fmt.Print
_ = utf8.UTFMax
_ = (*regexp.Regexp)(nil)
_ = (*strings.Reader)(nil)
_ = net.IPv4len
_ = time.Duration(0)
_ = (*url.URL)(nil)
_ = (*mail.Address)(nil)
_ = anypb.Any{}
)
// Validate checks the field values on StringMatcher with the rules defined in
// the proto definition for this message. If any rules are violated, an error
// is returned.
func (m *StringMatcher) Validate() error {
if m == nil {
return nil
}
// no validation rules for IgnoreCase
switch m.MatchPattern.(type) {
case *StringMatcher_Exact:
// no validation rules for Exact
case *StringMatcher_Prefix:
if utf8.RuneCountInString(m.GetPrefix()) < 1 {
return StringMatcherValidationError{
field: "Prefix",
reason: "value length must be at least 1 runes",
}
}
case *StringMatcher_Suffix:
if utf8.RuneCountInString(m.GetSuffix()) < 1 {
return StringMatcherValidationError{
field: "Suffix",
reason: "value length must be at least 1 runes",
}
}
case *StringMatcher_SafeRegex:
if m.GetSafeRegex() == nil {
return StringMatcherValidationError{
field: "SafeRegex",
reason: "value is required",
}
}
if v, ok := interface{}(m.GetSafeRegex()).(interface{ Validate() error }); ok {
if err := v.Validate(); err != nil {
return StringMatcherValidationError{
field: "SafeRegex",
reason: "embedded message failed validation",
cause: err,
}
}
}
case *StringMatcher_Contains:
if utf8.RuneCountInString(m.GetContains()) < 1 {
return StringMatcherValidationError{
field: "Contains",
reason: "value length must be at least 1 runes",
}
}
default:
return StringMatcherValidationError{
field: "MatchPattern",
reason: "value is required",
}
}
return nil
}
// StringMatcherValidationError is the validation error returned by
// StringMatcher.Validate if the designated constraints aren't met.
type StringMatcherValidationError struct {
field string
reason string
cause error
key bool
}
// Field function returns field value.
func (e StringMatcherValidationError) Field() string { return e.field }
// Reason function returns reason value.
func (e StringMatcherValidationError) Reason() string { return e.reason }
// Cause function returns cause value.
func (e StringMatcherValidationError) Cause() error { return e.cause }
// Key function returns key value.
func (e StringMatcherValidationError) Key() bool { return e.key }
// ErrorName returns error name.
func (e StringMatcherValidationError) ErrorName() string { return "StringMatcherValidationError" }
// Error satisfies the builtin error interface
func (e StringMatcherValidationError) Error() string {
cause := ""
if e.cause != nil {
cause = fmt.Sprintf(" | caused by: %v", e.cause)
}
key := ""
if e.key {
key = "key for "
}
return fmt.Sprintf(
"invalid %sStringMatcher.%s: %s%s",
key,
e.field,
e.reason,
cause)
}
var _ error = StringMatcherValidationError{}
var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = StringMatcherValidationError{}
// Validate checks the field values on ListStringMatcher with the rules defined
// in the proto definition for this message. If any rules are violated, an
// error is returned.
func (m *ListStringMatcher) Validate() error {
if m == nil {
return nil
}
if len(m.GetPatterns()) < 1 {
return ListStringMatcherValidationError{
field: "Patterns",
reason: "value must contain at least 1 item(s)",
}
}
for idx, item := range m.GetPatterns() {
_, _ = idx, item
if v, ok := interface{}(item).(interface{ Validate() error }); ok {
if err := v.Validate(); err != nil {
return ListStringMatcherValidationError{
field: fmt.Sprintf("Patterns[%v]", idx),
reason: "embedded message failed validation",
cause: err,
}
}
}
}
return nil
}
// ListStringMatcherValidationError is the validation error returned by
// ListStringMatcher.Validate if the designated constraints aren't met.
type ListStringMatcherValidationError struct {
field string
reason string
cause error
key bool
}
// Field function returns field value.
func (e ListStringMatcherValidationError) Field() string { return e.field }
// Reason function returns reason value.
func (e ListStringMatcherValidationError) Reason() string { return e.reason }
// Cause function returns cause value.
func (e ListStringMatcherValidationError) Cause() error { return e.cause }
// Key function returns key value.
func (e ListStringMatcherValidationError) Key() bool { return e.key }
// ErrorName returns error name.
func (e ListStringMatcherValidationError) ErrorName() string {
return "ListStringMatcherValidationError"
}
// Error satisfies the builtin error interface
func (e ListStringMatcherValidationError) Error() string {
cause := ""
if e.cause != nil {
cause = fmt.Sprintf(" | caused by: %v", e.cause)
}
key := ""
if e.key {
key = "key for "
}
return fmt.Sprintf(
"invalid %sListStringMatcher.%s: %s%s",
key,
e.field,
e.reason,
cause)
}
var _ error = ListStringMatcherValidationError{}
var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = ListStringMatcherValidationError{}

298
vendor/github.com/cncf/xds/go/xds/type/v3/cel.pb.go generated vendored Normal file
View File

@@ -0,0 +1,298 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.25.0
// protoc v3.18.0
// source: xds/type/v3/cel.proto
package v3
import (
_ "github.com/cncf/xds/go/xds/annotations/v3"
_ "github.com/envoyproxy/protoc-gen-validate/validate"
proto "github.com/golang/protobuf/proto"
wrappers "github.com/golang/protobuf/ptypes/wrappers"
v1alpha1 "google.golang.org/genproto/googleapis/api/expr/v1alpha1"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// This is a compile-time assertion that a sufficiently up-to-date version
// of the legacy proto package is being used.
const _ = proto.ProtoPackageIsVersion4
type CelExpression struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Types that are assignable to ExprSpecifier:
// *CelExpression_ParsedExpr
// *CelExpression_CheckedExpr
ExprSpecifier isCelExpression_ExprSpecifier `protobuf_oneof:"expr_specifier"`
}
func (x *CelExpression) Reset() {
*x = CelExpression{}
if protoimpl.UnsafeEnabled {
mi := &file_xds_type_v3_cel_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CelExpression) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CelExpression) ProtoMessage() {}
func (x *CelExpression) ProtoReflect() protoreflect.Message {
mi := &file_xds_type_v3_cel_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CelExpression.ProtoReflect.Descriptor instead.
func (*CelExpression) Descriptor() ([]byte, []int) {
return file_xds_type_v3_cel_proto_rawDescGZIP(), []int{0}
}
func (m *CelExpression) GetExprSpecifier() isCelExpression_ExprSpecifier {
if m != nil {
return m.ExprSpecifier
}
return nil
}
func (x *CelExpression) GetParsedExpr() *v1alpha1.ParsedExpr {
if x, ok := x.GetExprSpecifier().(*CelExpression_ParsedExpr); ok {
return x.ParsedExpr
}
return nil
}
func (x *CelExpression) GetCheckedExpr() *v1alpha1.CheckedExpr {
if x, ok := x.GetExprSpecifier().(*CelExpression_CheckedExpr); ok {
return x.CheckedExpr
}
return nil
}
type isCelExpression_ExprSpecifier interface {
isCelExpression_ExprSpecifier()
}
type CelExpression_ParsedExpr struct {
ParsedExpr *v1alpha1.ParsedExpr `protobuf:"bytes,1,opt,name=parsed_expr,json=parsedExpr,proto3,oneof"`
}
type CelExpression_CheckedExpr struct {
CheckedExpr *v1alpha1.CheckedExpr `protobuf:"bytes,2,opt,name=checked_expr,json=checkedExpr,proto3,oneof"`
}
func (*CelExpression_ParsedExpr) isCelExpression_ExprSpecifier() {}
func (*CelExpression_CheckedExpr) isCelExpression_ExprSpecifier() {}
type CelExtractString struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
ExprExtract *CelExpression `protobuf:"bytes,1,opt,name=expr_extract,json=exprExtract,proto3" json:"expr_extract,omitempty"`
DefaultValue *wrappers.StringValue `protobuf:"bytes,2,opt,name=default_value,json=defaultValue,proto3" json:"default_value,omitempty"`
}
func (x *CelExtractString) Reset() {
*x = CelExtractString{}
if protoimpl.UnsafeEnabled {
mi := &file_xds_type_v3_cel_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CelExtractString) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CelExtractString) ProtoMessage() {}
func (x *CelExtractString) ProtoReflect() protoreflect.Message {
mi := &file_xds_type_v3_cel_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CelExtractString.ProtoReflect.Descriptor instead.
func (*CelExtractString) Descriptor() ([]byte, []int) {
return file_xds_type_v3_cel_proto_rawDescGZIP(), []int{1}
}
func (x *CelExtractString) GetExprExtract() *CelExpression {
if x != nil {
return x.ExprExtract
}
return nil
}
func (x *CelExtractString) GetDefaultValue() *wrappers.StringValue {
if x != nil {
return x.DefaultValue
}
return nil
}
var File_xds_type_v3_cel_proto protoreflect.FileDescriptor
var file_xds_type_v3_cel_proto_rawDesc = []byte{
0x0a, 0x15, 0x78, 0x64, 0x73, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x63, 0x65,
0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0b, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70,
0x65, 0x2e, 0x76, 0x33, 0x1a, 0x26, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69,
0x2f, 0x65, 0x78, 0x70, 0x72, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x63,
0x68, 0x65, 0x63, 0x6b, 0x65, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x25, 0x67, 0x6f,
0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x65, 0x78, 0x70, 0x72, 0x2f, 0x76, 0x31,
0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x73, 0x79, 0x6e, 0x74, 0x61, 0x78, 0x2e, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x78, 0x64, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x33, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76,
0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xbb, 0x01,
0x0a, 0x0d, 0x43, 0x65, 0x6c, 0x45, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12,
0x47, 0x0a, 0x0b, 0x70, 0x61, 0x72, 0x73, 0x65, 0x64, 0x5f, 0x65, 0x78, 0x70, 0x72, 0x18, 0x01,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70,
0x69, 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e,
0x50, 0x61, 0x72, 0x73, 0x65, 0x64, 0x45, 0x78, 0x70, 0x72, 0x48, 0x00, 0x52, 0x0a, 0x70, 0x61,
0x72, 0x73, 0x65, 0x64, 0x45, 0x78, 0x70, 0x72, 0x12, 0x4a, 0x0a, 0x0c, 0x63, 0x68, 0x65, 0x63,
0x6b, 0x65, 0x64, 0x5f, 0x65, 0x78, 0x70, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25,
0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x65, 0x78, 0x70, 0x72,
0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x65,
0x64, 0x45, 0x78, 0x70, 0x72, 0x48, 0x00, 0x52, 0x0b, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x65, 0x64,
0x45, 0x78, 0x70, 0x72, 0x42, 0x15, 0x0a, 0x0e, 0x65, 0x78, 0x70, 0x72, 0x5f, 0x73, 0x70, 0x65,
0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x22, 0x9e, 0x01, 0x0a, 0x10,
0x43, 0x65, 0x6c, 0x45, 0x78, 0x74, 0x72, 0x61, 0x63, 0x74, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67,
0x12, 0x47, 0x0a, 0x0c, 0x65, 0x78, 0x70, 0x72, 0x5f, 0x65, 0x78, 0x74, 0x72, 0x61, 0x63, 0x74,
0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70,
0x65, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x65, 0x6c, 0x45, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69,
0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0b, 0x65, 0x78,
0x70, 0x72, 0x45, 0x78, 0x74, 0x72, 0x61, 0x63, 0x74, 0x12, 0x41, 0x0a, 0x0d, 0x64, 0x65, 0x66,
0x61, 0x75, 0x6c, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0c,
0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x50, 0x0a, 0x16,
0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74,
0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x42, 0x08, 0x43, 0x65, 0x6c, 0x50, 0x72, 0x6f, 0x74, 0x6f,
0x50, 0x01, 0x5a, 0x22, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63,
0x6e, 0x63, 0x66, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x67, 0x6f, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x74,
0x79, 0x70, 0x65, 0x2f, 0x76, 0x33, 0xd2, 0xc6, 0xa4, 0xe1, 0x06, 0x02, 0x08, 0x01, 0x62, 0x06,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_xds_type_v3_cel_proto_rawDescOnce sync.Once
file_xds_type_v3_cel_proto_rawDescData = file_xds_type_v3_cel_proto_rawDesc
)
func file_xds_type_v3_cel_proto_rawDescGZIP() []byte {
file_xds_type_v3_cel_proto_rawDescOnce.Do(func() {
file_xds_type_v3_cel_proto_rawDescData = protoimpl.X.CompressGZIP(file_xds_type_v3_cel_proto_rawDescData)
})
return file_xds_type_v3_cel_proto_rawDescData
}
var file_xds_type_v3_cel_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_xds_type_v3_cel_proto_goTypes = []interface{}{
(*CelExpression)(nil), // 0: xds.type.v3.CelExpression
(*CelExtractString)(nil), // 1: xds.type.v3.CelExtractString
(*v1alpha1.ParsedExpr)(nil), // 2: google.api.expr.v1alpha1.ParsedExpr
(*v1alpha1.CheckedExpr)(nil), // 3: google.api.expr.v1alpha1.CheckedExpr
(*wrappers.StringValue)(nil), // 4: google.protobuf.StringValue
}
var file_xds_type_v3_cel_proto_depIdxs = []int32{
2, // 0: xds.type.v3.CelExpression.parsed_expr:type_name -> google.api.expr.v1alpha1.ParsedExpr
3, // 1: xds.type.v3.CelExpression.checked_expr:type_name -> google.api.expr.v1alpha1.CheckedExpr
0, // 2: xds.type.v3.CelExtractString.expr_extract:type_name -> xds.type.v3.CelExpression
4, // 3: xds.type.v3.CelExtractString.default_value:type_name -> google.protobuf.StringValue
4, // [4:4] is the sub-list for method output_type
4, // [4:4] is the sub-list for method input_type
4, // [4:4] is the sub-list for extension type_name
4, // [4:4] is the sub-list for extension extendee
0, // [0:4] is the sub-list for field type_name
}
func init() { file_xds_type_v3_cel_proto_init() }
func file_xds_type_v3_cel_proto_init() {
if File_xds_type_v3_cel_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_xds_type_v3_cel_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CelExpression); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_xds_type_v3_cel_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CelExtractString); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
file_xds_type_v3_cel_proto_msgTypes[0].OneofWrappers = []interface{}{
(*CelExpression_ParsedExpr)(nil),
(*CelExpression_CheckedExpr)(nil),
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_xds_type_v3_cel_proto_rawDesc,
NumEnums: 0,
NumMessages: 2,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_xds_type_v3_cel_proto_goTypes,
DependencyIndexes: file_xds_type_v3_cel_proto_depIdxs,
MessageInfos: file_xds_type_v3_cel_proto_msgTypes,
}.Build()
File_xds_type_v3_cel_proto = out.File
file_xds_type_v3_cel_proto_rawDesc = nil
file_xds_type_v3_cel_proto_goTypes = nil
file_xds_type_v3_cel_proto_depIdxs = nil
}

View File

@@ -0,0 +1,225 @@
// Code generated by protoc-gen-validate. DO NOT EDIT.
// source: xds/type/v3/cel.proto
package v3
import (
"bytes"
"errors"
"fmt"
"net"
"net/mail"
"net/url"
"regexp"
"strings"
"time"
"unicode/utf8"
"google.golang.org/protobuf/types/known/anypb"
)
// ensure the imports are used
var (
_ = bytes.MinRead
_ = errors.New("")
_ = fmt.Print
_ = utf8.UTFMax
_ = (*regexp.Regexp)(nil)
_ = (*strings.Reader)(nil)
_ = net.IPv4len
_ = time.Duration(0)
_ = (*url.URL)(nil)
_ = (*mail.Address)(nil)
_ = anypb.Any{}
)
// Validate checks the field values on CelExpression with the rules defined in
// the proto definition for this message. If any rules are violated, an error
// is returned.
func (m *CelExpression) Validate() error {
if m == nil {
return nil
}
switch m.ExprSpecifier.(type) {
case *CelExpression_ParsedExpr:
if v, ok := interface{}(m.GetParsedExpr()).(interface{ Validate() error }); ok {
if err := v.Validate(); err != nil {
return CelExpressionValidationError{
field: "ParsedExpr",
reason: "embedded message failed validation",
cause: err,
}
}
}
case *CelExpression_CheckedExpr:
if v, ok := interface{}(m.GetCheckedExpr()).(interface{ Validate() error }); ok {
if err := v.Validate(); err != nil {
return CelExpressionValidationError{
field: "CheckedExpr",
reason: "embedded message failed validation",
cause: err,
}
}
}
default:
return CelExpressionValidationError{
field: "ExprSpecifier",
reason: "value is required",
}
}
return nil
}
// CelExpressionValidationError is the validation error returned by
// CelExpression.Validate if the designated constraints aren't met.
type CelExpressionValidationError struct {
field string
reason string
cause error
key bool
}
// Field function returns field value.
func (e CelExpressionValidationError) Field() string { return e.field }
// Reason function returns reason value.
func (e CelExpressionValidationError) Reason() string { return e.reason }
// Cause function returns cause value.
func (e CelExpressionValidationError) Cause() error { return e.cause }
// Key function returns key value.
func (e CelExpressionValidationError) Key() bool { return e.key }
// ErrorName returns error name.
func (e CelExpressionValidationError) ErrorName() string { return "CelExpressionValidationError" }
// Error satisfies the builtin error interface
func (e CelExpressionValidationError) Error() string {
cause := ""
if e.cause != nil {
cause = fmt.Sprintf(" | caused by: %v", e.cause)
}
key := ""
if e.key {
key = "key for "
}
return fmt.Sprintf(
"invalid %sCelExpression.%s: %s%s",
key,
e.field,
e.reason,
cause)
}
var _ error = CelExpressionValidationError{}
var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = CelExpressionValidationError{}
// Validate checks the field values on CelExtractString with the rules defined
// in the proto definition for this message. If any rules are violated, an
// error is returned.
func (m *CelExtractString) Validate() error {
if m == nil {
return nil
}
if m.GetExprExtract() == nil {
return CelExtractStringValidationError{
field: "ExprExtract",
reason: "value is required",
}
}
if v, ok := interface{}(m.GetExprExtract()).(interface{ Validate() error }); ok {
if err := v.Validate(); err != nil {
return CelExtractStringValidationError{
field: "ExprExtract",
reason: "embedded message failed validation",
cause: err,
}
}
}
if v, ok := interface{}(m.GetDefaultValue()).(interface{ Validate() error }); ok {
if err := v.Validate(); err != nil {
return CelExtractStringValidationError{
field: "DefaultValue",
reason: "embedded message failed validation",
cause: err,
}
}
}
return nil
}
// CelExtractStringValidationError is the validation error returned by
// CelExtractString.Validate if the designated constraints aren't met.
type CelExtractStringValidationError struct {
field string
reason string
cause error
key bool
}
// Field function returns field value.
func (e CelExtractStringValidationError) Field() string { return e.field }
// Reason function returns reason value.
func (e CelExtractStringValidationError) Reason() string { return e.reason }
// Cause function returns cause value.
func (e CelExtractStringValidationError) Cause() error { return e.cause }
// Key function returns key value.
func (e CelExtractStringValidationError) Key() bool { return e.key }
// ErrorName returns error name.
func (e CelExtractStringValidationError) ErrorName() string { return "CelExtractStringValidationError" }
// Error satisfies the builtin error interface
func (e CelExtractStringValidationError) Error() string {
cause := ""
if e.cause != nil {
cause = fmt.Sprintf(" | caused by: %v", e.cause)
}
key := ""
if e.key {
key = "key for "
}
return fmt.Sprintf(
"invalid %sCelExtractString.%s: %s%s",
key,
e.field,
e.reason,
cause)
}
var _ error = CelExtractStringValidationError{}
var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = CelExtractStringValidationError{}

303
vendor/github.com/cncf/xds/go/xds/type/v3/range.pb.go generated vendored Normal file
View File

@@ -0,0 +1,303 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.25.0
// protoc v3.18.0
// source: xds/type/v3/range.proto
package v3
import (
proto "github.com/golang/protobuf/proto"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// This is a compile-time assertion that a sufficiently up-to-date version
// of the legacy proto package is being used.
const _ = proto.ProtoPackageIsVersion4
type Int64Range struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Start int64 `protobuf:"varint,1,opt,name=start,proto3" json:"start,omitempty"`
End int64 `protobuf:"varint,2,opt,name=end,proto3" json:"end,omitempty"`
}
func (x *Int64Range) Reset() {
*x = Int64Range{}
if protoimpl.UnsafeEnabled {
mi := &file_xds_type_v3_range_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Int64Range) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Int64Range) ProtoMessage() {}
func (x *Int64Range) ProtoReflect() protoreflect.Message {
mi := &file_xds_type_v3_range_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Int64Range.ProtoReflect.Descriptor instead.
func (*Int64Range) Descriptor() ([]byte, []int) {
return file_xds_type_v3_range_proto_rawDescGZIP(), []int{0}
}
func (x *Int64Range) GetStart() int64 {
if x != nil {
return x.Start
}
return 0
}
func (x *Int64Range) GetEnd() int64 {
if x != nil {
return x.End
}
return 0
}
type Int32Range struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Start int32 `protobuf:"varint,1,opt,name=start,proto3" json:"start,omitempty"`
End int32 `protobuf:"varint,2,opt,name=end,proto3" json:"end,omitempty"`
}
func (x *Int32Range) Reset() {
*x = Int32Range{}
if protoimpl.UnsafeEnabled {
mi := &file_xds_type_v3_range_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Int32Range) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Int32Range) ProtoMessage() {}
func (x *Int32Range) ProtoReflect() protoreflect.Message {
mi := &file_xds_type_v3_range_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Int32Range.ProtoReflect.Descriptor instead.
func (*Int32Range) Descriptor() ([]byte, []int) {
return file_xds_type_v3_range_proto_rawDescGZIP(), []int{1}
}
func (x *Int32Range) GetStart() int32 {
if x != nil {
return x.Start
}
return 0
}
func (x *Int32Range) GetEnd() int32 {
if x != nil {
return x.End
}
return 0
}
type DoubleRange struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Start float64 `protobuf:"fixed64,1,opt,name=start,proto3" json:"start,omitempty"`
End float64 `protobuf:"fixed64,2,opt,name=end,proto3" json:"end,omitempty"`
}
func (x *DoubleRange) Reset() {
*x = DoubleRange{}
if protoimpl.UnsafeEnabled {
mi := &file_xds_type_v3_range_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *DoubleRange) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DoubleRange) ProtoMessage() {}
func (x *DoubleRange) ProtoReflect() protoreflect.Message {
mi := &file_xds_type_v3_range_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use DoubleRange.ProtoReflect.Descriptor instead.
func (*DoubleRange) Descriptor() ([]byte, []int) {
return file_xds_type_v3_range_proto_rawDescGZIP(), []int{2}
}
func (x *DoubleRange) GetStart() float64 {
if x != nil {
return x.Start
}
return 0
}
func (x *DoubleRange) GetEnd() float64 {
if x != nil {
return x.End
}
return 0
}
var File_xds_type_v3_range_proto protoreflect.FileDescriptor
var file_xds_type_v3_range_proto_rawDesc = []byte{
0x0a, 0x17, 0x78, 0x64, 0x73, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x61,
0x6e, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0b, 0x78, 0x64, 0x73, 0x2e, 0x74,
0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x22, 0x34, 0x0a, 0x0a, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x52,
0x61, 0x6e, 0x67, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20,
0x01, 0x28, 0x03, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x6e,
0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x65, 0x6e, 0x64, 0x22, 0x34, 0x0a, 0x0a,
0x49, 0x6e, 0x74, 0x33, 0x32, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74,
0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74,
0x12, 0x10, 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x65,
0x6e, 0x64, 0x22, 0x35, 0x0a, 0x0b, 0x44, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x52, 0x61, 0x6e, 0x67,
0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x01,
0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x18, 0x02,
0x20, 0x01, 0x28, 0x01, 0x52, 0x03, 0x65, 0x6e, 0x64, 0x42, 0x4a, 0x0a, 0x16, 0x63, 0x6f, 0x6d,
0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65,
0x2e, 0x76, 0x33, 0x42, 0x0a, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50,
0x01, 0x5a, 0x22, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6e,
0x63, 0x66, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x67, 0x6f, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x74, 0x79,
0x70, 0x65, 0x2f, 0x76, 0x33, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_xds_type_v3_range_proto_rawDescOnce sync.Once
file_xds_type_v3_range_proto_rawDescData = file_xds_type_v3_range_proto_rawDesc
)
func file_xds_type_v3_range_proto_rawDescGZIP() []byte {
file_xds_type_v3_range_proto_rawDescOnce.Do(func() {
file_xds_type_v3_range_proto_rawDescData = protoimpl.X.CompressGZIP(file_xds_type_v3_range_proto_rawDescData)
})
return file_xds_type_v3_range_proto_rawDescData
}
var file_xds_type_v3_range_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
var file_xds_type_v3_range_proto_goTypes = []interface{}{
(*Int64Range)(nil), // 0: xds.type.v3.Int64Range
(*Int32Range)(nil), // 1: xds.type.v3.Int32Range
(*DoubleRange)(nil), // 2: xds.type.v3.DoubleRange
}
var file_xds_type_v3_range_proto_depIdxs = []int32{
0, // [0:0] is the sub-list for method output_type
0, // [0:0] is the sub-list for method input_type
0, // [0:0] is the sub-list for extension type_name
0, // [0:0] is the sub-list for extension extendee
0, // [0:0] is the sub-list for field type_name
}
func init() { file_xds_type_v3_range_proto_init() }
func file_xds_type_v3_range_proto_init() {
if File_xds_type_v3_range_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_xds_type_v3_range_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Int64Range); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_xds_type_v3_range_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Int32Range); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_xds_type_v3_range_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DoubleRange); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_xds_type_v3_range_proto_rawDesc,
NumEnums: 0,
NumMessages: 3,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_xds_type_v3_range_proto_goTypes,
DependencyIndexes: file_xds_type_v3_range_proto_depIdxs,
MessageInfos: file_xds_type_v3_range_proto_msgTypes,
}.Build()
File_xds_type_v3_range_proto = out.File
file_xds_type_v3_range_proto_rawDesc = nil
file_xds_type_v3_range_proto_goTypes = nil
file_xds_type_v3_range_proto_depIdxs = nil
}

View File

@@ -0,0 +1,239 @@
// Code generated by protoc-gen-validate. DO NOT EDIT.
// source: xds/type/v3/range.proto
package v3
import (
"bytes"
"errors"
"fmt"
"net"
"net/mail"
"net/url"
"regexp"
"strings"
"time"
"unicode/utf8"
"google.golang.org/protobuf/types/known/anypb"
)
// ensure the imports are used
var (
_ = bytes.MinRead
_ = errors.New("")
_ = fmt.Print
_ = utf8.UTFMax
_ = (*regexp.Regexp)(nil)
_ = (*strings.Reader)(nil)
_ = net.IPv4len
_ = time.Duration(0)
_ = (*url.URL)(nil)
_ = (*mail.Address)(nil)
_ = anypb.Any{}
)
// Validate checks the field values on Int64Range with the rules defined in the
// proto definition for this message. If any rules are violated, an error is returned.
func (m *Int64Range) Validate() error {
if m == nil {
return nil
}
// no validation rules for Start
// no validation rules for End
return nil
}
// Int64RangeValidationError is the validation error returned by
// Int64Range.Validate if the designated constraints aren't met.
type Int64RangeValidationError struct {
field string
reason string
cause error
key bool
}
// Field function returns field value.
func (e Int64RangeValidationError) Field() string { return e.field }
// Reason function returns reason value.
func (e Int64RangeValidationError) Reason() string { return e.reason }
// Cause function returns cause value.
func (e Int64RangeValidationError) Cause() error { return e.cause }
// Key function returns key value.
func (e Int64RangeValidationError) Key() bool { return e.key }
// ErrorName returns error name.
func (e Int64RangeValidationError) ErrorName() string { return "Int64RangeValidationError" }
// Error satisfies the builtin error interface
func (e Int64RangeValidationError) Error() string {
cause := ""
if e.cause != nil {
cause = fmt.Sprintf(" | caused by: %v", e.cause)
}
key := ""
if e.key {
key = "key for "
}
return fmt.Sprintf(
"invalid %sInt64Range.%s: %s%s",
key,
e.field,
e.reason,
cause)
}
var _ error = Int64RangeValidationError{}
var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = Int64RangeValidationError{}
// Validate checks the field values on Int32Range with the rules defined in the
// proto definition for this message. If any rules are violated, an error is returned.
func (m *Int32Range) Validate() error {
if m == nil {
return nil
}
// no validation rules for Start
// no validation rules for End
return nil
}
// Int32RangeValidationError is the validation error returned by
// Int32Range.Validate if the designated constraints aren't met.
type Int32RangeValidationError struct {
field string
reason string
cause error
key bool
}
// Field function returns field value.
func (e Int32RangeValidationError) Field() string { return e.field }
// Reason function returns reason value.
func (e Int32RangeValidationError) Reason() string { return e.reason }
// Cause function returns cause value.
func (e Int32RangeValidationError) Cause() error { return e.cause }
// Key function returns key value.
func (e Int32RangeValidationError) Key() bool { return e.key }
// ErrorName returns error name.
func (e Int32RangeValidationError) ErrorName() string { return "Int32RangeValidationError" }
// Error satisfies the builtin error interface
func (e Int32RangeValidationError) Error() string {
cause := ""
if e.cause != nil {
cause = fmt.Sprintf(" | caused by: %v", e.cause)
}
key := ""
if e.key {
key = "key for "
}
return fmt.Sprintf(
"invalid %sInt32Range.%s: %s%s",
key,
e.field,
e.reason,
cause)
}
var _ error = Int32RangeValidationError{}
var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = Int32RangeValidationError{}
// Validate checks the field values on DoubleRange with the rules defined in
// the proto definition for this message. If any rules are violated, an error
// is returned.
func (m *DoubleRange) Validate() error {
if m == nil {
return nil
}
// no validation rules for Start
// no validation rules for End
return nil
}
// DoubleRangeValidationError is the validation error returned by
// DoubleRange.Validate if the designated constraints aren't met.
type DoubleRangeValidationError struct {
field string
reason string
cause error
key bool
}
// Field function returns field value.
func (e DoubleRangeValidationError) Field() string { return e.field }
// Reason function returns reason value.
func (e DoubleRangeValidationError) Reason() string { return e.reason }
// Cause function returns cause value.
func (e DoubleRangeValidationError) Cause() error { return e.cause }
// Key function returns key value.
func (e DoubleRangeValidationError) Key() bool { return e.key }
// ErrorName returns error name.
func (e DoubleRangeValidationError) ErrorName() string { return "DoubleRangeValidationError" }
// Error satisfies the builtin error interface
func (e DoubleRangeValidationError) Error() string {
cause := ""
if e.cause != nil {
cause = fmt.Sprintf(" | caused by: %v", e.cause)
}
key := ""
if e.key {
key = "key for "
}
return fmt.Sprintf(
"invalid %sDoubleRange.%s: %s%s",
key,
e.field,
e.reason,
cause)
}
var _ error = DoubleRangeValidationError{}
var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = DoubleRangeValidationError{}

View File

@@ -0,0 +1,168 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.25.0
// protoc v3.18.0
// source: xds/type/v3/typed_struct.proto
package v3
import (
proto "github.com/golang/protobuf/proto"
_struct "github.com/golang/protobuf/ptypes/struct"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// This is a compile-time assertion that a sufficiently up-to-date version
// of the legacy proto package is being used.
const _ = proto.ProtoPackageIsVersion4
type TypedStruct struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
TypeUrl string `protobuf:"bytes,1,opt,name=type_url,json=typeUrl,proto3" json:"type_url,omitempty"`
Value *_struct.Struct `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
}
func (x *TypedStruct) Reset() {
*x = TypedStruct{}
if protoimpl.UnsafeEnabled {
mi := &file_xds_type_v3_typed_struct_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *TypedStruct) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*TypedStruct) ProtoMessage() {}
func (x *TypedStruct) ProtoReflect() protoreflect.Message {
mi := &file_xds_type_v3_typed_struct_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use TypedStruct.ProtoReflect.Descriptor instead.
func (*TypedStruct) Descriptor() ([]byte, []int) {
return file_xds_type_v3_typed_struct_proto_rawDescGZIP(), []int{0}
}
func (x *TypedStruct) GetTypeUrl() string {
if x != nil {
return x.TypeUrl
}
return ""
}
func (x *TypedStruct) GetValue() *_struct.Struct {
if x != nil {
return x.Value
}
return nil
}
var File_xds_type_v3_typed_struct_proto protoreflect.FileDescriptor
var file_xds_type_v3_typed_struct_proto_rawDesc = []byte{
0x0a, 0x1e, 0x78, 0x64, 0x73, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x74, 0x79,
0x70, 0x65, 0x64, 0x5f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x12, 0x0b, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x1a, 0x1c, 0x67,
0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73,
0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x57, 0x0a, 0x0b, 0x54,
0x79, 0x70, 0x65, 0x64, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x74, 0x79,
0x70, 0x65, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x74, 0x79,
0x70, 0x65, 0x55, 0x72, 0x6c, 0x12, 0x2d, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x05, 0x76,
0x61, 0x6c, 0x75, 0x65, 0x42, 0x50, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x69, 0x74, 0x68,
0x75, 0x62, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x42, 0x10,
0x54, 0x79, 0x70, 0x65, 0x64, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f,
0x50, 0x01, 0x5a, 0x22, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63,
0x6e, 0x63, 0x66, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x67, 0x6f, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x74,
0x79, 0x70, 0x65, 0x2f, 0x76, 0x33, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_xds_type_v3_typed_struct_proto_rawDescOnce sync.Once
file_xds_type_v3_typed_struct_proto_rawDescData = file_xds_type_v3_typed_struct_proto_rawDesc
)
func file_xds_type_v3_typed_struct_proto_rawDescGZIP() []byte {
file_xds_type_v3_typed_struct_proto_rawDescOnce.Do(func() {
file_xds_type_v3_typed_struct_proto_rawDescData = protoimpl.X.CompressGZIP(file_xds_type_v3_typed_struct_proto_rawDescData)
})
return file_xds_type_v3_typed_struct_proto_rawDescData
}
var file_xds_type_v3_typed_struct_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_xds_type_v3_typed_struct_proto_goTypes = []interface{}{
(*TypedStruct)(nil), // 0: xds.type.v3.TypedStruct
(*_struct.Struct)(nil), // 1: google.protobuf.Struct
}
var file_xds_type_v3_typed_struct_proto_depIdxs = []int32{
1, // 0: xds.type.v3.TypedStruct.value:type_name -> google.protobuf.Struct
1, // [1:1] is the sub-list for method output_type
1, // [1:1] is the sub-list for method input_type
1, // [1:1] is the sub-list for extension type_name
1, // [1:1] is the sub-list for extension extendee
0, // [0:1] is the sub-list for field type_name
}
func init() { file_xds_type_v3_typed_struct_proto_init() }
func file_xds_type_v3_typed_struct_proto_init() {
if File_xds_type_v3_typed_struct_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_xds_type_v3_typed_struct_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*TypedStruct); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_xds_type_v3_typed_struct_proto_rawDesc,
NumEnums: 0,
NumMessages: 1,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_xds_type_v3_typed_struct_proto_goTypes,
DependencyIndexes: file_xds_type_v3_typed_struct_proto_depIdxs,
MessageInfos: file_xds_type_v3_typed_struct_proto_msgTypes,
}.Build()
File_xds_type_v3_typed_struct_proto = out.File
file_xds_type_v3_typed_struct_proto_rawDesc = nil
file_xds_type_v3_typed_struct_proto_goTypes = nil
file_xds_type_v3_typed_struct_proto_depIdxs = nil
}

View File

@@ -0,0 +1,111 @@
// Code generated by protoc-gen-validate. DO NOT EDIT.
// source: xds/type/v3/typed_struct.proto
package v3
import (
"bytes"
"errors"
"fmt"
"net"
"net/mail"
"net/url"
"regexp"
"strings"
"time"
"unicode/utf8"
"google.golang.org/protobuf/types/known/anypb"
)
// ensure the imports are used
var (
_ = bytes.MinRead
_ = errors.New("")
_ = fmt.Print
_ = utf8.UTFMax
_ = (*regexp.Regexp)(nil)
_ = (*strings.Reader)(nil)
_ = net.IPv4len
_ = time.Duration(0)
_ = (*url.URL)(nil)
_ = (*mail.Address)(nil)
_ = anypb.Any{}
)
// Validate checks the field values on TypedStruct with the rules defined in
// the proto definition for this message. If any rules are violated, an error
// is returned.
func (m *TypedStruct) Validate() error {
if m == nil {
return nil
}
// no validation rules for TypeUrl
if v, ok := interface{}(m.GetValue()).(interface{ Validate() error }); ok {
if err := v.Validate(); err != nil {
return TypedStructValidationError{
field: "Value",
reason: "embedded message failed validation",
cause: err,
}
}
}
return nil
}
// TypedStructValidationError is the validation error returned by
// TypedStruct.Validate if the designated constraints aren't met.
type TypedStructValidationError struct {
field string
reason string
cause error
key bool
}
// Field function returns field value.
func (e TypedStructValidationError) Field() string { return e.field }
// Reason function returns reason value.
func (e TypedStructValidationError) Reason() string { return e.reason }
// Cause function returns cause value.
func (e TypedStructValidationError) Cause() error { return e.cause }
// Key function returns key value.
func (e TypedStructValidationError) Key() bool { return e.key }
// ErrorName returns error name.
func (e TypedStructValidationError) ErrorName() string { return "TypedStructValidationError" }
// Error satisfies the builtin error interface
func (e TypedStructValidationError) Error() string {
cause := ""
if e.cause != nil {
cause = fmt.Sprintf(" | caused by: %v", e.cause)
}
key := ""
if e.key {
key = "key for "
}
return fmt.Sprintf(
"invalid %sTypedStruct.%s: %s%s",
key,
e.field,
e.reason,
cause)
}
var _ error = TypedStructValidationError{}
var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = TypedStructValidationError{}