build(deps): bump the golang group across 1 directory with 7 updates
Bumps the golang group with 6 updates in the / directory: | Package | From | To | | --- | --- | --- | | [github.com/Microsoft/hcsshim](https://github.com/Microsoft/hcsshim) | `0.12.7` | `0.12.9` | | [github.com/onsi/ginkgo/v2](https://github.com/onsi/ginkgo) | `2.20.2` | `2.22.0` | | [github.com/onsi/gomega](https://github.com/onsi/gomega) | `1.34.2` | `1.36.0` | | [github.com/opencontainers/selinux](https://github.com/opencontainers/selinux) | `1.11.0` | `1.11.1` | | [github.com/safchain/ethtool](https://github.com/safchain/ethtool) | `0.4.1` | `0.5.9` | | [sigs.k8s.io/knftables](https://github.com/kubernetes-sigs/knftables) | `0.0.17` | `0.0.18` | Updates `github.com/Microsoft/hcsshim` from 0.12.7 to 0.12.9 - [Release notes](https://github.com/Microsoft/hcsshim/releases) - [Commits](https://github.com/Microsoft/hcsshim/compare/v0.12.7...v0.12.9) Updates `github.com/onsi/ginkgo/v2` from 2.20.2 to 2.22.0 - [Release notes](https://github.com/onsi/ginkgo/releases) - [Changelog](https://github.com/onsi/ginkgo/blob/master/CHANGELOG.md) - [Commits](https://github.com/onsi/ginkgo/compare/v2.20.2...v2.22.0) Updates `github.com/onsi/gomega` from 1.34.2 to 1.36.0 - [Release notes](https://github.com/onsi/gomega/releases) - [Changelog](https://github.com/onsi/gomega/blob/master/CHANGELOG.md) - [Commits](https://github.com/onsi/gomega/compare/v1.34.2...v1.36.0) Updates `github.com/opencontainers/selinux` from 1.11.0 to 1.11.1 - [Release notes](https://github.com/opencontainers/selinux/releases) - [Commits](https://github.com/opencontainers/selinux/compare/v1.11.0...v1.11.1) Updates `github.com/safchain/ethtool` from 0.4.1 to 0.5.9 - [Release notes](https://github.com/safchain/ethtool/releases) - [Commits](https://github.com/safchain/ethtool/compare/v0.4.1...v0.5.9) Updates `golang.org/x/sys` from 0.26.0 to 0.27.0 - [Commits](https://github.com/golang/sys/compare/v0.26.0...v0.27.0) Updates `sigs.k8s.io/knftables` from 0.0.17 to 0.0.18 - [Changelog](https://github.com/kubernetes-sigs/knftables/blob/master/CHANGELOG.md) - [Commits](https://github.com/kubernetes-sigs/knftables/compare/v0.0.17...v0.0.18) --- updated-dependencies: - dependency-name: github.com/Microsoft/hcsshim dependency-type: direct:production update-type: version-update:semver-patch dependency-group: golang - dependency-name: github.com/onsi/ginkgo/v2 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: golang - dependency-name: github.com/onsi/gomega dependency-type: direct:production update-type: version-update:semver-minor dependency-group: golang - dependency-name: github.com/opencontainers/selinux dependency-type: direct:production update-type: version-update:semver-patch dependency-group: golang - dependency-name: github.com/safchain/ethtool dependency-type: direct:production update-type: version-update:semver-minor dependency-group: golang - dependency-name: golang.org/x/sys dependency-type: direct:production update-type: version-update:semver-minor dependency-group: golang - dependency-name: sigs.k8s.io/knftables dependency-type: direct:production update-type: version-update:semver-patch dependency-group: golang ... Signed-off-by: dependabot[bot] <support@github.com>
This commit is contained in:
![49699333+dependabot[bot]@users.noreply.github.com](/assets/img/avatar_default.png)
committed by
Casey Callendrello

parent
6de8a9853c
commit
3ffc42cdfd
2
vendor/google.golang.org/grpc/grpclog/internal/logger.go
generated
vendored
2
vendor/google.golang.org/grpc/grpclog/internal/logger.go
generated
vendored
@ -81,7 +81,7 @@ func (l *LoggerWrapper) Errorf(format string, args ...any) {
|
||||
}
|
||||
|
||||
// V reports whether verbosity level l is at least the requested verbose level.
|
||||
func (*LoggerWrapper) V(l int) bool {
|
||||
func (*LoggerWrapper) V(int) bool {
|
||||
// Returns true for all verbose level.
|
||||
return true
|
||||
}
|
||||
|
11
vendor/google.golang.org/grpc/internal/internal.go
generated
vendored
11
vendor/google.golang.org/grpc/internal/internal.go
generated
vendored
@ -183,7 +183,7 @@ var (
|
||||
|
||||
// GRPCResolverSchemeExtraMetadata determines when gRPC will add extra
|
||||
// metadata to RPCs.
|
||||
GRPCResolverSchemeExtraMetadata string = "xds"
|
||||
GRPCResolverSchemeExtraMetadata = "xds"
|
||||
|
||||
// EnterIdleModeForTesting gets the ClientConn to enter IDLE mode.
|
||||
EnterIdleModeForTesting any // func(*grpc.ClientConn)
|
||||
@ -203,7 +203,7 @@ var (
|
||||
|
||||
// UserSetDefaultScheme is set to true if the user has overridden the
|
||||
// default resolver scheme.
|
||||
UserSetDefaultScheme bool = false
|
||||
UserSetDefaultScheme = false
|
||||
|
||||
// ShuffleAddressListForTesting pseudo-randomizes the order of addresses. n
|
||||
// is the number of elements. swap swaps the elements with indexes i and j.
|
||||
@ -217,10 +217,9 @@ var (
|
||||
SetConnectedAddress any // func(scs *SubConnState, addr resolver.Address)
|
||||
|
||||
// SnapshotMetricRegistryForTesting snapshots the global data of the metric
|
||||
// registry. Registers a cleanup function on the provided testing.T that
|
||||
// sets the metric registry to its original state. Only called in testing
|
||||
// functions.
|
||||
SnapshotMetricRegistryForTesting any // func(t *testing.T)
|
||||
// registry. Returns a cleanup function that sets the metric registry to its
|
||||
// original state. Only called in testing functions.
|
||||
SnapshotMetricRegistryForTesting func() func()
|
||||
|
||||
// SetDefaultBufferPoolForTesting updates the default buffer pool, for
|
||||
// testing purposes.
|
||||
|
4
vendor/google.golang.org/grpc/internal/status/status.go
generated
vendored
4
vendor/google.golang.org/grpc/internal/status/status.go
generated
vendored
@ -138,11 +138,11 @@ func (s *Status) WithDetails(details ...protoadapt.MessageV1) (*Status, error) {
|
||||
// s.Code() != OK implies that s.Proto() != nil.
|
||||
p := s.Proto()
|
||||
for _, detail := range details {
|
||||
any, err := anypb.New(protoadapt.MessageV2Of(detail))
|
||||
m, err := anypb.New(protoadapt.MessageV2Of(detail))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
p.Details = append(p.Details, any)
|
||||
p.Details = append(p.Details, m)
|
||||
}
|
||||
return &Status{s: p}, nil
|
||||
}
|
||||
|
2
vendor/google.golang.org/protobuf/encoding/protojson/decode.go
generated
vendored
2
vendor/google.golang.org/protobuf/encoding/protojson/decode.go
generated
vendored
@ -351,7 +351,7 @@ func (d decoder) unmarshalScalar(fd protoreflect.FieldDescriptor) (protoreflect.
|
||||
panic(fmt.Sprintf("unmarshalScalar: invalid scalar kind %v", kind))
|
||||
}
|
||||
|
||||
return protoreflect.Value{}, d.newError(tok.Pos(), "invalid value for %v type: %v", kind, tok.RawString())
|
||||
return protoreflect.Value{}, d.newError(tok.Pos(), "invalid value for %v field %v: %v", kind, fd.JSONName(), tok.RawString())
|
||||
}
|
||||
|
||||
func unmarshalInt(tok json.Token, bitSize int) (protoreflect.Value, bool) {
|
||||
|
4
vendor/google.golang.org/protobuf/encoding/protojson/encode.go
generated
vendored
4
vendor/google.golang.org/protobuf/encoding/protojson/encode.go
generated
vendored
@ -216,9 +216,7 @@ func (m unpopulatedFieldRanger) Range(f func(protoreflect.FieldDescriptor, proto
|
||||
}
|
||||
|
||||
v := m.Get(fd)
|
||||
isProto2Scalar := fd.Syntax() == protoreflect.Proto2 && fd.Default().IsValid()
|
||||
isSingularMessage := fd.Cardinality() != protoreflect.Repeated && fd.Message() != nil
|
||||
if isProto2Scalar || isSingularMessage {
|
||||
if fd.HasPresence() {
|
||||
if m.skipNull {
|
||||
continue
|
||||
}
|
||||
|
20
vendor/google.golang.org/protobuf/internal/descopts/options.go
generated
vendored
20
vendor/google.golang.org/protobuf/internal/descopts/options.go
generated
vendored
@ -9,7 +9,7 @@
|
||||
// dependency on the descriptor proto package).
|
||||
package descopts
|
||||
|
||||
import pref "google.golang.org/protobuf/reflect/protoreflect"
|
||||
import "google.golang.org/protobuf/reflect/protoreflect"
|
||||
|
||||
// These variables are set by the init function in descriptor.pb.go via logic
|
||||
// in internal/filetype. In other words, so long as the descriptor proto package
|
||||
@ -17,13 +17,13 @@ import pref "google.golang.org/protobuf/reflect/protoreflect"
|
||||
//
|
||||
// Each variable is populated with a nil pointer to the options struct.
|
||||
var (
|
||||
File pref.ProtoMessage
|
||||
Enum pref.ProtoMessage
|
||||
EnumValue pref.ProtoMessage
|
||||
Message pref.ProtoMessage
|
||||
Field pref.ProtoMessage
|
||||
Oneof pref.ProtoMessage
|
||||
ExtensionRange pref.ProtoMessage
|
||||
Service pref.ProtoMessage
|
||||
Method pref.ProtoMessage
|
||||
File protoreflect.ProtoMessage
|
||||
Enum protoreflect.ProtoMessage
|
||||
EnumValue protoreflect.ProtoMessage
|
||||
Message protoreflect.ProtoMessage
|
||||
Field protoreflect.ProtoMessage
|
||||
Oneof protoreflect.ProtoMessage
|
||||
ExtensionRange protoreflect.ProtoMessage
|
||||
Service protoreflect.ProtoMessage
|
||||
Method protoreflect.ProtoMessage
|
||||
)
|
||||
|
4
vendor/google.golang.org/protobuf/internal/filedesc/desc.go
generated
vendored
4
vendor/google.golang.org/protobuf/internal/filedesc/desc.go
generated
vendored
@ -258,6 +258,7 @@ type (
|
||||
StringName stringName
|
||||
IsProto3Optional bool // promoted from google.protobuf.FieldDescriptorProto
|
||||
IsWeak bool // promoted from google.protobuf.FieldOptions
|
||||
IsLazy bool // promoted from google.protobuf.FieldOptions
|
||||
Default defaultValue
|
||||
ContainingOneof protoreflect.OneofDescriptor // must be consistent with Message.Oneofs.Fields
|
||||
Enum protoreflect.EnumDescriptor
|
||||
@ -351,6 +352,7 @@ func (fd *Field) IsPacked() bool {
|
||||
}
|
||||
func (fd *Field) IsExtension() bool { return false }
|
||||
func (fd *Field) IsWeak() bool { return fd.L1.IsWeak }
|
||||
func (fd *Field) IsLazy() bool { return fd.L1.IsLazy }
|
||||
func (fd *Field) IsList() bool { return fd.Cardinality() == protoreflect.Repeated && !fd.IsMap() }
|
||||
func (fd *Field) IsMap() bool { return fd.Message() != nil && fd.Message().IsMapEntry() }
|
||||
func (fd *Field) MapKey() protoreflect.FieldDescriptor {
|
||||
@ -425,6 +427,7 @@ type (
|
||||
Extendee protoreflect.MessageDescriptor
|
||||
Cardinality protoreflect.Cardinality
|
||||
Kind protoreflect.Kind
|
||||
IsLazy bool
|
||||
EditionFeatures EditionFeatures
|
||||
}
|
||||
ExtensionL2 struct {
|
||||
@ -465,6 +468,7 @@ func (xd *Extension) IsPacked() bool {
|
||||
}
|
||||
func (xd *Extension) IsExtension() bool { return true }
|
||||
func (xd *Extension) IsWeak() bool { return false }
|
||||
func (xd *Extension) IsLazy() bool { return xd.L1.IsLazy }
|
||||
func (xd *Extension) IsList() bool { return xd.Cardinality() == protoreflect.Repeated }
|
||||
func (xd *Extension) IsMap() bool { return false }
|
||||
func (xd *Extension) MapKey() protoreflect.FieldDescriptor { return nil }
|
||||
|
2
vendor/google.golang.org/protobuf/internal/filedesc/desc_init.go
generated
vendored
2
vendor/google.golang.org/protobuf/internal/filedesc/desc_init.go
generated
vendored
@ -495,6 +495,8 @@ func (xd *Extension) unmarshalOptions(b []byte) {
|
||||
switch num {
|
||||
case genid.FieldOptions_Packed_field_number:
|
||||
xd.L1.EditionFeatures.IsPacked = protowire.DecodeBool(v)
|
||||
case genid.FieldOptions_Lazy_field_number:
|
||||
xd.L1.IsLazy = protowire.DecodeBool(v)
|
||||
}
|
||||
case protowire.BytesType:
|
||||
v, m := protowire.ConsumeBytes(b)
|
||||
|
2
vendor/google.golang.org/protobuf/internal/filedesc/desc_lazy.go
generated
vendored
2
vendor/google.golang.org/protobuf/internal/filedesc/desc_lazy.go
generated
vendored
@ -504,6 +504,8 @@ func (fd *Field) unmarshalOptions(b []byte) {
|
||||
fd.L1.EditionFeatures.IsPacked = protowire.DecodeBool(v)
|
||||
case genid.FieldOptions_Weak_field_number:
|
||||
fd.L1.IsWeak = protowire.DecodeBool(v)
|
||||
case genid.FieldOptions_Lazy_field_number:
|
||||
fd.L1.IsLazy = protowire.DecodeBool(v)
|
||||
case FieldOptions_EnforceUTF8:
|
||||
fd.L1.EditionFeatures.IsUTF8Validated = protowire.DecodeBool(v)
|
||||
}
|
||||
|
2
vendor/google.golang.org/protobuf/internal/filedesc/editions.go
generated
vendored
2
vendor/google.golang.org/protobuf/internal/filedesc/editions.go
generated
vendored
@ -68,7 +68,7 @@ func unmarshalFeatureSet(b []byte, parent EditionFeatures) EditionFeatures {
|
||||
v, m := protowire.ConsumeBytes(b)
|
||||
b = b[m:]
|
||||
switch num {
|
||||
case genid.GoFeatures_LegacyUnmarshalJsonEnum_field_number:
|
||||
case genid.FeatureSet_Go_ext_number:
|
||||
parent = unmarshalGoFeature(v, parent)
|
||||
}
|
||||
}
|
||||
|
2
vendor/google.golang.org/protobuf/internal/genid/doc.go
generated
vendored
2
vendor/google.golang.org/protobuf/internal/genid/doc.go
generated
vendored
@ -6,6 +6,6 @@
|
||||
// and the well-known types.
|
||||
package genid
|
||||
|
||||
import protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
import "google.golang.org/protobuf/reflect/protoreflect"
|
||||
|
||||
const GoogleProtobuf_package protoreflect.FullName = "google.protobuf"
|
||||
|
15
vendor/google.golang.org/protobuf/internal/genid/go_features_gen.go
generated
vendored
15
vendor/google.golang.org/protobuf/internal/genid/go_features_gen.go
generated
vendored
@ -12,20 +12,25 @@ import (
|
||||
|
||||
const File_google_protobuf_go_features_proto = "google/protobuf/go_features.proto"
|
||||
|
||||
// Names for google.protobuf.GoFeatures.
|
||||
// Names for pb.GoFeatures.
|
||||
const (
|
||||
GoFeatures_message_name protoreflect.Name = "GoFeatures"
|
||||
GoFeatures_message_fullname protoreflect.FullName = "google.protobuf.GoFeatures"
|
||||
GoFeatures_message_fullname protoreflect.FullName = "pb.GoFeatures"
|
||||
)
|
||||
|
||||
// Field names for google.protobuf.GoFeatures.
|
||||
// Field names for pb.GoFeatures.
|
||||
const (
|
||||
GoFeatures_LegacyUnmarshalJsonEnum_field_name protoreflect.Name = "legacy_unmarshal_json_enum"
|
||||
|
||||
GoFeatures_LegacyUnmarshalJsonEnum_field_fullname protoreflect.FullName = "google.protobuf.GoFeatures.legacy_unmarshal_json_enum"
|
||||
GoFeatures_LegacyUnmarshalJsonEnum_field_fullname protoreflect.FullName = "pb.GoFeatures.legacy_unmarshal_json_enum"
|
||||
)
|
||||
|
||||
// Field numbers for google.protobuf.GoFeatures.
|
||||
// Field numbers for pb.GoFeatures.
|
||||
const (
|
||||
GoFeatures_LegacyUnmarshalJsonEnum_field_number protoreflect.FieldNumber = 1
|
||||
)
|
||||
|
||||
// Extension numbers
|
||||
const (
|
||||
FeatureSet_Go_ext_number protoreflect.FieldNumber = 1002
|
||||
)
|
||||
|
2
vendor/google.golang.org/protobuf/internal/genid/map_entry.go
generated
vendored
2
vendor/google.golang.org/protobuf/internal/genid/map_entry.go
generated
vendored
@ -4,7 +4,7 @@
|
||||
|
||||
package genid
|
||||
|
||||
import protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
import "google.golang.org/protobuf/reflect/protoreflect"
|
||||
|
||||
// Generic field names and numbers for synthetic map entry messages.
|
||||
const (
|
||||
|
2
vendor/google.golang.org/protobuf/internal/genid/wrappers.go
generated
vendored
2
vendor/google.golang.org/protobuf/internal/genid/wrappers.go
generated
vendored
@ -4,7 +4,7 @@
|
||||
|
||||
package genid
|
||||
|
||||
import protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
import "google.golang.org/protobuf/reflect/protoreflect"
|
||||
|
||||
// Generic field name and number for messages in wrappers.proto.
|
||||
const (
|
||||
|
11
vendor/google.golang.org/protobuf/internal/impl/codec_extension.go
generated
vendored
11
vendor/google.golang.org/protobuf/internal/impl/codec_extension.go
generated
vendored
@ -67,7 +67,6 @@ type lazyExtensionValue struct {
|
||||
xi *extensionFieldInfo
|
||||
value protoreflect.Value
|
||||
b []byte
|
||||
fn func() protoreflect.Value
|
||||
}
|
||||
|
||||
type ExtensionField struct {
|
||||
@ -158,10 +157,9 @@ func (f *ExtensionField) lazyInit() {
|
||||
}
|
||||
f.lazy.value = val
|
||||
} else {
|
||||
f.lazy.value = f.lazy.fn()
|
||||
panic("No support for lazy fns for ExtensionField")
|
||||
}
|
||||
f.lazy.xi = nil
|
||||
f.lazy.fn = nil
|
||||
f.lazy.b = nil
|
||||
atomic.StoreUint32(&f.lazy.atomicOnce, 1)
|
||||
}
|
||||
@ -174,13 +172,6 @@ func (f *ExtensionField) Set(t protoreflect.ExtensionType, v protoreflect.Value)
|
||||
f.lazy = nil
|
||||
}
|
||||
|
||||
// SetLazy sets the type and a value that is to be lazily evaluated upon first use.
|
||||
// This must not be called concurrently.
|
||||
func (f *ExtensionField) SetLazy(t protoreflect.ExtensionType, fn func() protoreflect.Value) {
|
||||
f.typ = t
|
||||
f.lazy = &lazyExtensionValue{fn: fn}
|
||||
}
|
||||
|
||||
// Value returns the value of the extension field.
|
||||
// This may be called concurrently.
|
||||
func (f *ExtensionField) Value() protoreflect.Value {
|
||||
|
3
vendor/google.golang.org/protobuf/internal/impl/codec_field.go
generated
vendored
3
vendor/google.golang.org/protobuf/internal/impl/codec_field.go
generated
vendored
@ -65,6 +65,9 @@ func (mi *MessageInfo) initOneofFieldCoders(od protoreflect.OneofDescriptor, si
|
||||
if err != nil {
|
||||
return out, err
|
||||
}
|
||||
if cf.funcs.isInit == nil {
|
||||
out.initialized = true
|
||||
}
|
||||
vi.Set(vw)
|
||||
return out, nil
|
||||
}
|
||||
|
3
vendor/google.golang.org/protobuf/internal/impl/codec_message.go
generated
vendored
3
vendor/google.golang.org/protobuf/internal/impl/codec_message.go
generated
vendored
@ -189,6 +189,9 @@ func (mi *MessageInfo) makeCoderMethods(t reflect.Type, si structInfo) {
|
||||
if mi.methods.Merge == nil {
|
||||
mi.methods.Merge = mi.merge
|
||||
}
|
||||
if mi.methods.Equal == nil {
|
||||
mi.methods.Equal = equal
|
||||
}
|
||||
}
|
||||
|
||||
// getUnknownBytes returns a *[]byte for the unknown fields.
|
||||
|
210
vendor/google.golang.org/protobuf/internal/impl/codec_reflect.go
generated
vendored
210
vendor/google.golang.org/protobuf/internal/impl/codec_reflect.go
generated
vendored
@ -1,210 +0,0 @@
|
||||
// Copyright 2019 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
//go:build purego || appengine
|
||||
// +build purego appengine
|
||||
|
||||
package impl
|
||||
|
||||
import (
|
||||
"reflect"
|
||||
|
||||
"google.golang.org/protobuf/encoding/protowire"
|
||||
)
|
||||
|
||||
func sizeEnum(p pointer, f *coderFieldInfo, _ marshalOptions) (size int) {
|
||||
v := p.v.Elem().Int()
|
||||
return f.tagsize + protowire.SizeVarint(uint64(v))
|
||||
}
|
||||
|
||||
func appendEnum(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) {
|
||||
v := p.v.Elem().Int()
|
||||
b = protowire.AppendVarint(b, f.wiretag)
|
||||
b = protowire.AppendVarint(b, uint64(v))
|
||||
return b, nil
|
||||
}
|
||||
|
||||
func consumeEnum(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, _ unmarshalOptions) (out unmarshalOutput, err error) {
|
||||
if wtyp != protowire.VarintType {
|
||||
return out, errUnknown
|
||||
}
|
||||
v, n := protowire.ConsumeVarint(b)
|
||||
if n < 0 {
|
||||
return out, errDecode
|
||||
}
|
||||
p.v.Elem().SetInt(int64(v))
|
||||
out.n = n
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func mergeEnum(dst, src pointer, _ *coderFieldInfo, _ mergeOptions) {
|
||||
dst.v.Elem().Set(src.v.Elem())
|
||||
}
|
||||
|
||||
var coderEnum = pointerCoderFuncs{
|
||||
size: sizeEnum,
|
||||
marshal: appendEnum,
|
||||
unmarshal: consumeEnum,
|
||||
merge: mergeEnum,
|
||||
}
|
||||
|
||||
func sizeEnumNoZero(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) {
|
||||
if p.v.Elem().Int() == 0 {
|
||||
return 0
|
||||
}
|
||||
return sizeEnum(p, f, opts)
|
||||
}
|
||||
|
||||
func appendEnumNoZero(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) {
|
||||
if p.v.Elem().Int() == 0 {
|
||||
return b, nil
|
||||
}
|
||||
return appendEnum(b, p, f, opts)
|
||||
}
|
||||
|
||||
func mergeEnumNoZero(dst, src pointer, _ *coderFieldInfo, _ mergeOptions) {
|
||||
if src.v.Elem().Int() != 0 {
|
||||
dst.v.Elem().Set(src.v.Elem())
|
||||
}
|
||||
}
|
||||
|
||||
var coderEnumNoZero = pointerCoderFuncs{
|
||||
size: sizeEnumNoZero,
|
||||
marshal: appendEnumNoZero,
|
||||
unmarshal: consumeEnum,
|
||||
merge: mergeEnumNoZero,
|
||||
}
|
||||
|
||||
func sizeEnumPtr(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) {
|
||||
return sizeEnum(pointer{p.v.Elem()}, f, opts)
|
||||
}
|
||||
|
||||
func appendEnumPtr(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) {
|
||||
return appendEnum(b, pointer{p.v.Elem()}, f, opts)
|
||||
}
|
||||
|
||||
func consumeEnumPtr(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) {
|
||||
if wtyp != protowire.VarintType {
|
||||
return out, errUnknown
|
||||
}
|
||||
if p.v.Elem().IsNil() {
|
||||
p.v.Elem().Set(reflect.New(p.v.Elem().Type().Elem()))
|
||||
}
|
||||
return consumeEnum(b, pointer{p.v.Elem()}, wtyp, f, opts)
|
||||
}
|
||||
|
||||
func mergeEnumPtr(dst, src pointer, _ *coderFieldInfo, _ mergeOptions) {
|
||||
if !src.v.Elem().IsNil() {
|
||||
v := reflect.New(dst.v.Type().Elem().Elem())
|
||||
v.Elem().Set(src.v.Elem().Elem())
|
||||
dst.v.Elem().Set(v)
|
||||
}
|
||||
}
|
||||
|
||||
var coderEnumPtr = pointerCoderFuncs{
|
||||
size: sizeEnumPtr,
|
||||
marshal: appendEnumPtr,
|
||||
unmarshal: consumeEnumPtr,
|
||||
merge: mergeEnumPtr,
|
||||
}
|
||||
|
||||
func sizeEnumSlice(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) {
|
||||
s := p.v.Elem()
|
||||
for i, llen := 0, s.Len(); i < llen; i++ {
|
||||
size += protowire.SizeVarint(uint64(s.Index(i).Int())) + f.tagsize
|
||||
}
|
||||
return size
|
||||
}
|
||||
|
||||
func appendEnumSlice(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) {
|
||||
s := p.v.Elem()
|
||||
for i, llen := 0, s.Len(); i < llen; i++ {
|
||||
b = protowire.AppendVarint(b, f.wiretag)
|
||||
b = protowire.AppendVarint(b, uint64(s.Index(i).Int()))
|
||||
}
|
||||
return b, nil
|
||||
}
|
||||
|
||||
func consumeEnumSlice(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) {
|
||||
s := p.v.Elem()
|
||||
if wtyp == protowire.BytesType {
|
||||
b, n := protowire.ConsumeBytes(b)
|
||||
if n < 0 {
|
||||
return out, errDecode
|
||||
}
|
||||
for len(b) > 0 {
|
||||
v, n := protowire.ConsumeVarint(b)
|
||||
if n < 0 {
|
||||
return out, errDecode
|
||||
}
|
||||
rv := reflect.New(s.Type().Elem()).Elem()
|
||||
rv.SetInt(int64(v))
|
||||
s.Set(reflect.Append(s, rv))
|
||||
b = b[n:]
|
||||
}
|
||||
out.n = n
|
||||
return out, nil
|
||||
}
|
||||
if wtyp != protowire.VarintType {
|
||||
return out, errUnknown
|
||||
}
|
||||
v, n := protowire.ConsumeVarint(b)
|
||||
if n < 0 {
|
||||
return out, errDecode
|
||||
}
|
||||
rv := reflect.New(s.Type().Elem()).Elem()
|
||||
rv.SetInt(int64(v))
|
||||
s.Set(reflect.Append(s, rv))
|
||||
out.n = n
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func mergeEnumSlice(dst, src pointer, _ *coderFieldInfo, _ mergeOptions) {
|
||||
dst.v.Elem().Set(reflect.AppendSlice(dst.v.Elem(), src.v.Elem()))
|
||||
}
|
||||
|
||||
var coderEnumSlice = pointerCoderFuncs{
|
||||
size: sizeEnumSlice,
|
||||
marshal: appendEnumSlice,
|
||||
unmarshal: consumeEnumSlice,
|
||||
merge: mergeEnumSlice,
|
||||
}
|
||||
|
||||
func sizeEnumPackedSlice(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) {
|
||||
s := p.v.Elem()
|
||||
llen := s.Len()
|
||||
if llen == 0 {
|
||||
return 0
|
||||
}
|
||||
n := 0
|
||||
for i := 0; i < llen; i++ {
|
||||
n += protowire.SizeVarint(uint64(s.Index(i).Int()))
|
||||
}
|
||||
return f.tagsize + protowire.SizeBytes(n)
|
||||
}
|
||||
|
||||
func appendEnumPackedSlice(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) {
|
||||
s := p.v.Elem()
|
||||
llen := s.Len()
|
||||
if llen == 0 {
|
||||
return b, nil
|
||||
}
|
||||
b = protowire.AppendVarint(b, f.wiretag)
|
||||
n := 0
|
||||
for i := 0; i < llen; i++ {
|
||||
n += protowire.SizeVarint(uint64(s.Index(i).Int()))
|
||||
}
|
||||
b = protowire.AppendVarint(b, uint64(n))
|
||||
for i := 0; i < llen; i++ {
|
||||
b = protowire.AppendVarint(b, uint64(s.Index(i).Int()))
|
||||
}
|
||||
return b, nil
|
||||
}
|
||||
|
||||
var coderEnumPackedSlice = pointerCoderFuncs{
|
||||
size: sizeEnumPackedSlice,
|
||||
marshal: appendEnumPackedSlice,
|
||||
unmarshal: consumeEnumSlice,
|
||||
merge: mergeEnumSlice,
|
||||
}
|
3
vendor/google.golang.org/protobuf/internal/impl/codec_unsafe.go
generated
vendored
3
vendor/google.golang.org/protobuf/internal/impl/codec_unsafe.go
generated
vendored
@ -2,9 +2,6 @@
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
//go:build !purego && !appengine
|
||||
// +build !purego,!appengine
|
||||
|
||||
package impl
|
||||
|
||||
// When using unsafe pointers, we can just treat enum values as int32s.
|
||||
|
2
vendor/google.golang.org/protobuf/internal/impl/convert.go
generated
vendored
2
vendor/google.golang.org/protobuf/internal/impl/convert.go
generated
vendored
@ -322,7 +322,7 @@ func (c *stringConverter) PBValueOf(v reflect.Value) protoreflect.Value {
|
||||
return protoreflect.ValueOfString(v.Convert(stringType).String())
|
||||
}
|
||||
func (c *stringConverter) GoValueOf(v protoreflect.Value) reflect.Value {
|
||||
// pref.Value.String never panics, so we go through an interface
|
||||
// protoreflect.Value.String never panics, so we go through an interface
|
||||
// conversion here to check the type.
|
||||
s := v.Interface().(string)
|
||||
if c.goType.Kind() == reflect.Slice && s == "" {
|
||||
|
2
vendor/google.golang.org/protobuf/internal/impl/encode.go
generated
vendored
2
vendor/google.golang.org/protobuf/internal/impl/encode.go
generated
vendored
@ -10,7 +10,7 @@ import (
|
||||
"sync/atomic"
|
||||
|
||||
"google.golang.org/protobuf/internal/flags"
|
||||
proto "google.golang.org/protobuf/proto"
|
||||
"google.golang.org/protobuf/proto"
|
||||
piface "google.golang.org/protobuf/runtime/protoiface"
|
||||
)
|
||||
|
||||
|
224
vendor/google.golang.org/protobuf/internal/impl/equal.go
generated
vendored
Normal file
224
vendor/google.golang.org/protobuf/internal/impl/equal.go
generated
vendored
Normal file
@ -0,0 +1,224 @@
|
||||
// Copyright 2024 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package impl
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
|
||||
"google.golang.org/protobuf/encoding/protowire"
|
||||
"google.golang.org/protobuf/reflect/protoreflect"
|
||||
"google.golang.org/protobuf/runtime/protoiface"
|
||||
)
|
||||
|
||||
func equal(in protoiface.EqualInput) protoiface.EqualOutput {
|
||||
return protoiface.EqualOutput{Equal: equalMessage(in.MessageA, in.MessageB)}
|
||||
}
|
||||
|
||||
// equalMessage is a fast-path variant of protoreflect.equalMessage.
|
||||
// It takes advantage of the internal messageState type to avoid
|
||||
// unnecessary allocations, type assertions.
|
||||
func equalMessage(mx, my protoreflect.Message) bool {
|
||||
if mx == nil || my == nil {
|
||||
return mx == my
|
||||
}
|
||||
if mx.Descriptor() != my.Descriptor() {
|
||||
return false
|
||||
}
|
||||
|
||||
msx, ok := mx.(*messageState)
|
||||
if !ok {
|
||||
return protoreflect.ValueOfMessage(mx).Equal(protoreflect.ValueOfMessage(my))
|
||||
}
|
||||
msy, ok := my.(*messageState)
|
||||
if !ok {
|
||||
return protoreflect.ValueOfMessage(mx).Equal(protoreflect.ValueOfMessage(my))
|
||||
}
|
||||
|
||||
mi := msx.messageInfo()
|
||||
miy := msy.messageInfo()
|
||||
if mi != miy {
|
||||
return protoreflect.ValueOfMessage(mx).Equal(protoreflect.ValueOfMessage(my))
|
||||
}
|
||||
mi.init()
|
||||
// Compares regular fields
|
||||
// Modified Message.Range code that compares two messages of the same type
|
||||
// while going over the fields.
|
||||
for _, ri := range mi.rangeInfos {
|
||||
var fd protoreflect.FieldDescriptor
|
||||
var vx, vy protoreflect.Value
|
||||
|
||||
switch ri := ri.(type) {
|
||||
case *fieldInfo:
|
||||
hx := ri.has(msx.pointer())
|
||||
hy := ri.has(msy.pointer())
|
||||
if hx != hy {
|
||||
return false
|
||||
}
|
||||
if !hx {
|
||||
continue
|
||||
}
|
||||
fd = ri.fieldDesc
|
||||
vx = ri.get(msx.pointer())
|
||||
vy = ri.get(msy.pointer())
|
||||
case *oneofInfo:
|
||||
fnx := ri.which(msx.pointer())
|
||||
fny := ri.which(msy.pointer())
|
||||
if fnx != fny {
|
||||
return false
|
||||
}
|
||||
if fnx <= 0 {
|
||||
continue
|
||||
}
|
||||
fi := mi.fields[fnx]
|
||||
fd = fi.fieldDesc
|
||||
vx = fi.get(msx.pointer())
|
||||
vy = fi.get(msy.pointer())
|
||||
}
|
||||
|
||||
if !equalValue(fd, vx, vy) {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
// Compare extensions.
|
||||
// This is more complicated because mx or my could have empty/nil extension maps,
|
||||
// however some populated extension map values are equal to nil extension maps.
|
||||
emx := mi.extensionMap(msx.pointer())
|
||||
emy := mi.extensionMap(msy.pointer())
|
||||
if emx != nil {
|
||||
for k, x := range *emx {
|
||||
xd := x.Type().TypeDescriptor()
|
||||
xv := x.Value()
|
||||
var y ExtensionField
|
||||
ok := false
|
||||
if emy != nil {
|
||||
y, ok = (*emy)[k]
|
||||
}
|
||||
// We need to treat empty lists as equal to nil values
|
||||
if emy == nil || !ok {
|
||||
if xd.IsList() && xv.List().Len() == 0 {
|
||||
continue
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
if !equalValue(xd, xv, y.Value()) {
|
||||
return false
|
||||
}
|
||||
}
|
||||
}
|
||||
if emy != nil {
|
||||
// emy may have extensions emx does not have, need to check them as well
|
||||
for k, y := range *emy {
|
||||
if emx != nil {
|
||||
// emx has the field, so we already checked it
|
||||
if _, ok := (*emx)[k]; ok {
|
||||
continue
|
||||
}
|
||||
}
|
||||
// Empty lists are equal to nil
|
||||
if y.Type().TypeDescriptor().IsList() && y.Value().List().Len() == 0 {
|
||||
continue
|
||||
}
|
||||
|
||||
// Cant be equal if the extension is populated
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
return equalUnknown(mx.GetUnknown(), my.GetUnknown())
|
||||
}
|
||||
|
||||
func equalValue(fd protoreflect.FieldDescriptor, vx, vy protoreflect.Value) bool {
|
||||
// slow path
|
||||
if fd.Kind() != protoreflect.MessageKind {
|
||||
return vx.Equal(vy)
|
||||
}
|
||||
|
||||
// fast path special cases
|
||||
if fd.IsMap() {
|
||||
if fd.MapValue().Kind() == protoreflect.MessageKind {
|
||||
return equalMessageMap(vx.Map(), vy.Map())
|
||||
}
|
||||
return vx.Equal(vy)
|
||||
}
|
||||
|
||||
if fd.IsList() {
|
||||
return equalMessageList(vx.List(), vy.List())
|
||||
}
|
||||
|
||||
return equalMessage(vx.Message(), vy.Message())
|
||||
}
|
||||
|
||||
// Mostly copied from protoreflect.equalMap.
|
||||
// This variant only works for messages as map types.
|
||||
// All other map types should be handled via Value.Equal.
|
||||
func equalMessageMap(mx, my protoreflect.Map) bool {
|
||||
if mx.Len() != my.Len() {
|
||||
return false
|
||||
}
|
||||
equal := true
|
||||
mx.Range(func(k protoreflect.MapKey, vx protoreflect.Value) bool {
|
||||
if !my.Has(k) {
|
||||
equal = false
|
||||
return false
|
||||
}
|
||||
vy := my.Get(k)
|
||||
equal = equalMessage(vx.Message(), vy.Message())
|
||||
return equal
|
||||
})
|
||||
return equal
|
||||
}
|
||||
|
||||
// Mostly copied from protoreflect.equalList.
|
||||
// The only change is the usage of equalImpl instead of protoreflect.equalValue.
|
||||
func equalMessageList(lx, ly protoreflect.List) bool {
|
||||
if lx.Len() != ly.Len() {
|
||||
return false
|
||||
}
|
||||
for i := 0; i < lx.Len(); i++ {
|
||||
// We only operate on messages here since equalImpl will not call us in any other case.
|
||||
if !equalMessage(lx.Get(i).Message(), ly.Get(i).Message()) {
|
||||
return false
|
||||
}
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
// equalUnknown compares unknown fields by direct comparison on the raw bytes
|
||||
// of each individual field number.
|
||||
// Copied from protoreflect.equalUnknown.
|
||||
func equalUnknown(x, y protoreflect.RawFields) bool {
|
||||
if len(x) != len(y) {
|
||||
return false
|
||||
}
|
||||
if bytes.Equal([]byte(x), []byte(y)) {
|
||||
return true
|
||||
}
|
||||
|
||||
mx := make(map[protoreflect.FieldNumber]protoreflect.RawFields)
|
||||
my := make(map[protoreflect.FieldNumber]protoreflect.RawFields)
|
||||
for len(x) > 0 {
|
||||
fnum, _, n := protowire.ConsumeField(x)
|
||||
mx[fnum] = append(mx[fnum], x[:n]...)
|
||||
x = x[n:]
|
||||
}
|
||||
for len(y) > 0 {
|
||||
fnum, _, n := protowire.ConsumeField(y)
|
||||
my[fnum] = append(my[fnum], y[:n]...)
|
||||
y = y[n:]
|
||||
}
|
||||
if len(mx) != len(my) {
|
||||
return false
|
||||
}
|
||||
|
||||
for k, v1 := range mx {
|
||||
if v2, ok := my[k]; !ok || !bytes.Equal([]byte(v1), []byte(v2)) {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
return true
|
||||
}
|
1
vendor/google.golang.org/protobuf/internal/impl/legacy_extension.go
generated
vendored
1
vendor/google.golang.org/protobuf/internal/impl/legacy_extension.go
generated
vendored
@ -160,6 +160,7 @@ func (x placeholderExtension) HasPresence() bool
|
||||
func (x placeholderExtension) HasOptionalKeyword() bool { return false }
|
||||
func (x placeholderExtension) IsExtension() bool { return true }
|
||||
func (x placeholderExtension) IsWeak() bool { return false }
|
||||
func (x placeholderExtension) IsLazy() bool { return false }
|
||||
func (x placeholderExtension) IsPacked() bool { return false }
|
||||
func (x placeholderExtension) IsList() bool { return false }
|
||||
func (x placeholderExtension) IsMap() bool { return false }
|
||||
|
4
vendor/google.golang.org/protobuf/internal/impl/message.go
generated
vendored
4
vendor/google.golang.org/protobuf/internal/impl/message.go
generated
vendored
@ -30,8 +30,8 @@ type MessageInfo struct {
|
||||
// Desc is the underlying message descriptor type and must be populated.
|
||||
Desc protoreflect.MessageDescriptor
|
||||
|
||||
// Exporter must be provided in a purego environment in order to provide
|
||||
// access to unexported fields.
|
||||
// Deprecated: Exporter will be removed the next time we bump
|
||||
// protoimpl.GenVersion. See https://github.com/golang/protobuf/issues/1640
|
||||
Exporter exporter
|
||||
|
||||
// OneofWrappers is list of pointers to oneof wrapper struct types.
|
||||
|
215
vendor/google.golang.org/protobuf/internal/impl/pointer_reflect.go
generated
vendored
215
vendor/google.golang.org/protobuf/internal/impl/pointer_reflect.go
generated
vendored
@ -1,215 +0,0 @@
|
||||
// Copyright 2018 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
//go:build purego || appengine
|
||||
// +build purego appengine
|
||||
|
||||
package impl
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"reflect"
|
||||
"sync"
|
||||
)
|
||||
|
||||
const UnsafeEnabled = false
|
||||
|
||||
// Pointer is an opaque pointer type.
|
||||
type Pointer any
|
||||
|
||||
// offset represents the offset to a struct field, accessible from a pointer.
|
||||
// The offset is the field index into a struct.
|
||||
type offset struct {
|
||||
index int
|
||||
export exporter
|
||||
}
|
||||
|
||||
// offsetOf returns a field offset for the struct field.
|
||||
func offsetOf(f reflect.StructField, x exporter) offset {
|
||||
if len(f.Index) != 1 {
|
||||
panic("embedded structs are not supported")
|
||||
}
|
||||
if f.PkgPath == "" {
|
||||
return offset{index: f.Index[0]} // field is already exported
|
||||
}
|
||||
if x == nil {
|
||||
panic("exporter must be provided for unexported field")
|
||||
}
|
||||
return offset{index: f.Index[0], export: x}
|
||||
}
|
||||
|
||||
// IsValid reports whether the offset is valid.
|
||||
func (f offset) IsValid() bool { return f.index >= 0 }
|
||||
|
||||
// invalidOffset is an invalid field offset.
|
||||
var invalidOffset = offset{index: -1}
|
||||
|
||||
// zeroOffset is a noop when calling pointer.Apply.
|
||||
var zeroOffset = offset{index: 0}
|
||||
|
||||
// pointer is an abstract representation of a pointer to a struct or field.
|
||||
type pointer struct{ v reflect.Value }
|
||||
|
||||
// pointerOf returns p as a pointer.
|
||||
func pointerOf(p Pointer) pointer {
|
||||
return pointerOfIface(p)
|
||||
}
|
||||
|
||||
// pointerOfValue returns v as a pointer.
|
||||
func pointerOfValue(v reflect.Value) pointer {
|
||||
return pointer{v: v}
|
||||
}
|
||||
|
||||
// pointerOfIface returns the pointer portion of an interface.
|
||||
func pointerOfIface(v any) pointer {
|
||||
return pointer{v: reflect.ValueOf(v)}
|
||||
}
|
||||
|
||||
// IsNil reports whether the pointer is nil.
|
||||
func (p pointer) IsNil() bool {
|
||||
return p.v.IsNil()
|
||||
}
|
||||
|
||||
// Apply adds an offset to the pointer to derive a new pointer
|
||||
// to a specified field. The current pointer must be pointing at a struct.
|
||||
func (p pointer) Apply(f offset) pointer {
|
||||
if f.export != nil {
|
||||
if v := reflect.ValueOf(f.export(p.v.Interface(), f.index)); v.IsValid() {
|
||||
return pointer{v: v}
|
||||
}
|
||||
}
|
||||
return pointer{v: p.v.Elem().Field(f.index).Addr()}
|
||||
}
|
||||
|
||||
// AsValueOf treats p as a pointer to an object of type t and returns the value.
|
||||
// It is equivalent to reflect.ValueOf(p.AsIfaceOf(t))
|
||||
func (p pointer) AsValueOf(t reflect.Type) reflect.Value {
|
||||
if got := p.v.Type().Elem(); got != t {
|
||||
panic(fmt.Sprintf("invalid type: got %v, want %v", got, t))
|
||||
}
|
||||
return p.v
|
||||
}
|
||||
|
||||
// AsIfaceOf treats p as a pointer to an object of type t and returns the value.
|
||||
// It is equivalent to p.AsValueOf(t).Interface()
|
||||
func (p pointer) AsIfaceOf(t reflect.Type) any {
|
||||
return p.AsValueOf(t).Interface()
|
||||
}
|
||||
|
||||
func (p pointer) Bool() *bool { return p.v.Interface().(*bool) }
|
||||
func (p pointer) BoolPtr() **bool { return p.v.Interface().(**bool) }
|
||||
func (p pointer) BoolSlice() *[]bool { return p.v.Interface().(*[]bool) }
|
||||
func (p pointer) Int32() *int32 { return p.v.Interface().(*int32) }
|
||||
func (p pointer) Int32Ptr() **int32 { return p.v.Interface().(**int32) }
|
||||
func (p pointer) Int32Slice() *[]int32 { return p.v.Interface().(*[]int32) }
|
||||
func (p pointer) Int64() *int64 { return p.v.Interface().(*int64) }
|
||||
func (p pointer) Int64Ptr() **int64 { return p.v.Interface().(**int64) }
|
||||
func (p pointer) Int64Slice() *[]int64 { return p.v.Interface().(*[]int64) }
|
||||
func (p pointer) Uint32() *uint32 { return p.v.Interface().(*uint32) }
|
||||
func (p pointer) Uint32Ptr() **uint32 { return p.v.Interface().(**uint32) }
|
||||
func (p pointer) Uint32Slice() *[]uint32 { return p.v.Interface().(*[]uint32) }
|
||||
func (p pointer) Uint64() *uint64 { return p.v.Interface().(*uint64) }
|
||||
func (p pointer) Uint64Ptr() **uint64 { return p.v.Interface().(**uint64) }
|
||||
func (p pointer) Uint64Slice() *[]uint64 { return p.v.Interface().(*[]uint64) }
|
||||
func (p pointer) Float32() *float32 { return p.v.Interface().(*float32) }
|
||||
func (p pointer) Float32Ptr() **float32 { return p.v.Interface().(**float32) }
|
||||
func (p pointer) Float32Slice() *[]float32 { return p.v.Interface().(*[]float32) }
|
||||
func (p pointer) Float64() *float64 { return p.v.Interface().(*float64) }
|
||||
func (p pointer) Float64Ptr() **float64 { return p.v.Interface().(**float64) }
|
||||
func (p pointer) Float64Slice() *[]float64 { return p.v.Interface().(*[]float64) }
|
||||
func (p pointer) String() *string { return p.v.Interface().(*string) }
|
||||
func (p pointer) StringPtr() **string { return p.v.Interface().(**string) }
|
||||
func (p pointer) StringSlice() *[]string { return p.v.Interface().(*[]string) }
|
||||
func (p pointer) Bytes() *[]byte { return p.v.Interface().(*[]byte) }
|
||||
func (p pointer) BytesPtr() **[]byte { return p.v.Interface().(**[]byte) }
|
||||
func (p pointer) BytesSlice() *[][]byte { return p.v.Interface().(*[][]byte) }
|
||||
func (p pointer) WeakFields() *weakFields { return (*weakFields)(p.v.Interface().(*WeakFields)) }
|
||||
func (p pointer) Extensions() *map[int32]ExtensionField {
|
||||
return p.v.Interface().(*map[int32]ExtensionField)
|
||||
}
|
||||
|
||||
func (p pointer) Elem() pointer {
|
||||
return pointer{v: p.v.Elem()}
|
||||
}
|
||||
|
||||
// PointerSlice copies []*T from p as a new []pointer.
|
||||
// This behavior differs from the implementation in pointer_unsafe.go.
|
||||
func (p pointer) PointerSlice() []pointer {
|
||||
// TODO: reconsider this
|
||||
if p.v.IsNil() {
|
||||
return nil
|
||||
}
|
||||
n := p.v.Elem().Len()
|
||||
s := make([]pointer, n)
|
||||
for i := 0; i < n; i++ {
|
||||
s[i] = pointer{v: p.v.Elem().Index(i)}
|
||||
}
|
||||
return s
|
||||
}
|
||||
|
||||
// AppendPointerSlice appends v to p, which must be a []*T.
|
||||
func (p pointer) AppendPointerSlice(v pointer) {
|
||||
sp := p.v.Elem()
|
||||
sp.Set(reflect.Append(sp, v.v))
|
||||
}
|
||||
|
||||
// SetPointer sets *p to v.
|
||||
func (p pointer) SetPointer(v pointer) {
|
||||
p.v.Elem().Set(v.v)
|
||||
}
|
||||
|
||||
func growSlice(p pointer, addCap int) {
|
||||
// TODO: Once we only support Go 1.20 and newer, use reflect.Grow.
|
||||
in := p.v.Elem()
|
||||
out := reflect.MakeSlice(in.Type(), in.Len(), in.Len()+addCap)
|
||||
reflect.Copy(out, in)
|
||||
p.v.Elem().Set(out)
|
||||
}
|
||||
|
||||
func (p pointer) growBoolSlice(addCap int) {
|
||||
growSlice(p, addCap)
|
||||
}
|
||||
|
||||
func (p pointer) growInt32Slice(addCap int) {
|
||||
growSlice(p, addCap)
|
||||
}
|
||||
|
||||
func (p pointer) growUint32Slice(addCap int) {
|
||||
growSlice(p, addCap)
|
||||
}
|
||||
|
||||
func (p pointer) growInt64Slice(addCap int) {
|
||||
growSlice(p, addCap)
|
||||
}
|
||||
|
||||
func (p pointer) growUint64Slice(addCap int) {
|
||||
growSlice(p, addCap)
|
||||
}
|
||||
|
||||
func (p pointer) growFloat64Slice(addCap int) {
|
||||
growSlice(p, addCap)
|
||||
}
|
||||
|
||||
func (p pointer) growFloat32Slice(addCap int) {
|
||||
growSlice(p, addCap)
|
||||
}
|
||||
|
||||
func (Export) MessageStateOf(p Pointer) *messageState { panic("not supported") }
|
||||
func (ms *messageState) pointer() pointer { panic("not supported") }
|
||||
func (ms *messageState) messageInfo() *MessageInfo { panic("not supported") }
|
||||
func (ms *messageState) LoadMessageInfo() *MessageInfo { panic("not supported") }
|
||||
func (ms *messageState) StoreMessageInfo(mi *MessageInfo) { panic("not supported") }
|
||||
|
||||
type atomicNilMessage struct {
|
||||
once sync.Once
|
||||
m messageReflectWrapper
|
||||
}
|
||||
|
||||
func (m *atomicNilMessage) Init(mi *MessageInfo) *messageReflectWrapper {
|
||||
m.once.Do(func() {
|
||||
m.m.p = pointerOfIface(reflect.Zero(mi.GoReflectType).Interface())
|
||||
m.m.mi = mi
|
||||
})
|
||||
return &m.m
|
||||
}
|
3
vendor/google.golang.org/protobuf/internal/impl/pointer_unsafe.go
generated
vendored
3
vendor/google.golang.org/protobuf/internal/impl/pointer_unsafe.go
generated
vendored
@ -2,9 +2,6 @@
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
//go:build !purego && !appengine
|
||||
// +build !purego,!appengine
|
||||
|
||||
package impl
|
||||
|
||||
import (
|
||||
|
28
vendor/google.golang.org/protobuf/internal/strs/strings_pure.go
generated
vendored
28
vendor/google.golang.org/protobuf/internal/strs/strings_pure.go
generated
vendored
@ -1,28 +0,0 @@
|
||||
// Copyright 2018 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
//go:build purego || appengine
|
||||
// +build purego appengine
|
||||
|
||||
package strs
|
||||
|
||||
import pref "google.golang.org/protobuf/reflect/protoreflect"
|
||||
|
||||
func UnsafeString(b []byte) string {
|
||||
return string(b)
|
||||
}
|
||||
|
||||
func UnsafeBytes(s string) []byte {
|
||||
return []byte(s)
|
||||
}
|
||||
|
||||
type Builder struct{}
|
||||
|
||||
func (*Builder) AppendFullName(prefix pref.FullName, name pref.Name) pref.FullName {
|
||||
return prefix.Append(name)
|
||||
}
|
||||
|
||||
func (*Builder) MakeString(b []byte) string {
|
||||
return string(b)
|
||||
}
|
3
vendor/google.golang.org/protobuf/internal/strs/strings_unsafe_go120.go
generated
vendored
3
vendor/google.golang.org/protobuf/internal/strs/strings_unsafe_go120.go
generated
vendored
@ -2,8 +2,7 @@
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
//go:build !purego && !appengine && !go1.21
|
||||
// +build !purego,!appengine,!go1.21
|
||||
//go:build !go1.21
|
||||
|
||||
package strs
|
||||
|
||||
|
3
vendor/google.golang.org/protobuf/internal/strs/strings_unsafe_go121.go
generated
vendored
3
vendor/google.golang.org/protobuf/internal/strs/strings_unsafe_go121.go
generated
vendored
@ -2,8 +2,7 @@
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
//go:build !purego && !appengine && go1.21
|
||||
// +build !purego,!appengine,go1.21
|
||||
//go:build go1.21
|
||||
|
||||
package strs
|
||||
|
||||
|
4
vendor/google.golang.org/protobuf/internal/version/version.go
generated
vendored
4
vendor/google.golang.org/protobuf/internal/version/version.go
generated
vendored
@ -51,8 +51,8 @@ import (
|
||||
// 10. Send out the CL for review and submit it.
|
||||
const (
|
||||
Major = 1
|
||||
Minor = 34
|
||||
Patch = 2
|
||||
Minor = 35
|
||||
Patch = 1
|
||||
PreRelease = ""
|
||||
)
|
||||
|
||||
|
9
vendor/google.golang.org/protobuf/proto/equal.go
generated
vendored
9
vendor/google.golang.org/protobuf/proto/equal.go
generated
vendored
@ -8,6 +8,7 @@ import (
|
||||
"reflect"
|
||||
|
||||
"google.golang.org/protobuf/reflect/protoreflect"
|
||||
"google.golang.org/protobuf/runtime/protoiface"
|
||||
)
|
||||
|
||||
// Equal reports whether two messages are equal,
|
||||
@ -51,6 +52,14 @@ func Equal(x, y Message) bool {
|
||||
if mx.IsValid() != my.IsValid() {
|
||||
return false
|
||||
}
|
||||
|
||||
// Only one of the messages needs to implement the fast-path for it to work.
|
||||
pmx := protoMethods(mx)
|
||||
pmy := protoMethods(my)
|
||||
if pmx != nil && pmy != nil && pmx.Equal != nil && pmy.Equal != nil {
|
||||
return pmx.Equal(protoiface.EqualInput{MessageA: mx, MessageB: my}).Equal
|
||||
}
|
||||
|
||||
vx := protoreflect.ValueOfMessage(mx)
|
||||
vy := protoreflect.ValueOfMessage(my)
|
||||
return vx.Equal(vy)
|
||||
|
71
vendor/google.golang.org/protobuf/proto/extension.go
generated
vendored
71
vendor/google.golang.org/protobuf/proto/extension.go
generated
vendored
@ -39,6 +39,48 @@ func ClearExtension(m Message, xt protoreflect.ExtensionType) {
|
||||
// If the field is unpopulated, it returns the default value for
|
||||
// scalars and an immutable, empty value for lists or messages.
|
||||
// It panics if xt does not extend m.
|
||||
//
|
||||
// The type of the value is dependent on the field type of the extension.
|
||||
// For extensions generated by protoc-gen-go, the Go type is as follows:
|
||||
//
|
||||
// ╔═══════════════════╤═════════════════════════╗
|
||||
// ║ Go type │ Protobuf kind ║
|
||||
// ╠═══════════════════╪═════════════════════════╣
|
||||
// ║ bool │ bool ║
|
||||
// ║ int32 │ int32, sint32, sfixed32 ║
|
||||
// ║ int64 │ int64, sint64, sfixed64 ║
|
||||
// ║ uint32 │ uint32, fixed32 ║
|
||||
// ║ uint64 │ uint64, fixed64 ║
|
||||
// ║ float32 │ float ║
|
||||
// ║ float64 │ double ║
|
||||
// ║ string │ string ║
|
||||
// ║ []byte │ bytes ║
|
||||
// ║ protoreflect.Enum │ enum ║
|
||||
// ║ proto.Message │ message, group ║
|
||||
// ╚═══════════════════╧═════════════════════════╝
|
||||
//
|
||||
// The protoreflect.Enum and proto.Message types are the concrete Go type
|
||||
// associated with the named enum or message. Repeated fields are represented
|
||||
// using a Go slice of the base element type.
|
||||
//
|
||||
// If a generated extension descriptor variable is directly passed to
|
||||
// GetExtension, then the call should be followed immediately by a
|
||||
// type assertion to the expected output value. For example:
|
||||
//
|
||||
// mm := proto.GetExtension(m, foopb.E_MyExtension).(*foopb.MyMessage)
|
||||
//
|
||||
// This pattern enables static analysis tools to verify that the asserted type
|
||||
// matches the Go type associated with the extension field and
|
||||
// also enables a possible future migration to a type-safe extension API.
|
||||
//
|
||||
// Since singular messages are the most common extension type, the pattern of
|
||||
// calling HasExtension followed by GetExtension may be simplified to:
|
||||
//
|
||||
// if mm := proto.GetExtension(m, foopb.E_MyExtension).(*foopb.MyMessage); mm != nil {
|
||||
// ... // make use of mm
|
||||
// }
|
||||
//
|
||||
// The mm variable is non-nil if and only if HasExtension reports true.
|
||||
func GetExtension(m Message, xt protoreflect.ExtensionType) any {
|
||||
// Treat nil message interface as an empty message; return the default.
|
||||
if m == nil {
|
||||
@ -51,6 +93,35 @@ func GetExtension(m Message, xt protoreflect.ExtensionType) any {
|
||||
// SetExtension stores the value of an extension field.
|
||||
// It panics if m is invalid, xt does not extend m, or if type of v
|
||||
// is invalid for the specified extension field.
|
||||
//
|
||||
// The type of the value is dependent on the field type of the extension.
|
||||
// For extensions generated by protoc-gen-go, the Go type is as follows:
|
||||
//
|
||||
// ╔═══════════════════╤═════════════════════════╗
|
||||
// ║ Go type │ Protobuf kind ║
|
||||
// ╠═══════════════════╪═════════════════════════╣
|
||||
// ║ bool │ bool ║
|
||||
// ║ int32 │ int32, sint32, sfixed32 ║
|
||||
// ║ int64 │ int64, sint64, sfixed64 ║
|
||||
// ║ uint32 │ uint32, fixed32 ║
|
||||
// ║ uint64 │ uint64, fixed64 ║
|
||||
// ║ float32 │ float ║
|
||||
// ║ float64 │ double ║
|
||||
// ║ string │ string ║
|
||||
// ║ []byte │ bytes ║
|
||||
// ║ protoreflect.Enum │ enum ║
|
||||
// ║ proto.Message │ message, group ║
|
||||
// ╚═══════════════════╧═════════════════════════╝
|
||||
//
|
||||
// The protoreflect.Enum and proto.Message types are the concrete Go type
|
||||
// associated with the named enum or message. Repeated fields are represented
|
||||
// using a Go slice of the base element type.
|
||||
//
|
||||
// If a generated extension descriptor variable is directly passed to
|
||||
// SetExtension (e.g., foopb.E_MyExtension), then the value should be a
|
||||
// concrete type that matches the expected Go type for the extension descriptor
|
||||
// so that static analysis tools can verify type correctness.
|
||||
// This also enables a possible future migration to a type-safe extension API.
|
||||
func SetExtension(m Message, xt protoreflect.ExtensionType, v any) {
|
||||
xd := xt.TypeDescriptor()
|
||||
pv := xt.ValueOf(v)
|
||||
|
10
vendor/google.golang.org/protobuf/reflect/protoreflect/methods.go
generated
vendored
10
vendor/google.golang.org/protobuf/reflect/protoreflect/methods.go
generated
vendored
@ -23,6 +23,7 @@ type (
|
||||
Unmarshal func(unmarshalInput) (unmarshalOutput, error)
|
||||
Merge func(mergeInput) mergeOutput
|
||||
CheckInitialized func(checkInitializedInput) (checkInitializedOutput, error)
|
||||
Equal func(equalInput) equalOutput
|
||||
}
|
||||
supportFlags = uint64
|
||||
sizeInput = struct {
|
||||
@ -75,4 +76,13 @@ type (
|
||||
checkInitializedOutput = struct {
|
||||
pragma.NoUnkeyedLiterals
|
||||
}
|
||||
equalInput = struct {
|
||||
pragma.NoUnkeyedLiterals
|
||||
MessageA Message
|
||||
MessageB Message
|
||||
}
|
||||
equalOutput = struct {
|
||||
pragma.NoUnkeyedLiterals
|
||||
Equal bool
|
||||
}
|
||||
)
|
||||
|
60
vendor/google.golang.org/protobuf/reflect/protoreflect/value_pure.go
generated
vendored
60
vendor/google.golang.org/protobuf/reflect/protoreflect/value_pure.go
generated
vendored
@ -1,60 +0,0 @@
|
||||
// Copyright 2018 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
//go:build purego || appengine
|
||||
// +build purego appengine
|
||||
|
||||
package protoreflect
|
||||
|
||||
import "google.golang.org/protobuf/internal/pragma"
|
||||
|
||||
type valueType int
|
||||
|
||||
const (
|
||||
nilType valueType = iota
|
||||
boolType
|
||||
int32Type
|
||||
int64Type
|
||||
uint32Type
|
||||
uint64Type
|
||||
float32Type
|
||||
float64Type
|
||||
stringType
|
||||
bytesType
|
||||
enumType
|
||||
ifaceType
|
||||
)
|
||||
|
||||
// value is a union where only one type can be represented at a time.
|
||||
// This uses a distinct field for each type. This is type safe in Go, but
|
||||
// occupies more memory than necessary (72B).
|
||||
type value struct {
|
||||
pragma.DoNotCompare // 0B
|
||||
|
||||
typ valueType // 8B
|
||||
num uint64 // 8B
|
||||
str string // 16B
|
||||
bin []byte // 24B
|
||||
iface any // 16B
|
||||
}
|
||||
|
||||
func valueOfString(v string) Value {
|
||||
return Value{typ: stringType, str: v}
|
||||
}
|
||||
func valueOfBytes(v []byte) Value {
|
||||
return Value{typ: bytesType, bin: v}
|
||||
}
|
||||
func valueOfIface(v any) Value {
|
||||
return Value{typ: ifaceType, iface: v}
|
||||
}
|
||||
|
||||
func (v Value) getString() string {
|
||||
return v.str
|
||||
}
|
||||
func (v Value) getBytes() []byte {
|
||||
return v.bin
|
||||
}
|
||||
func (v Value) getIface() any {
|
||||
return v.iface
|
||||
}
|
3
vendor/google.golang.org/protobuf/reflect/protoreflect/value_unsafe_go120.go
generated
vendored
3
vendor/google.golang.org/protobuf/reflect/protoreflect/value_unsafe_go120.go
generated
vendored
@ -2,8 +2,7 @@
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
//go:build !purego && !appengine && !go1.21
|
||||
// +build !purego,!appengine,!go1.21
|
||||
//go:build !go1.21
|
||||
|
||||
package protoreflect
|
||||
|
||||
|
3
vendor/google.golang.org/protobuf/reflect/protoreflect/value_unsafe_go121.go
generated
vendored
3
vendor/google.golang.org/protobuf/reflect/protoreflect/value_unsafe_go121.go
generated
vendored
@ -2,8 +2,7 @@
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
//go:build !purego && !appengine && go1.21
|
||||
// +build !purego,!appengine,go1.21
|
||||
//go:build go1.21
|
||||
|
||||
package protoreflect
|
||||
|
||||
|
18
vendor/google.golang.org/protobuf/runtime/protoiface/methods.go
generated
vendored
18
vendor/google.golang.org/protobuf/runtime/protoiface/methods.go
generated
vendored
@ -39,6 +39,9 @@ type Methods = struct {
|
||||
|
||||
// CheckInitialized returns an error if any required fields in the message are not set.
|
||||
CheckInitialized func(CheckInitializedInput) (CheckInitializedOutput, error)
|
||||
|
||||
// Equal compares two messages and returns EqualOutput.Equal == true if they are equal.
|
||||
Equal func(EqualInput) EqualOutput
|
||||
}
|
||||
|
||||
// SupportFlags indicate support for optional features.
|
||||
@ -166,3 +169,18 @@ type CheckInitializedInput = struct {
|
||||
type CheckInitializedOutput = struct {
|
||||
pragma.NoUnkeyedLiterals
|
||||
}
|
||||
|
||||
// EqualInput is input to the Equal method.
|
||||
type EqualInput = struct {
|
||||
pragma.NoUnkeyedLiterals
|
||||
|
||||
MessageA protoreflect.Message
|
||||
MessageB protoreflect.Message
|
||||
}
|
||||
|
||||
// EqualOutput is output from the Equal method.
|
||||
type EqualOutput = struct {
|
||||
pragma.NoUnkeyedLiterals
|
||||
|
||||
Equal bool
|
||||
}
|
||||
|
24
vendor/google.golang.org/protobuf/types/known/anypb/any.pb.go
generated
vendored
24
vendor/google.golang.org/protobuf/types/known/anypb/any.pb.go
generated
vendored
@ -368,11 +368,9 @@ func (x *Any) UnmarshalNew() (proto.Message, error) {
|
||||
|
||||
func (x *Any) Reset() {
|
||||
*x = Any{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_google_protobuf_any_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
mi := &file_google_protobuf_any_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *Any) String() string {
|
||||
@ -383,7 +381,7 @@ func (*Any) ProtoMessage() {}
|
||||
|
||||
func (x *Any) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_google_protobuf_any_proto_msgTypes[0]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@ -461,20 +459,6 @@ func file_google_protobuf_any_proto_init() {
|
||||
if File_google_protobuf_any_proto != nil {
|
||||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_google_protobuf_any_proto_msgTypes[0].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*Any); 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{
|
||||
|
Reference in New Issue
Block a user