chore: make deps
This commit is contained in:
52
vendor/google.golang.org/protobuf/internal/filedesc/desc.go
generated
vendored
52
vendor/google.golang.org/protobuf/internal/filedesc/desc.go
generated
vendored
@ -72,9 +72,10 @@ type (
|
||||
EditionFeatures EditionFeatures
|
||||
}
|
||||
FileL2 struct {
|
||||
Options func() protoreflect.ProtoMessage
|
||||
Imports FileImports
|
||||
Locations SourceLocations
|
||||
Options func() protoreflect.ProtoMessage
|
||||
Imports FileImports
|
||||
OptionImports func() protoreflect.FileImports
|
||||
Locations SourceLocations
|
||||
}
|
||||
|
||||
// EditionFeatures is a frequently-instantiated struct, so please take care
|
||||
@ -126,12 +127,9 @@ func (fd *File) ParentFile() protoreflect.FileDescriptor { return fd }
|
||||
func (fd *File) Parent() protoreflect.Descriptor { return nil }
|
||||
func (fd *File) Index() int { return 0 }
|
||||
func (fd *File) Syntax() protoreflect.Syntax { return fd.L1.Syntax }
|
||||
|
||||
// Not exported and just used to reconstruct the original FileDescriptor proto
|
||||
func (fd *File) Edition() int32 { return int32(fd.L1.Edition) }
|
||||
func (fd *File) Name() protoreflect.Name { return fd.L1.Package.Name() }
|
||||
func (fd *File) FullName() protoreflect.FullName { return fd.L1.Package }
|
||||
func (fd *File) IsPlaceholder() bool { return false }
|
||||
func (fd *File) Name() protoreflect.Name { return fd.L1.Package.Name() }
|
||||
func (fd *File) FullName() protoreflect.FullName { return fd.L1.Package }
|
||||
func (fd *File) IsPlaceholder() bool { return false }
|
||||
func (fd *File) Options() protoreflect.ProtoMessage {
|
||||
if f := fd.lazyInit().Options; f != nil {
|
||||
return f()
|
||||
@ -150,6 +148,16 @@ func (fd *File) Format(s fmt.State, r rune) { descfmt.FormatD
|
||||
func (fd *File) ProtoType(protoreflect.FileDescriptor) {}
|
||||
func (fd *File) ProtoInternal(pragma.DoNotImplement) {}
|
||||
|
||||
// The next two are not part of the FileDescriptor interface. They are just used to reconstruct
|
||||
// the original FileDescriptor proto.
|
||||
func (fd *File) Edition() int32 { return int32(fd.L1.Edition) }
|
||||
func (fd *File) OptionImports() protoreflect.FileImports {
|
||||
if f := fd.lazyInit().OptionImports; f != nil {
|
||||
return f()
|
||||
}
|
||||
return emptyFiles
|
||||
}
|
||||
|
||||
func (fd *File) lazyInit() *FileL2 {
|
||||
if atomic.LoadUint32(&fd.once) == 0 {
|
||||
fd.lazyInitOnce()
|
||||
@ -182,9 +190,9 @@ type (
|
||||
L2 *EnumL2 // protected by fileDesc.once
|
||||
}
|
||||
EnumL1 struct {
|
||||
eagerValues bool // controls whether EnumL2.Values is already populated
|
||||
|
||||
EditionFeatures EditionFeatures
|
||||
Visibility int32
|
||||
eagerValues bool // controls whether EnumL2.Values is already populated
|
||||
}
|
||||
EnumL2 struct {
|
||||
Options func() protoreflect.ProtoMessage
|
||||
@ -219,6 +227,11 @@ func (ed *Enum) ReservedNames() protoreflect.Names { return &ed.lazyInit()
|
||||
func (ed *Enum) ReservedRanges() protoreflect.EnumRanges { return &ed.lazyInit().ReservedRanges }
|
||||
func (ed *Enum) Format(s fmt.State, r rune) { descfmt.FormatDesc(s, r, ed) }
|
||||
func (ed *Enum) ProtoType(protoreflect.EnumDescriptor) {}
|
||||
|
||||
// This is not part of the EnumDescriptor interface. It is just used to reconstruct
|
||||
// the original FileDescriptor proto.
|
||||
func (ed *Enum) Visibility() int32 { return ed.L1.Visibility }
|
||||
|
||||
func (ed *Enum) lazyInit() *EnumL2 {
|
||||
ed.L0.ParentFile.lazyInit() // implicitly initializes L2
|
||||
return ed.L2
|
||||
@ -244,13 +257,13 @@ type (
|
||||
L2 *MessageL2 // protected by fileDesc.once
|
||||
}
|
||||
MessageL1 struct {
|
||||
Enums Enums
|
||||
Messages Messages
|
||||
Extensions Extensions
|
||||
IsMapEntry bool // promoted from google.protobuf.MessageOptions
|
||||
IsMessageSet bool // promoted from google.protobuf.MessageOptions
|
||||
|
||||
Enums Enums
|
||||
Messages Messages
|
||||
Extensions Extensions
|
||||
EditionFeatures EditionFeatures
|
||||
Visibility int32
|
||||
IsMapEntry bool // promoted from google.protobuf.MessageOptions
|
||||
IsMessageSet bool // promoted from google.protobuf.MessageOptions
|
||||
}
|
||||
MessageL2 struct {
|
||||
Options func() protoreflect.ProtoMessage
|
||||
@ -319,6 +332,11 @@ func (md *Message) Messages() protoreflect.MessageDescriptors { return &md.L
|
||||
func (md *Message) Extensions() protoreflect.ExtensionDescriptors { return &md.L1.Extensions }
|
||||
func (md *Message) ProtoType(protoreflect.MessageDescriptor) {}
|
||||
func (md *Message) Format(s fmt.State, r rune) { descfmt.FormatDesc(s, r, md) }
|
||||
|
||||
// This is not part of the MessageDescriptor interface. It is just used to reconstruct
|
||||
// the original FileDescriptor proto.
|
||||
func (md *Message) Visibility() int32 { return md.L1.Visibility }
|
||||
|
||||
func (md *Message) lazyInit() *MessageL2 {
|
||||
md.L0.ParentFile.lazyInit() // implicitly initializes L2
|
||||
return md.L2
|
||||
|
||||
14
vendor/google.golang.org/protobuf/internal/filedesc/desc_init.go
generated
vendored
14
vendor/google.golang.org/protobuf/internal/filedesc/desc_init.go
generated
vendored
@ -284,6 +284,13 @@ func (ed *Enum) unmarshalSeed(b []byte, sb *strs.Builder, pf *File, pd protorefl
|
||||
case genid.EnumDescriptorProto_Value_field_number:
|
||||
numValues++
|
||||
}
|
||||
case protowire.VarintType:
|
||||
v, m := protowire.ConsumeVarint(b)
|
||||
b = b[m:]
|
||||
switch num {
|
||||
case genid.EnumDescriptorProto_Visibility_field_number:
|
||||
ed.L1.Visibility = int32(v)
|
||||
}
|
||||
default:
|
||||
m := protowire.ConsumeFieldValue(num, typ, b)
|
||||
b = b[m:]
|
||||
@ -365,6 +372,13 @@ func (md *Message) unmarshalSeed(b []byte, sb *strs.Builder, pf *File, pd protor
|
||||
md.unmarshalSeedOptions(v)
|
||||
}
|
||||
prevField = num
|
||||
case protowire.VarintType:
|
||||
v, m := protowire.ConsumeVarint(b)
|
||||
b = b[m:]
|
||||
switch num {
|
||||
case genid.DescriptorProto_Visibility_field_number:
|
||||
md.L1.Visibility = int32(v)
|
||||
}
|
||||
default:
|
||||
m := protowire.ConsumeFieldValue(num, typ, b)
|
||||
b = b[m:]
|
||||
|
||||
20
vendor/google.golang.org/protobuf/internal/filedesc/desc_lazy.go
generated
vendored
20
vendor/google.golang.org/protobuf/internal/filedesc/desc_lazy.go
generated
vendored
@ -134,6 +134,7 @@ func (fd *File) unmarshalFull(b []byte) {
|
||||
|
||||
var enumIdx, messageIdx, extensionIdx, serviceIdx int
|
||||
var rawOptions []byte
|
||||
var optionImports []string
|
||||
fd.L2 = new(FileL2)
|
||||
for len(b) > 0 {
|
||||
num, typ, n := protowire.ConsumeTag(b)
|
||||
@ -157,6 +158,8 @@ func (fd *File) unmarshalFull(b []byte) {
|
||||
imp = PlaceholderFile(path)
|
||||
}
|
||||
fd.L2.Imports = append(fd.L2.Imports, protoreflect.FileImport{FileDescriptor: imp})
|
||||
case genid.FileDescriptorProto_OptionDependency_field_number:
|
||||
optionImports = append(optionImports, sb.MakeString(v))
|
||||
case genid.FileDescriptorProto_EnumType_field_number:
|
||||
fd.L1.Enums.List[enumIdx].unmarshalFull(v, sb)
|
||||
enumIdx++
|
||||
@ -178,6 +181,23 @@ func (fd *File) unmarshalFull(b []byte) {
|
||||
}
|
||||
}
|
||||
fd.L2.Options = fd.builder.optionsUnmarshaler(&descopts.File, rawOptions)
|
||||
if len(optionImports) > 0 {
|
||||
var imps FileImports
|
||||
var once sync.Once
|
||||
fd.L2.OptionImports = func() protoreflect.FileImports {
|
||||
once.Do(func() {
|
||||
imps = make(FileImports, len(optionImports))
|
||||
for i, path := range optionImports {
|
||||
imp, _ := fd.builder.FileRegistry.FindFileByPath(path)
|
||||
if imp == nil {
|
||||
imp = PlaceholderFile(path)
|
||||
}
|
||||
imps[i] = protoreflect.FileImport{FileDescriptor: imp}
|
||||
}
|
||||
})
|
||||
return &imps
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func (ed *Enum) unmarshalFull(b []byte, sb *strs.Builder) {
|
||||
|
||||
Reference in New Issue
Block a user