Compare commits

...

12 Commits
v0.0.1 ... main

Author SHA1 Message Date
alyssawilk c52dc94e7f
removing an unused import (#50) 2022-01-12 01:05:39 -05:00
John Howard 04548b0d99
Remove all go types with aliases to cncf/xds repo (#49)
Fixes https://github.com/cncf/xds/issues/7

This follows a path taken by the protobuf team for the protobuf v2
migration.

In go, protobuf generated files are singletons. Its impossible to import
cncf/xds and cncf/udpa at the same time as a result.

grpc/grpc-go is on cncf/udpa at the moment, which means that likely
almost all others are as well. A quick github query shows 350 users of
cncf/udpa and 50 of cncf/xds. One option is to have grpc-go update and
hope others follow (https://github.com/grpc/grpc-go/pull/4812). However,
this would introduce churn for users.

Instead, we can do this approach which should allow seemles
interoperability between the two repos.

I have tested this on
istio.io/istio, https://github.com/howardjohn/cncf-udpa-to-xds-repro,
and grpc/grpc-go; all tests pass in these repos.
2021-09-29 23:19:21 -04:00
htuch 6414d71391
Redirect README.md to cncf/xds. (#46)
Signed-off-by: Harvey Tuch <htuch@google.com>
2021-03-21 20:53:30 -04:00
htuch bff43e8824
repository: rename master to main branch. (#44)
Signed-off-by: Harvey Tuch <htuch@google.com>
2021-02-09 22:26:58 -05:00
Kuat cc1b757b3e
resolve rules_go conflict (#43)
Signed-off-by: Kuat Yessenov <kuat@google.com>
2020-12-11 15:53:26 -05:00
htuch 5459f2c994
repository: UDPA-WG -> xDS-WG, update to reflect usage. (#39)
As part of the recently announced change of name from UDPA-WG to xDS-WG,
reflect this in README.md. Also a few updates around vision, repository
structure and membership.

Signed-off-by: Harvey Tuch <htuch@google.com>
2020-11-20 15:59:02 -05:00
htuch 82be644d48
xdstp: migrate URL-scheme to xDS naming convention. (#40)
* Replace UDPA references with xDS.

* Move from udpa.core.v1 to xds.core.v3. The idea is to use v3 to remain
  consistent with xDS v3 package namespace elsewhere.

Signed-off-by: Harvey Tuch <htuch@google.com>
2020-11-20 11:44:55 -05:00
htuch a08826d251
xRFC: rename uRFC to xRFC. (#41)
As per the other renames happening in the CNCF UDPA-WG -> XDS-WG update.

Signed-off-by: Harvey Tuch <htuch@google.com>
2020-11-20 10:57:56 -05:00
htuch 3a44e3262f
URIs: remove repeated id. (#38)
It's a _lot_ more convenient when writing proto literals (e.g. in
filesystem config files) to be able to specify a single flat ID than
repeated. Also, this makes some of the decisions around /-escaping
simpler in different implementations.

Signed-off-by: Harvey Tuch <htuch@google.com>
2020-11-19 15:50:42 -05:00
htuch 7e6fe0510f
udpa: update some working group logistics. (#37)
Signed-off-by: Harvey Tuch <htuch@google.com>
2020-10-01 11:08:55 -04:00
sanjaypujare 1f710aca26
udpa: enhance context_params documentation (#35)
Signed-off-by: Sanjay Pujare <sanjaypujare@users.noreply.github.com>
2020-09-09 11:43:43 -04:00
htuch e9e5d2bce6
urfc: process and template for uRFCs. (#34)
In order to provide a permanent reference for docs such as
https://docs.google.com/document/d/1m5_Q9LUlzvDdImP0jqh1lSTrLMldsApTQX6ibbd3i7c/edit
and amendments (e.g. https://github.com/cncf/udpa/issues/32), this patch
introduces a UDPA RFC (uRFC) process, modeled after gRPC RFCs
(https://github.com/grpc/proposal).

Signed-off-by: Harvey Tuch <htuch@google.com>
2020-09-03 19:49:07 -04:00
50 changed files with 284 additions and 3957 deletions

View File

@ -1,19 +1,2 @@
# Universal Data Plane API Working Group (UDPA-WG)
# Goal
The objective of the Universal Data Plane API Working Group (UDPA-WG) is to bring together parties across the industry interested in a common control and configuration API for data plane proxies and load balancers.
# Vision
The vision of the Universal data Plane API (UDPA) is articulated at [https://blog.envoyproxy.io/the-universal-data-plane-api-d15cec7a](https://blog.envoyproxy.io/the-universal-data-plane-api-d15cec7a). We will pursue a set of APIs that provide the de facto standard for L4/L7 data plane configuration, similar to the role played by OpenFlow at L2/L3/L4 in SDN.
The APIs will be defined canonically in proto3 and incrementally evolve from [existing Envoy xDS APIs](https://github.com/envoyproxy/data-plane-api) via a well defined [stable API versioning policy](https://docs.google.com/document/d/1xeVvJ6KjFBkNjVspPbY_PwEDHC7XPi0J5p1SqUXcCl8/edit#). APIs will cover service discovery, load balancing assignments, routing discovery, listener configuration, secret discovery, load reporting, health check delegation, etc.
We will evolve and mold the APIs to support client-side lookaside load balancing (e.g. gRPC-LB), data plane proxies beyond Envoy, hardware LB, mobile clients and beyond. We will strive to be vendor and implementation agnostic to the degree possible while not regressing on support for projects that have committed to UDPA in production (Envoy & gRPC-LB so far).
# Membership
Initial members will include representatives from the Envoy and gRPC projects. This will include Google and Lyft based maintainers, as well as members from Microsoft and Amazon. We are soliciting the wider data plane proxy community for additional interest in initial membership, since we feel that a truly universal API should reflect a diverse set of projects, organizations and individuals.
We would like to keep the working group small and tightly focussed on efficiently balancing incrementally improving the API while pursuing longer term strategic evolution. We will meet once every two weeks on Zoom and communicate via the [udpa-wg@lists.cncf.io](https://lists.cncf.io/g/udpa-wg/) mailing list.
This repository exists for archival purposes only, please see
https://github.com/cncf/xds for active development of the xDS APIs.

View File

@ -134,15 +134,15 @@ def udpa_proto_package(srcs = [], deps = [], has_services = False, visibility =
proto = name,
visibility = ["//visibility:public"],
deps = [_go_proto_mapping(dep) for dep in deps] + [
"@com_github_golang_protobuf//ptypes:go_default_library",
"@com_github_golang_protobuf//ptypes/any:go_default_library",
"@com_github_golang_protobuf//ptypes/duration:go_default_library",
"@com_github_golang_protobuf//ptypes/struct:go_default_library",
"@com_github_golang_protobuf//ptypes/timestamp:go_default_library",
"@com_github_golang_protobuf//ptypes/wrappers:go_default_library",
"@com_envoyproxy_protoc_gen_validate//validate:go_default_library",
"@com_google_googleapis//google/api:annotations_go_proto",
"@com_google_googleapis//google/rpc:status_go_proto",
"@com_github_golang_protobuf//ptypes:go_default_library_gen",
"@go_googleapis//google/api:annotations_go_proto",
"@go_googleapis//google/rpc:status_go_proto",
"@io_bazel_rules_go//proto/wkt:any_go_proto",
"@io_bazel_rules_go//proto/wkt:duration_go_proto",
"@io_bazel_rules_go//proto/wkt:struct_go_proto",
"@io_bazel_rules_go//proto/wkt:timestamp_go_proto",
"@io_bazel_rules_go//proto/wkt:wrappers_go_proto",
],
)

View File

@ -1,7 +1,7 @@
trigger:
branches:
include:
- 'master'
- 'main'
tags:
include:
- 'v*'

5
go/README.md Normal file
View File

@ -0,0 +1,5 @@
# Description
This library has been deprecated in favor of `github.com/cncf/xds/go`. All users are recommended to switch their imports.
In the meantime, this library is frozen and has all previously public types aliased to point to `github.com/cncf/xds/go`.

View File

@ -1,9 +1,6 @@
// Deprecated: use github.com/cncf/xds/go instead.
module github.com/cncf/udpa/go
go 1.11
require (
github.com/envoyproxy/protoc-gen-validate v0.1.0
github.com/golang/protobuf v1.3.2
google.golang.org/grpc v1.25.1
)
require github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84

View File

@ -1,231 +0,0 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: udpa/annotations/migrate.proto
package udpa_annotations
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
descriptor "github.com/golang/protobuf/protoc-gen-go/descriptor"
math "math"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
type MigrateAnnotation struct {
Rename string `protobuf:"bytes,1,opt,name=rename,proto3" json:"rename,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *MigrateAnnotation) Reset() { *m = MigrateAnnotation{} }
func (m *MigrateAnnotation) String() string { return proto.CompactTextString(m) }
func (*MigrateAnnotation) ProtoMessage() {}
func (*MigrateAnnotation) Descriptor() ([]byte, []int) {
return fileDescriptor_ba8191732d0e246d, []int{0}
}
func (m *MigrateAnnotation) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_MigrateAnnotation.Unmarshal(m, b)
}
func (m *MigrateAnnotation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_MigrateAnnotation.Marshal(b, m, deterministic)
}
func (m *MigrateAnnotation) XXX_Merge(src proto.Message) {
xxx_messageInfo_MigrateAnnotation.Merge(m, src)
}
func (m *MigrateAnnotation) XXX_Size() int {
return xxx_messageInfo_MigrateAnnotation.Size(m)
}
func (m *MigrateAnnotation) XXX_DiscardUnknown() {
xxx_messageInfo_MigrateAnnotation.DiscardUnknown(m)
}
var xxx_messageInfo_MigrateAnnotation proto.InternalMessageInfo
func (m *MigrateAnnotation) GetRename() string {
if m != nil {
return m.Rename
}
return ""
}
type FieldMigrateAnnotation struct {
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"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *FieldMigrateAnnotation) Reset() { *m = FieldMigrateAnnotation{} }
func (m *FieldMigrateAnnotation) String() string { return proto.CompactTextString(m) }
func (*FieldMigrateAnnotation) ProtoMessage() {}
func (*FieldMigrateAnnotation) Descriptor() ([]byte, []int) {
return fileDescriptor_ba8191732d0e246d, []int{1}
}
func (m *FieldMigrateAnnotation) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_FieldMigrateAnnotation.Unmarshal(m, b)
}
func (m *FieldMigrateAnnotation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_FieldMigrateAnnotation.Marshal(b, m, deterministic)
}
func (m *FieldMigrateAnnotation) XXX_Merge(src proto.Message) {
xxx_messageInfo_FieldMigrateAnnotation.Merge(m, src)
}
func (m *FieldMigrateAnnotation) XXX_Size() int {
return xxx_messageInfo_FieldMigrateAnnotation.Size(m)
}
func (m *FieldMigrateAnnotation) XXX_DiscardUnknown() {
xxx_messageInfo_FieldMigrateAnnotation.DiscardUnknown(m)
}
var xxx_messageInfo_FieldMigrateAnnotation proto.InternalMessageInfo
func (m *FieldMigrateAnnotation) GetRename() string {
if m != nil {
return m.Rename
}
return ""
}
func (m *FieldMigrateAnnotation) GetOneofPromotion() string {
if m != nil {
return m.OneofPromotion
}
return ""
}
type FileMigrateAnnotation struct {
MoveToPackage string `protobuf:"bytes,2,opt,name=move_to_package,json=moveToPackage,proto3" json:"move_to_package,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *FileMigrateAnnotation) Reset() { *m = FileMigrateAnnotation{} }
func (m *FileMigrateAnnotation) String() string { return proto.CompactTextString(m) }
func (*FileMigrateAnnotation) ProtoMessage() {}
func (*FileMigrateAnnotation) Descriptor() ([]byte, []int) {
return fileDescriptor_ba8191732d0e246d, []int{2}
}
func (m *FileMigrateAnnotation) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_FileMigrateAnnotation.Unmarshal(m, b)
}
func (m *FileMigrateAnnotation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_FileMigrateAnnotation.Marshal(b, m, deterministic)
}
func (m *FileMigrateAnnotation) XXX_Merge(src proto.Message) {
xxx_messageInfo_FileMigrateAnnotation.Merge(m, src)
}
func (m *FileMigrateAnnotation) XXX_Size() int {
return xxx_messageInfo_FileMigrateAnnotation.Size(m)
}
func (m *FileMigrateAnnotation) XXX_DiscardUnknown() {
xxx_messageInfo_FileMigrateAnnotation.DiscardUnknown(m)
}
var xxx_messageInfo_FileMigrateAnnotation proto.InternalMessageInfo
func (m *FileMigrateAnnotation) GetMoveToPackage() string {
if m != nil {
return m.MoveToPackage
}
return ""
}
var E_MessageMigrate = &proto.ExtensionDesc{
ExtendedType: (*descriptor.MessageOptions)(nil),
ExtensionType: (*MigrateAnnotation)(nil),
Field: 171962766,
Name: "udpa.annotations.message_migrate",
Tag: "bytes,171962766,opt,name=message_migrate",
Filename: "udpa/annotations/migrate.proto",
}
var E_FieldMigrate = &proto.ExtensionDesc{
ExtendedType: (*descriptor.FieldOptions)(nil),
ExtensionType: (*FieldMigrateAnnotation)(nil),
Field: 171962766,
Name: "udpa.annotations.field_migrate",
Tag: "bytes,171962766,opt,name=field_migrate",
Filename: "udpa/annotations/migrate.proto",
}
var E_EnumMigrate = &proto.ExtensionDesc{
ExtendedType: (*descriptor.EnumOptions)(nil),
ExtensionType: (*MigrateAnnotation)(nil),
Field: 171962766,
Name: "udpa.annotations.enum_migrate",
Tag: "bytes,171962766,opt,name=enum_migrate",
Filename: "udpa/annotations/migrate.proto",
}
var E_EnumValueMigrate = &proto.ExtensionDesc{
ExtendedType: (*descriptor.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",
}
var E_FileMigrate = &proto.ExtensionDesc{
ExtendedType: (*descriptor.FileOptions)(nil),
ExtensionType: (*FileMigrateAnnotation)(nil),
Field: 171962766,
Name: "udpa.annotations.file_migrate",
Tag: "bytes,171962766,opt,name=file_migrate",
Filename: "udpa/annotations/migrate.proto",
}
func init() {
proto.RegisterType((*MigrateAnnotation)(nil), "udpa.annotations.MigrateAnnotation")
proto.RegisterType((*FieldMigrateAnnotation)(nil), "udpa.annotations.FieldMigrateAnnotation")
proto.RegisterType((*FileMigrateAnnotation)(nil), "udpa.annotations.FileMigrateAnnotation")
proto.RegisterExtension(E_MessageMigrate)
proto.RegisterExtension(E_FieldMigrate)
proto.RegisterExtension(E_EnumMigrate)
proto.RegisterExtension(E_EnumValueMigrate)
proto.RegisterExtension(E_FileMigrate)
}
func init() { proto.RegisterFile("udpa/annotations/migrate.proto", fileDescriptor_ba8191732d0e246d) }
var fileDescriptor_ba8191732d0e246d = []byte{
// 349 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x92, 0xcd, 0x4a, 0xfb, 0x40,
0x14, 0xc5, 0xe9, 0x7f, 0x51, 0xf8, 0x4f, 0x3f, 0x0d, 0x58, 0x8a, 0xf8, 0x51, 0x2b, 0xd8, 0x82,
0x30, 0x01, 0xdd, 0x75, 0x23, 0x2e, 0xec, 0xae, 0x58, 0x83, 0x08, 0xae, 0xc2, 0xb4, 0xbd, 0x09,
0xa1, 0x99, 0xb9, 0x43, 0x32, 0xa9, 0x6f, 0xe1, 0x4b, 0xfa, 0x20, 0xca, 0x4c, 0x92, 0xb6, 0x38,
0x41, 0xa4, 0xcb, 0x9c, 0x7b, 0xef, 0xf9, 0xe5, 0x1c, 0x86, 0x9c, 0x67, 0x2b, 0xc9, 0x5c, 0x26,
0x04, 0x2a, 0xa6, 0x22, 0x14, 0xa9, 0xcb, 0xa3, 0x30, 0x61, 0x0a, 0xa8, 0x4c, 0x50, 0xa1, 0xd3,
0xd5, 0x73, 0xba, 0x37, 0x3f, 0x19, 0x84, 0x88, 0x61, 0x0c, 0xae, 0x99, 0x2f, 0xb2, 0xc0, 0x5d,
0x41, 0xba, 0x4c, 0x22, 0xa9, 0x30, 0xc9, 0x6f, 0x86, 0x37, 0xe4, 0x68, 0x96, 0x9b, 0x3c, 0x6c,
0xef, 0x9c, 0x1e, 0xa9, 0x27, 0x20, 0x18, 0x87, 0x7e, 0x6d, 0x50, 0x1b, 0xff, 0xf7, 0x8a, 0xaf,
0xe1, 0x1b, 0xe9, 0x4d, 0x23, 0x88, 0x57, 0x7f, 0xbe, 0x70, 0x46, 0xa4, 0x83, 0x02, 0x30, 0xf0,
0x65, 0x82, 0x1c, 0xf5, 0x6a, 0xff, 0x9f, 0x59, 0x68, 0x1b, 0x79, 0x5e, 0xaa, 0xc3, 0x7b, 0x72,
0x3c, 0x8d, 0x62, 0xb0, 0x9d, 0xaf, 0x49, 0x87, 0xe3, 0x06, 0x7c, 0x85, 0xbe, 0x64, 0xcb, 0x35,
0x0b, 0xa1, 0x70, 0x68, 0x69, 0xf9, 0x05, 0xe7, 0xb9, 0x38, 0x91, 0xa4, 0xc3, 0x21, 0x4d, 0x59,
0x08, 0x7e, 0xd1, 0x8a, 0x73, 0x41, 0xf3, 0xf8, 0xb4, 0x8c, 0x4f, 0x67, 0xf9, 0xc6, 0x93, 0x34,
0xf5, 0xf4, 0x3f, 0x3e, 0xbf, 0x9e, 0x07, 0xb5, 0x71, 0xe3, 0xf6, 0x8a, 0xfe, 0xac, 0x8e, 0x5a,
0x7f, 0xe2, 0xb5, 0x0b, 0xff, 0x62, 0x32, 0x41, 0xd2, 0x0a, 0x74, 0x1b, 0x5b, 0xde, 0x99, 0xc5,
0x33, 0x6d, 0x59, 0xb4, 0xb1, 0x4d, 0xab, 0xae, 0xd5, 0x6b, 0x06, 0x7b, 0xfa, 0x24, 0x24, 0x4d,
0x10, 0x19, 0xdf, 0xf2, 0x4e, 0x2d, 0xde, 0xa3, 0xc8, 0xf8, 0x61, 0xe1, 0x1a, 0xda, 0xb9, 0x04,
0xbd, 0x13, 0xc7, 0x80, 0x36, 0x2c, 0xce, 0x76, 0x75, 0x5e, 0x56, 0xe2, 0x5e, 0xf5, 0xce, 0x61,
0xcc, 0x2e, 0x94, 0xf7, 0x25, 0x78, 0x4d, 0x9a, 0x41, 0x14, 0xc3, 0x2f, 0x09, 0xf5, 0x23, 0xb1,
0x68, 0xa3, 0xaa, 0x42, 0x2b, 0x1e, 0x93, 0xd7, 0x08, 0x76, 0xf2, 0xa2, 0x6e, 0x4c, 0xef, 0xbe,
0x03, 0x00, 0x00, 0xff, 0xff, 0x62, 0x65, 0xc8, 0x45, 0x57, 0x03, 0x00, 0x00,
}

View File

@ -1,246 +0,0 @@
// Code generated by protoc-gen-validate. DO NOT EDIT.
// source: udpa/annotations/migrate.proto
package udpa_annotations
import (
"bytes"
"errors"
"fmt"
"net"
"net/mail"
"net/url"
"regexp"
"strings"
"time"
"unicode/utf8"
"github.com/golang/protobuf/ptypes"
)
// 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)
_ = ptypes.DynamicAny{}
)
// define the regex for a UUID once up-front
var _migrate_uuidPattern = regexp.MustCompile("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$")
// 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

@ -1,109 +0,0 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: udpa/annotations/security.proto
package udpa_annotations
import (
fmt "fmt"
_ "github.com/envoyproxy/protoc-gen-validate/validate"
proto "github.com/golang/protobuf/proto"
descriptor "github.com/golang/protobuf/protoc-gen-go/descriptor"
_ "github.com/golang/protobuf/ptypes/any"
math "math"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
type FieldSecurityAnnotation struct {
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"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *FieldSecurityAnnotation) Reset() { *m = FieldSecurityAnnotation{} }
func (m *FieldSecurityAnnotation) String() string { return proto.CompactTextString(m) }
func (*FieldSecurityAnnotation) ProtoMessage() {}
func (*FieldSecurityAnnotation) Descriptor() ([]byte, []int) {
return fileDescriptor_43b150013eccfb0a, []int{0}
}
func (m *FieldSecurityAnnotation) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_FieldSecurityAnnotation.Unmarshal(m, b)
}
func (m *FieldSecurityAnnotation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_FieldSecurityAnnotation.Marshal(b, m, deterministic)
}
func (m *FieldSecurityAnnotation) XXX_Merge(src proto.Message) {
xxx_messageInfo_FieldSecurityAnnotation.Merge(m, src)
}
func (m *FieldSecurityAnnotation) XXX_Size() int {
return xxx_messageInfo_FieldSecurityAnnotation.Size(m)
}
func (m *FieldSecurityAnnotation) XXX_DiscardUnknown() {
xxx_messageInfo_FieldSecurityAnnotation.DiscardUnknown(m)
}
var xxx_messageInfo_FieldSecurityAnnotation proto.InternalMessageInfo
func (m *FieldSecurityAnnotation) GetConfigureForUntrustedDownstream() bool {
if m != nil {
return m.ConfigureForUntrustedDownstream
}
return false
}
func (m *FieldSecurityAnnotation) GetConfigureForUntrustedUpstream() bool {
if m != nil {
return m.ConfigureForUntrustedUpstream
}
return false
}
var E_Security = &proto.ExtensionDesc{
ExtendedType: (*descriptor.FieldOptions)(nil),
ExtensionType: (*FieldSecurityAnnotation)(nil),
Field: 11122993,
Name: "udpa.annotations.security",
Tag: "bytes,11122993,opt,name=security",
Filename: "udpa/annotations/security.proto",
}
func init() {
proto.RegisterType((*FieldSecurityAnnotation)(nil), "udpa.annotations.FieldSecurityAnnotation")
proto.RegisterExtension(E_Security)
}
func init() { proto.RegisterFile("udpa/annotations/security.proto", fileDescriptor_43b150013eccfb0a) }
var fileDescriptor_43b150013eccfb0a = []byte{
// 276 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x90, 0xb1, 0x4a, 0x03, 0x31,
0x18, 0xc7, 0xb9, 0x82, 0xe5, 0x88, 0x8b, 0xdc, 0xd2, 0x5a, 0x38, 0x7a, 0x74, 0xaa, 0x4b, 0x02,
0xba, 0xb9, 0x29, 0x52, 0x07, 0x07, 0xa1, 0xd2, 0xf9, 0x48, 0x2f, 0xb9, 0x23, 0x70, 0xe6, 0x0b,
0xc9, 0x17, 0xc5, 0xcd, 0xa7, 0x71, 0x15, 0x57, 0x9f, 0xc0, 0xd5, 0x57, 0xf1, 0x09, 0xc4, 0x5c,
0xee, 0x90, 0x6a, 0xb7, 0x84, 0xef, 0xf7, 0xfd, 0x92, 0xff, 0x9f, 0xcc, 0xbd, 0x30, 0x9c, 0x71,
0xad, 0x01, 0x39, 0x2a, 0xd0, 0x8e, 0x39, 0x59, 0x79, 0xab, 0xf0, 0x89, 0x1a, 0x0b, 0x08, 0xd9,
0xd1, 0x0f, 0x40, 0x7f, 0x01, 0xb3, 0xfc, 0xef, 0x0a, 0x72, 0xf4, 0xae, 0x5b, 0x98, 0x1d, 0x37,
0x00, 0x4d, 0x2b, 0x59, 0xb8, 0x6d, 0x7d, 0xcd, 0xb8, 0x8e, 0xae, 0x59, 0xb1, 0x3b, 0x12, 0xd2,
0x55, 0x56, 0x19, 0x04, 0x1b, 0x89, 0xc9, 0x03, 0x6f, 0x95, 0xe0, 0x28, 0x59, 0x7f, 0xe8, 0x06,
0x8b, 0xd7, 0x84, 0x4c, 0x56, 0x4a, 0xb6, 0xe2, 0x2e, 0x7e, 0xef, 0x62, 0x78, 0x3f, 0xbb, 0x21,
0x8b, 0x0a, 0x74, 0xad, 0x1a, 0x6f, 0x65, 0x59, 0x83, 0x2d, 0xbd, 0x46, 0xeb, 0x1d, 0x4a, 0x51,
0x0a, 0x78, 0xd4, 0x0e, 0xad, 0xe4, 0xf7, 0xd3, 0xa4, 0x48, 0x96, 0xe9, 0x7a, 0x3e, 0x90, 0x2b,
0xb0, 0x9b, 0x9e, 0xbb, 0x1a, 0xb0, 0xec, 0x9a, 0x14, 0xfb, 0x64, 0xde, 0x44, 0xd5, 0x28, 0xa8,
0xf2, 0x7f, 0x55, 0x9b, 0x08, 0x9d, 0x37, 0x24, 0xed, 0xab, 0xcc, 0x72, 0xda, 0x25, 0xa7, 0x7d,
0x72, 0x1a, 0xb2, 0xdc, 0x9a, 0xd0, 0xdf, 0xf4, 0xed, 0xeb, 0xe5, 0xa0, 0x48, 0x96, 0x87, 0xa7,
0x27, 0x74, 0xb7, 0x6d, 0xba, 0x27, 0xf4, 0x7a, 0x90, 0x5f, 0xa6, 0xef, 0xcf, 0x1f, 0x9f, 0xe3,
0x51, 0x9a, 0x6c, 0xc7, 0x41, 0x7f, 0xf6, 0x1d, 0x00, 0x00, 0xff, 0xff, 0xc9, 0xf3, 0x6a, 0x56,
0xd5, 0x01, 0x00, 0x00,
}

View File

@ -1,108 +0,0 @@
// Code generated by protoc-gen-validate. DO NOT EDIT.
// source: udpa/annotations/security.proto
package udpa_annotations
import (
"bytes"
"errors"
"fmt"
"net"
"net/mail"
"net/url"
"regexp"
"strings"
"time"
"unicode/utf8"
"github.com/golang/protobuf/ptypes"
)
// 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)
_ = ptypes.DynamicAny{}
)
// define the regex for a UUID once up-front
var _security_uuidPattern = regexp.MustCompile("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$")
// 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

@ -1,50 +0,0 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: udpa/annotations/sensitive.proto
package udpa_annotations
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
descriptor "github.com/golang/protobuf/protoc-gen-go/descriptor"
math "math"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
var E_Sensitive = &proto.ExtensionDesc{
ExtendedType: (*descriptor.FieldOptions)(nil),
ExtensionType: (*bool)(nil),
Field: 76569463,
Name: "udpa.annotations.sensitive",
Tag: "varint,76569463,opt,name=sensitive",
Filename: "udpa/annotations/sensitive.proto",
}
func init() {
proto.RegisterExtension(E_Sensitive)
}
func init() { proto.RegisterFile("udpa/annotations/sensitive.proto", fileDescriptor_abbd0dde0408189d) }
var fileDescriptor_abbd0dde0408189d = []byte{
// 134 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x28, 0x4d, 0x29, 0x48,
0xd4, 0x4f, 0xcc, 0xcb, 0xcb, 0x2f, 0x49, 0x2c, 0xc9, 0xcc, 0xcf, 0x2b, 0xd6, 0x2f, 0x4e, 0xcd,
0x2b, 0xce, 0x2c, 0xc9, 0x2c, 0x4b, 0xd5, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x00, 0xa9,
0xd0, 0x43, 0x52, 0x21, 0xa5, 0x90, 0x9e, 0x9f, 0x9f, 0x9e, 0x93, 0xaa, 0x0f, 0x96, 0x4f, 0x2a,
0x4d, 0xd3, 0x4f, 0x49, 0x2d, 0x4e, 0x2e, 0xca, 0x2c, 0x28, 0xc9, 0x2f, 0x82, 0xe8, 0xb1, 0xb2,
0xe3, 0xe2, 0x84, 0x1b, 0x23, 0x24, 0xab, 0x07, 0x51, 0xaf, 0x07, 0x53, 0xaf, 0xe7, 0x96, 0x99,
0x9a, 0x93, 0xe2, 0x5f, 0x00, 0x36, 0x4d, 0xe2, 0xfb, 0xb6, 0x83, 0x2a, 0x0a, 0x8c, 0x1a, 0x1c,
0x41, 0x08, 0x2d, 0x49, 0x6c, 0x60, 0xa5, 0xc6, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0x5f, 0xba,
0xeb, 0x73, 0x9e, 0x00, 0x00, 0x00,
}

View File

@ -1,37 +0,0 @@
// Code generated by protoc-gen-validate. DO NOT EDIT.
// source: udpa/annotations/sensitive.proto
package udpa_annotations
import (
"bytes"
"errors"
"fmt"
"net"
"net/mail"
"net/url"
"regexp"
"strings"
"time"
"unicode/utf8"
"github.com/golang/protobuf/ptypes"
)
// 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)
_ = ptypes.DynamicAny{}
)
// define the regex for a UUID once up-front
var _sensitive_uuidPattern = regexp.MustCompile("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$")

View File

@ -1,141 +0,0 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: udpa/annotations/status.proto
package udpa_annotations
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
descriptor "github.com/golang/protobuf/protoc-gen-go/descriptor"
math "math"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
type PackageVersionStatus int32
const (
PackageVersionStatus_UNKNOWN PackageVersionStatus = 0
PackageVersionStatus_FROZEN PackageVersionStatus = 1
PackageVersionStatus_ACTIVE PackageVersionStatus = 2
PackageVersionStatus_NEXT_MAJOR_VERSION_CANDIDATE PackageVersionStatus = 3
)
var PackageVersionStatus_name = map[int32]string{
0: "UNKNOWN",
1: "FROZEN",
2: "ACTIVE",
3: "NEXT_MAJOR_VERSION_CANDIDATE",
}
var PackageVersionStatus_value = map[string]int32{
"UNKNOWN": 0,
"FROZEN": 1,
"ACTIVE": 2,
"NEXT_MAJOR_VERSION_CANDIDATE": 3,
}
func (x PackageVersionStatus) String() string {
return proto.EnumName(PackageVersionStatus_name, int32(x))
}
func (PackageVersionStatus) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_011cc2e7e491b0ff, []int{0}
}
type StatusAnnotation struct {
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"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *StatusAnnotation) Reset() { *m = StatusAnnotation{} }
func (m *StatusAnnotation) String() string { return proto.CompactTextString(m) }
func (*StatusAnnotation) ProtoMessage() {}
func (*StatusAnnotation) Descriptor() ([]byte, []int) {
return fileDescriptor_011cc2e7e491b0ff, []int{0}
}
func (m *StatusAnnotation) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_StatusAnnotation.Unmarshal(m, b)
}
func (m *StatusAnnotation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_StatusAnnotation.Marshal(b, m, deterministic)
}
func (m *StatusAnnotation) XXX_Merge(src proto.Message) {
xxx_messageInfo_StatusAnnotation.Merge(m, src)
}
func (m *StatusAnnotation) XXX_Size() int {
return xxx_messageInfo_StatusAnnotation.Size(m)
}
func (m *StatusAnnotation) XXX_DiscardUnknown() {
xxx_messageInfo_StatusAnnotation.DiscardUnknown(m)
}
var xxx_messageInfo_StatusAnnotation proto.InternalMessageInfo
func (m *StatusAnnotation) GetWorkInProgress() bool {
if m != nil {
return m.WorkInProgress
}
return false
}
func (m *StatusAnnotation) GetPackageVersionStatus() PackageVersionStatus {
if m != nil {
return m.PackageVersionStatus
}
return PackageVersionStatus_UNKNOWN
}
var E_FileStatus = &proto.ExtensionDesc{
ExtendedType: (*descriptor.FileOptions)(nil),
ExtensionType: (*StatusAnnotation)(nil),
Field: 222707719,
Name: "udpa.annotations.file_status",
Tag: "bytes,222707719,opt,name=file_status",
Filename: "udpa/annotations/status.proto",
}
func init() {
proto.RegisterEnum("udpa.annotations.PackageVersionStatus", PackageVersionStatus_name, PackageVersionStatus_value)
proto.RegisterType((*StatusAnnotation)(nil), "udpa.annotations.StatusAnnotation")
proto.RegisterExtension(E_FileStatus)
}
func init() { proto.RegisterFile("udpa/annotations/status.proto", fileDescriptor_011cc2e7e491b0ff) }
var fileDescriptor_011cc2e7e491b0ff = []byte{
// 305 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x50, 0x4f, 0x4b, 0xc3, 0x30,
0x1c, 0xb5, 0x13, 0xa6, 0x64, 0x30, 0x42, 0x18, 0x32, 0x64, 0x42, 0xd9, 0x41, 0x8a, 0x87, 0x14,
0xe6, 0xcd, 0x5b, 0xd9, 0x3a, 0xa8, 0x62, 0x3a, 0xba, 0x39, 0x45, 0x94, 0xd0, 0x6d, 0x59, 0x89,
0x1b, 0x49, 0x48, 0x32, 0xbd, 0x7a, 0xf3, 0x33, 0xe8, 0xa7, 0x95, 0x36, 0x53, 0x64, 0xee, 0x16,
0xde, 0xbf, 0xbc, 0xdf, 0x03, 0x67, 0x9b, 0x85, 0xca, 0xc3, 0x5c, 0x08, 0x69, 0x73, 0xcb, 0xa5,
0x30, 0xa1, 0xb1, 0xb9, 0xdd, 0x18, 0xac, 0xb4, 0xb4, 0x12, 0xc1, 0x92, 0xc6, 0x7f, 0xe8, 0x53,
0xbf, 0x90, 0xb2, 0x58, 0xb3, 0xb0, 0xe2, 0x67, 0x9b, 0x65, 0xb8, 0x60, 0x66, 0xae, 0xb9, 0xb2,
0x52, 0x3b, 0x4f, 0xf7, 0xcb, 0x03, 0x70, 0x5c, 0x85, 0x44, 0xbf, 0x3e, 0x14, 0x00, 0xf8, 0x26,
0xf5, 0x8a, 0x72, 0x41, 0x95, 0x96, 0x85, 0x66, 0xc6, 0xb4, 0x3d, 0xdf, 0x0b, 0x8e, 0xb3, 0x66,
0x89, 0x27, 0x62, 0xb4, 0x45, 0xd1, 0x13, 0x38, 0x51, 0xf9, 0x7c, 0x95, 0x17, 0x8c, 0xbe, 0x32,
0x6d, 0xb8, 0x14, 0xd4, 0x55, 0x6a, 0xd7, 0x7c, 0x2f, 0x68, 0xf6, 0xce, 0xf1, 0x6e, 0x27, 0x3c,
0x72, 0xfa, 0xa9, 0x93, 0xbb, 0xbf, 0xb3, 0x96, 0xda, 0x83, 0x5e, 0x3c, 0x83, 0xd6, 0x3e, 0x35,
0x6a, 0x80, 0xa3, 0x3b, 0x72, 0x43, 0xd2, 0x7b, 0x02, 0x0f, 0x10, 0x00, 0xf5, 0x61, 0x96, 0x3e,
0xc6, 0x04, 0x7a, 0xe5, 0x3b, 0xea, 0x4f, 0x92, 0x69, 0x0c, 0x6b, 0xc8, 0x07, 0x1d, 0x12, 0x3f,
0x4c, 0xe8, 0x6d, 0x74, 0x9d, 0x66, 0x74, 0x1a, 0x67, 0xe3, 0x24, 0x25, 0xb4, 0x1f, 0x91, 0x41,
0x32, 0x88, 0x26, 0x31, 0x3c, 0xbc, 0x5a, 0x80, 0xc6, 0x92, 0xaf, 0xd9, 0xb6, 0x31, 0xea, 0x60,
0xb7, 0x16, 0xfe, 0x59, 0x0b, 0x0f, 0xf9, 0x9a, 0xa5, 0xaa, 0xaa, 0xdd, 0xfe, 0x78, 0xff, 0x7c,
0xf1, 0xbd, 0xa0, 0xd1, 0xeb, 0xfe, 0x3f, 0x69, 0x77, 0xc0, 0x0c, 0x94, 0xb9, 0x0e, 0x9d, 0xd5,
0xab, 0xb8, 0xcb, 0xef, 0x00, 0x00, 0x00, 0xff, 0xff, 0x58, 0x12, 0xee, 0xf3, 0xbd, 0x01, 0x00,
0x00,
}

View File

@ -1,106 +0,0 @@
// Code generated by protoc-gen-validate. DO NOT EDIT.
// source: udpa/annotations/status.proto
package udpa_annotations
import (
"bytes"
"errors"
"fmt"
"net"
"net/mail"
"net/url"
"regexp"
"strings"
"time"
"unicode/utf8"
"github.com/golang/protobuf/ptypes"
)
// 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)
_ = ptypes.DynamicAny{}
)
// define the regex for a UUID once up-front
var _status_uuidPattern = regexp.MustCompile("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$")
// 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,41 @@
package udpa_annotations
import (
xds "github.com/cncf/xds/go/udpa/annotations"
)
type FieldSecurityAnnotation = xds.FieldSecurityAnnotation
type FieldSecurityAnnotationValidationError = xds.FieldSecurityAnnotationValidationError
type VersioningAnnotationValidationError = xds.VersioningAnnotationValidationError
type MigrateAnnotation = xds.MigrateAnnotation
type FieldMigrateAnnotation = xds.FieldMigrateAnnotation
type FileMigrateAnnotation = xds.FileMigrateAnnotation
type StatusAnnotationValidationError = xds.StatusAnnotationValidationError
type VersioningAnnotation = xds.VersioningAnnotation
type MigrateAnnotationValidationError = xds.MigrateAnnotationValidationError
type FieldMigrateAnnotationValidationError = xds.FieldMigrateAnnotationValidationError
type FileMigrateAnnotationValidationError = xds.FileMigrateAnnotationValidationError
type PackageVersionStatus = xds.PackageVersionStatus
type StatusAnnotation = xds.StatusAnnotation
const (
PackageVersionStatus_UNKNOWN PackageVersionStatus = xds.PackageVersionStatus_UNKNOWN
PackageVersionStatus_FROZEN PackageVersionStatus = xds.PackageVersionStatus_FROZEN
PackageVersionStatus_ACTIVE PackageVersionStatus = xds.PackageVersionStatus_ACTIVE
PackageVersionStatus_NEXT_MAJOR_VERSION_CANDIDATE PackageVersionStatus = xds.PackageVersionStatus_NEXT_MAJOR_VERSION_CANDIDATE
)
var PackageVersionStatus_name = xds.PackageVersionStatus_name
var PackageVersionStatus_value = xds.PackageVersionStatus_value
var E_Security = xds.E_Security
var E_Sensitive = xds.E_Sensitive
var E_MessageMigrate = xds.E_MessageMigrate
var E_FieldMigrate = xds.E_FieldMigrate
var E_EnumMigrate = xds.E_EnumMigrate
var E_EnumValueMigrate = xds.E_EnumValueMigrate
var E_FileMigrate = xds.E_FileMigrate
var E_Versioning = xds.E_Versioning
var E_FileStatus = xds.E_FileStatus

View File

@ -1,94 +0,0 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: udpa/annotations/versioning.proto
package udpa_annotations
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
descriptor "github.com/golang/protobuf/protoc-gen-go/descriptor"
math "math"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
type VersioningAnnotation struct {
PreviousMessageType string `protobuf:"bytes,1,opt,name=previous_message_type,json=previousMessageType,proto3" json:"previous_message_type,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *VersioningAnnotation) Reset() { *m = VersioningAnnotation{} }
func (m *VersioningAnnotation) String() string { return proto.CompactTextString(m) }
func (*VersioningAnnotation) ProtoMessage() {}
func (*VersioningAnnotation) Descriptor() ([]byte, []int) {
return fileDescriptor_5bc0544382e16cfc, []int{0}
}
func (m *VersioningAnnotation) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_VersioningAnnotation.Unmarshal(m, b)
}
func (m *VersioningAnnotation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_VersioningAnnotation.Marshal(b, m, deterministic)
}
func (m *VersioningAnnotation) XXX_Merge(src proto.Message) {
xxx_messageInfo_VersioningAnnotation.Merge(m, src)
}
func (m *VersioningAnnotation) XXX_Size() int {
return xxx_messageInfo_VersioningAnnotation.Size(m)
}
func (m *VersioningAnnotation) XXX_DiscardUnknown() {
xxx_messageInfo_VersioningAnnotation.DiscardUnknown(m)
}
var xxx_messageInfo_VersioningAnnotation proto.InternalMessageInfo
func (m *VersioningAnnotation) GetPreviousMessageType() string {
if m != nil {
return m.PreviousMessageType
}
return ""
}
var E_Versioning = &proto.ExtensionDesc{
ExtendedType: (*descriptor.MessageOptions)(nil),
ExtensionType: (*VersioningAnnotation)(nil),
Field: 7881811,
Name: "udpa.annotations.versioning",
Tag: "bytes,7881811,opt,name=versioning",
Filename: "udpa/annotations/versioning.proto",
}
func init() {
proto.RegisterType((*VersioningAnnotation)(nil), "udpa.annotations.VersioningAnnotation")
proto.RegisterExtension(E_Versioning)
}
func init() { proto.RegisterFile("udpa/annotations/versioning.proto", fileDescriptor_5bc0544382e16cfc) }
var fileDescriptor_5bc0544382e16cfc = []byte{
// 193 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x2c, 0x4d, 0x29, 0x48,
0xd4, 0x4f, 0xcc, 0xcb, 0xcb, 0x2f, 0x49, 0x2c, 0xc9, 0xcc, 0xcf, 0x2b, 0xd6, 0x2f, 0x4b, 0x2d,
0x2a, 0xce, 0xcc, 0xcf, 0xcb, 0xcc, 0x4b, 0xd7, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x00,
0x29, 0xd1, 0x43, 0x52, 0x22, 0xa5, 0x90, 0x9e, 0x9f, 0x9f, 0x9e, 0x93, 0xaa, 0x0f, 0x96, 0x4f,
0x2a, 0x4d, 0xd3, 0x4f, 0x49, 0x2d, 0x4e, 0x2e, 0xca, 0x2c, 0x28, 0xc9, 0x2f, 0x82, 0xe8, 0x51,
0xf2, 0xe2, 0x12, 0x09, 0x83, 0x9b, 0xe3, 0x08, 0xd7, 0x2a, 0x64, 0xc4, 0x25, 0x5a, 0x50, 0x94,
0x5a, 0x96, 0x99, 0x5f, 0x5a, 0x1c, 0x9f, 0x9b, 0x5a, 0x5c, 0x9c, 0x98, 0x9e, 0x1a, 0x5f, 0x52,
0x59, 0x90, 0x2a, 0xc1, 0xa8, 0xc0, 0xa8, 0xc1, 0x19, 0x24, 0x0c, 0x93, 0xf4, 0x85, 0xc8, 0x85,
0x54, 0x16, 0xa4, 0x5a, 0x65, 0x71, 0x71, 0x21, 0xdc, 0x24, 0x24, 0xaf, 0x07, 0xb1, 0x5c, 0x0f,
0x66, 0xb9, 0x1e, 0x54, 0xad, 0x7f, 0x01, 0xd8, 0x71, 0x12, 0x97, 0x3b, 0x1e, 0x32, 0x2b, 0x30,
0x6a, 0x70, 0x1b, 0xa9, 0xe9, 0xa1, 0x3b, 0x5c, 0x0f, 0x9b, 0x9b, 0x82, 0x90, 0x4c, 0x4f, 0x62,
0x03, 0x9b, 0x6a, 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0xc1, 0x9c, 0xb8, 0x85, 0x17, 0x01, 0x00,
0x00,
}

View File

@ -1,106 +0,0 @@
// Code generated by protoc-gen-validate. DO NOT EDIT.
// source: udpa/annotations/versioning.proto
package udpa_annotations
import (
"bytes"
"errors"
"fmt"
"net"
"net/mail"
"net/url"
"regexp"
"strings"
"time"
"unicode/utf8"
"github.com/golang/protobuf/ptypes"
)
// 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)
_ = ptypes.DynamicAny{}
)
// define the regex for a UUID once up-front
var _versioning_uuidPattern = regexp.MustCompile("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$")
// 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

@ -1,84 +0,0 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: udpa/core/v1/authority.proto
package udpa_core_v1
import (
fmt "fmt"
_ "github.com/cncf/udpa/go/udpa/annotations"
_ "github.com/envoyproxy/protoc-gen-validate/validate"
proto "github.com/golang/protobuf/proto"
math "math"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
type Authority struct {
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Authority) Reset() { *m = Authority{} }
func (m *Authority) String() string { return proto.CompactTextString(m) }
func (*Authority) ProtoMessage() {}
func (*Authority) Descriptor() ([]byte, []int) {
return fileDescriptor_609fadab943a4134, []int{0}
}
func (m *Authority) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Authority.Unmarshal(m, b)
}
func (m *Authority) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Authority.Marshal(b, m, deterministic)
}
func (m *Authority) XXX_Merge(src proto.Message) {
xxx_messageInfo_Authority.Merge(m, src)
}
func (m *Authority) XXX_Size() int {
return xxx_messageInfo_Authority.Size(m)
}
func (m *Authority) XXX_DiscardUnknown() {
xxx_messageInfo_Authority.DiscardUnknown(m)
}
var xxx_messageInfo_Authority proto.InternalMessageInfo
func (m *Authority) GetName() string {
if m != nil {
return m.Name
}
return ""
}
func init() {
proto.RegisterType((*Authority)(nil), "udpa.core.v1.Authority")
}
func init() { proto.RegisterFile("udpa/core/v1/authority.proto", fileDescriptor_609fadab943a4134) }
var fileDescriptor_609fadab943a4134 = []byte{
// 178 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x29, 0x4d, 0x29, 0x48,
0xd4, 0x4f, 0xce, 0x2f, 0x4a, 0xd5, 0x2f, 0x33, 0xd4, 0x4f, 0x2c, 0x2d, 0xc9, 0xc8, 0x2f, 0xca,
0x2c, 0xa9, 0xd4, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x01, 0xc9, 0xea, 0x81, 0x64, 0xf5,
0xca, 0x0c, 0xa5, 0x64, 0xc1, 0x6a, 0x13, 0xf3, 0xf2, 0xf2, 0x4b, 0x12, 0x4b, 0x32, 0xf3, 0xf3,
0x8a, 0xf5, 0x8b, 0x4b, 0x12, 0x4b, 0x4a, 0x8b, 0x21, 0x8a, 0xa5, 0xc4, 0xcb, 0x12, 0x73, 0x32,
0x53, 0x12, 0x4b, 0x52, 0xf5, 0x61, 0x0c, 0x88, 0x84, 0x92, 0x06, 0x17, 0xa7, 0x23, 0xcc, 0x60,
0x21, 0x69, 0x2e, 0x96, 0xbc, 0xc4, 0xdc, 0x54, 0x09, 0x46, 0x05, 0x46, 0x0d, 0x4e, 0x27, 0xf6,
0x5f, 0x4e, 0x2c, 0x45, 0x4c, 0x02, 0x8c, 0x41, 0x60, 0x41, 0x27, 0x8b, 0x5d, 0x0d, 0x27, 0x2e,
0xb2, 0x31, 0x71, 0x30, 0x72, 0xc9, 0x24, 0xe7, 0xe7, 0xea, 0xa5, 0x67, 0x96, 0x64, 0x94, 0x26,
0xe9, 0x81, 0x1d, 0x81, 0xec, 0x12, 0x27, 0x3e, 0xb8, 0x79, 0x01, 0x20, 0x1b, 0x02, 0x18, 0x93,
0xd8, 0xc0, 0x56, 0x19, 0x03, 0x02, 0x00, 0x00, 0xff, 0xff, 0xd3, 0x02, 0xb5, 0x8b, 0xd0, 0x00,
0x00, 0x00,
}

View File

@ -1,108 +0,0 @@
// Code generated by protoc-gen-validate. DO NOT EDIT.
// source: udpa/core/v1/authority.proto
package udpa_core_v1
import (
"bytes"
"errors"
"fmt"
"net"
"net/mail"
"net/url"
"regexp"
"strings"
"time"
"unicode/utf8"
"github.com/golang/protobuf/ptypes"
)
// 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)
_ = ptypes.DynamicAny{}
)
// define the regex for a UUID once up-front
var _authority_uuidPattern = regexp.MustCompile("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$")
// 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{}

View File

@ -1,196 +0,0 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: udpa/core/v1/collection_entry.proto
package udpa_core_v1
import (
fmt "fmt"
_ "github.com/cncf/udpa/go/udpa/annotations"
_ "github.com/envoyproxy/protoc-gen-validate/validate"
proto "github.com/golang/protobuf/proto"
any "github.com/golang/protobuf/ptypes/any"
math "math"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
type CollectionEntry struct {
// Types that are valid to be assigned to ResourceSpecifier:
// *CollectionEntry_Locator
// *CollectionEntry_InlineEntry_
ResourceSpecifier isCollectionEntry_ResourceSpecifier `protobuf_oneof:"resource_specifier"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *CollectionEntry) Reset() { *m = CollectionEntry{} }
func (m *CollectionEntry) String() string { return proto.CompactTextString(m) }
func (*CollectionEntry) ProtoMessage() {}
func (*CollectionEntry) Descriptor() ([]byte, []int) {
return fileDescriptor_1fbd2663cd4713c4, []int{0}
}
func (m *CollectionEntry) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_CollectionEntry.Unmarshal(m, b)
}
func (m *CollectionEntry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_CollectionEntry.Marshal(b, m, deterministic)
}
func (m *CollectionEntry) XXX_Merge(src proto.Message) {
xxx_messageInfo_CollectionEntry.Merge(m, src)
}
func (m *CollectionEntry) XXX_Size() int {
return xxx_messageInfo_CollectionEntry.Size(m)
}
func (m *CollectionEntry) XXX_DiscardUnknown() {
xxx_messageInfo_CollectionEntry.DiscardUnknown(m)
}
var xxx_messageInfo_CollectionEntry proto.InternalMessageInfo
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() {}
func (m *CollectionEntry) GetResourceSpecifier() isCollectionEntry_ResourceSpecifier {
if m != nil {
return m.ResourceSpecifier
}
return nil
}
func (m *CollectionEntry) GetLocator() *ResourceLocator {
if x, ok := m.GetResourceSpecifier().(*CollectionEntry_Locator); ok {
return x.Locator
}
return nil
}
func (m *CollectionEntry) GetInlineEntry() *CollectionEntry_InlineEntry {
if x, ok := m.GetResourceSpecifier().(*CollectionEntry_InlineEntry_); ok {
return x.InlineEntry
}
return nil
}
// XXX_OneofWrappers is for the internal use of the proto package.
func (*CollectionEntry) XXX_OneofWrappers() []interface{} {
return []interface{}{
(*CollectionEntry_Locator)(nil),
(*CollectionEntry_InlineEntry_)(nil),
}
}
type CollectionEntry_InlineEntry struct {
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"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *CollectionEntry_InlineEntry) Reset() { *m = CollectionEntry_InlineEntry{} }
func (m *CollectionEntry_InlineEntry) String() string { return proto.CompactTextString(m) }
func (*CollectionEntry_InlineEntry) ProtoMessage() {}
func (*CollectionEntry_InlineEntry) Descriptor() ([]byte, []int) {
return fileDescriptor_1fbd2663cd4713c4, []int{0, 0}
}
func (m *CollectionEntry_InlineEntry) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_CollectionEntry_InlineEntry.Unmarshal(m, b)
}
func (m *CollectionEntry_InlineEntry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_CollectionEntry_InlineEntry.Marshal(b, m, deterministic)
}
func (m *CollectionEntry_InlineEntry) XXX_Merge(src proto.Message) {
xxx_messageInfo_CollectionEntry_InlineEntry.Merge(m, src)
}
func (m *CollectionEntry_InlineEntry) XXX_Size() int {
return xxx_messageInfo_CollectionEntry_InlineEntry.Size(m)
}
func (m *CollectionEntry_InlineEntry) XXX_DiscardUnknown() {
xxx_messageInfo_CollectionEntry_InlineEntry.DiscardUnknown(m)
}
var xxx_messageInfo_CollectionEntry_InlineEntry proto.InternalMessageInfo
func (m *CollectionEntry_InlineEntry) GetName() string {
if m != nil {
return m.Name
}
return ""
}
func (m *CollectionEntry_InlineEntry) GetVersion() string {
if m != nil {
return m.Version
}
return ""
}
func (m *CollectionEntry_InlineEntry) GetResource() *any.Any {
if m != nil {
return m.Resource
}
return nil
}
func init() {
proto.RegisterType((*CollectionEntry)(nil), "udpa.core.v1.CollectionEntry")
proto.RegisterType((*CollectionEntry_InlineEntry)(nil), "udpa.core.v1.CollectionEntry.InlineEntry")
}
func init() {
proto.RegisterFile("udpa/core/v1/collection_entry.proto", fileDescriptor_1fbd2663cd4713c4)
}
var fileDescriptor_1fbd2663cd4713c4 = []byte{
// 369 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x5c, 0x91, 0x4f, 0x4b, 0x3a, 0x41,
0x1c, 0xc6, 0x5d, 0xfd, 0xe1, 0x9f, 0x51, 0xf8, 0xc1, 0x60, 0xb8, 0x8a, 0x42, 0x54, 0x87, 0x22,
0x76, 0x56, 0xed, 0x64, 0x87, 0xc0, 0x8d, 0xc0, 0x20, 0x42, 0xf6, 0x58, 0x96, 0x8c, 0xe3, 0x68,
0x03, 0xeb, 0x8c, 0xcc, 0xce, 0x2e, 0xd8, 0x21, 0xba, 0xf7, 0x8e, 0xba, 0x07, 0x5d, 0x7b, 0x37,
0xd1, 0x29, 0x76, 0x76, 0xd7, 0xd4, 0xdb, 0x0c, 0xdf, 0xcf, 0x33, 0xcf, 0xf3, 0xcc, 0x17, 0x1c,
0x06, 0xd3, 0x25, 0xb6, 0x89, 0x90, 0xd4, 0x0e, 0x3b, 0x36, 0x11, 0x9e, 0x47, 0x89, 0x62, 0x82,
0x8f, 0x29, 0x57, 0x72, 0x85, 0x96, 0x52, 0x28, 0x01, 0x2b, 0x11, 0x84, 0x22, 0x08, 0x85, 0x9d,
0x46, 0x7d, 0x2e, 0xc4, 0xdc, 0xa3, 0xb6, 0x9e, 0x4d, 0x82, 0x99, 0x8d, 0x79, 0x02, 0x36, 0x5a,
0xfa, 0x35, 0xcc, 0xb9, 0x50, 0x38, 0x7a, 0xc5, 0xb7, 0x7d, 0x85, 0x55, 0xe0, 0x27, 0xe3, 0x6d,
0x33, 0x49, 0x7d, 0x11, 0x48, 0x42, 0xc7, 0x9e, 0x20, 0x58, 0x09, 0x99, 0x40, 0xb5, 0x10, 0x7b,
0x6c, 0x8a, 0x15, 0xb5, 0xd3, 0x43, 0x3c, 0x38, 0xf8, 0xc8, 0x82, 0xff, 0x97, 0xeb, 0x80, 0x57,
0x51, 0x3e, 0xd8, 0x03, 0x85, 0x44, 0x6d, 0x1a, 0xfb, 0xc6, 0x71, 0xb9, 0xdb, 0x42, 0x9b, 0x59,
0x91, 0x9b, 0x78, 0xdc, 0xc4, 0xd0, 0x20, 0xe3, 0xa6, 0x3c, 0xbc, 0x05, 0x15, 0xc6, 0x3d, 0xc6,
0x69, 0x5c, 0xd5, 0xcc, 0x6a, 0xfd, 0xc9, 0xb6, 0x7e, 0xc7, 0x0f, 0x5d, 0x6b, 0x85, 0x3e, 0x0f,
0x32, 0x6e, 0x99, 0xfd, 0x5d, 0x1b, 0x6f, 0x06, 0x28, 0x6f, 0x8c, 0x61, 0x1b, 0xfc, 0xe3, 0x78,
0x41, 0x75, 0xae, 0x92, 0xd3, 0xfc, 0x71, 0xea, 0xb2, 0xd6, 0xdd, 0x7b, 0xbc, 0x6f, 0x5b, 0x3d,
0x6c, 0x3d, 0xf7, 0xad, 0xbb, 0xf1, 0xc8, 0x1a, 0xa1, 0x97, 0xf3, 0x87, 0xd3, 0x23, 0x57, 0x93,
0xd0, 0x04, 0x85, 0x90, 0x4a, 0x9f, 0x09, 0xae, 0xc3, 0x94, 0xdc, 0xf4, 0x0a, 0xdb, 0xa0, 0x98,
0xfe, 0x96, 0x99, 0xd3, 0x39, 0xab, 0x28, 0xde, 0x02, 0x4a, 0xb7, 0x80, 0xfa, 0x7c, 0xe5, 0xae,
0x29, 0xa7, 0x0e, 0xe0, 0xfa, 0x7f, 0xfd, 0x25, 0x25, 0x6c, 0xc6, 0xa8, 0x84, 0xb9, 0x6f, 0xc7,
0x70, 0x2e, 0xde, 0x5f, 0x3f, 0xbf, 0xf2, 0xd9, 0xa2, 0x01, 0x9a, 0x44, 0x2c, 0xd0, 0x9c, 0xa9,
0xa7, 0x60, 0x12, 0xd7, 0xde, 0xec, 0xee, 0x54, 0x77, 0xca, 0x0f, 0x23, 0xa7, 0xa1, 0x31, 0xc9,
0x6b, 0xcb, 0xb3, 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x54, 0xf1, 0xee, 0x8f, 0x3b, 0x02, 0x00,
0x00,
}

View File

@ -1,225 +0,0 @@
// Code generated by protoc-gen-validate. DO NOT EDIT.
// source: udpa/core/v1/collection_entry.proto
package udpa_core_v1
import (
"bytes"
"errors"
"fmt"
"net"
"net/mail"
"net/url"
"regexp"
"strings"
"time"
"unicode/utf8"
"github.com/golang/protobuf/ptypes"
)
// 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)
_ = ptypes.DynamicAny{}
)
// define the regex for a UUID once up-front
var _collection_entry_uuidPattern = regexp.MustCompile("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$")
// 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

@ -1,86 +0,0 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: udpa/core/v1/context_params.proto
package udpa_core_v1
import (
fmt "fmt"
_ "github.com/cncf/udpa/go/udpa/annotations"
proto "github.com/golang/protobuf/proto"
math "math"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
type ContextParams struct {
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"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ContextParams) Reset() { *m = ContextParams{} }
func (m *ContextParams) String() string { return proto.CompactTextString(m) }
func (*ContextParams) ProtoMessage() {}
func (*ContextParams) Descriptor() ([]byte, []int) {
return fileDescriptor_bbf45dc46a790208, []int{0}
}
func (m *ContextParams) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ContextParams.Unmarshal(m, b)
}
func (m *ContextParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ContextParams.Marshal(b, m, deterministic)
}
func (m *ContextParams) XXX_Merge(src proto.Message) {
xxx_messageInfo_ContextParams.Merge(m, src)
}
func (m *ContextParams) XXX_Size() int {
return xxx_messageInfo_ContextParams.Size(m)
}
func (m *ContextParams) XXX_DiscardUnknown() {
xxx_messageInfo_ContextParams.DiscardUnknown(m)
}
var xxx_messageInfo_ContextParams proto.InternalMessageInfo
func (m *ContextParams) GetParams() map[string]string {
if m != nil {
return m.Params
}
return nil
}
func init() {
proto.RegisterType((*ContextParams)(nil), "udpa.core.v1.ContextParams")
proto.RegisterMapType((map[string]string)(nil), "udpa.core.v1.ContextParams.ParamsEntry")
}
func init() { proto.RegisterFile("udpa/core/v1/context_params.proto", fileDescriptor_bbf45dc46a790208) }
var fileDescriptor_bbf45dc46a790208 = []byte{
// 217 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x2c, 0x4d, 0x29, 0x48,
0xd4, 0x4f, 0xce, 0x2f, 0x4a, 0xd5, 0x2f, 0x33, 0xd4, 0x4f, 0xce, 0xcf, 0x2b, 0x49, 0xad, 0x28,
0x89, 0x2f, 0x48, 0x2c, 0x4a, 0xcc, 0x2d, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x01,
0x29, 0xd1, 0x03, 0x29, 0xd1, 0x2b, 0x33, 0x94, 0x92, 0x05, 0x6b, 0x48, 0xcc, 0xcb, 0xcb, 0x2f,
0x49, 0x2c, 0xc9, 0xcc, 0xcf, 0x2b, 0xd6, 0x2f, 0x2e, 0x49, 0x2c, 0x29, 0x85, 0x2a, 0x56, 0xea,
0x66, 0xe4, 0xe2, 0x75, 0x86, 0x98, 0x12, 0x00, 0x36, 0x44, 0xc8, 0x9e, 0x8b, 0x0d, 0x62, 0x9c,
0x04, 0xa3, 0x02, 0xb3, 0x06, 0xb7, 0x91, 0xba, 0x1e, 0xb2, 0x79, 0x7a, 0x28, 0x8a, 0xf5, 0x20,
0x94, 0x6b, 0x5e, 0x49, 0x51, 0x65, 0x10, 0x54, 0x9b, 0x94, 0x25, 0x17, 0x37, 0x92, 0xb0, 0x90,
0x00, 0x17, 0x73, 0x76, 0x6a, 0xa5, 0x04, 0xa3, 0x02, 0xa3, 0x06, 0x67, 0x10, 0x88, 0x29, 0x24,
0xc2, 0xc5, 0x5a, 0x96, 0x98, 0x53, 0x9a, 0x2a, 0xc1, 0x04, 0x16, 0x83, 0x70, 0xac, 0x98, 0x2c,
0x18, 0x9d, 0x6c, 0x76, 0x35, 0x9c, 0xb8, 0xc8, 0xc6, 0xc4, 0xc1, 0xc8, 0x25, 0x93, 0x9c, 0x9f,
0xab, 0x97, 0x9e, 0x59, 0x92, 0x51, 0x9a, 0x04, 0xb1, 0x1f, 0xd9, 0x11, 0x4e, 0x42, 0x28, 0xae,
0x08, 0x00, 0xf9, 0x24, 0x80, 0x31, 0x89, 0x0d, 0xec, 0x25, 0x63, 0x40, 0x00, 0x00, 0x00, 0xff,
0xff, 0x05, 0x1a, 0x11, 0x52, 0x24, 0x01, 0x00, 0x00,
}

View File

@ -1,104 +0,0 @@
// Code generated by protoc-gen-validate. DO NOT EDIT.
// source: udpa/core/v1/context_params.proto
package udpa_core_v1
import (
"bytes"
"errors"
"fmt"
"net"
"net/mail"
"net/url"
"regexp"
"strings"
"time"
"unicode/utf8"
"github.com/golang/protobuf/ptypes"
)
// 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)
_ = ptypes.DynamicAny{}
)
// define the regex for a UUID once up-front
var _context_params_uuidPattern = regexp.MustCompile("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$")
// 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

@ -1,103 +0,0 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: udpa/core/v1/resource.proto
package udpa_core_v1
import (
fmt "fmt"
_ "github.com/cncf/udpa/go/udpa/annotations"
proto "github.com/golang/protobuf/proto"
any "github.com/golang/protobuf/ptypes/any"
math "math"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
type Resource struct {
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"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Resource) Reset() { *m = Resource{} }
func (m *Resource) String() string { return proto.CompactTextString(m) }
func (*Resource) ProtoMessage() {}
func (*Resource) Descriptor() ([]byte, []int) {
return fileDescriptor_3bc3fd9d360e95ec, []int{0}
}
func (m *Resource) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Resource.Unmarshal(m, b)
}
func (m *Resource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Resource.Marshal(b, m, deterministic)
}
func (m *Resource) XXX_Merge(src proto.Message) {
xxx_messageInfo_Resource.Merge(m, src)
}
func (m *Resource) XXX_Size() int {
return xxx_messageInfo_Resource.Size(m)
}
func (m *Resource) XXX_DiscardUnknown() {
xxx_messageInfo_Resource.DiscardUnknown(m)
}
var xxx_messageInfo_Resource proto.InternalMessageInfo
func (m *Resource) GetName() *ResourceName {
if m != nil {
return m.Name
}
return nil
}
func (m *Resource) GetVersion() string {
if m != nil {
return m.Version
}
return ""
}
func (m *Resource) GetResource() *any.Any {
if m != nil {
return m.Resource
}
return nil
}
func init() {
proto.RegisterType((*Resource)(nil), "udpa.core.v1.Resource")
}
func init() { proto.RegisterFile("udpa/core/v1/resource.proto", fileDescriptor_3bc3fd9d360e95ec) }
var fileDescriptor_3bc3fd9d360e95ec = []byte{
// 237 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x2e, 0x4d, 0x29, 0x48,
0xd4, 0x4f, 0xce, 0x2f, 0x4a, 0xd5, 0x2f, 0x33, 0xd4, 0x2f, 0x4a, 0x2d, 0xce, 0x2f, 0x2d, 0x4a,
0x4e, 0xd5, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x01, 0x49, 0xea, 0x81, 0x24, 0xf5, 0xca,
0x0c, 0xa5, 0x24, 0xd3, 0xf3, 0xf3, 0xd3, 0x73, 0x52, 0xf5, 0xc1, 0x72, 0x49, 0xa5, 0x69, 0xfa,
0x89, 0x79, 0x95, 0x10, 0x85, 0x52, 0xb2, 0x60, 0x53, 0x12, 0xf3, 0xf2, 0xf2, 0x4b, 0x12, 0x4b,
0x32, 0xf3, 0xf3, 0x8a, 0xf5, 0x8b, 0x4b, 0x12, 0x4b, 0x4a, 0x8b, 0xa1, 0xd2, 0x0a, 0x58, 0x2d,
0x89, 0xcf, 0x4b, 0xcc, 0x85, 0xda, 0xa4, 0xd4, 0xc6, 0xc8, 0xc5, 0x11, 0x04, 0x15, 0x17, 0xd2,
0xe3, 0x62, 0x01, 0x49, 0x49, 0x30, 0x2a, 0x30, 0x6a, 0x70, 0x1b, 0x49, 0xe9, 0x21, 0xbb, 0x42,
0x0f, 0xa6, 0xca, 0x2f, 0x31, 0x37, 0x35, 0x08, 0xac, 0x4e, 0x48, 0x82, 0x8b, 0xbd, 0x2c, 0xb5,
0xa8, 0x38, 0x33, 0x3f, 0x4f, 0x82, 0x49, 0x81, 0x51, 0x83, 0x33, 0x08, 0xc6, 0x15, 0x32, 0xe0,
0xe2, 0x80, 0xd9, 0x26, 0xc1, 0x0c, 0x36, 0x4d, 0x44, 0x0f, 0xe2, 0x0b, 0x3d, 0x98, 0x2f, 0xf4,
0x1c, 0xf3, 0x2a, 0x83, 0xe0, 0xaa, 0x9c, 0xcc, 0x77, 0x35, 0x9c, 0xb8, 0xc8, 0xc6, 0xc4, 0xc1,
0xc8, 0x25, 0x93, 0x9c, 0x9f, 0xab, 0x97, 0x9e, 0x59, 0x92, 0x51, 0x9a, 0x04, 0x71, 0x01, 0xb2,
0x33, 0x9c, 0x78, 0x61, 0xee, 0x08, 0x00, 0x99, 0x13, 0xc0, 0x98, 0xc4, 0x06, 0x36, 0xd0, 0x18,
0x10, 0x00, 0x00, 0xff, 0xff, 0x06, 0x0a, 0x1d, 0xc1, 0x51, 0x01, 0x00, 0x00,
}

View File

@ -1,123 +0,0 @@
// Code generated by protoc-gen-validate. DO NOT EDIT.
// source: udpa/core/v1/resource.proto
package udpa_core_v1
import (
"bytes"
"errors"
"fmt"
"net"
"net/mail"
"net/url"
"regexp"
"strings"
"time"
"unicode/utf8"
"github.com/golang/protobuf/ptypes"
)
// 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)
_ = ptypes.DynamicAny{}
)
// define the regex for a UUID once up-front
var _resource_uuidPattern = regexp.MustCompile("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$")
// 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

@ -1,281 +0,0 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: udpa/core/v1/resource_locator.proto
package udpa_core_v1
import (
fmt "fmt"
_ "github.com/cncf/udpa/go/udpa/annotations"
_ "github.com/envoyproxy/protoc-gen-validate/validate"
proto "github.com/golang/protobuf/proto"
math "math"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
type ResourceLocator_Scheme int32
const (
ResourceLocator_UDPA ResourceLocator_Scheme = 0
ResourceLocator_HTTP ResourceLocator_Scheme = 1
ResourceLocator_FILE ResourceLocator_Scheme = 2
)
var ResourceLocator_Scheme_name = map[int32]string{
0: "UDPA",
1: "HTTP",
2: "FILE",
}
var ResourceLocator_Scheme_value = map[string]int32{
"UDPA": 0,
"HTTP": 1,
"FILE": 2,
}
func (x ResourceLocator_Scheme) String() string {
return proto.EnumName(ResourceLocator_Scheme_name, int32(x))
}
func (ResourceLocator_Scheme) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_b10c84cf310f3232, []int{0, 0}
}
type ResourceLocator struct {
Scheme ResourceLocator_Scheme `protobuf:"varint,1,opt,name=scheme,proto3,enum=udpa.core.v1.ResourceLocator_Scheme" json:"scheme,omitempty"`
Id []string `protobuf:"bytes,2,rep,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 valid to be assigned 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"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ResourceLocator) Reset() { *m = ResourceLocator{} }
func (m *ResourceLocator) String() string { return proto.CompactTextString(m) }
func (*ResourceLocator) ProtoMessage() {}
func (*ResourceLocator) Descriptor() ([]byte, []int) {
return fileDescriptor_b10c84cf310f3232, []int{0}
}
func (m *ResourceLocator) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ResourceLocator.Unmarshal(m, b)
}
func (m *ResourceLocator) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ResourceLocator.Marshal(b, m, deterministic)
}
func (m *ResourceLocator) XXX_Merge(src proto.Message) {
xxx_messageInfo_ResourceLocator.Merge(m, src)
}
func (m *ResourceLocator) XXX_Size() int {
return xxx_messageInfo_ResourceLocator.Size(m)
}
func (m *ResourceLocator) XXX_DiscardUnknown() {
xxx_messageInfo_ResourceLocator.DiscardUnknown(m)
}
var xxx_messageInfo_ResourceLocator proto.InternalMessageInfo
func (m *ResourceLocator) GetScheme() ResourceLocator_Scheme {
if m != nil {
return m.Scheme
}
return ResourceLocator_UDPA
}
func (m *ResourceLocator) GetId() []string {
if m != nil {
return m.Id
}
return nil
}
func (m *ResourceLocator) GetAuthority() string {
if m != nil {
return m.Authority
}
return ""
}
func (m *ResourceLocator) GetResourceType() string {
if m != nil {
return m.ResourceType
}
return ""
}
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() {}
func (m *ResourceLocator) GetContextParamSpecifier() isResourceLocator_ContextParamSpecifier {
if m != nil {
return m.ContextParamSpecifier
}
return nil
}
func (m *ResourceLocator) GetExactContext() *ContextParams {
if x, ok := m.GetContextParamSpecifier().(*ResourceLocator_ExactContext); ok {
return x.ExactContext
}
return nil
}
func (m *ResourceLocator) GetDirectives() []*ResourceLocator_Directive {
if m != nil {
return m.Directives
}
return nil
}
// XXX_OneofWrappers is for the internal use of the proto package.
func (*ResourceLocator) XXX_OneofWrappers() []interface{} {
return []interface{}{
(*ResourceLocator_ExactContext)(nil),
}
}
type ResourceLocator_Directive struct {
// Types that are valid to be assigned to Directive:
// *ResourceLocator_Directive_Alt
// *ResourceLocator_Directive_Entry
Directive isResourceLocator_Directive_Directive `protobuf_oneof:"directive"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ResourceLocator_Directive) Reset() { *m = ResourceLocator_Directive{} }
func (m *ResourceLocator_Directive) String() string { return proto.CompactTextString(m) }
func (*ResourceLocator_Directive) ProtoMessage() {}
func (*ResourceLocator_Directive) Descriptor() ([]byte, []int) {
return fileDescriptor_b10c84cf310f3232, []int{0, 0}
}
func (m *ResourceLocator_Directive) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ResourceLocator_Directive.Unmarshal(m, b)
}
func (m *ResourceLocator_Directive) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ResourceLocator_Directive.Marshal(b, m, deterministic)
}
func (m *ResourceLocator_Directive) XXX_Merge(src proto.Message) {
xxx_messageInfo_ResourceLocator_Directive.Merge(m, src)
}
func (m *ResourceLocator_Directive) XXX_Size() int {
return xxx_messageInfo_ResourceLocator_Directive.Size(m)
}
func (m *ResourceLocator_Directive) XXX_DiscardUnknown() {
xxx_messageInfo_ResourceLocator_Directive.DiscardUnknown(m)
}
var xxx_messageInfo_ResourceLocator_Directive proto.InternalMessageInfo
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() {}
func (m *ResourceLocator_Directive) GetDirective() isResourceLocator_Directive_Directive {
if m != nil {
return m.Directive
}
return nil
}
func (m *ResourceLocator_Directive) GetAlt() *ResourceLocator {
if x, ok := m.GetDirective().(*ResourceLocator_Directive_Alt); ok {
return x.Alt
}
return nil
}
func (m *ResourceLocator_Directive) GetEntry() string {
if x, ok := m.GetDirective().(*ResourceLocator_Directive_Entry); ok {
return x.Entry
}
return ""
}
// XXX_OneofWrappers is for the internal use of the proto package.
func (*ResourceLocator_Directive) XXX_OneofWrappers() []interface{} {
return []interface{}{
(*ResourceLocator_Directive_Alt)(nil),
(*ResourceLocator_Directive_Entry)(nil),
}
}
func init() {
proto.RegisterEnum("udpa.core.v1.ResourceLocator_Scheme", ResourceLocator_Scheme_name, ResourceLocator_Scheme_value)
proto.RegisterType((*ResourceLocator)(nil), "udpa.core.v1.ResourceLocator")
proto.RegisterType((*ResourceLocator_Directive)(nil), "udpa.core.v1.ResourceLocator.Directive")
}
func init() {
proto.RegisterFile("udpa/core/v1/resource_locator.proto", fileDescriptor_b10c84cf310f3232)
}
var fileDescriptor_b10c84cf310f3232 = []byte{
// 484 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x92, 0x31, 0x6f, 0xd3, 0x40,
0x14, 0xc7, 0x73, 0x76, 0x62, 0xe2, 0x4b, 0x0a, 0xd6, 0x09, 0x51, 0x13, 0x52, 0x61, 0x4a, 0x05,
0x96, 0x20, 0x36, 0x31, 0x03, 0x82, 0x01, 0xa9, 0x47, 0x29, 0x41, 0xea, 0x60, 0x99, 0xb0, 0x40,
0xc1, 0xba, 0xda, 0x07, 0x39, 0x29, 0xf1, 0x59, 0xe7, 0x73, 0xd4, 0x30, 0x20, 0xc4, 0xc6, 0xca,
0xca, 0x37, 0xe1, 0x13, 0xb0, 0xf2, 0x6d, 0x50, 0x26, 0x64, 0x3b, 0x49, 0x93, 0x0e, 0xd9, 0x9e,
0xee, 0xff, 0x7b, 0x4f, 0xff, 0xff, 0xbb, 0x07, 0xef, 0xe6, 0x71, 0x4a, 0xdc, 0x88, 0x0b, 0xea,
0x4e, 0xfb, 0xae, 0xa0, 0x19, 0xcf, 0x45, 0x44, 0xc3, 0x31, 0x8f, 0x88, 0xe4, 0xc2, 0x49, 0x05,
0x97, 0x1c, 0xb5, 0x0b, 0xc8, 0x29, 0x20, 0x67, 0xda, 0xef, 0xec, 0x95, 0x2d, 0x24, 0x49, 0xb8,
0x24, 0x92, 0xf1, 0x24, 0x73, 0x33, 0x49, 0x64, 0x9e, 0x55, 0x70, 0xe7, 0xce, 0xc6, 0xc4, 0x88,
0x27, 0x92, 0x9e, 0xcb, 0x30, 0x25, 0x82, 0x4c, 0x96, 0xc8, 0xee, 0x94, 0x8c, 0x59, 0x4c, 0x24,
0x75, 0x97, 0x45, 0x25, 0xec, 0xff, 0xaa, 0xc3, 0x6b, 0xc1, 0xc2, 0xc3, 0x49, 0x65, 0x01, 0x1d,
0x43, 0x2d, 0x8b, 0x46, 0x74, 0x42, 0x4d, 0x60, 0x01, 0xfb, 0xaa, 0x77, 0xe0, 0xac, 0xbb, 0x71,
0x2e, 0xe1, 0xce, 0x9b, 0x92, 0xc5, 0xcd, 0x39, 0x6e, 0x7c, 0x07, 0x8a, 0x01, 0x82, 0x45, 0x37,
0x32, 0xa1, 0xc2, 0x62, 0x53, 0xb1, 0x54, 0x5b, 0x2f, 0xd5, 0x9f, 0x40, 0x69, 0x82, 0x40, 0x61,
0x31, 0xea, 0x42, 0x9d, 0xe4, 0x72, 0xc4, 0x05, 0x93, 0x33, 0x53, 0xb5, 0x80, 0xad, 0x07, 0x17,
0x0f, 0xe8, 0x21, 0xdc, 0x59, 0xad, 0x45, 0xce, 0x52, 0x6a, 0xd6, 0x0b, 0x02, 0x5f, 0x99, 0xe3,
0xba, 0x28, 0xe6, 0xb7, 0x97, 0xea, 0x70, 0x96, 0x52, 0x84, 0xe1, 0x0e, 0x3d, 0x27, 0x91, 0x0c,
0x17, 0xc1, 0xcd, 0x86, 0x05, 0xec, 0x96, 0x77, 0x6b, 0xd3, 0xf4, 0x8b, 0x4a, 0xf4, 0xcb, 0xa5,
0x0c, 0x6a, 0x41, 0xbb, 0xec, 0x59, 0xbc, 0xa2, 0x57, 0x10, 0xc6, 0x4c, 0xd0, 0x48, 0xb2, 0x29,
0xcd, 0x4c, 0xcd, 0x52, 0xed, 0x96, 0x77, 0x7f, 0x7b, 0xea, 0xa3, 0x25, 0x1f, 0xac, 0xb5, 0x76,
0x7e, 0x00, 0xa8, 0xaf, 0x14, 0xd4, 0x87, 0x2a, 0x19, 0xcb, 0x72, 0x8b, 0x2d, 0x6f, 0x6f, 0xeb,
0xbc, 0x41, 0x2d, 0x28, 0x58, 0xf4, 0x04, 0x36, 0x68, 0x22, 0xc5, 0xcc, 0x54, 0xca, 0xcc, 0xb7,
0xe7, 0xb8, 0x2b, 0x3a, 0x06, 0xf0, 0x6e, 0x7c, 0x7c, 0xff, 0xa8, 0xf7, 0x94, 0xf4, 0xbe, 0x1c,
0xf6, 0xde, 0x85, 0xa7, 0xbd, 0x53, 0xc7, 0xfd, 0xfa, 0xec, 0xc3, 0x83, 0x83, 0x41, 0x2d, 0xa8,
0x78, 0x6c, 0x40, 0x7d, 0xe5, 0x03, 0xa9, 0xff, 0x30, 0xd8, 0xbf, 0x07, 0xb5, 0xea, 0x6b, 0x50,
0x13, 0xd6, 0xdf, 0x1e, 0xf9, 0x87, 0x46, 0xad, 0xa8, 0x06, 0xc3, 0xa1, 0x6f, 0x80, 0xa2, 0x3a,
0x7e, 0x7d, 0xf2, 0xd2, 0x50, 0xf0, 0x4d, 0xb8, 0xbb, 0x71, 0x33, 0x61, 0x96, 0xd2, 0x88, 0x7d,
0x62, 0x54, 0xe0, 0xe7, 0xbf, 0xbf, 0xfd, 0xf9, 0xab, 0x29, 0x4d, 0x00, 0xbb, 0x11, 0x9f, 0x38,
0x9f, 0x99, 0x1c, 0xe5, 0x67, 0x55, 0x8e, 0xf5, 0x30, 0xf8, 0xfa, 0xa5, 0x34, 0x7e, 0x71, 0x5b,
0x3e, 0x38, 0xd3, 0xca, 0x23, 0x7b, 0xfc, 0x3f, 0x00, 0x00, 0xff, 0xff, 0x7d, 0xa8, 0x3f, 0xc5,
0xf4, 0x02, 0x00, 0x00,
}

View File

@ -1,263 +0,0 @@
// Code generated by protoc-gen-validate. DO NOT EDIT.
// source: udpa/core/v1/resource_locator.proto
package udpa_core_v1
import (
"bytes"
"errors"
"fmt"
"net"
"net/mail"
"net/url"
"regexp"
"strings"
"time"
"unicode/utf8"
"github.com/golang/protobuf/ptypes"
)
// 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)
_ = ptypes.DynamicAny{}
)
// define the regex for a UUID once up-front
var _resource_locator_uuidPattern = regexp.MustCompile("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$")
// 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",
}
}
if len(m.GetId()) < 1 {
return ResourceLocatorValidationError{
field: "Id",
reason: "value must contain at least 1 item(s)",
}
}
// 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

@ -1,114 +0,0 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: udpa/core/v1/resource_name.proto
package udpa_core_v1
import (
fmt "fmt"
_ "github.com/cncf/udpa/go/udpa/annotations"
_ "github.com/envoyproxy/protoc-gen-validate/validate"
proto "github.com/golang/protobuf/proto"
math "math"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
type ResourceName struct {
Id []string `protobuf:"bytes,1,rep,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"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ResourceName) Reset() { *m = ResourceName{} }
func (m *ResourceName) String() string { return proto.CompactTextString(m) }
func (*ResourceName) ProtoMessage() {}
func (*ResourceName) Descriptor() ([]byte, []int) {
return fileDescriptor_cadec11c867fca74, []int{0}
}
func (m *ResourceName) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ResourceName.Unmarshal(m, b)
}
func (m *ResourceName) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ResourceName.Marshal(b, m, deterministic)
}
func (m *ResourceName) XXX_Merge(src proto.Message) {
xxx_messageInfo_ResourceName.Merge(m, src)
}
func (m *ResourceName) XXX_Size() int {
return xxx_messageInfo_ResourceName.Size(m)
}
func (m *ResourceName) XXX_DiscardUnknown() {
xxx_messageInfo_ResourceName.DiscardUnknown(m)
}
var xxx_messageInfo_ResourceName proto.InternalMessageInfo
func (m *ResourceName) GetId() []string {
if m != nil {
return m.Id
}
return nil
}
func (m *ResourceName) GetAuthority() string {
if m != nil {
return m.Authority
}
return ""
}
func (m *ResourceName) GetResourceType() string {
if m != nil {
return m.ResourceType
}
return ""
}
func (m *ResourceName) GetContext() *ContextParams {
if m != nil {
return m.Context
}
return nil
}
func init() {
proto.RegisterType((*ResourceName)(nil), "udpa.core.v1.ResourceName")
}
func init() { proto.RegisterFile("udpa/core/v1/resource_name.proto", fileDescriptor_cadec11c867fca74) }
var fileDescriptor_cadec11c867fca74 = []byte{
// 280 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x54, 0x8f, 0x41, 0x4e, 0x83, 0x40,
0x14, 0x86, 0x33, 0xd3, 0xda, 0xc2, 0x88, 0x89, 0xb2, 0x91, 0xd4, 0x9a, 0xa0, 0x2b, 0x16, 0x66,
0x48, 0x35, 0xae, 0xdc, 0x8d, 0x7b, 0x43, 0x88, 0xfb, 0xe6, 0x15, 0x26, 0x76, 0x12, 0x61, 0xc8,
0xf0, 0x20, 0xb2, 0xf3, 0x0c, 0x5e, 0xc3, 0x1b, 0x78, 0x02, 0xb7, 0x5e, 0xa7, 0x2b, 0x03, 0x14,
0xa5, 0xbb, 0xc9, 0xfc, 0xdf, 0xff, 0xf2, 0x7f, 0xcc, 0xaf, 0xd2, 0x02, 0xc2, 0x44, 0x1b, 0x19,
0xd6, 0xab, 0xd0, 0xc8, 0x52, 0x57, 0x26, 0x91, 0xeb, 0x1c, 0x32, 0xc9, 0x0b, 0xa3, 0x51, 0xbb,
0x4e, 0x4b, 0xf0, 0x96, 0xe0, 0xf5, 0x6a, 0x71, 0xd9, 0xf1, 0x90, 0xe7, 0x1a, 0x01, 0x95, 0xce,
0xcb, 0xb0, 0x44, 0xc0, 0xaa, 0xec, 0xe1, 0xc5, 0xd5, 0xc1, 0xb9, 0x44, 0xe7, 0x28, 0xdf, 0x70,
0x5d, 0x80, 0x81, 0x6c, 0x40, 0xce, 0x6b, 0x78, 0x55, 0x29, 0xa0, 0x0c, 0x87, 0x47, 0x1f, 0x5c,
0x7f, 0x12, 0xe6, 0xc4, 0xfb, 0x01, 0x4f, 0x90, 0x49, 0xd7, 0x63, 0x54, 0xa5, 0x1e, 0xf1, 0x27,
0x81, 0x2d, 0xac, 0x9d, 0x38, 0xfa, 0x20, 0xd4, 0x22, 0x31, 0x55, 0xa9, 0xbb, 0x64, 0x36, 0x54,
0xb8, 0xd5, 0x46, 0x61, 0xe3, 0x51, 0x9f, 0x04, 0x76, 0xfc, 0xff, 0xe1, 0xde, 0xb0, 0x93, 0x3f,
0x11, 0x6c, 0x0a, 0xe9, 0x4d, 0x5a, 0x42, 0xcc, 0x77, 0x62, 0x6a, 0xe8, 0x29, 0x89, 0x9d, 0x21,
0x7d, 0x6e, 0x0a, 0xe9, 0xde, 0xb3, 0xf9, 0x7e, 0xa7, 0x37, 0xf5, 0x49, 0x70, 0x7c, 0x7b, 0xc1,
0xc7, 0xc6, 0xfc, 0xb1, 0x0f, 0xa3, 0xce, 0x21, 0x1e, 0x58, 0xf1, 0xf0, 0xf5, 0xfe, 0xfd, 0x33,
0xa3, 0x16, 0x61, 0xcb, 0x44, 0x67, 0xfc, 0x45, 0xe1, 0xb6, 0xda, 0xf4, 0xcd, 0x71, 0x5d, 0x9c,
0x8d, 0x95, 0xa2, 0x56, 0x34, 0x22, 0x9b, 0x59, 0x67, 0x7c, 0xf7, 0x1b, 0x00, 0x00, 0xff, 0xff,
0x4e, 0xc6, 0x95, 0x08, 0x7e, 0x01, 0x00, 0x00,
}

View File

@ -1,128 +0,0 @@
// Code generated by protoc-gen-validate. DO NOT EDIT.
// source: udpa/core/v1/resource_name.proto
package udpa_core_v1
import (
"bytes"
"errors"
"fmt"
"net"
"net/mail"
"net/url"
"regexp"
"strings"
"time"
"unicode/utf8"
"github.com/golang/protobuf/ptypes"
)
// 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)
_ = ptypes.DynamicAny{}
)
// define the regex for a UUID once up-front
var _resource_name_uuidPattern = regexp.MustCompile("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$")
// 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
}
if len(m.GetId()) < 1 {
return ResourceNameValidationError{
field: "Id",
reason: "value must contain at least 1 item(s)",
}
}
// 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,7 @@
package udpa_data_orca_v1
import (
xds "github.com/cncf/xds/go/udpa/data/orca/v1" // Note this is cncf/xds
)
type OrcaLoadReport = xds.OrcaLoadReport

View File

@ -1,129 +0,0 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: udpa/data/orca/v1/orca_load_report.proto
package udpa_data_orca_v1
import (
fmt "fmt"
_ "github.com/envoyproxy/protoc-gen-validate/validate"
proto "github.com/golang/protobuf/proto"
math "math"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
type OrcaLoadReport struct {
CpuUtilization float64 `protobuf:"fixed64,1,opt,name=cpu_utilization,json=cpuUtilization,proto3" json:"cpu_utilization,omitempty"`
MemUtilization float64 `protobuf:"fixed64,2,opt,name=mem_utilization,json=memUtilization,proto3" json:"mem_utilization,omitempty"`
Rps uint64 `protobuf:"varint,3,opt,name=rps,proto3" json:"rps,omitempty"`
RequestCost map[string]float64 `protobuf:"bytes,4,rep,name=request_cost,json=requestCost,proto3" json:"request_cost,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"`
Utilization map[string]float64 `protobuf:"bytes,5,rep,name=utilization,proto3" json:"utilization,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *OrcaLoadReport) Reset() { *m = OrcaLoadReport{} }
func (m *OrcaLoadReport) String() string { return proto.CompactTextString(m) }
func (*OrcaLoadReport) ProtoMessage() {}
func (*OrcaLoadReport) Descriptor() ([]byte, []int) {
return fileDescriptor_27edb21f16098bf0, []int{0}
}
func (m *OrcaLoadReport) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_OrcaLoadReport.Unmarshal(m, b)
}
func (m *OrcaLoadReport) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_OrcaLoadReport.Marshal(b, m, deterministic)
}
func (m *OrcaLoadReport) XXX_Merge(src proto.Message) {
xxx_messageInfo_OrcaLoadReport.Merge(m, src)
}
func (m *OrcaLoadReport) XXX_Size() int {
return xxx_messageInfo_OrcaLoadReport.Size(m)
}
func (m *OrcaLoadReport) XXX_DiscardUnknown() {
xxx_messageInfo_OrcaLoadReport.DiscardUnknown(m)
}
var xxx_messageInfo_OrcaLoadReport proto.InternalMessageInfo
func (m *OrcaLoadReport) GetCpuUtilization() float64 {
if m != nil {
return m.CpuUtilization
}
return 0
}
func (m *OrcaLoadReport) GetMemUtilization() float64 {
if m != nil {
return m.MemUtilization
}
return 0
}
func (m *OrcaLoadReport) GetRps() uint64 {
if m != nil {
return m.Rps
}
return 0
}
func (m *OrcaLoadReport) GetRequestCost() map[string]float64 {
if m != nil {
return m.RequestCost
}
return nil
}
func (m *OrcaLoadReport) GetUtilization() map[string]float64 {
if m != nil {
return m.Utilization
}
return nil
}
func init() {
proto.RegisterType((*OrcaLoadReport)(nil), "udpa.data.orca.v1.OrcaLoadReport")
proto.RegisterMapType((map[string]float64)(nil), "udpa.data.orca.v1.OrcaLoadReport.RequestCostEntry")
proto.RegisterMapType((map[string]float64)(nil), "udpa.data.orca.v1.OrcaLoadReport.UtilizationEntry")
}
func init() {
proto.RegisterFile("udpa/data/orca/v1/orca_load_report.proto", fileDescriptor_27edb21f16098bf0)
}
var fileDescriptor_27edb21f16098bf0 = []byte{
// 341 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x92, 0x4f, 0x4b, 0xfb, 0x30,
0x1c, 0xc6, 0x7f, 0xd9, 0x9f, 0x1f, 0x2c, 0xd5, 0x39, 0xab, 0xe0, 0x1c, 0x1e, 0xa6, 0x07, 0xa9,
0x1e, 0x52, 0x36, 0x2f, 0xb2, 0x83, 0x42, 0x65, 0x37, 0xc1, 0x11, 0xd8, 0xb9, 0x64, 0x6d, 0xd0,
0x62, 0xbb, 0xc4, 0x34, 0x29, 0x4c, 0xbc, 0xfa, 0x26, 0x7c, 0x95, 0x9e, 0x77, 0x92, 0x24, 0x8e,
0xb5, 0xdb, 0x65, 0xf6, 0xd2, 0x6f, 0xc2, 0xf3, 0x3c, 0x79, 0x3e, 0x21, 0xd0, 0x53, 0x31, 0x27,
0x7e, 0x4c, 0x24, 0xf1, 0x99, 0x88, 0x88, 0x5f, 0x0c, 0xcc, 0x3f, 0x4c, 0x19, 0x89, 0x43, 0x41,
0x39, 0x13, 0x12, 0x71, 0xc1, 0x24, 0x73, 0x0f, 0xb5, 0x12, 0x69, 0x25, 0xd2, 0x0a, 0x54, 0x0c,
0x7a, 0x27, 0x05, 0x49, 0x93, 0x98, 0x48, 0xea, 0xaf, 0x06, 0xab, 0xbd, 0xf8, 0x6c, 0xc0, 0xf6,
0x93, 0x88, 0xc8, 0x23, 0x23, 0x31, 0x36, 0x21, 0xee, 0x18, 0x1e, 0x44, 0x5c, 0x85, 0x4a, 0x26,
0x69, 0xf2, 0x4e, 0x64, 0xc2, 0xe6, 0x5d, 0xd0, 0x07, 0x1e, 0x08, 0xce, 0x96, 0x81, 0xe3, 0xb6,
0xae, 0xfe, 0xfd, 0x7e, 0x66, 0x75, 0x6a, 0xe7, 0xef, 0x7b, 0xdc, 0x8e, 0xb8, 0x9a, 0xae, 0x3d,
0x3a, 0x26, 0xa3, 0x59, 0x25, 0xa6, 0xb6, 0x4b, 0x4c, 0x46, 0xb3, 0x72, 0x4c, 0x07, 0xd6, 0x05,
0xcf, 0xbb, 0xf5, 0x3e, 0xf0, 0x1a, 0x58, 0x8f, 0xee, 0x14, 0xee, 0x09, 0xfa, 0xa6, 0x68, 0x2e,
0xc3, 0x88, 0xe5, 0xb2, 0xdb, 0xe8, 0xd7, 0x3d, 0x67, 0x38, 0x44, 0x5b, 0xd4, 0xa8, 0x0a, 0x86,
0xb0, 0x75, 0x3d, 0xb0, 0x5c, 0x8e, 0xe7, 0x52, 0x2c, 0xb0, 0x23, 0xd6, 0x3b, 0xee, 0x07, 0x74,
0xca, 0x5d, 0x9b, 0xbb, 0xa6, 0x96, 0xca, 0x9a, 0xd4, 0xe0, 0x72, 0x19, 0x74, 0xbe, 0xc0, 0xfe,
0x75, 0x15, 0x72, 0xb5, 0xb5, 0x26, 0x2d, 0x1f, 0xd7, 0xbb, 0x83, 0x9d, 0xcd, 0x7a, 0x1a, 0xfd,
0x95, 0x2e, 0xcc, 0xe5, 0xb7, 0xb0, 0x1e, 0xdd, 0x63, 0xd8, 0x2c, 0x48, 0xaa, 0xa8, 0xbd, 0x49,
0x6c, 0x17, 0xa3, 0xda, 0x2d, 0xd0, 0xfe, 0xcd, 0x22, 0x7f, 0xf1, 0x07, 0x23, 0x78, 0x1e, 0xb1,
0x0c, 0x3d, 0x27, 0xf2, 0x45, 0xcd, 0x2c, 0xf4, 0x16, 0x79, 0x70, 0x54, 0x45, 0x9f, 0xe8, 0x17,
0x34, 0x01, 0xb3, 0xff, 0xe6, 0x29, 0xdd, 0xfc, 0x04, 0x00, 0x00, 0xff, 0xff, 0x71, 0x13, 0xd1,
0xd4, 0xa2, 0x02, 0x00, 0x00,
}

View File

@ -1,134 +0,0 @@
// Code generated by protoc-gen-validate. DO NOT EDIT.
// source: udpa/data/orca/v1/orca_load_report.proto
package udpa_data_orca_v1
import (
"bytes"
"errors"
"fmt"
"net"
"net/mail"
"net/url"
"regexp"
"strings"
"time"
"unicode/utf8"
"github.com/golang/protobuf/ptypes"
)
// 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)
_ = ptypes.DynamicAny{}
)
// define the regex for a UUID once up-front
var _orca_load_report_uuidPattern = regexp.MustCompile("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$")
// Validate checks the field values on OrcaLoadReport with the rules defined in
// the proto definition for this message. If any rules are violated, an error
// is returned.
func (m *OrcaLoadReport) Validate() error {
if m == nil {
return nil
}
if m.GetCpuUtilization() > 1 {
return OrcaLoadReportValidationError{
field: "CpuUtilization",
reason: "value must be less than or equal to 1",
}
}
if m.GetMemUtilization() > 1 {
return OrcaLoadReportValidationError{
field: "MemUtilization",
reason: "value must be less than or equal to 1",
}
}
// no validation rules for Rps
// no validation rules for RequestCost
for key, val := range m.GetUtilization() {
_ = val
// no validation rules for Utilization[key]
if val > 1 {
return OrcaLoadReportValidationError{
field: fmt.Sprintf("Utilization[%v]", key),
reason: "value must be less than or equal to 1",
}
}
}
return nil
}
// OrcaLoadReportValidationError is the validation error returned by
// OrcaLoadReport.Validate if the designated constraints aren't met.
type OrcaLoadReportValidationError struct {
field string
reason string
cause error
key bool
}
// Field function returns field value.
func (e OrcaLoadReportValidationError) Field() string { return e.field }
// Reason function returns reason value.
func (e OrcaLoadReportValidationError) Reason() string { return e.reason }
// Cause function returns cause value.
func (e OrcaLoadReportValidationError) Cause() error { return e.cause }
// Key function returns key value.
func (e OrcaLoadReportValidationError) Key() bool { return e.key }
// ErrorName returns error name.
func (e OrcaLoadReportValidationError) ErrorName() string { return "OrcaLoadReportValidationError" }
// Error satisfies the builtin error interface
func (e OrcaLoadReportValidationError) 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 %sOrcaLoadReport.%s: %s%s",
key,
e.field,
e.reason,
cause)
}
var _ error = OrcaLoadReportValidationError{}
var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = OrcaLoadReportValidationError{}

View File

@ -0,0 +1,17 @@
package udpa_service_orca_v1
import (
xds "github.com/cncf/xds/go/udpa/service/orca/v1" // Note this is cncf/xds
)
type OrcaLoadReportRequest = xds.OrcaLoadReportRequest
// OpenRcaServiceClient is the client API for OpenRcaService service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type OpenRcaServiceClient = xds.OpenRcaServiceClient
var NewOpenRcaServiceClient = xds.NewOpenRcaServiceClient
var RegisterOpenRcaServiceServer = xds.RegisterOpenRcaServiceServer
type OpenRcaService_StreamCoreMetricsServer = xds.OpenRcaService_StreamCoreMetricsServer

View File

@ -1,201 +0,0 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: udpa/service/orca/v1/orca.proto
package udpa_service_orca_v1
import (
context "context"
fmt "fmt"
v1 "github.com/cncf/udpa/go/udpa/data/orca/v1"
_ "github.com/envoyproxy/protoc-gen-validate/validate"
proto "github.com/golang/protobuf/proto"
duration "github.com/golang/protobuf/ptypes/duration"
grpc "google.golang.org/grpc"
math "math"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
type OrcaLoadReportRequest struct {
ReportInterval *duration.Duration `protobuf:"bytes,1,opt,name=report_interval,json=reportInterval,proto3" json:"report_interval,omitempty"`
RequestCostNames []string `protobuf:"bytes,2,rep,name=request_cost_names,json=requestCostNames,proto3" json:"request_cost_names,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *OrcaLoadReportRequest) Reset() { *m = OrcaLoadReportRequest{} }
func (m *OrcaLoadReportRequest) String() string { return proto.CompactTextString(m) }
func (*OrcaLoadReportRequest) ProtoMessage() {}
func (*OrcaLoadReportRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_f598b2ec2dba5eee, []int{0}
}
func (m *OrcaLoadReportRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_OrcaLoadReportRequest.Unmarshal(m, b)
}
func (m *OrcaLoadReportRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_OrcaLoadReportRequest.Marshal(b, m, deterministic)
}
func (m *OrcaLoadReportRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_OrcaLoadReportRequest.Merge(m, src)
}
func (m *OrcaLoadReportRequest) XXX_Size() int {
return xxx_messageInfo_OrcaLoadReportRequest.Size(m)
}
func (m *OrcaLoadReportRequest) XXX_DiscardUnknown() {
xxx_messageInfo_OrcaLoadReportRequest.DiscardUnknown(m)
}
var xxx_messageInfo_OrcaLoadReportRequest proto.InternalMessageInfo
func (m *OrcaLoadReportRequest) GetReportInterval() *duration.Duration {
if m != nil {
return m.ReportInterval
}
return nil
}
func (m *OrcaLoadReportRequest) GetRequestCostNames() []string {
if m != nil {
return m.RequestCostNames
}
return nil
}
func init() {
proto.RegisterType((*OrcaLoadReportRequest)(nil), "udpa.service.orca.v1.OrcaLoadReportRequest")
}
func init() { proto.RegisterFile("udpa/service/orca/v1/orca.proto", fileDescriptor_f598b2ec2dba5eee) }
var fileDescriptor_f598b2ec2dba5eee = []byte{
// 295 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x90, 0xdd, 0x4a, 0xc3, 0x40,
0x10, 0x85, 0x89, 0x82, 0xd0, 0x15, 0xaa, 0x06, 0xc5, 0xda, 0x0b, 0xad, 0xe2, 0x45, 0x41, 0xd9,
0xd8, 0xf6, 0x0d, 0x5a, 0x6f, 0x04, 0xb5, 0x25, 0x7d, 0x80, 0x30, 0xdd, 0x8c, 0x35, 0x90, 0x66,
0xe2, 0xec, 0x24, 0x3e, 0x83, 0x6f, 0x2d, 0xd9, 0x4d, 0x2f, 0x84, 0x78, 0xb5, 0x3f, 0xe7, 0x7c,
0x73, 0x98, 0xa3, 0x6e, 0xaa, 0xb4, 0x84, 0xc8, 0x22, 0xd7, 0x99, 0xc1, 0x88, 0xd8, 0x40, 0x54,
0x4f, 0xdc, 0xa9, 0x4b, 0x26, 0xa1, 0xf0, 0xbc, 0x31, 0xe8, 0xd6, 0xa0, 0x9d, 0x50, 0x4f, 0x86,
0x63, 0x87, 0xa5, 0x20, 0xf0, 0x87, 0x49, 0x72, 0x82, 0x34, 0x61, 0x2c, 0x89, 0xc5, 0xf3, 0xc3,
0xeb, 0x2d, 0xd1, 0x36, 0xc7, 0xc8, 0xbd, 0x36, 0xd5, 0x47, 0x94, 0x56, 0x0c, 0x92, 0x51, 0xd1,
0xea, 0x97, 0x35, 0xe4, 0x59, 0x0a, 0x82, 0xd1, 0xfe, 0xe2, 0x85, 0xbb, 0x9f, 0x40, 0x5d, 0x2c,
0xd9, 0xc0, 0x2b, 0x41, 0x1a, 0xbb, 0x89, 0x31, 0x7e, 0x55, 0x68, 0x25, 0x9c, 0xab, 0x13, 0x1f,
0x91, 0x64, 0x85, 0x20, 0xd7, 0x90, 0x0f, 0x82, 0x51, 0x30, 0x3e, 0x9e, 0x5e, 0x69, 0x1f, 0xa6,
0xf7, 0x61, 0xfa, 0xb9, 0x0d, 0x8b, 0xfb, 0x9e, 0x78, 0x69, 0x81, 0xf0, 0x51, 0x85, 0xec, 0xc7,
0x25, 0x86, 0xac, 0x24, 0x05, 0xec, 0xd0, 0x0e, 0x0e, 0x46, 0x87, 0xe3, 0x5e, 0x7c, 0xda, 0x2a,
0x0b, 0xb2, 0xf2, 0xde, 0xfc, 0x4f, 0xbf, 0x55, 0x7f, 0x59, 0x62, 0x11, 0x1b, 0x58, 0xfb, 0x22,
0x42, 0x54, 0x67, 0x6b, 0x61, 0x84, 0xdd, 0x82, 0x18, 0xdf, 0x50, 0x38, 0x33, 0x36, 0x7c, 0xd0,
0x5d, 0x65, 0xe9, 0xce, 0x2d, 0x86, 0xb7, 0xde, 0xdc, 0x74, 0xf8, 0x8f, 0xf3, 0x29, 0x98, 0xcf,
0xd4, 0xbd, 0xa1, 0x9d, 0xde, 0x66, 0xf2, 0x59, 0x6d, 0x3c, 0xd0, 0x15, 0x31, 0xef, 0x35, 0xe4,
0xaa, 0xd9, 0x7a, 0x15, 0x6c, 0x8e, 0xdc, 0xfa, 0xb3, 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x1f,
0xe4, 0x0b, 0x27, 0xdc, 0x01, 0x00, 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConn
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion4
// OpenRcaServiceClient is the client API for OpenRcaService service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type OpenRcaServiceClient interface {
StreamCoreMetrics(ctx context.Context, in *OrcaLoadReportRequest, opts ...grpc.CallOption) (OpenRcaService_StreamCoreMetricsClient, error)
}
type openRcaServiceClient struct {
cc *grpc.ClientConn
}
func NewOpenRcaServiceClient(cc *grpc.ClientConn) OpenRcaServiceClient {
return &openRcaServiceClient{cc}
}
func (c *openRcaServiceClient) StreamCoreMetrics(ctx context.Context, in *OrcaLoadReportRequest, opts ...grpc.CallOption) (OpenRcaService_StreamCoreMetricsClient, error) {
stream, err := c.cc.NewStream(ctx, &_OpenRcaService_serviceDesc.Streams[0], "/udpa.service.orca.v1.OpenRcaService/StreamCoreMetrics", opts...)
if err != nil {
return nil, err
}
x := &openRcaServiceStreamCoreMetricsClient{stream}
if err := x.ClientStream.SendMsg(in); err != nil {
return nil, err
}
if err := x.ClientStream.CloseSend(); err != nil {
return nil, err
}
return x, nil
}
type OpenRcaService_StreamCoreMetricsClient interface {
Recv() (*v1.OrcaLoadReport, error)
grpc.ClientStream
}
type openRcaServiceStreamCoreMetricsClient struct {
grpc.ClientStream
}
func (x *openRcaServiceStreamCoreMetricsClient) Recv() (*v1.OrcaLoadReport, error) {
m := new(v1.OrcaLoadReport)
if err := x.ClientStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
// OpenRcaServiceServer is the server API for OpenRcaService service.
type OpenRcaServiceServer interface {
StreamCoreMetrics(*OrcaLoadReportRequest, OpenRcaService_StreamCoreMetricsServer) error
}
func RegisterOpenRcaServiceServer(s *grpc.Server, srv OpenRcaServiceServer) {
s.RegisterService(&_OpenRcaService_serviceDesc, srv)
}
func _OpenRcaService_StreamCoreMetrics_Handler(srv interface{}, stream grpc.ServerStream) error {
m := new(OrcaLoadReportRequest)
if err := stream.RecvMsg(m); err != nil {
return err
}
return srv.(OpenRcaServiceServer).StreamCoreMetrics(m, &openRcaServiceStreamCoreMetricsServer{stream})
}
type OpenRcaService_StreamCoreMetricsServer interface {
Send(*v1.OrcaLoadReport) error
grpc.ServerStream
}
type openRcaServiceStreamCoreMetricsServer struct {
grpc.ServerStream
}
func (x *openRcaServiceStreamCoreMetricsServer) Send(m *v1.OrcaLoadReport) error {
return x.ServerStream.SendMsg(m)
}
var _OpenRcaService_serviceDesc = grpc.ServiceDesc{
ServiceName: "udpa.service.orca.v1.OpenRcaService",
HandlerType: (*OpenRcaServiceServer)(nil),
Methods: []grpc.MethodDesc{},
Streams: []grpc.StreamDesc{
{
StreamName: "StreamCoreMetrics",
Handler: _OpenRcaService_StreamCoreMetrics_Handler,
ServerStreams: true,
},
},
Metadata: "udpa/service/orca/v1/orca.proto",
}

View File

@ -1,114 +0,0 @@
// Code generated by protoc-gen-validate. DO NOT EDIT.
// source: udpa/service/orca/v1/orca.proto
package udpa_service_orca_v1
import (
"bytes"
"errors"
"fmt"
"net"
"net/mail"
"net/url"
"regexp"
"strings"
"time"
"unicode/utf8"
"github.com/golang/protobuf/ptypes"
)
// 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)
_ = ptypes.DynamicAny{}
)
// define the regex for a UUID once up-front
var _orca_uuidPattern = regexp.MustCompile("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$")
// Validate checks the field values on OrcaLoadReportRequest with the rules
// defined in the proto definition for this message. If any rules are
// violated, an error is returned.
func (m *OrcaLoadReportRequest) Validate() error {
if m == nil {
return nil
}
if v, ok := interface{}(m.GetReportInterval()).(interface{ Validate() error }); ok {
if err := v.Validate(); err != nil {
return OrcaLoadReportRequestValidationError{
field: "ReportInterval",
reason: "embedded message failed validation",
cause: err,
}
}
}
return nil
}
// OrcaLoadReportRequestValidationError is the validation error returned by
// OrcaLoadReportRequest.Validate if the designated constraints aren't met.
type OrcaLoadReportRequestValidationError struct {
field string
reason string
cause error
key bool
}
// Field function returns field value.
func (e OrcaLoadReportRequestValidationError) Field() string { return e.field }
// Reason function returns reason value.
func (e OrcaLoadReportRequestValidationError) Reason() string { return e.reason }
// Cause function returns cause value.
func (e OrcaLoadReportRequestValidationError) Cause() error { return e.cause }
// Key function returns key value.
func (e OrcaLoadReportRequestValidationError) Key() bool { return e.key }
// ErrorName returns error name.
func (e OrcaLoadReportRequestValidationError) ErrorName() string {
return "OrcaLoadReportRequestValidationError"
}
// Error satisfies the builtin error interface
func (e OrcaLoadReportRequestValidationError) 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 %sOrcaLoadReportRequest.%s: %s%s",
key,
e.field,
e.reason,
cause)
}
var _ error = OrcaLoadReportRequestValidationError{}
var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = OrcaLoadReportRequestValidationError{}

View File

@ -0,0 +1,8 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: udpa/type/v1/typed_struct.proto
package udpa_type_v1
import xdsudpatypepb "github.com/cncf/xds/go/udpa/type/v1" // Note this is cncf/xds
type TypedStruct = xdsudpatypepb.TypedStruct

View File

@ -1,92 +0,0 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: udpa/type/v1/typed_struct.proto
package udpa_type_v1
import (
fmt "fmt"
_ "github.com/envoyproxy/protoc-gen-validate/validate"
proto "github.com/golang/protobuf/proto"
_struct "github.com/golang/protobuf/ptypes/struct"
math "math"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
type TypedStruct struct {
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"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *TypedStruct) Reset() { *m = TypedStruct{} }
func (m *TypedStruct) String() string { return proto.CompactTextString(m) }
func (*TypedStruct) ProtoMessage() {}
func (*TypedStruct) Descriptor() ([]byte, []int) {
return fileDescriptor_098110268becad8a, []int{0}
}
func (m *TypedStruct) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_TypedStruct.Unmarshal(m, b)
}
func (m *TypedStruct) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_TypedStruct.Marshal(b, m, deterministic)
}
func (m *TypedStruct) XXX_Merge(src proto.Message) {
xxx_messageInfo_TypedStruct.Merge(m, src)
}
func (m *TypedStruct) XXX_Size() int {
return xxx_messageInfo_TypedStruct.Size(m)
}
func (m *TypedStruct) XXX_DiscardUnknown() {
xxx_messageInfo_TypedStruct.DiscardUnknown(m)
}
var xxx_messageInfo_TypedStruct proto.InternalMessageInfo
func (m *TypedStruct) GetTypeUrl() string {
if m != nil {
return m.TypeUrl
}
return ""
}
func (m *TypedStruct) GetValue() *_struct.Struct {
if m != nil {
return m.Value
}
return nil
}
func init() {
proto.RegisterType((*TypedStruct)(nil), "udpa.type.v1.TypedStruct")
}
func init() { proto.RegisterFile("udpa/type/v1/typed_struct.proto", fileDescriptor_098110268becad8a) }
var fileDescriptor_098110268becad8a = []byte{
// 192 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x2f, 0x4d, 0x29, 0x48,
0xd4, 0x2f, 0xa9, 0x2c, 0x48, 0xd5, 0x2f, 0x33, 0x04, 0xd3, 0x29, 0xf1, 0xc5, 0x25, 0x45, 0xa5,
0xc9, 0x25, 0x7a, 0x05, 0x45, 0xf9, 0x25, 0xf9, 0x42, 0x3c, 0x20, 0x05, 0x7a, 0x20, 0x09, 0xbd,
0x32, 0x43, 0x29, 0xf1, 0xb2, 0xc4, 0x9c, 0xcc, 0x94, 0xc4, 0x92, 0x54, 0x7d, 0x18, 0x03, 0xa2,
0x4c, 0x4a, 0x26, 0x3d, 0x3f, 0x3f, 0x3d, 0x27, 0x55, 0x1f, 0xcc, 0x4b, 0x2a, 0x4d, 0xd3, 0x47,
0x36, 0x44, 0x29, 0x9c, 0x8b, 0x3b, 0x04, 0x64, 0x74, 0x30, 0x58, 0x50, 0x48, 0x92, 0x8b, 0x03,
0x64, 0x60, 0x7c, 0x69, 0x51, 0x8e, 0x04, 0xa3, 0x02, 0xa3, 0x06, 0x67, 0x10, 0x3b, 0x88, 0x1f,
0x5a, 0x94, 0x23, 0xa4, 0xcb, 0xc5, 0x5a, 0x96, 0x98, 0x53, 0x9a, 0x2a, 0xc1, 0xa4, 0xc0, 0xa8,
0xc1, 0x6d, 0x24, 0xae, 0x07, 0x31, 0x57, 0x0f, 0x66, 0xae, 0x1e, 0xc4, 0x88, 0x20, 0x88, 0x2a,
0x27, 0x23, 0x2e, 0x99, 0xe4, 0xfc, 0x5c, 0xbd, 0xf4, 0xcc, 0x92, 0x8c, 0xd2, 0x24, 0x3d, 0xb0,
0x53, 0x91, 0xdd, 0xeb, 0x24, 0x80, 0x64, 0x6d, 0x00, 0xc8, 0x88, 0x00, 0xc6, 0x24, 0x36, 0xb0,
0x59, 0xc6, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0x68, 0x7c, 0xa9, 0xb5, 0xfb, 0x00, 0x00, 0x00,
}

View File

@ -1,114 +0,0 @@
// Code generated by protoc-gen-validate. DO NOT EDIT.
// source: udpa/type/v1/typed_struct.proto
package udpa_type_v1
import (
"bytes"
"errors"
"fmt"
"net"
"net/mail"
"net/url"
"regexp"
"strings"
"time"
"unicode/utf8"
"github.com/golang/protobuf/ptypes"
)
// 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)
_ = ptypes.DynamicAny{}
)
// define the regex for a UUID once up-front
var _typed_struct_uuidPattern = regexp.MustCompile("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$")
// 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{}

39
go/xds/core/v3/types.go Normal file
View File

@ -0,0 +1,39 @@
package xds_core_v3
import (
xds "github.com/cncf/xds/go/xds/core/v3"
)
type ResourceLocatorValidationError = xds.ResourceLocatorValidationError
type ResourceLocator_DirectiveValidationError = xds.ResourceLocator_DirectiveValidationError
type ContextParamsValidationError = xds.ContextParamsValidationError
type Resource = xds.Resource
type CollectionEntry = xds.CollectionEntry
type CollectionEntry_Locator = xds.CollectionEntry_Locator
type CollectionEntry_InlineEntry_ = xds.CollectionEntry_InlineEntry_
type CollectionEntry_InlineEntry = xds.CollectionEntry_InlineEntry
type ResourceLocator_Scheme = xds.ResourceLocator_Scheme
type ResourceLocator = xds.ResourceLocator
type ResourceLocator_ExactContext = xds.ResourceLocator_ExactContext
type ResourceLocator_Directive = xds.ResourceLocator_Directive
type ResourceLocator_Directive_Alt = xds.ResourceLocator_Directive_Alt
type ResourceLocator_Directive_Entry = xds.ResourceLocator_Directive_Entry
type ResourceName = xds.ResourceName
type ResourceNameValidationError = xds.ResourceNameValidationError
type Authority = xds.Authority
type ResourceValidationError = xds.ResourceValidationError
type AuthorityValidationError = xds.AuthorityValidationError
type CollectionEntryValidationError = xds.CollectionEntryValidationError
type CollectionEntry_InlineEntryValidationError = xds.CollectionEntry_InlineEntryValidationError
type ContextParams = xds.ContextParams
const (
ResourceLocator_XDSTP ResourceLocator_Scheme = xds.ResourceLocator_XDSTP
ResourceLocator_HTTP ResourceLocator_Scheme = xds.ResourceLocator_HTTP
ResourceLocator_FILE ResourceLocator_Scheme = xds.ResourceLocator_FILE
)
var ResourceLocator_Scheme_name = xds.ResourceLocator_Scheme_name
var ResourceLocator_Scheme_value = xds.ResourceLocator_Scheme_name

54
proposals/README.md Normal file
View File

@ -0,0 +1,54 @@
# xDS RFCs (xRFCs)
## Introduction
This directory contains the design proposals for substantial feature changes for
xDS. The goal of this process is to:
- Provide a reference for the xDS transport protocol and data model standards.
- Capture design history and tradeoffs as the xDS APIs evolve.
- Provide increased visibility to the community on upcoming changes and the
design considerations around them.
- Provide ability to reason about larger “sets” of changes that are too big to
be covered either in an Issue or in a PR.
- Establish a consistent process for structured participation by the community
on significant changes, especially those that impact multiple clients and servers.
We have modeled the xRFC process on [gRPC
RFCs](https://github.com/grpc/proposal).
## Process
1. Copy the template [XRFC-TEMPLATE.md](XRFC-TEMPLATE.md).
1. Rename it to `$CategoryName$xRfcId-$Summary.md`, e.g. `TP1-xds-transport-next.md`
(see category definitions below). The `$xRfcId` should be strictly higher
than any existing or under-review xRFC in `$CategoryName`.
1. Write up the RFC.
1. Submit a Pull Request. The CNCF xDS working group should be tagged with
`@cncf/xds-wg` and an e-mail sent to `xds-wg@lists.cncf.io` linking to the
PR. All discussion is expected to take place within the PR.
1. An APPROVER will be assigned by one of this repository's maintainers.
1. For at least a period of 10 business days (the minimum comment period),
it is expected that the OWNER will respond to the comments and make updates
to the RFC as new commits to the PR. Through the process, the discussion
should take place within the PR to avoid splintering conversations. The OWNER is
encouraged to solicit as much feedback on the proposal as possible during this
period.
1. If there is consensus as deemed by the APPROVER during the comment period,
the APPROVER will merge the proposal pull request.
## Proposal Categories
The proposals shall be numbered in increasing order.
- ``#TPn`` - Transport protocol.
- ``#DMn`` - Data model.
- ``#Pnn`` - Affects processes, such as the proposal process itself.
## Proposal Status
1. Every uncommitted proposal is effectively in draft status.
1. Once committed, a proposal is in finalized status.
1. If issues are discovered during implementation, revisions may be made by
following the review process.
1. Once implemented by an xDS client, this should be reflected in the
`Implemented in:` header field of the proposal. Listing versions is not
required.

View File

@ -0,0 +1,35 @@
Title
----
* Author(s): [Author Name, Co-Author Name ...]
* Approver:
* Implemented in: <xDS client, ...>
* Last updated: [YYYY-MM-DD]
## Abstract
[A short summary of the proposal.]
## Background
[An introduction of the necessary background and the problem being solved by the proposed change.]
### Related Proposals:
* A list of proposals this proposal builds on or supersedes.
## Proposal
[A precise statement of the proposed change.]
## Rationale
[A discussion of alternate approaches and the trade offs, advantages, and disadvantages of the specified approach.]
## Implementation
[A description of the steps in the implementation, who will do them, and when. If a particular client is going to get the implementation first, this section should list the proposed order.]
## Open issues (if applicable)
[A discussion of issues relating to this proposal for which the author does not know the solution. This section may be omitted if there are none.]

View File

@ -1,36 +0,0 @@
#!/usr/bin/env python3
from subprocess import check_output
import glob
import os
import shutil
def generateProtobufs(output):
bazel_bin = check_output(['bazel', 'info', 'bazel-bin']).decode().strip()
go_protos = check_output([
'bazel',
'query',
'kind("go_proto_library", ...)',
]).split()
check_output(['bazel', 'build', '-c', 'fastbuild'] + go_protos)
for rule in go_protos:
rule_dir, proto = rule.decode()[2:].rsplit(':', 1)
input_dir = os.path.join(bazel_bin, rule_dir, 'linux_amd64_stripped',
proto + '%', 'github.com/cncf/udpa/go', rule_dir)
input_files = glob.glob(os.path.join(input_dir, '*.go'))
output_dir = os.path.join(output, rule_dir)
# Ensure the output directory exists
os.makedirs(output_dir, 0o755, exist_ok=True)
for generated_file in input_files:
output_file = shutil.copy(generated_file, output_dir)
os.chmod(output_file, 0o644)
if __name__ == "__main__":
workspace = check_output(['bazel', 'info', 'workspace']).decode().strip()
output = os.path.join(workspace, 'go')
generateProtobufs(output)

View File

@ -1,16 +0,0 @@
syntax = "proto3";
package udpa.core.v1;
import "udpa/annotations/status.proto";
option java_outer_classname = "ContextParamsProto";
option java_multiple_files = true;
option java_package = "com.github.udpa.udpa.core.v1";
option (udpa.annotations.file_status).work_in_progress = true;
// Additional parameters that can be used to select resource variants.
message ContextParams {
map<string, string> params = 1;
}

View File

@ -6,7 +6,6 @@ option java_outer_classname = "TypedStructProto";
option java_multiple_files = true;
option java_package = "com.github.udpa.udpa.type.v1";
import "validate/validate.proto";
import "google/protobuf/struct.proto";
// A TypedStruct contains an arbitrary JSON serialized protocol buffer message with a URL that

View File

@ -1,6 +1,6 @@
syntax = "proto3";
package udpa.core.v1;
package xds.core.v3;
import "udpa/annotations/status.proto";
@ -8,11 +8,11 @@ import "validate/validate.proto";
option java_outer_classname = "AuthorityProto";
option java_multiple_files = true;
option java_package = "com.github.udpa.udpa.core.v1";
option java_package = "com.github.udpa.xds.core.v3";
option (udpa.annotations.file_status).work_in_progress = true;
// UDPA authority information.
// xDS authority information.
message Authority {
string name = 1 [(validate.rules).string = {min_len: 1}];

View File

@ -1,21 +1,21 @@
syntax = "proto3";
package udpa.core.v1;
package xds.core.v3;
import "google/protobuf/any.proto";
import "udpa/annotations/status.proto";
import "udpa/core/v1/resource_locator.proto";
import "xds/core/v3/resource_locator.proto";
import "validate/validate.proto";
option java_outer_classname = "CollectionEntryProto";
option java_multiple_files = true;
option java_package = "com.github.udpa.udpa.core.v1";
option java_package = "com.github.udpa.xds.core.v3";
option (udpa.annotations.file_status).work_in_progress = true;
// UDPA collection resource wrapper. This encapsulates a UDPA resource when
// xDS collection resource wrapper. This encapsulates a xDS resource when
// appearing inside a list collection resource. List collection resources are
// regular Resource messages of type:
//
@ -32,7 +32,7 @@ message CollectionEntry {
// reference via the #entry directive in ResourceLocator.
string name = 1 [(validate.rules).string.pattern = "^[0-9a-zA-Z_\\-\\.~:]+$"];
// The resource's logical version. It is illegal to have the same named UDPA
// The resource's logical version. It is illegal to have the same named xDS
// resource name at a given version with different resource payloads.
string version = 2;

View File

@ -0,0 +1,21 @@
syntax = "proto3";
package xds.core.v3;
import "udpa/annotations/status.proto";
option java_outer_classname = "ContextParamsProto";
option java_multiple_files = true;
option java_package = "com.github.udpa.xds.core.v3";
option (udpa.annotations.file_status).work_in_progress = true;
// Additional parameters that can be used to select resource variants. These include any
// global context parameters, per-resource type client feature capabilities and per-resource
// type functional attributes. All per-resource type attributes will be `xds.resource.`
// prefixed and some of these are documented below:
// `xds.resource.listening_address`: The value is "IP:port" (e.g. "10.1.1.3:8080") which is
// the listening address of a Listener. Used in a Listener resource query.
message ContextParams {
map<string, string> params = 1;
}

View File

@ -1,25 +1,25 @@
syntax = "proto3";
package udpa.core.v1;
package xds.core.v3;
import "google/protobuf/any.proto";
import "udpa/annotations/status.proto";
import "udpa/core/v1/resource_name.proto";
import "xds/core/v3/resource_name.proto";
option java_outer_classname = "ResourceProto";
option java_multiple_files = true;
option java_package = "com.github.udpa.udpa.core.v1";
option java_package = "com.github.udpa.xds.core.v3";
option (udpa.annotations.file_status).work_in_progress = true;
// UDPA resource wrapper. This encapsulates a UDPA resource when appearing in an
// xDS resource wrapper. This encapsulates a xDS resource when appearing in an
// xDS transport discovery response or when accessed as a filesystem object.
message Resource {
// Resource name. This may be omitted for filesystem resources.
ResourceName name = 1;
// The resource's logical version. It is illegal to have the same named UDPA
// The resource's logical version. It is illegal to have the same named xDS
// resource name at a given version with different resource payloads.
string version = 2;

View File

@ -1,38 +1,38 @@
syntax = "proto3";
package udpa.core.v1;
package xds.core.v3;
import "udpa/annotations/status.proto";
import "udpa/core/v1/context_params.proto";
import "xds/core/v3/context_params.proto";
import "validate/validate.proto";
option java_outer_classname = "ResourceLocatorProto";
option java_multiple_files = true;
option java_package = "com.github.udpa.udpa.core.v1";
option java_package = "com.github.udpa.xds.core.v3";
option (udpa.annotations.file_status).work_in_progress = true;
// UDPA resource locators identify a UDPA resource name and instruct the
// xDS resource locators identify a xDS resource name and instruct the
// data-plane load balancer on how the resource may be located.
//
// Resource locators have a canonical udpa:// URI representation:
// Resource locators have a canonical xdstp:// URI representation:
//
// udpa://{authority}/{type_url}/{id/*}?{context_params}{#directive,*}
// xdstp://{authority}/{type_url}/{id}?{context_params}{#directive,*}
//
// where context_params take the form of URI query parameters.
//
// Resource locators have a similar canonical http:// URI representation:
//
// http://{authority}/{type_url}/{id/*}?{context_params}{#directive,*}
// http://{authority}/{type_url}/{id}?{context_params}{#directive,*}
//
// Resource locators also have a simplified file:// URI representation:
//
// file:///{id/*}{#directive,*}
// file:///{id}{#directive,*}
//
message ResourceLocator {
enum Scheme {
UDPA = 0;
XDSTP = 0;
HTTP = 1;
FILE = 2;
}
@ -40,13 +40,13 @@ message ResourceLocator {
// URI scheme.
Scheme scheme = 1 [(validate.rules).enum = {defined_only: true}];
// Opaque identifiers for the resource. These are effectively concatenated
// with / to form the non-query param path as resource ID. This may end
// Opaque identifier for the resource. Any '/' will not be escaped during URI
// encoding and will form part of the URI path. This may end
// with * for glob collection references.
repeated string id = 2 [(validate.rules).repeated = {min_items: 1}];
string id = 2;
// Logical authority for resource (not necessarily transport network address).
// Authorities are opaque in the UDPA API, data-plane load balancers will map
// Authorities are opaque in the xDS API, data-plane load balancers will map
// them to concrete network transports such as an xDS management server, e.g.
// via envoy.config.core.v3.ConfigSource.
string authority = 3;
@ -65,7 +65,7 @@ message ResourceLocator {
// .. space reserved for future potential matchers, e.g. CEL expressions.
}
// Directives provide information to data-plane load balancers on how UDPA
// Directives provide information to data-plane load balancers on how xDS
// resource names are to be interpreted and potentially further resolved. For
// example, they may provide alternative resource locators for when primary
// resolution fails. Directives are not part of resource names and do not
@ -75,7 +75,7 @@ message ResourceLocator {
//
// <directive name>=<string representation of directive value>
//
// For example, we can have alt=udpa://foo/bar or entry=some%20thing. Each
// For example, we can have alt=xdstp://foo/bar or entry=some%20thing. Each
// directive value type may have its own string encoding, in the case of
// ResourceLocator there is a recursive URI encoding.
//
@ -83,7 +83,7 @@ message ResourceLocator {
// Multiple directives are comma-separated, so the reserved characters that
// require percent encoding in a directive value are [',', '#', '[', ']',
// '%']. These are the RFC3986 fragment reserved characters with the addition
// of the UDPA scheme specific ','. See
// of the xDS scheme specific ','. See
// https://tools.ietf.org/html/rfc3986#page-49 for further details on URI ABNF
// and reserved characters.
message Directive {
@ -93,7 +93,7 @@ message ResourceLocator {
// An alternative resource locator for fallback if the resource is
// unavailable. For example, take the resource locator:
//
// udpa://foo/some-type/some-route-table#alt=udpa://bar/some-type/another-route-table
// xdstp://foo/some-type/some-route-table#alt=xdstp://bar/some-type/another-route-table
//
// If the data-plane load balancer is unable to reach `foo` to fetch the
// resource, it will fallback to `bar`. Alternative resources do not need
@ -103,13 +103,13 @@ message ResourceLocator {
// List collections support inlining of resources via the entry field in
// Resource. These inlined Resource objects may have an optional name
// field specified. When specified, the entry directive allows
// UdpaResourceLocator to directly reference these inlined resources, e.g.
// udpa://.../foo#entry=bar.
// ResourceLocator to directly reference these inlined resources, e.g.
// xdstp://.../foo#entry=bar.
string entry = 2 [(validate.rules).string = {min_len: 1, pattern: "^[0-9a-zA-Z_\\-\\./~:]+$"}];
}
}
// A list of directives that appear in the UDPA resource locator #fragment.
// A list of directives that appear in the xDS resource locator #fragment.
//
// When encoding to URI form, directives are percent encoded with comma
// separation.

View File

@ -1,34 +1,34 @@
syntax = "proto3";
package udpa.core.v1;
package xds.core.v3;
import "udpa/annotations/status.proto";
import "udpa/core/v1/context_params.proto";
import "xds/core/v3/context_params.proto";
import "validate/validate.proto";
option java_outer_classname = "ResourceNameProto";
option java_multiple_files = true;
option java_package = "com.github.udpa.udpa.core.v1";
option java_package = "com.github.udpa.xds.core.v3";
option (udpa.annotations.file_status).work_in_progress = true;
// UDPA resource name. This has a canonical udpa:// URI representation:
// xDS resource name. This has a canonical xdstp:// URI representation:
//
// udpa://{authority}/{type_url}/{id/*}?{context_params}
// xdstp://{authority}/{type_url}/{id}?{context_params}
//
// where context_params take the form of URI query parameters.
//
// A UDPA resource name fully identifies a network resource for transport
// purposes. UDPA resource names in this form appear only in discovery
// A xDS resource name fully identifies a network resource for transport
// purposes. xDS resource names in this form appear only in discovery
// request/response messages used with the xDS transport.
message ResourceName {
// Opaque identifiers for the resource. These are effectively concatenated
// with / to form the non-query param path as resource ID.
repeated string id = 1 [(validate.rules).repeated = {min_items: 1}];
// Opaque identifier for the resource. Any '/' will not be escaped during URI
// encoding and will form part of the URI path.
string id = 1;
// Logical authority for resource (not necessarily transport network address).
// Authorities are opaque in the UDPA API, data-plane load balancers will map
// Authorities are opaque in the xDS API, data-plane load balancers will map
// them to concrete network transports such as an xDS management server.
string authority = 2;