From ee24d2012553f68630150faeac7d9cccf69d99e9 Mon Sep 17 00:00:00 2001 From: "update-envoy[bot]" <135279899+update-envoy[bot]@users.noreply.github.com> Date: Mon, 27 Jan 2025 13:28:40 +0000 Subject: [PATCH] Mirrored from envoyproxy/envoy @ b034c57c7328237a4b12c7d5c2ca41b19569c9b5 Signed-off-by: update-envoy[bot] <135279899+update-envoy[bot]@users.noreply.github.com> --- .../http/tcp/golang/v3alpha/golang.pb.go | 224 ++++++++++++++++++ .../tcp/golang/v3alpha/golang.pb.validate.go | 197 +++++++++++++++ .../tcp/golang/v3alpha/golang_vtproto.pb.go | 110 +++++++++ envoy/COMMIT | 2 +- 4 files changed, 532 insertions(+), 1 deletion(-) create mode 100755 contrib/envoy/extensions/upstreams/http/tcp/golang/v3alpha/golang.pb.go create mode 100755 contrib/envoy/extensions/upstreams/http/tcp/golang/v3alpha/golang.pb.validate.go create mode 100755 contrib/envoy/extensions/upstreams/http/tcp/golang/v3alpha/golang_vtproto.pb.go diff --git a/contrib/envoy/extensions/upstreams/http/tcp/golang/v3alpha/golang.pb.go b/contrib/envoy/extensions/upstreams/http/tcp/golang/v3alpha/golang.pb.go new file mode 100755 index 000000000..966ac8c85 --- /dev/null +++ b/contrib/envoy/extensions/upstreams/http/tcp/golang/v3alpha/golang.pb.go @@ -0,0 +1,224 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.30.0 +// protoc v5.29.3 +// source: contrib/envoy/extensions/upstreams/http/tcp/golang/v3alpha/golang.proto + +package v3alpha + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/cncf/xds/go/xds/annotations/v3" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + anypb "google.golang.org/protobuf/types/known/anypb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// [#extension-category: envoy.upstreams] +type Config struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Globally unique ID for a dynamic library file. + LibraryId string `protobuf:"bytes,1,opt,name=library_id,json=libraryId,proto3" json:"library_id,omitempty"` + // Path to a dynamic library implementing the + // :repo:`HttpTcpBridge API ` + // interface. + LibraryPath string `protobuf:"bytes,2,opt,name=library_path,json=libraryPath,proto3" json:"library_path,omitempty"` + // Globally unique name of the Go plugin. + // + // This name **must** be consistent with the name registered in “tcp::RegisterHttpTcpBridgeFactoryAndConfigParser“ + PluginName string `protobuf:"bytes,3,opt,name=plugin_name,json=pluginName,proto3" json:"plugin_name,omitempty"` + // Configuration for the Go plugin. + // + // .. note:: + // + // This configuration is only parsed in the Golang plugin, and is therefore not validated + // by Envoy. + // + // See the :repo:`HttpTcpBridge API ` + // for more information about how the plugin's configuration data can be accessed. + PluginConfig *anypb.Any `protobuf:"bytes,4,opt,name=plugin_config,json=pluginConfig,proto3" json:"plugin_config,omitempty"` +} + +func (x *Config) Reset() { + *x = Config{} + if protoimpl.UnsafeEnabled { + mi := &file_contrib_envoy_extensions_upstreams_http_tcp_golang_v3alpha_golang_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Config) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Config) ProtoMessage() {} + +func (x *Config) ProtoReflect() protoreflect.Message { + mi := &file_contrib_envoy_extensions_upstreams_http_tcp_golang_v3alpha_golang_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Config.ProtoReflect.Descriptor instead. +func (*Config) Descriptor() ([]byte, []int) { + return file_contrib_envoy_extensions_upstreams_http_tcp_golang_v3alpha_golang_proto_rawDescGZIP(), []int{0} +} + +func (x *Config) GetLibraryId() string { + if x != nil { + return x.LibraryId + } + return "" +} + +func (x *Config) GetLibraryPath() string { + if x != nil { + return x.LibraryPath + } + return "" +} + +func (x *Config) GetPluginName() string { + if x != nil { + return x.PluginName + } + return "" +} + +func (x *Config) GetPluginConfig() *anypb.Any { + if x != nil { + return x.PluginConfig + } + return nil +} + +var File_contrib_envoy_extensions_upstreams_http_tcp_golang_v3alpha_golang_proto protoreflect.FileDescriptor + +var file_contrib_envoy_extensions_upstreams_http_tcp_golang_v3alpha_golang_proto_rawDesc = []byte{ + 0x0a, 0x47, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, + 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x75, 0x70, 0x73, 0x74, 0x72, + 0x65, 0x61, 0x6d, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, 0x74, 0x63, 0x70, 0x2f, 0x67, 0x6f, + 0x6c, 0x61, 0x6e, 0x67, 0x2f, 0x76, 0x33, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x67, 0x6f, 0x6c, + 0x61, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x32, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x75, 0x70, 0x73, 0x74, + 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x74, 0x63, 0x70, 0x2e, 0x67, + 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x76, 0x33, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x1a, 0x19, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, + 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x78, 0x64, 0x73, 0x2f, 0x61, 0x6e, + 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x33, 0x2f, 0x73, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, + 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x22, 0xc1, 0x01, 0x0a, 0x06, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x26, 0x0a, 0x0a, + 0x6c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x09, 0x6c, 0x69, 0x62, 0x72, 0x61, + 0x72, 0x79, 0x49, 0x64, 0x12, 0x2a, 0x0a, 0x0c, 0x6c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x5f, + 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, + 0x02, 0x10, 0x01, 0x52, 0x0b, 0x6c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x50, 0x61, 0x74, 0x68, + 0x12, 0x28, 0x0a, 0x0b, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0a, + 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x39, 0x0a, 0x0d, 0x70, 0x6c, + 0x75, 0x67, 0x69, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0c, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0xc4, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, + 0xd2, 0xc6, 0xa4, 0xe1, 0x06, 0x02, 0x08, 0x01, 0x0a, 0x40, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, + 0x6d, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x74, 0x63, 0x70, 0x2e, 0x67, 0x6f, 0x6c, 0x61, + 0x6e, 0x67, 0x2e, 0x76, 0x33, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x42, 0x0b, 0x47, 0x6f, 0x6c, 0x61, + 0x6e, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x61, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, + 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, + 0x65, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, + 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x75, 0x70, 0x73, 0x74, 0x72, + 0x65, 0x61, 0x6d, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, 0x74, 0x63, 0x70, 0x2f, 0x67, 0x6f, + 0x6c, 0x61, 0x6e, 0x67, 0x2f, 0x76, 0x33, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_contrib_envoy_extensions_upstreams_http_tcp_golang_v3alpha_golang_proto_rawDescOnce sync.Once + file_contrib_envoy_extensions_upstreams_http_tcp_golang_v3alpha_golang_proto_rawDescData = file_contrib_envoy_extensions_upstreams_http_tcp_golang_v3alpha_golang_proto_rawDesc +) + +func file_contrib_envoy_extensions_upstreams_http_tcp_golang_v3alpha_golang_proto_rawDescGZIP() []byte { + file_contrib_envoy_extensions_upstreams_http_tcp_golang_v3alpha_golang_proto_rawDescOnce.Do(func() { + file_contrib_envoy_extensions_upstreams_http_tcp_golang_v3alpha_golang_proto_rawDescData = protoimpl.X.CompressGZIP(file_contrib_envoy_extensions_upstreams_http_tcp_golang_v3alpha_golang_proto_rawDescData) + }) + return file_contrib_envoy_extensions_upstreams_http_tcp_golang_v3alpha_golang_proto_rawDescData +} + +var file_contrib_envoy_extensions_upstreams_http_tcp_golang_v3alpha_golang_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_contrib_envoy_extensions_upstreams_http_tcp_golang_v3alpha_golang_proto_goTypes = []interface{}{ + (*Config)(nil), // 0: envoy.extensions.upstreams.http.tcp.golang.v3alpha.Config + (*anypb.Any)(nil), // 1: google.protobuf.Any +} +var file_contrib_envoy_extensions_upstreams_http_tcp_golang_v3alpha_golang_proto_depIdxs = []int32{ + 1, // 0: envoy.extensions.upstreams.http.tcp.golang.v3alpha.Config.plugin_config:type_name -> google.protobuf.Any + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_contrib_envoy_extensions_upstreams_http_tcp_golang_v3alpha_golang_proto_init() } +func file_contrib_envoy_extensions_upstreams_http_tcp_golang_v3alpha_golang_proto_init() { + if File_contrib_envoy_extensions_upstreams_http_tcp_golang_v3alpha_golang_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_contrib_envoy_extensions_upstreams_http_tcp_golang_v3alpha_golang_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Config); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_contrib_envoy_extensions_upstreams_http_tcp_golang_v3alpha_golang_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_contrib_envoy_extensions_upstreams_http_tcp_golang_v3alpha_golang_proto_goTypes, + DependencyIndexes: file_contrib_envoy_extensions_upstreams_http_tcp_golang_v3alpha_golang_proto_depIdxs, + MessageInfos: file_contrib_envoy_extensions_upstreams_http_tcp_golang_v3alpha_golang_proto_msgTypes, + }.Build() + File_contrib_envoy_extensions_upstreams_http_tcp_golang_v3alpha_golang_proto = out.File + file_contrib_envoy_extensions_upstreams_http_tcp_golang_v3alpha_golang_proto_rawDesc = nil + file_contrib_envoy_extensions_upstreams_http_tcp_golang_v3alpha_golang_proto_goTypes = nil + file_contrib_envoy_extensions_upstreams_http_tcp_golang_v3alpha_golang_proto_depIdxs = nil +} diff --git a/contrib/envoy/extensions/upstreams/http/tcp/golang/v3alpha/golang.pb.validate.go b/contrib/envoy/extensions/upstreams/http/tcp/golang/v3alpha/golang.pb.validate.go new file mode 100755 index 000000000..3656c0e00 --- /dev/null +++ b/contrib/envoy/extensions/upstreams/http/tcp/golang/v3alpha/golang.pb.validate.go @@ -0,0 +1,197 @@ +//go:build !disable_pgv +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: contrib/envoy/extensions/upstreams/http/tcp/golang/v3alpha/golang.proto + +package v3alpha + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on Config with the rules defined in the +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. +func (m *Config) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Config with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in ConfigMultiError, or nil if none found. +func (m *Config) ValidateAll() error { + return m.validate(true) +} + +func (m *Config) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if utf8.RuneCountInString(m.GetLibraryId()) < 1 { + err := ConfigValidationError{ + field: "LibraryId", + reason: "value length must be at least 1 runes", + } + if !all { + return err + } + errors = append(errors, err) + } + + if utf8.RuneCountInString(m.GetLibraryPath()) < 1 { + err := ConfigValidationError{ + field: "LibraryPath", + reason: "value length must be at least 1 runes", + } + if !all { + return err + } + errors = append(errors, err) + } + + if utf8.RuneCountInString(m.GetPluginName()) < 1 { + err := ConfigValidationError{ + field: "PluginName", + reason: "value length must be at least 1 runes", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetPluginConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ConfigValidationError{ + field: "PluginConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ConfigValidationError{ + field: "PluginConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetPluginConfig()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ConfigValidationError{ + field: "PluginConfig", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return ConfigMultiError(errors) + } + + return nil +} + +// ConfigMultiError is an error wrapping multiple validation errors returned by +// Config.ValidateAll() if the designated constraints aren't met. +type ConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ConfigMultiError) AllErrors() []error { return m } + +// ConfigValidationError is the validation error returned by Config.Validate if +// the designated constraints aren't met. +type ConfigValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ConfigValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ConfigValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ConfigValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ConfigValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ConfigValidationError) ErrorName() string { return "ConfigValidationError" } + +// Error satisfies the builtin error interface +func (e ConfigValidationError) 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 %sConfig.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ConfigValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ConfigValidationError{} diff --git a/contrib/envoy/extensions/upstreams/http/tcp/golang/v3alpha/golang_vtproto.pb.go b/contrib/envoy/extensions/upstreams/http/tcp/golang/v3alpha/golang_vtproto.pb.go new file mode 100755 index 000000000..42e0164ee --- /dev/null +++ b/contrib/envoy/extensions/upstreams/http/tcp/golang/v3alpha/golang_vtproto.pb.go @@ -0,0 +1,110 @@ +//go:build vtprotobuf +// +build vtprotobuf + +// Code generated by protoc-gen-go-vtproto. DO NOT EDIT. +// source: contrib/envoy/extensions/upstreams/http/tcp/golang/v3alpha/golang.proto + +package v3alpha + +import ( + protohelpers "github.com/planetscale/vtprotobuf/protohelpers" + anypb "github.com/planetscale/vtprotobuf/types/known/anypb" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +func (m *Config) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Config) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *Config) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.PluginConfig != nil { + size, err := (*anypb.Any)(m.PluginConfig).MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x22 + } + if len(m.PluginName) > 0 { + i -= len(m.PluginName) + copy(dAtA[i:], m.PluginName) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.PluginName))) + i-- + dAtA[i] = 0x1a + } + if len(m.LibraryPath) > 0 { + i -= len(m.LibraryPath) + copy(dAtA[i:], m.LibraryPath) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.LibraryPath))) + i-- + dAtA[i] = 0x12 + } + if len(m.LibraryId) > 0 { + i -= len(m.LibraryId) + copy(dAtA[i:], m.LibraryId) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.LibraryId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *Config) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.LibraryId) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.LibraryPath) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.PluginName) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.PluginConfig != nil { + l = (*anypb.Any)(m.PluginConfig).SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} diff --git a/envoy/COMMIT b/envoy/COMMIT index 515f02130..e014b1752 100644 --- a/envoy/COMMIT +++ b/envoy/COMMIT @@ -1 +1 @@ -ad2a1c700b1cc6c8b1581bc3e2990d696501f105 +b034c57c7328237a4b12c7d5c2ca41b19569c9b5