Documentation ¶
Overview ¶
此包是为扩展 google.protobuf.descriptor 的功能, 所有结构除了 protoc-gen-go 为每个 Field 生成的 getter: GetField() 之外, 还生成了 Field() 方法。
因为在 go/template 中,直接使用 {{.Message.Field}} 可能会有空指针问题, 而使用 {{.Message.GetField}} 又觉得太丑。 所以,现在可以安全又愉快地使用 {{.Message.Field}}
此外,还扩展了一些功能,参考:
type DescriptorCommon interface{} 全体都有的扩展方法 type Nestable interface{} 可嵌套的对象: message/enum type ProtoType interface{} proto类型信息: message/enum
Index ¶
- Constants
- Variables
- type DescriptorCommon
- type DescriptorProto
- func (t *DescriptorProto) Comments() *SourceCodeInfo_Location
- func (t *DescriptorProto) DescriptorProto() *descriptorpb.DescriptorProto
- func (t *DescriptorProto) Empty() bool
- func (t *DescriptorProto) EnumType() []*EnumDescriptorProto
- func (t *DescriptorProto) Extension() []*FieldDescriptorProto
- func (t *DescriptorProto) ExtensionRange() []*DescriptorProto_ExtensionRange
- func (t *DescriptorProto) Field() []*FieldDescriptorProto
- func (t *DescriptorProto) File() *FileDescriptorProto
- func (t *DescriptorProto) GetEnumType() (ret []*EnumDescriptorProto)
- func (t *DescriptorProto) GetExtension() (ret []*FieldDescriptorProto)
- func (t *DescriptorProto) GetExtensionRange() (ret []*DescriptorProto_ExtensionRange)
- func (t *DescriptorProto) GetField() (ret []*FieldDescriptorProto)
- func (t *DescriptorProto) GetName() (ret string)
- func (t *DescriptorProto) GetNestedType() (ret []*DescriptorProto)
- func (t *DescriptorProto) GetOneofDecl() (ret []*OneofDescriptorProto)
- func (t *DescriptorProto) GetOptions() (ret *MessageOptions)
- func (t *DescriptorProto) GetReservedName() (ret []string)
- func (t *DescriptorProto) GetReservedRange() (ret []*DescriptorProto_ReservedRange)
- func (t *DescriptorProto) Index() int
- func (t *DescriptorProto) IsNested() bool
- func (t *DescriptorProto) IsTopLevel() bool
- func (t *DescriptorProto) LocationPath() LocationPath
- func (t *DescriptorProto) MarshalJSON() (b []byte, err error)
- func (t *DescriptorProto) Name() string
- func (t *DescriptorProto) NestedType() []*DescriptorProto
- func (t *DescriptorProto) OneofDecl() []*OneofDescriptorProto
- func (t *DescriptorProto) Options() *MessageOptions
- func (t *DescriptorProto) Parent() DescriptorCommon
- func (t *DescriptorProto) ParentMessage() *DescriptorProto
- func (t *DescriptorProto) PbDescriptor() *descriptorpb.DescriptorProto
- func (t *DescriptorProto) ProtoType() *PbTypeInfo
- func (t *DescriptorProto) ReservedName() []string
- func (t *DescriptorProto) ReservedRange() []*DescriptorProto_ReservedRange
- type DescriptorProto_ExtensionRange
- func (t *DescriptorProto_ExtensionRange) Comments() *SourceCodeInfo_Location
- func (t *DescriptorProto_ExtensionRange) DescriptorProto_ExtensionRange() *descriptorpb.DescriptorProto_ExtensionRange
- func (t *DescriptorProto_ExtensionRange) Empty() bool
- func (t *DescriptorProto_ExtensionRange) End() int32
- func (t *DescriptorProto_ExtensionRange) File() *FileDescriptorProto
- func (t *DescriptorProto_ExtensionRange) GetEnd() (ret int32)
- func (t *DescriptorProto_ExtensionRange) GetOptions() (ret *ExtensionRangeOptions)
- func (t *DescriptorProto_ExtensionRange) GetStart() (ret int32)
- func (t *DescriptorProto_ExtensionRange) Index() int
- func (t *DescriptorProto_ExtensionRange) IsTopLevel() bool
- func (t *DescriptorProto_ExtensionRange) LocationPath() LocationPath
- func (t *DescriptorProto_ExtensionRange) MarshalJSON() (b []byte, err error)
- func (t *DescriptorProto_ExtensionRange) Options() *ExtensionRangeOptions
- func (t *DescriptorProto_ExtensionRange) Parent() DescriptorCommon
- func (t *DescriptorProto_ExtensionRange) PbDescriptor() *descriptorpb.DescriptorProto_ExtensionRange
- func (t *DescriptorProto_ExtensionRange) Start() int32
- type DescriptorProto_ReservedRange
- func (t *DescriptorProto_ReservedRange) Comments() *SourceCodeInfo_Location
- func (t *DescriptorProto_ReservedRange) DescriptorProto_ReservedRange() *descriptorpb.DescriptorProto_ReservedRange
- func (t *DescriptorProto_ReservedRange) Empty() bool
- func (t *DescriptorProto_ReservedRange) End() int32
- func (t *DescriptorProto_ReservedRange) File() *FileDescriptorProto
- func (t *DescriptorProto_ReservedRange) GetEnd() (ret int32)
- func (t *DescriptorProto_ReservedRange) GetStart() (ret int32)
- func (t *DescriptorProto_ReservedRange) Index() int
- func (t *DescriptorProto_ReservedRange) IsTopLevel() bool
- func (t *DescriptorProto_ReservedRange) LocationPath() LocationPath
- func (t *DescriptorProto_ReservedRange) MarshalJSON() (b []byte, err error)
- func (t *DescriptorProto_ReservedRange) Parent() DescriptorCommon
- func (t *DescriptorProto_ReservedRange) PbDescriptor() *descriptorpb.DescriptorProto_ReservedRange
- func (t *DescriptorProto_ReservedRange) Start() int32
- type EnumDescriptorProto
- func (t *EnumDescriptorProto) Comments() *SourceCodeInfo_Location
- func (t *EnumDescriptorProto) Empty() bool
- func (t *EnumDescriptorProto) EnumDescriptorProto() *descriptorpb.EnumDescriptorProto
- func (t *EnumDescriptorProto) File() *FileDescriptorProto
- func (t *EnumDescriptorProto) GetName() (ret string)
- func (t *EnumDescriptorProto) GetOptions() (ret *EnumOptions)
- func (t *EnumDescriptorProto) GetReservedName() (ret []string)
- func (t *EnumDescriptorProto) GetReservedRange() (ret []*EnumDescriptorProto_EnumReservedRange)
- func (t *EnumDescriptorProto) GetValue() (ret []*EnumValueDescriptorProto)
- func (t *EnumDescriptorProto) Index() int
- func (t *EnumDescriptorProto) IsNested() bool
- func (t *EnumDescriptorProto) IsTopLevel() bool
- func (t *EnumDescriptorProto) LocationPath() LocationPath
- func (t *EnumDescriptorProto) MarshalJSON() (b []byte, err error)
- func (t *EnumDescriptorProto) Name() string
- func (t *EnumDescriptorProto) Options() *EnumOptions
- func (t *EnumDescriptorProto) Parent() DescriptorCommon
- func (t *EnumDescriptorProto) ParentMessage() *DescriptorProto
- func (t *EnumDescriptorProto) PbDescriptor() *descriptorpb.EnumDescriptorProto
- func (t *EnumDescriptorProto) ProtoType() *PbTypeInfo
- func (t *EnumDescriptorProto) ReservedName() []string
- func (t *EnumDescriptorProto) ReservedRange() []*EnumDescriptorProto_EnumReservedRange
- func (t *EnumDescriptorProto) Value() []*EnumValueDescriptorProto
- type EnumDescriptorProto_EnumReservedRange
- func (t *EnumDescriptorProto_EnumReservedRange) Comments() *SourceCodeInfo_Location
- func (t *EnumDescriptorProto_EnumReservedRange) Empty() bool
- func (t *EnumDescriptorProto_EnumReservedRange) End() int32
- func (t *EnumDescriptorProto_EnumReservedRange) EnumDescriptorProto_EnumReservedRange() *descriptorpb.EnumDescriptorProto_EnumReservedRange
- func (t *EnumDescriptorProto_EnumReservedRange) File() *FileDescriptorProto
- func (t *EnumDescriptorProto_EnumReservedRange) GetEnd() (ret int32)
- func (t *EnumDescriptorProto_EnumReservedRange) GetStart() (ret int32)
- func (t *EnumDescriptorProto_EnumReservedRange) Index() int
- func (t *EnumDescriptorProto_EnumReservedRange) IsTopLevel() bool
- func (t *EnumDescriptorProto_EnumReservedRange) LocationPath() LocationPath
- func (t *EnumDescriptorProto_EnumReservedRange) MarshalJSON() (b []byte, err error)
- func (t *EnumDescriptorProto_EnumReservedRange) Parent() DescriptorCommon
- func (t *EnumDescriptorProto_EnumReservedRange) PbDescriptor() *descriptorpb.EnumDescriptorProto_EnumReservedRange
- func (t *EnumDescriptorProto_EnumReservedRange) Start() int32
- type EnumOptions
- func (t *EnumOptions) AllowAlias() bool
- func (t *EnumOptions) Comments() *SourceCodeInfo_Location
- func (t *EnumOptions) Deprecated() bool
- func (t *EnumOptions) Empty() bool
- func (t *EnumOptions) EnumOptions() *descriptorpb.EnumOptions
- func (t *EnumOptions) File() *FileDescriptorProto
- func (t *EnumOptions) GetAllowAlias() (ret bool)
- func (t *EnumOptions) GetDeprecated() (ret bool)
- func (t *EnumOptions) GetUninterpretedOption() (ret []*UninterpretedOption)
- func (t *EnumOptions) Index() int
- func (t *EnumOptions) IsTopLevel() bool
- func (t *EnumOptions) LocationPath() LocationPath
- func (t *EnumOptions) MarshalJSON() (b []byte, err error)
- func (t *EnumOptions) Parent() DescriptorCommon
- func (t *EnumOptions) PbDescriptor() *descriptorpb.EnumOptions
- func (t *EnumOptions) UninterpretedOption() []*UninterpretedOption
- type EnumValueDescriptorProto
- func (t *EnumValueDescriptorProto) Comments() *SourceCodeInfo_Location
- func (t *EnumValueDescriptorProto) Empty() bool
- func (t *EnumValueDescriptorProto) EnumValueDescriptorProto() *descriptorpb.EnumValueDescriptorProto
- func (t *EnumValueDescriptorProto) File() *FileDescriptorProto
- func (t *EnumValueDescriptorProto) GetName() (ret string)
- func (t *EnumValueDescriptorProto) GetNumber() (ret int32)
- func (t *EnumValueDescriptorProto) GetOptions() (ret *EnumValueOptions)
- func (t *EnumValueDescriptorProto) Index() int
- func (t *EnumValueDescriptorProto) IsTopLevel() bool
- func (t *EnumValueDescriptorProto) LocationPath() LocationPath
- func (t *EnumValueDescriptorProto) MarshalJSON() (b []byte, err error)
- func (t *EnumValueDescriptorProto) Name() string
- func (t *EnumValueDescriptorProto) Number() int32
- func (t *EnumValueDescriptorProto) Options() *EnumValueOptions
- func (t *EnumValueDescriptorProto) Parent() DescriptorCommon
- func (t *EnumValueDescriptorProto) PbDescriptor() *descriptorpb.EnumValueDescriptorProto
- type EnumValueOptions
- func (t *EnumValueOptions) Comments() *SourceCodeInfo_Location
- func (t *EnumValueOptions) Deprecated() bool
- func (t *EnumValueOptions) Empty() bool
- func (t *EnumValueOptions) EnumValueOptions() *descriptorpb.EnumValueOptions
- func (t *EnumValueOptions) File() *FileDescriptorProto
- func (t *EnumValueOptions) GetDeprecated() (ret bool)
- func (t *EnumValueOptions) GetUninterpretedOption() (ret []*UninterpretedOption)
- func (t *EnumValueOptions) Index() int
- func (t *EnumValueOptions) IsTopLevel() bool
- func (t *EnumValueOptions) LocationPath() LocationPath
- func (t *EnumValueOptions) MarshalJSON() (b []byte, err error)
- func (t *EnumValueOptions) Parent() DescriptorCommon
- func (t *EnumValueOptions) PbDescriptor() *descriptorpb.EnumValueOptions
- func (t *EnumValueOptions) UninterpretedOption() []*UninterpretedOption
- type ExtensionRangeOptions
- func (t *ExtensionRangeOptions) Comments() *SourceCodeInfo_Location
- func (t *ExtensionRangeOptions) Empty() bool
- func (t *ExtensionRangeOptions) ExtensionRangeOptions() *descriptorpb.ExtensionRangeOptions
- func (t *ExtensionRangeOptions) File() *FileDescriptorProto
- func (t *ExtensionRangeOptions) GetUninterpretedOption() (ret []*UninterpretedOption)
- func (t *ExtensionRangeOptions) Index() int
- func (t *ExtensionRangeOptions) IsTopLevel() bool
- func (t *ExtensionRangeOptions) LocationPath() LocationPath
- func (t *ExtensionRangeOptions) MarshalJSON() (b []byte, err error)
- func (t *ExtensionRangeOptions) Parent() DescriptorCommon
- func (t *ExtensionRangeOptions) PbDescriptor() *descriptorpb.ExtensionRangeOptions
- func (t *ExtensionRangeOptions) UninterpretedOption() []*UninterpretedOption
- type FieldDescriptorProto
- func (t *FieldDescriptorProto) Comments() *SourceCodeInfo_Location
- func (t *FieldDescriptorProto) DefaultValue() string
- func (t *FieldDescriptorProto) Empty() bool
- func (t *FieldDescriptorProto) Extendee() string
- func (t *FieldDescriptorProto) FieldDescriptorProto() *descriptorpb.FieldDescriptorProto
- func (t *FieldDescriptorProto) File() *FileDescriptorProto
- func (t *FieldDescriptorProto) GetDefaultValue() (ret string)
- func (t *FieldDescriptorProto) GetExtendee() (ret string)
- func (t *FieldDescriptorProto) GetJsonName() (ret string)
- func (t *FieldDescriptorProto) GetLabel() (ret FieldDescriptorProto_Label)
- func (t *FieldDescriptorProto) GetName() (ret string)
- func (t *FieldDescriptorProto) GetNumber() (ret int32)
- func (t *FieldDescriptorProto) GetOneofIndex() (ret int32)
- func (t *FieldDescriptorProto) GetOptions() (ret *FieldOptions)
- func (t *FieldDescriptorProto) GetType() (ret FieldDescriptorProto_Type)
- func (t *FieldDescriptorProto) GetTypeName() (ret string)
- func (t *FieldDescriptorProto) Index() int
- func (t *FieldDescriptorProto) IsOptional() bool
- func (t *FieldDescriptorProto) IsRepeated() bool
- func (t *FieldDescriptorProto) IsRequired() bool
- func (t *FieldDescriptorProto) IsTopLevel() bool
- func (t *FieldDescriptorProto) JsonName() string
- func (t *FieldDescriptorProto) Label() FieldDescriptorProto_Label
- func (t *FieldDescriptorProto) LocationPath() LocationPath
- func (t *FieldDescriptorProto) MarshalJSON() (b []byte, err error)
- func (t *FieldDescriptorProto) Name() string
- func (t *FieldDescriptorProto) Number() int32
- func (t *FieldDescriptorProto) OneofIndex() int32
- func (t *FieldDescriptorProto) Options() *FieldOptions
- func (t *FieldDescriptorProto) Parent() DescriptorCommon
- func (t *FieldDescriptorProto) PbDescriptor() *descriptorpb.FieldDescriptorProto
- func (t *FieldDescriptorProto) Type() FieldDescriptorProto_Type
- func (t *FieldDescriptorProto) TypeName() string
- type FieldDescriptorProto_Label
- type FieldDescriptorProto_Type
- type FieldOptions
- func (t *FieldOptions) Comments() *SourceCodeInfo_Location
- func (t *FieldOptions) Ctype() FieldOptions_CType
- func (t *FieldOptions) Deprecated() bool
- func (t *FieldOptions) Empty() bool
- func (t *FieldOptions) FieldOptions() *descriptorpb.FieldOptions
- func (t *FieldOptions) File() *FileDescriptorProto
- func (t *FieldOptions) GetCtype() (ret FieldOptions_CType)
- func (t *FieldOptions) GetDeprecated() (ret bool)
- func (t *FieldOptions) GetJstype() (ret FieldOptions_JSType)
- func (t *FieldOptions) GetLazy() (ret bool)
- func (t *FieldOptions) GetPacked() (ret bool)
- func (t *FieldOptions) GetUninterpretedOption() (ret []*UninterpretedOption)
- func (t *FieldOptions) GetWeak() (ret bool)
- func (t *FieldOptions) Index() int
- func (t *FieldOptions) IsTopLevel() bool
- func (t *FieldOptions) Jstype() FieldOptions_JSType
- func (t *FieldOptions) Lazy() bool
- func (t *FieldOptions) LocationPath() LocationPath
- func (t *FieldOptions) MarshalJSON() (b []byte, err error)
- func (t *FieldOptions) Packed() bool
- func (t *FieldOptions) Parent() DescriptorCommon
- func (t *FieldOptions) PbDescriptor() *descriptorpb.FieldOptions
- func (t *FieldOptions) UninterpretedOption() []*UninterpretedOption
- func (t *FieldOptions) Weak() bool
- type FieldOptions_CType
- type FieldOptions_JSType
- type FileDescriptorProto
- func (t *FileDescriptorProto) Comments() *SourceCodeInfo_Location
- func (t *FileDescriptorProto) Dependency() []string
- func (t *FileDescriptorProto) Empty() bool
- func (t *FileDescriptorProto) EnumType() []*EnumDescriptorProto
- func (t *FileDescriptorProto) Extension() []*FieldDescriptorProto
- func (t *FileDescriptorProto) File() *FileDescriptorProto
- func (t *FileDescriptorProto) FileDescriptorProto() *descriptorpb.FileDescriptorProto
- func (t *FileDescriptorProto) GetDependency() (ret []string)
- func (t *FileDescriptorProto) GetEnumType() (ret []*EnumDescriptorProto)
- func (t *FileDescriptorProto) GetExtension() (ret []*FieldDescriptorProto)
- func (t *FileDescriptorProto) GetMessageType() (ret []*DescriptorProto)
- func (t *FileDescriptorProto) GetName() (ret string)
- func (t *FileDescriptorProto) GetOptions() (ret *FileOptions)
- func (t *FileDescriptorProto) GetPackage() (ret string)
- func (t *FileDescriptorProto) GetPublicDependency() (ret []int32)
- func (t *FileDescriptorProto) GetService() (ret []*ServiceDescriptorProto)
- func (t *FileDescriptorProto) GetSourceCodeInfo() (ret *SourceCodeInfo)
- func (t *FileDescriptorProto) GetSyntax() (ret string)
- func (t *FileDescriptorProto) GetWeakDependency() (ret []int32)
- func (t *FileDescriptorProto) Index() int
- func (t *FileDescriptorProto) IsProto2() bool
- func (t *FileDescriptorProto) IsProto3() bool
- func (t *FileDescriptorProto) IsTopLevel() bool
- func (t *FileDescriptorProto) LocationPath() LocationPath
- func (t *FileDescriptorProto) MarshalJSON() (b []byte, err error)
- func (t *FileDescriptorProto) MessageType() []*DescriptorProto
- func (t *FileDescriptorProto) Name() string
- func (t *FileDescriptorProto) Options() *FileOptions
- func (t *FileDescriptorProto) Package() string
- func (t *FileDescriptorProto) Parent() DescriptorCommon
- func (t *FileDescriptorProto) PbDescriptor() *descriptorpb.FileDescriptorProto
- func (t *FileDescriptorProto) PublicDependency() []int32
- func (t *FileDescriptorProto) Service() []*ServiceDescriptorProto
- func (t *FileDescriptorProto) SourceCodeInfo() *SourceCodeInfo
- func (t *FileDescriptorProto) Syntax() string
- func (t *FileDescriptorProto) WeakDependency() []int32
- type FileOptions
- func (t *FileOptions) CcEnableArenas() bool
- func (t *FileOptions) CcGenericServices() bool
- func (t *FileOptions) Comments() *SourceCodeInfo_Location
- func (t *FileOptions) CsharpNamespace() string
- func (t *FileOptions) Deprecated() bool
- func (t *FileOptions) Empty() bool
- func (t *FileOptions) File() *FileDescriptorProto
- func (t *FileOptions) FileOptions() *descriptorpb.FileOptions
- func (t *FileOptions) GetCcEnableArenas() (ret bool)
- func (t *FileOptions) GetCcGenericServices() (ret bool)
- func (t *FileOptions) GetCsharpNamespace() (ret string)
- func (t *FileOptions) GetDeprecated() (ret bool)
- func (t *FileOptions) GetGoPackage() (ret string)
- func (t *FileOptions) GetJavaGenerateEqualsAndHash() (ret bool)
- func (t *FileOptions) GetJavaGenericServices() (ret bool)
- func (t *FileOptions) GetJavaMultipleFiles() (ret bool)
- func (t *FileOptions) GetJavaOuterClassname() (ret string)
- func (t *FileOptions) GetJavaPackage() (ret string)
- func (t *FileOptions) GetJavaStringCheckUtf8() (ret bool)
- func (t *FileOptions) GetObjcClassPrefix() (ret string)
- func (t *FileOptions) GetOptimizeFor() (ret FileOptions_OptimizeMode)
- func (t *FileOptions) GetPhpClassPrefix() (ret string)
- func (t *FileOptions) GetPhpGenericServices() (ret bool)
- func (t *FileOptions) GetPhpMetadataNamespace() (ret string)
- func (t *FileOptions) GetPhpNamespace() (ret string)
- func (t *FileOptions) GetPyGenericServices() (ret bool)
- func (t *FileOptions) GetRubyPackage() (ret string)
- func (t *FileOptions) GetSwiftPrefix() (ret string)
- func (t *FileOptions) GetUninterpretedOption() (ret []*UninterpretedOption)
- func (t *FileOptions) GoPackage() string
- func (t *FileOptions) Index() int
- func (t *FileOptions) IsTopLevel() bool
- func (t *FileOptions) JavaGenerateEqualsAndHash() bool
- func (t *FileOptions) JavaGenericServices() bool
- func (t *FileOptions) JavaMultipleFiles() bool
- func (t *FileOptions) JavaOuterClassname() string
- func (t *FileOptions) JavaPackage() string
- func (t *FileOptions) JavaStringCheckUtf8() bool
- func (t *FileOptions) LocationPath() LocationPath
- func (t *FileOptions) MarshalJSON() (b []byte, err error)
- func (t *FileOptions) ObjcClassPrefix() string
- func (t *FileOptions) OptimizeFor() FileOptions_OptimizeMode
- func (t *FileOptions) Parent() DescriptorCommon
- func (t *FileOptions) PbDescriptor() *descriptorpb.FileOptions
- func (t *FileOptions) PhpClassPrefix() string
- func (t *FileOptions) PhpGenericServices() bool
- func (t *FileOptions) PhpMetadataNamespace() string
- func (t *FileOptions) PhpNamespace() string
- func (t *FileOptions) PyGenericServices() bool
- func (t *FileOptions) RubyPackage() string
- func (t *FileOptions) SwiftPrefix() string
- func (t *FileOptions) UninterpretedOption() []*UninterpretedOption
- type FileOptions_OptimizeMode
- type GeneratedCodeInfo
- func (t *GeneratedCodeInfo) Annotation() []*GeneratedCodeInfo_Annotation
- func (t *GeneratedCodeInfo) Comments() *SourceCodeInfo_Location
- func (t *GeneratedCodeInfo) Empty() bool
- func (t *GeneratedCodeInfo) File() *FileDescriptorProto
- func (t *GeneratedCodeInfo) GeneratedCodeInfo() *descriptorpb.GeneratedCodeInfo
- func (t *GeneratedCodeInfo) GetAnnotation() (ret []*GeneratedCodeInfo_Annotation)
- func (t *GeneratedCodeInfo) Index() int
- func (t *GeneratedCodeInfo) IsTopLevel() bool
- func (t *GeneratedCodeInfo) LocationPath() LocationPath
- func (t *GeneratedCodeInfo) MarshalJSON() (b []byte, err error)
- func (t *GeneratedCodeInfo) Parent() DescriptorCommon
- func (t *GeneratedCodeInfo) PbDescriptor() *descriptorpb.GeneratedCodeInfo
- type GeneratedCodeInfo_Annotation
- func (t *GeneratedCodeInfo_Annotation) Begin() int32
- func (t *GeneratedCodeInfo_Annotation) Comments() *SourceCodeInfo_Location
- func (t *GeneratedCodeInfo_Annotation) Empty() bool
- func (t *GeneratedCodeInfo_Annotation) End() int32
- func (t *GeneratedCodeInfo_Annotation) File() *FileDescriptorProto
- func (t *GeneratedCodeInfo_Annotation) GeneratedCodeInfo_Annotation() *descriptorpb.GeneratedCodeInfo_Annotation
- func (t *GeneratedCodeInfo_Annotation) GetBegin() (ret int32)
- func (t *GeneratedCodeInfo_Annotation) GetEnd() (ret int32)
- func (t *GeneratedCodeInfo_Annotation) GetPath() (ret []int32)
- func (t *GeneratedCodeInfo_Annotation) GetSourceFile() (ret string)
- func (t *GeneratedCodeInfo_Annotation) Index() int
- func (t *GeneratedCodeInfo_Annotation) IsTopLevel() bool
- func (t *GeneratedCodeInfo_Annotation) LocationPath() LocationPath
- func (t *GeneratedCodeInfo_Annotation) MarshalJSON() (b []byte, err error)
- func (t *GeneratedCodeInfo_Annotation) Parent() DescriptorCommon
- func (t *GeneratedCodeInfo_Annotation) Path() []int32
- func (t *GeneratedCodeInfo_Annotation) PbDescriptor() *descriptorpb.GeneratedCodeInfo_Annotation
- func (t *GeneratedCodeInfo_Annotation) SourceFile() string
- type LocationPath
- type MessageOptions
- func (t *MessageOptions) Comments() *SourceCodeInfo_Location
- func (t *MessageOptions) Deprecated() bool
- func (t *MessageOptions) Empty() bool
- func (t *MessageOptions) File() *FileDescriptorProto
- func (t *MessageOptions) GetDeprecated() (ret bool)
- func (t *MessageOptions) GetMapEntry() (ret bool)
- func (t *MessageOptions) GetMessageSetWireFormat() (ret bool)
- func (t *MessageOptions) GetNoStandardDescriptorAccessor() (ret bool)
- func (t *MessageOptions) GetUninterpretedOption() (ret []*UninterpretedOption)
- func (t *MessageOptions) Index() int
- func (t *MessageOptions) IsTopLevel() bool
- func (t *MessageOptions) LocationPath() LocationPath
- func (t *MessageOptions) MapEntry() bool
- func (t *MessageOptions) MarshalJSON() (b []byte, err error)
- func (t *MessageOptions) MessageOptions() *descriptorpb.MessageOptions
- func (t *MessageOptions) MessageSetWireFormat() bool
- func (t *MessageOptions) NoStandardDescriptorAccessor() bool
- func (t *MessageOptions) Parent() DescriptorCommon
- func (t *MessageOptions) PbDescriptor() *descriptorpb.MessageOptions
- func (t *MessageOptions) UninterpretedOption() []*UninterpretedOption
- type MethodDescriptorProto
- func (t *MethodDescriptorProto) ClientStreaming() bool
- func (t *MethodDescriptorProto) Comments() *SourceCodeInfo_Location
- func (t *MethodDescriptorProto) Empty() bool
- func (t *MethodDescriptorProto) File() *FileDescriptorProto
- func (t *MethodDescriptorProto) GetClientStreaming() (ret bool)
- func (t *MethodDescriptorProto) GetInputType() (ret string)
- func (t *MethodDescriptorProto) GetName() (ret string)
- func (t *MethodDescriptorProto) GetOptions() (ret *MethodOptions)
- func (t *MethodDescriptorProto) GetOutputType() (ret string)
- func (t *MethodDescriptorProto) GetServerStreaming() (ret bool)
- func (t *MethodDescriptorProto) Index() int
- func (t *MethodDescriptorProto) InputType() string
- func (t *MethodDescriptorProto) IsTopLevel() bool
- func (t *MethodDescriptorProto) LocationPath() LocationPath
- func (t *MethodDescriptorProto) MarshalJSON() (b []byte, err error)
- func (t *MethodDescriptorProto) MethodDescriptorProto() *descriptorpb.MethodDescriptorProto
- func (t *MethodDescriptorProto) Name() string
- func (t *MethodDescriptorProto) Options() *MethodOptions
- func (t *MethodDescriptorProto) OutputType() string
- func (t *MethodDescriptorProto) Parent() DescriptorCommon
- func (t *MethodDescriptorProto) PbDescriptor() *descriptorpb.MethodDescriptorProto
- func (t *MethodDescriptorProto) ServerStreaming() bool
- func (t *MethodDescriptorProto) Service() *ServiceDescriptorProto
- type MethodOptions
- func (t *MethodOptions) Comments() *SourceCodeInfo_Location
- func (t *MethodOptions) Deprecated() bool
- func (t *MethodOptions) Empty() bool
- func (t *MethodOptions) File() *FileDescriptorProto
- func (t *MethodOptions) GetDeprecated() (ret bool)
- func (t *MethodOptions) GetIdempotencyLevel() (ret MethodOptions_IdempotencyLevel)
- func (t *MethodOptions) GetUninterpretedOption() (ret []*UninterpretedOption)
- func (t *MethodOptions) IdempotencyLevel() MethodOptions_IdempotencyLevel
- func (t *MethodOptions) Index() int
- func (t *MethodOptions) IsTopLevel() bool
- func (t *MethodOptions) LocationPath() LocationPath
- func (t *MethodOptions) MarshalJSON() (b []byte, err error)
- func (t *MethodOptions) MethodOptions() *descriptorpb.MethodOptions
- func (t *MethodOptions) Parent() DescriptorCommon
- func (t *MethodOptions) PbDescriptor() *descriptorpb.MethodOptions
- func (t *MethodOptions) UninterpretedOption() []*UninterpretedOption
- type MethodOptions_IdempotencyLevel
- type NamedDescriptor
- type Nestable
- type OneofDescriptorProto
- func (t *OneofDescriptorProto) Comments() *SourceCodeInfo_Location
- func (t *OneofDescriptorProto) Empty() bool
- func (t *OneofDescriptorProto) File() *FileDescriptorProto
- func (t *OneofDescriptorProto) GetName() (ret string)
- func (t *OneofDescriptorProto) GetOptions() (ret *OneofOptions)
- func (t *OneofDescriptorProto) Index() int
- func (t *OneofDescriptorProto) IsTopLevel() bool
- func (t *OneofDescriptorProto) LocationPath() LocationPath
- func (t *OneofDescriptorProto) MarshalJSON() (b []byte, err error)
- func (t *OneofDescriptorProto) Name() string
- func (t *OneofDescriptorProto) OneofDescriptorProto() *descriptorpb.OneofDescriptorProto
- func (t *OneofDescriptorProto) Options() *OneofOptions
- func (t *OneofDescriptorProto) Parent() DescriptorCommon
- func (t *OneofDescriptorProto) PbDescriptor() *descriptorpb.OneofDescriptorProto
- type OneofOptions
- func (t *OneofOptions) Comments() *SourceCodeInfo_Location
- func (t *OneofOptions) Empty() bool
- func (t *OneofOptions) File() *FileDescriptorProto
- func (t *OneofOptions) GetUninterpretedOption() (ret []*UninterpretedOption)
- func (t *OneofOptions) Index() int
- func (t *OneofOptions) IsTopLevel() bool
- func (t *OneofOptions) LocationPath() LocationPath
- func (t *OneofOptions) MarshalJSON() (b []byte, err error)
- func (t *OneofOptions) OneofOptions() *descriptorpb.OneofOptions
- func (t *OneofOptions) Parent() DescriptorCommon
- func (t *OneofOptions) PbDescriptor() *descriptorpb.OneofOptions
- func (t *OneofOptions) UninterpretedOption() []*UninterpretedOption
- type PbTypeInfo
- type ProtoType
- type ServiceDescriptorProto
- func (t *ServiceDescriptorProto) Comments() *SourceCodeInfo_Location
- func (t *ServiceDescriptorProto) Empty() bool
- func (t *ServiceDescriptorProto) File() *FileDescriptorProto
- func (t *ServiceDescriptorProto) GetMethod() (ret []*MethodDescriptorProto)
- func (t *ServiceDescriptorProto) GetName() (ret string)
- func (t *ServiceDescriptorProto) GetOptions() (ret *ServiceOptions)
- func (t *ServiceDescriptorProto) Index() int
- func (t *ServiceDescriptorProto) IsTopLevel() bool
- func (t *ServiceDescriptorProto) LocationPath() LocationPath
- func (t *ServiceDescriptorProto) MarshalJSON() (b []byte, err error)
- func (t *ServiceDescriptorProto) Method() []*MethodDescriptorProto
- func (t *ServiceDescriptorProto) Name() string
- func (t *ServiceDescriptorProto) Options() *ServiceOptions
- func (t *ServiceDescriptorProto) Parent() DescriptorCommon
- func (t *ServiceDescriptorProto) PbDescriptor() *descriptorpb.ServiceDescriptorProto
- func (t *ServiceDescriptorProto) ServiceDescriptorProto() *descriptorpb.ServiceDescriptorProto
- type ServiceOptions
- func (t *ServiceOptions) Comments() *SourceCodeInfo_Location
- func (t *ServiceOptions) Deprecated() bool
- func (t *ServiceOptions) Empty() bool
- func (t *ServiceOptions) File() *FileDescriptorProto
- func (t *ServiceOptions) GetDeprecated() (ret bool)
- func (t *ServiceOptions) GetUninterpretedOption() (ret []*UninterpretedOption)
- func (t *ServiceOptions) Index() int
- func (t *ServiceOptions) IsTopLevel() bool
- func (t *ServiceOptions) LocationPath() LocationPath
- func (t *ServiceOptions) MarshalJSON() (b []byte, err error)
- func (t *ServiceOptions) Parent() DescriptorCommon
- func (t *ServiceOptions) PbDescriptor() *descriptorpb.ServiceOptions
- func (t *ServiceOptions) ServiceOptions() *descriptorpb.ServiceOptions
- func (t *ServiceOptions) UninterpretedOption() []*UninterpretedOption
- type SourceCodeInfo
- func (t *SourceCodeInfo) Comments() *SourceCodeInfo_Location
- func (t *SourceCodeInfo) Empty() bool
- func (t *SourceCodeInfo) File() *FileDescriptorProto
- func (t *SourceCodeInfo) GetLocation() (ret []*SourceCodeInfo_Location)
- func (t *SourceCodeInfo) Index() int
- func (t *SourceCodeInfo) IsTopLevel() bool
- func (t *SourceCodeInfo) Location() []*SourceCodeInfo_Location
- func (t *SourceCodeInfo) LocationPath() LocationPath
- func (t *SourceCodeInfo) MarshalJSON() (b []byte, err error)
- func (t *SourceCodeInfo) Parent() DescriptorCommon
- func (t *SourceCodeInfo) PbDescriptor() *descriptorpb.SourceCodeInfo
- func (t *SourceCodeInfo) SourceCodeInfo() *descriptorpb.SourceCodeInfo
- type SourceCodeInfo_Location
- func (t *SourceCodeInfo_Location) Comments() *SourceCodeInfo_Location
- func (t *SourceCodeInfo_Location) Empty() bool
- func (t *SourceCodeInfo_Location) File() *FileDescriptorProto
- func (t *SourceCodeInfo_Location) GetLeadingComments() (ret string)
- func (t *SourceCodeInfo_Location) GetLeadingDetachedComments() (ret []string)
- func (t *SourceCodeInfo_Location) GetPath() (ret []int32)
- func (t *SourceCodeInfo_Location) GetSpan() (ret []int32)
- func (t *SourceCodeInfo_Location) GetTrailingComments() (ret string)
- func (t *SourceCodeInfo_Location) Index() int
- func (t *SourceCodeInfo_Location) IsTopLevel() bool
- func (t *SourceCodeInfo_Location) LeadingComments() string
- func (t *SourceCodeInfo_Location) LeadingDetachedComments() []string
- func (t *SourceCodeInfo_Location) LocationPath() LocationPath
- func (t *SourceCodeInfo_Location) MarshalJSON() (b []byte, err error)
- func (t *SourceCodeInfo_Location) Parent() DescriptorCommon
- func (t *SourceCodeInfo_Location) Path() []int32
- func (t *SourceCodeInfo_Location) PbDescriptor() *descriptorpb.SourceCodeInfo_Location
- func (t *SourceCodeInfo_Location) SourceCodeInfo_Location() *descriptorpb.SourceCodeInfo_Location
- func (t *SourceCodeInfo_Location) Span() []int32
- func (t *SourceCodeInfo_Location) String() string
- func (t *SourceCodeInfo_Location) TrailingComments() string
- type UninterpretedOption
- func (t *UninterpretedOption) AggregateValue() string
- func (t *UninterpretedOption) Comments() *SourceCodeInfo_Location
- func (t *UninterpretedOption) DoubleValue() float64
- func (t *UninterpretedOption) Empty() bool
- func (t *UninterpretedOption) File() *FileDescriptorProto
- func (t *UninterpretedOption) GetAggregateValue() (ret string)
- func (t *UninterpretedOption) GetDoubleValue() (ret float64)
- func (t *UninterpretedOption) GetIdentifierValue() (ret string)
- func (t *UninterpretedOption) GetName() (ret []*UninterpretedOption_NamePart)
- func (t *UninterpretedOption) GetNegativeIntValue() (ret int64)
- func (t *UninterpretedOption) GetPositiveIntValue() (ret uint64)
- func (t *UninterpretedOption) GetStringValue() (ret []byte)
- func (t *UninterpretedOption) IdentifierValue() string
- func (t *UninterpretedOption) Index() int
- func (t *UninterpretedOption) IsTopLevel() bool
- func (t *UninterpretedOption) LocationPath() LocationPath
- func (t *UninterpretedOption) MarshalJSON() (b []byte, err error)
- func (t *UninterpretedOption) Name() []*UninterpretedOption_NamePart
- func (t *UninterpretedOption) NegativeIntValue() int64
- func (t *UninterpretedOption) Parent() DescriptorCommon
- func (t *UninterpretedOption) PbDescriptor() *descriptorpb.UninterpretedOption
- func (t *UninterpretedOption) PositiveIntValue() uint64
- func (t *UninterpretedOption) StringValue() []byte
- func (t *UninterpretedOption) UninterpretedOption() *descriptorpb.UninterpretedOption
- type UninterpretedOption_NamePart
- func (t *UninterpretedOption_NamePart) Comments() *SourceCodeInfo_Location
- func (t *UninterpretedOption_NamePart) Empty() bool
- func (t *UninterpretedOption_NamePart) File() *FileDescriptorProto
- func (t *UninterpretedOption_NamePart) GetIsExtension() (ret bool)
- func (t *UninterpretedOption_NamePart) GetNamePart() (ret string)
- func (t *UninterpretedOption_NamePart) Index() int
- func (t *UninterpretedOption_NamePart) IsExtension() bool
- func (t *UninterpretedOption_NamePart) IsTopLevel() bool
- func (t *UninterpretedOption_NamePart) LocationPath() LocationPath
- func (t *UninterpretedOption_NamePart) MarshalJSON() (b []byte, err error)
- func (t *UninterpretedOption_NamePart) NamePart() string
- func (t *UninterpretedOption_NamePart) Parent() DescriptorCommon
- func (t *UninterpretedOption_NamePart) PbDescriptor() *descriptorpb.UninterpretedOption_NamePart
- func (t *UninterpretedOption_NamePart) UninterpretedOption_NamePart() *descriptorpb.UninterpretedOption_NamePart
Constants ¶
const ( // 0 is reserved for errors FieldDescriptorProto_LABEL_OPTIONAL = descriptorpb.FieldDescriptorProto_LABEL_OPTIONAL FieldDescriptorProto_LABEL_REQUIRED = descriptorpb.FieldDescriptorProto_LABEL_REQUIRED FieldDescriptorProto_LABEL_REPEATED = descriptorpb.FieldDescriptorProto_LABEL_REPEATED )
const ( // 0 is reserved for errors. // Order is weird for historical reasons. FieldDescriptorProto_TYPE_DOUBLE = descriptorpb.FieldDescriptorProto_TYPE_DOUBLE FieldDescriptorProto_TYPE_FLOAT = descriptorpb.FieldDescriptorProto_TYPE_FLOAT // Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if // negative values are likely. FieldDescriptorProto_TYPE_INT64 = descriptorpb.FieldDescriptorProto_TYPE_INT64 FieldDescriptorProto_TYPE_UINT64 = descriptorpb.FieldDescriptorProto_TYPE_UINT64 // Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if // negative values are likely. FieldDescriptorProto_TYPE_INT32 = descriptorpb.FieldDescriptorProto_TYPE_INT32 FieldDescriptorProto_TYPE_FIXED64 = descriptorpb.FieldDescriptorProto_TYPE_FIXED64 FieldDescriptorProto_TYPE_FIXED32 = descriptorpb.FieldDescriptorProto_TYPE_FIXED32 FieldDescriptorProto_TYPE_BOOL = descriptorpb.FieldDescriptorProto_TYPE_BOOL FieldDescriptorProto_TYPE_STRING = descriptorpb.FieldDescriptorProto_TYPE_STRING // Tag-delimited aggregate. // Group type is deprecated and not supported in proto3. However, Proto3 // implementations should still be able to parse the group wire format and // treat group fields as unknown fields. FieldDescriptorProto_TYPE_GROUP = descriptorpb.FieldDescriptorProto_TYPE_GROUP FieldDescriptorProto_TYPE_MESSAGE = descriptorpb.FieldDescriptorProto_TYPE_MESSAGE // Length-delimited aggregate. // New in version 2. FieldDescriptorProto_TYPE_BYTES = descriptorpb.FieldDescriptorProto_TYPE_BYTES FieldDescriptorProto_TYPE_UINT32 = descriptorpb.FieldDescriptorProto_TYPE_UINT32 FieldDescriptorProto_TYPE_ENUM = descriptorpb.FieldDescriptorProto_TYPE_ENUM FieldDescriptorProto_TYPE_SFIXED32 = descriptorpb.FieldDescriptorProto_TYPE_SFIXED32 FieldDescriptorProto_TYPE_SFIXED64 = descriptorpb.FieldDescriptorProto_TYPE_SFIXED64 FieldDescriptorProto_TYPE_SINT32 = descriptorpb.FieldDescriptorProto_TYPE_SINT32 // Uses ZigZag encoding. FieldDescriptorProto_TYPE_SINT64 = descriptorpb.FieldDescriptorProto_TYPE_SINT64 // Uses ZigZag encoding. )
const ( // Default mode. FieldOptions_STRING = descriptorpb.FieldOptions_STRING FieldOptions_CORD = descriptorpb.FieldOptions_CORD FieldOptions_STRING_PIECE = descriptorpb.FieldOptions_STRING_PIECE )
const ( // Use the default type. FieldOptions_JS_NORMAL = descriptorpb.FieldOptions_JS_NORMAL // Use JavaScript strings. FieldOptions_JS_STRING = descriptorpb.FieldOptions_JS_STRING // Use JavaScript numbers. FieldOptions_JS_NUMBER = descriptorpb.FieldOptions_JS_NUMBER )
const ( FileOptions_SPEED = descriptorpb.FileOptions_SPEED // Generate complete code for parsing, serialization, // etc. FileOptions_CODE_SIZE = descriptorpb.FileOptions_CODE_SIZE // Use ReflectionOps to implement these methods. FileOptions_LITE_RUNTIME = descriptorpb.FileOptions_LITE_RUNTIME // Generate code using MessageLite and the lite runtime. )
const ( MethodOptions_IDEMPOTENCY_UNKNOWN = descriptorpb.MethodOptions_IDEMPOTENCY_UNKNOWN MethodOptions_NO_SIDE_EFFECTS = descriptorpb.MethodOptions_NO_SIDE_EFFECTS // implies idempotent MethodOptions_IDEMPOTENT = descriptorpb.MethodOptions_IDEMPOTENT // idempotent, but may have side effects )
Variables ¶
var NestableDescriptors = []Nestable{ new(DescriptorProto), new(EnumDescriptorProto), }
implemented Nestable types
var ProtoTypeDescriptors = []ProtoType{ new(DescriptorProto), new(EnumDescriptorProto), }
implemented ProtoType types
Functions ¶
This section is empty.
Types ¶
type DescriptorCommon ¶
type DescriptorCommon interface { // 当前对象是否为空 Empty() bool // 当前对象所属文件 File() *FileDescriptorProto // 上级对象 // 除了 FileDescriptorProto ,其他对象的 Parent 都不为 nil // 如 Method 的上级必定为 Service // // 注意:top level 的 message/enum 的 Parent 为 File // 而嵌套(nested)的 message/enum 的 Parent 则为 message Parent() DescriptorCommon // 索引值 // 如 Field 在其 Message 的序号 // 默认为 -1 Index() int // 获取source中的注释信息 Comments() *SourceCodeInfo_Location // 获取 SourceCodeInfo.Location .Path LocationPath() LocationPath // 是否为顶级的消息 // 即 Parent = FileDescriptorProto IsTopLevel() bool }
每个结构都有的方法
type DescriptorProto ¶
type DescriptorProto struct {
// contains filtered or unexported fields
}
func (*DescriptorProto) Comments ¶
func (t *DescriptorProto) Comments() *SourceCodeInfo_Location
func (*DescriptorProto) DescriptorProto ¶
func (t *DescriptorProto) DescriptorProto() *descriptorpb.DescriptorProto
func (*DescriptorProto) Empty ¶
func (t *DescriptorProto) Empty() bool
func (*DescriptorProto) EnumType ¶
func (t *DescriptorProto) EnumType() []*EnumDescriptorProto
func (*DescriptorProto) Extension ¶
func (t *DescriptorProto) Extension() []*FieldDescriptorProto
func (*DescriptorProto) ExtensionRange ¶
func (t *DescriptorProto) ExtensionRange() []*DescriptorProto_ExtensionRange
func (*DescriptorProto) Field ¶
func (t *DescriptorProto) Field() []*FieldDescriptorProto
func (*DescriptorProto) File ¶
func (t *DescriptorProto) File() *FileDescriptorProto
func (*DescriptorProto) GetEnumType ¶
func (t *DescriptorProto) GetEnumType() (ret []*EnumDescriptorProto)
func (*DescriptorProto) GetExtension ¶
func (t *DescriptorProto) GetExtension() (ret []*FieldDescriptorProto)
func (*DescriptorProto) GetExtensionRange ¶
func (t *DescriptorProto) GetExtensionRange() (ret []*DescriptorProto_ExtensionRange)
func (*DescriptorProto) GetField ¶
func (t *DescriptorProto) GetField() (ret []*FieldDescriptorProto)
func (*DescriptorProto) GetName ¶
func (t *DescriptorProto) GetName() (ret string)
func (*DescriptorProto) GetNestedType ¶
func (t *DescriptorProto) GetNestedType() (ret []*DescriptorProto)
func (*DescriptorProto) GetOneofDecl ¶
func (t *DescriptorProto) GetOneofDecl() (ret []*OneofDescriptorProto)
func (*DescriptorProto) GetOptions ¶
func (t *DescriptorProto) GetOptions() (ret *MessageOptions)
func (*DescriptorProto) GetReservedName ¶
func (t *DescriptorProto) GetReservedName() (ret []string)
func (*DescriptorProto) GetReservedRange ¶
func (t *DescriptorProto) GetReservedRange() (ret []*DescriptorProto_ReservedRange)
func (*DescriptorProto) Index ¶
func (t *DescriptorProto) Index() int
func (*DescriptorProto) IsNested ¶
func (t *DescriptorProto) IsNested() bool
func (*DescriptorProto) IsTopLevel ¶
func (t *DescriptorProto) IsTopLevel() bool
implement DescriptorCommon.IsTopLevel
func (*DescriptorProto) LocationPath ¶
func (t *DescriptorProto) LocationPath() LocationPath
func (*DescriptorProto) MarshalJSON ¶
func (t *DescriptorProto) MarshalJSON() (b []byte, err error)
func (*DescriptorProto) Name ¶
func (t *DescriptorProto) Name() string
func (*DescriptorProto) NestedType ¶
func (t *DescriptorProto) NestedType() []*DescriptorProto
func (*DescriptorProto) OneofDecl ¶
func (t *DescriptorProto) OneofDecl() []*OneofDescriptorProto
func (*DescriptorProto) Options ¶
func (t *DescriptorProto) Options() *MessageOptions
func (*DescriptorProto) Parent ¶
func (t *DescriptorProto) Parent() DescriptorCommon
func (*DescriptorProto) ParentMessage ¶
func (t *DescriptorProto) ParentMessage() *DescriptorProto
func (*DescriptorProto) PbDescriptor ¶
func (t *DescriptorProto) PbDescriptor() *descriptorpb.DescriptorProto
func (*DescriptorProto) ProtoType ¶
func (t *DescriptorProto) ProtoType() *PbTypeInfo
func (*DescriptorProto) ReservedName ¶
func (t *DescriptorProto) ReservedName() []string
func (*DescriptorProto) ReservedRange ¶
func (t *DescriptorProto) ReservedRange() []*DescriptorProto_ReservedRange
type DescriptorProto_ExtensionRange ¶
type DescriptorProto_ExtensionRange struct {
// contains filtered or unexported fields
}
func (*DescriptorProto_ExtensionRange) Comments ¶
func (t *DescriptorProto_ExtensionRange) Comments() *SourceCodeInfo_Location
func (*DescriptorProto_ExtensionRange) DescriptorProto_ExtensionRange ¶
func (t *DescriptorProto_ExtensionRange) DescriptorProto_ExtensionRange() *descriptorpb.DescriptorProto_ExtensionRange
func (*DescriptorProto_ExtensionRange) Empty ¶
func (t *DescriptorProto_ExtensionRange) Empty() bool
func (*DescriptorProto_ExtensionRange) End ¶
func (t *DescriptorProto_ExtensionRange) End() int32
func (*DescriptorProto_ExtensionRange) File ¶
func (t *DescriptorProto_ExtensionRange) File() *FileDescriptorProto
func (*DescriptorProto_ExtensionRange) GetEnd ¶
func (t *DescriptorProto_ExtensionRange) GetEnd() (ret int32)
func (*DescriptorProto_ExtensionRange) GetOptions ¶
func (t *DescriptorProto_ExtensionRange) GetOptions() (ret *ExtensionRangeOptions)
func (*DescriptorProto_ExtensionRange) GetStart ¶
func (t *DescriptorProto_ExtensionRange) GetStart() (ret int32)
func (*DescriptorProto_ExtensionRange) Index ¶
func (t *DescriptorProto_ExtensionRange) Index() int
func (*DescriptorProto_ExtensionRange) IsTopLevel ¶
func (t *DescriptorProto_ExtensionRange) IsTopLevel() bool
implement DescriptorCommon.IsTopLevel
func (*DescriptorProto_ExtensionRange) LocationPath ¶
func (t *DescriptorProto_ExtensionRange) LocationPath() LocationPath
func (*DescriptorProto_ExtensionRange) MarshalJSON ¶
func (t *DescriptorProto_ExtensionRange) MarshalJSON() (b []byte, err error)
func (*DescriptorProto_ExtensionRange) Options ¶
func (t *DescriptorProto_ExtensionRange) Options() *ExtensionRangeOptions
func (*DescriptorProto_ExtensionRange) Parent ¶
func (t *DescriptorProto_ExtensionRange) Parent() DescriptorCommon
func (*DescriptorProto_ExtensionRange) PbDescriptor ¶
func (t *DescriptorProto_ExtensionRange) PbDescriptor() *descriptorpb.DescriptorProto_ExtensionRange
func (*DescriptorProto_ExtensionRange) Start ¶
func (t *DescriptorProto_ExtensionRange) Start() int32
type DescriptorProto_ReservedRange ¶
type DescriptorProto_ReservedRange struct {
// contains filtered or unexported fields
}
func (*DescriptorProto_ReservedRange) Comments ¶
func (t *DescriptorProto_ReservedRange) Comments() *SourceCodeInfo_Location
func (*DescriptorProto_ReservedRange) DescriptorProto_ReservedRange ¶
func (t *DescriptorProto_ReservedRange) DescriptorProto_ReservedRange() *descriptorpb.DescriptorProto_ReservedRange
func (*DescriptorProto_ReservedRange) Empty ¶
func (t *DescriptorProto_ReservedRange) Empty() bool
func (*DescriptorProto_ReservedRange) End ¶
func (t *DescriptorProto_ReservedRange) End() int32
func (*DescriptorProto_ReservedRange) File ¶
func (t *DescriptorProto_ReservedRange) File() *FileDescriptorProto
func (*DescriptorProto_ReservedRange) GetEnd ¶
func (t *DescriptorProto_ReservedRange) GetEnd() (ret int32)
func (*DescriptorProto_ReservedRange) GetStart ¶
func (t *DescriptorProto_ReservedRange) GetStart() (ret int32)
func (*DescriptorProto_ReservedRange) Index ¶
func (t *DescriptorProto_ReservedRange) Index() int
func (*DescriptorProto_ReservedRange) IsTopLevel ¶
func (t *DescriptorProto_ReservedRange) IsTopLevel() bool
implement DescriptorCommon.IsTopLevel
func (*DescriptorProto_ReservedRange) LocationPath ¶
func (t *DescriptorProto_ReservedRange) LocationPath() LocationPath
func (*DescriptorProto_ReservedRange) MarshalJSON ¶
func (t *DescriptorProto_ReservedRange) MarshalJSON() (b []byte, err error)
func (*DescriptorProto_ReservedRange) Parent ¶
func (t *DescriptorProto_ReservedRange) Parent() DescriptorCommon
func (*DescriptorProto_ReservedRange) PbDescriptor ¶
func (t *DescriptorProto_ReservedRange) PbDescriptor() *descriptorpb.DescriptorProto_ReservedRange
func (*DescriptorProto_ReservedRange) Start ¶
func (t *DescriptorProto_ReservedRange) Start() int32
type EnumDescriptorProto ¶
type EnumDescriptorProto struct {
// contains filtered or unexported fields
}
func (*EnumDescriptorProto) Comments ¶
func (t *EnumDescriptorProto) Comments() *SourceCodeInfo_Location
func (*EnumDescriptorProto) Empty ¶
func (t *EnumDescriptorProto) Empty() bool
func (*EnumDescriptorProto) EnumDescriptorProto ¶
func (t *EnumDescriptorProto) EnumDescriptorProto() *descriptorpb.EnumDescriptorProto
func (*EnumDescriptorProto) File ¶
func (t *EnumDescriptorProto) File() *FileDescriptorProto
func (*EnumDescriptorProto) GetName ¶
func (t *EnumDescriptorProto) GetName() (ret string)
func (*EnumDescriptorProto) GetOptions ¶
func (t *EnumDescriptorProto) GetOptions() (ret *EnumOptions)
func (*EnumDescriptorProto) GetReservedName ¶
func (t *EnumDescriptorProto) GetReservedName() (ret []string)
func (*EnumDescriptorProto) GetReservedRange ¶
func (t *EnumDescriptorProto) GetReservedRange() (ret []*EnumDescriptorProto_EnumReservedRange)
func (*EnumDescriptorProto) GetValue ¶
func (t *EnumDescriptorProto) GetValue() (ret []*EnumValueDescriptorProto)
func (*EnumDescriptorProto) Index ¶
func (t *EnumDescriptorProto) Index() int
func (*EnumDescriptorProto) IsNested ¶
func (t *EnumDescriptorProto) IsNested() bool
func (*EnumDescriptorProto) IsTopLevel ¶
func (t *EnumDescriptorProto) IsTopLevel() bool
implement DescriptorCommon.IsTopLevel
func (*EnumDescriptorProto) LocationPath ¶
func (t *EnumDescriptorProto) LocationPath() LocationPath
func (*EnumDescriptorProto) MarshalJSON ¶
func (t *EnumDescriptorProto) MarshalJSON() (b []byte, err error)
func (*EnumDescriptorProto) Name ¶
func (t *EnumDescriptorProto) Name() string
func (*EnumDescriptorProto) Options ¶
func (t *EnumDescriptorProto) Options() *EnumOptions
func (*EnumDescriptorProto) Parent ¶
func (t *EnumDescriptorProto) Parent() DescriptorCommon
func (*EnumDescriptorProto) ParentMessage ¶
func (t *EnumDescriptorProto) ParentMessage() *DescriptorProto
func (*EnumDescriptorProto) PbDescriptor ¶
func (t *EnumDescriptorProto) PbDescriptor() *descriptorpb.EnumDescriptorProto
func (*EnumDescriptorProto) ProtoType ¶
func (t *EnumDescriptorProto) ProtoType() *PbTypeInfo
func (*EnumDescriptorProto) ReservedName ¶
func (t *EnumDescriptorProto) ReservedName() []string
func (*EnumDescriptorProto) ReservedRange ¶
func (t *EnumDescriptorProto) ReservedRange() []*EnumDescriptorProto_EnumReservedRange
func (*EnumDescriptorProto) Value ¶
func (t *EnumDescriptorProto) Value() []*EnumValueDescriptorProto
type EnumDescriptorProto_EnumReservedRange ¶
type EnumDescriptorProto_EnumReservedRange struct {
// contains filtered or unexported fields
}
func (*EnumDescriptorProto_EnumReservedRange) Comments ¶
func (t *EnumDescriptorProto_EnumReservedRange) Comments() *SourceCodeInfo_Location
func (*EnumDescriptorProto_EnumReservedRange) Empty ¶
func (t *EnumDescriptorProto_EnumReservedRange) Empty() bool
func (*EnumDescriptorProto_EnumReservedRange) End ¶
func (t *EnumDescriptorProto_EnumReservedRange) End() int32
func (*EnumDescriptorProto_EnumReservedRange) EnumDescriptorProto_EnumReservedRange ¶
func (t *EnumDescriptorProto_EnumReservedRange) EnumDescriptorProto_EnumReservedRange() *descriptorpb.EnumDescriptorProto_EnumReservedRange
func (*EnumDescriptorProto_EnumReservedRange) File ¶
func (t *EnumDescriptorProto_EnumReservedRange) File() *FileDescriptorProto
func (*EnumDescriptorProto_EnumReservedRange) GetEnd ¶
func (t *EnumDescriptorProto_EnumReservedRange) GetEnd() (ret int32)
func (*EnumDescriptorProto_EnumReservedRange) GetStart ¶
func (t *EnumDescriptorProto_EnumReservedRange) GetStart() (ret int32)
func (*EnumDescriptorProto_EnumReservedRange) Index ¶
func (t *EnumDescriptorProto_EnumReservedRange) Index() int
func (*EnumDescriptorProto_EnumReservedRange) IsTopLevel ¶
func (t *EnumDescriptorProto_EnumReservedRange) IsTopLevel() bool
implement DescriptorCommon.IsTopLevel
func (*EnumDescriptorProto_EnumReservedRange) LocationPath ¶
func (t *EnumDescriptorProto_EnumReservedRange) LocationPath() LocationPath
func (*EnumDescriptorProto_EnumReservedRange) MarshalJSON ¶
func (t *EnumDescriptorProto_EnumReservedRange) MarshalJSON() (b []byte, err error)
func (*EnumDescriptorProto_EnumReservedRange) Parent ¶
func (t *EnumDescriptorProto_EnumReservedRange) Parent() DescriptorCommon
func (*EnumDescriptorProto_EnumReservedRange) PbDescriptor ¶
func (t *EnumDescriptorProto_EnumReservedRange) PbDescriptor() *descriptorpb.EnumDescriptorProto_EnumReservedRange
func (*EnumDescriptorProto_EnumReservedRange) Start ¶
func (t *EnumDescriptorProto_EnumReservedRange) Start() int32
type EnumOptions ¶
type EnumOptions struct {
// contains filtered or unexported fields
}
func (*EnumOptions) AllowAlias ¶
func (t *EnumOptions) AllowAlias() bool
func (*EnumOptions) Comments ¶
func (t *EnumOptions) Comments() *SourceCodeInfo_Location
func (*EnumOptions) Deprecated ¶
func (t *EnumOptions) Deprecated() bool
func (*EnumOptions) Empty ¶
func (t *EnumOptions) Empty() bool
func (*EnumOptions) EnumOptions ¶
func (t *EnumOptions) EnumOptions() *descriptorpb.EnumOptions
func (*EnumOptions) File ¶
func (t *EnumOptions) File() *FileDescriptorProto
func (*EnumOptions) GetAllowAlias ¶
func (t *EnumOptions) GetAllowAlias() (ret bool)
func (*EnumOptions) GetDeprecated ¶
func (t *EnumOptions) GetDeprecated() (ret bool)
func (*EnumOptions) GetUninterpretedOption ¶
func (t *EnumOptions) GetUninterpretedOption() (ret []*UninterpretedOption)
func (*EnumOptions) Index ¶
func (t *EnumOptions) Index() int
func (*EnumOptions) IsTopLevel ¶
func (t *EnumOptions) IsTopLevel() bool
implement DescriptorCommon.IsTopLevel
func (*EnumOptions) LocationPath ¶
func (t *EnumOptions) LocationPath() LocationPath
func (*EnumOptions) MarshalJSON ¶
func (t *EnumOptions) MarshalJSON() (b []byte, err error)
func (*EnumOptions) Parent ¶
func (t *EnumOptions) Parent() DescriptorCommon
func (*EnumOptions) PbDescriptor ¶
func (t *EnumOptions) PbDescriptor() *descriptorpb.EnumOptions
func (*EnumOptions) UninterpretedOption ¶
func (t *EnumOptions) UninterpretedOption() []*UninterpretedOption
type EnumValueDescriptorProto ¶
type EnumValueDescriptorProto struct {
// contains filtered or unexported fields
}
func (*EnumValueDescriptorProto) Comments ¶
func (t *EnumValueDescriptorProto) Comments() *SourceCodeInfo_Location
func (*EnumValueDescriptorProto) Empty ¶
func (t *EnumValueDescriptorProto) Empty() bool
func (*EnumValueDescriptorProto) EnumValueDescriptorProto ¶
func (t *EnumValueDescriptorProto) EnumValueDescriptorProto() *descriptorpb.EnumValueDescriptorProto
func (*EnumValueDescriptorProto) File ¶
func (t *EnumValueDescriptorProto) File() *FileDescriptorProto
func (*EnumValueDescriptorProto) GetName ¶
func (t *EnumValueDescriptorProto) GetName() (ret string)
func (*EnumValueDescriptorProto) GetNumber ¶
func (t *EnumValueDescriptorProto) GetNumber() (ret int32)
func (*EnumValueDescriptorProto) GetOptions ¶
func (t *EnumValueDescriptorProto) GetOptions() (ret *EnumValueOptions)
func (*EnumValueDescriptorProto) Index ¶
func (t *EnumValueDescriptorProto) Index() int
func (*EnumValueDescriptorProto) IsTopLevel ¶
func (t *EnumValueDescriptorProto) IsTopLevel() bool
implement DescriptorCommon.IsTopLevel
func (*EnumValueDescriptorProto) LocationPath ¶
func (t *EnumValueDescriptorProto) LocationPath() LocationPath
func (*EnumValueDescriptorProto) MarshalJSON ¶
func (t *EnumValueDescriptorProto) MarshalJSON() (b []byte, err error)
func (*EnumValueDescriptorProto) Name ¶
func (t *EnumValueDescriptorProto) Name() string
func (*EnumValueDescriptorProto) Number ¶
func (t *EnumValueDescriptorProto) Number() int32
func (*EnumValueDescriptorProto) Options ¶
func (t *EnumValueDescriptorProto) Options() *EnumValueOptions
func (*EnumValueDescriptorProto) Parent ¶
func (t *EnumValueDescriptorProto) Parent() DescriptorCommon
func (*EnumValueDescriptorProto) PbDescriptor ¶
func (t *EnumValueDescriptorProto) PbDescriptor() *descriptorpb.EnumValueDescriptorProto
type EnumValueOptions ¶
type EnumValueOptions struct {
// contains filtered or unexported fields
}
func (*EnumValueOptions) Comments ¶
func (t *EnumValueOptions) Comments() *SourceCodeInfo_Location
func (*EnumValueOptions) Deprecated ¶
func (t *EnumValueOptions) Deprecated() bool
func (*EnumValueOptions) Empty ¶
func (t *EnumValueOptions) Empty() bool
func (*EnumValueOptions) EnumValueOptions ¶
func (t *EnumValueOptions) EnumValueOptions() *descriptorpb.EnumValueOptions
func (*EnumValueOptions) File ¶
func (t *EnumValueOptions) File() *FileDescriptorProto
func (*EnumValueOptions) GetDeprecated ¶
func (t *EnumValueOptions) GetDeprecated() (ret bool)
func (*EnumValueOptions) GetUninterpretedOption ¶
func (t *EnumValueOptions) GetUninterpretedOption() (ret []*UninterpretedOption)
func (*EnumValueOptions) Index ¶
func (t *EnumValueOptions) Index() int
func (*EnumValueOptions) IsTopLevel ¶
func (t *EnumValueOptions) IsTopLevel() bool
implement DescriptorCommon.IsTopLevel
func (*EnumValueOptions) LocationPath ¶
func (t *EnumValueOptions) LocationPath() LocationPath
func (*EnumValueOptions) MarshalJSON ¶
func (t *EnumValueOptions) MarshalJSON() (b []byte, err error)
func (*EnumValueOptions) Parent ¶
func (t *EnumValueOptions) Parent() DescriptorCommon
func (*EnumValueOptions) PbDescriptor ¶
func (t *EnumValueOptions) PbDescriptor() *descriptorpb.EnumValueOptions
func (*EnumValueOptions) UninterpretedOption ¶
func (t *EnumValueOptions) UninterpretedOption() []*UninterpretedOption
type ExtensionRangeOptions ¶
type ExtensionRangeOptions struct {
// contains filtered or unexported fields
}
func (*ExtensionRangeOptions) Comments ¶
func (t *ExtensionRangeOptions) Comments() *SourceCodeInfo_Location
func (*ExtensionRangeOptions) Empty ¶
func (t *ExtensionRangeOptions) Empty() bool
func (*ExtensionRangeOptions) ExtensionRangeOptions ¶
func (t *ExtensionRangeOptions) ExtensionRangeOptions() *descriptorpb.ExtensionRangeOptions
func (*ExtensionRangeOptions) File ¶
func (t *ExtensionRangeOptions) File() *FileDescriptorProto
func (*ExtensionRangeOptions) GetUninterpretedOption ¶
func (t *ExtensionRangeOptions) GetUninterpretedOption() (ret []*UninterpretedOption)
func (*ExtensionRangeOptions) Index ¶
func (t *ExtensionRangeOptions) Index() int
func (*ExtensionRangeOptions) IsTopLevel ¶
func (t *ExtensionRangeOptions) IsTopLevel() bool
implement DescriptorCommon.IsTopLevel
func (*ExtensionRangeOptions) LocationPath ¶
func (t *ExtensionRangeOptions) LocationPath() LocationPath
func (*ExtensionRangeOptions) MarshalJSON ¶
func (t *ExtensionRangeOptions) MarshalJSON() (b []byte, err error)
func (*ExtensionRangeOptions) Parent ¶
func (t *ExtensionRangeOptions) Parent() DescriptorCommon
func (*ExtensionRangeOptions) PbDescriptor ¶
func (t *ExtensionRangeOptions) PbDescriptor() *descriptorpb.ExtensionRangeOptions
func (*ExtensionRangeOptions) UninterpretedOption ¶
func (t *ExtensionRangeOptions) UninterpretedOption() []*UninterpretedOption
type FieldDescriptorProto ¶
type FieldDescriptorProto struct {
// contains filtered or unexported fields
}
func (*FieldDescriptorProto) Comments ¶
func (t *FieldDescriptorProto) Comments() *SourceCodeInfo_Location
func (*FieldDescriptorProto) DefaultValue ¶
func (t *FieldDescriptorProto) DefaultValue() string
func (*FieldDescriptorProto) Empty ¶
func (t *FieldDescriptorProto) Empty() bool
func (*FieldDescriptorProto) Extendee ¶
func (t *FieldDescriptorProto) Extendee() string
func (*FieldDescriptorProto) FieldDescriptorProto ¶
func (t *FieldDescriptorProto) FieldDescriptorProto() *descriptorpb.FieldDescriptorProto
func (*FieldDescriptorProto) File ¶
func (t *FieldDescriptorProto) File() *FileDescriptorProto
func (*FieldDescriptorProto) GetDefaultValue ¶
func (t *FieldDescriptorProto) GetDefaultValue() (ret string)
func (*FieldDescriptorProto) GetExtendee ¶
func (t *FieldDescriptorProto) GetExtendee() (ret string)
func (*FieldDescriptorProto) GetJsonName ¶
func (t *FieldDescriptorProto) GetJsonName() (ret string)
func (*FieldDescriptorProto) GetLabel ¶
func (t *FieldDescriptorProto) GetLabel() (ret FieldDescriptorProto_Label)
func (*FieldDescriptorProto) GetName ¶
func (t *FieldDescriptorProto) GetName() (ret string)
func (*FieldDescriptorProto) GetNumber ¶
func (t *FieldDescriptorProto) GetNumber() (ret int32)
func (*FieldDescriptorProto) GetOneofIndex ¶
func (t *FieldDescriptorProto) GetOneofIndex() (ret int32)
func (*FieldDescriptorProto) GetOptions ¶
func (t *FieldDescriptorProto) GetOptions() (ret *FieldOptions)
func (*FieldDescriptorProto) GetType ¶
func (t *FieldDescriptorProto) GetType() (ret FieldDescriptorProto_Type)
func (*FieldDescriptorProto) GetTypeName ¶
func (t *FieldDescriptorProto) GetTypeName() (ret string)
func (*FieldDescriptorProto) Index ¶
func (t *FieldDescriptorProto) Index() int
func (*FieldDescriptorProto) IsOptional ¶
func (t *FieldDescriptorProto) IsOptional() bool
func (*FieldDescriptorProto) IsRepeated ¶
func (t *FieldDescriptorProto) IsRepeated() bool
func (*FieldDescriptorProto) IsRequired ¶
func (t *FieldDescriptorProto) IsRequired() bool
func (*FieldDescriptorProto) IsTopLevel ¶
func (t *FieldDescriptorProto) IsTopLevel() bool
implement DescriptorCommon.IsTopLevel
func (*FieldDescriptorProto) JsonName ¶
func (t *FieldDescriptorProto) JsonName() string
func (*FieldDescriptorProto) Label ¶
func (t *FieldDescriptorProto) Label() FieldDescriptorProto_Label
func (*FieldDescriptorProto) LocationPath ¶
func (t *FieldDescriptorProto) LocationPath() LocationPath
func (*FieldDescriptorProto) MarshalJSON ¶
func (t *FieldDescriptorProto) MarshalJSON() (b []byte, err error)
func (*FieldDescriptorProto) Name ¶
func (t *FieldDescriptorProto) Name() string
func (*FieldDescriptorProto) Number ¶
func (t *FieldDescriptorProto) Number() int32
func (*FieldDescriptorProto) OneofIndex ¶
func (t *FieldDescriptorProto) OneofIndex() int32
func (*FieldDescriptorProto) Options ¶
func (t *FieldDescriptorProto) Options() *FieldOptions
func (*FieldDescriptorProto) Parent ¶
func (t *FieldDescriptorProto) Parent() DescriptorCommon
func (*FieldDescriptorProto) PbDescriptor ¶
func (t *FieldDescriptorProto) PbDescriptor() *descriptorpb.FieldDescriptorProto
func (*FieldDescriptorProto) Type ¶
func (t *FieldDescriptorProto) Type() FieldDescriptorProto_Type
func (*FieldDescriptorProto) TypeName ¶
func (t *FieldDescriptorProto) TypeName() string
type FieldDescriptorProto_Label ¶
type FieldDescriptorProto_Label = descriptorpb.FieldDescriptorProto_Label
FieldDescriptorProto_Label
See descriptorpb.FieldDescriptorProto_Label
type FieldDescriptorProto_Type ¶
type FieldDescriptorProto_Type = descriptorpb.FieldDescriptorProto_Type
FieldDescriptorProto_Type
See descriptorpb.FieldDescriptorProto_Type
type FieldOptions ¶
type FieldOptions struct {
// contains filtered or unexported fields
}
func (*FieldOptions) Comments ¶
func (t *FieldOptions) Comments() *SourceCodeInfo_Location
func (*FieldOptions) Ctype ¶
func (t *FieldOptions) Ctype() FieldOptions_CType
func (*FieldOptions) Deprecated ¶
func (t *FieldOptions) Deprecated() bool
func (*FieldOptions) Empty ¶
func (t *FieldOptions) Empty() bool
func (*FieldOptions) FieldOptions ¶
func (t *FieldOptions) FieldOptions() *descriptorpb.FieldOptions
func (*FieldOptions) File ¶
func (t *FieldOptions) File() *FileDescriptorProto
func (*FieldOptions) GetCtype ¶
func (t *FieldOptions) GetCtype() (ret FieldOptions_CType)
func (*FieldOptions) GetDeprecated ¶
func (t *FieldOptions) GetDeprecated() (ret bool)
func (*FieldOptions) GetJstype ¶
func (t *FieldOptions) GetJstype() (ret FieldOptions_JSType)
func (*FieldOptions) GetLazy ¶
func (t *FieldOptions) GetLazy() (ret bool)
func (*FieldOptions) GetPacked ¶
func (t *FieldOptions) GetPacked() (ret bool)
func (*FieldOptions) GetUninterpretedOption ¶
func (t *FieldOptions) GetUninterpretedOption() (ret []*UninterpretedOption)
func (*FieldOptions) GetWeak ¶
func (t *FieldOptions) GetWeak() (ret bool)
func (*FieldOptions) Index ¶
func (t *FieldOptions) Index() int
func (*FieldOptions) IsTopLevel ¶
func (t *FieldOptions) IsTopLevel() bool
implement DescriptorCommon.IsTopLevel
func (*FieldOptions) Jstype ¶
func (t *FieldOptions) Jstype() FieldOptions_JSType
func (*FieldOptions) Lazy ¶
func (t *FieldOptions) Lazy() bool
func (*FieldOptions) LocationPath ¶
func (t *FieldOptions) LocationPath() LocationPath
func (*FieldOptions) MarshalJSON ¶
func (t *FieldOptions) MarshalJSON() (b []byte, err error)
func (*FieldOptions) Packed ¶
func (t *FieldOptions) Packed() bool
func (*FieldOptions) Parent ¶
func (t *FieldOptions) Parent() DescriptorCommon
func (*FieldOptions) PbDescriptor ¶
func (t *FieldOptions) PbDescriptor() *descriptorpb.FieldOptions
func (*FieldOptions) UninterpretedOption ¶
func (t *FieldOptions) UninterpretedOption() []*UninterpretedOption
func (*FieldOptions) Weak ¶
func (t *FieldOptions) Weak() bool
type FieldOptions_CType ¶
type FieldOptions_CType = descriptorpb.FieldOptions_CType
FieldOptions_CType
See descriptorpb.FieldOptions_CType
type FieldOptions_JSType ¶
type FieldOptions_JSType = descriptorpb.FieldOptions_JSType
FieldOptions_JSType
See descriptorpb.FieldOptions_JSType
type FileDescriptorProto ¶
type FileDescriptorProto struct {
// contains filtered or unexported fields
}
func NewFileDescriptorProto ¶
func NewFileDescriptorProto(file *descriptor.FileDescriptorProto) *FileDescriptorProto
//////////////////////////////////////////////////////////////////// NewFileDescriptorProto 是唯一允许公开的构造器
func (*FileDescriptorProto) Comments ¶
func (t *FileDescriptorProto) Comments() *SourceCodeInfo_Location
func (*FileDescriptorProto) Dependency ¶
func (t *FileDescriptorProto) Dependency() []string
func (*FileDescriptorProto) Empty ¶
func (t *FileDescriptorProto) Empty() bool
func (*FileDescriptorProto) EnumType ¶
func (t *FileDescriptorProto) EnumType() []*EnumDescriptorProto
func (*FileDescriptorProto) Extension ¶
func (t *FileDescriptorProto) Extension() []*FieldDescriptorProto
func (*FileDescriptorProto) File ¶
func (t *FileDescriptorProto) File() *FileDescriptorProto
func (*FileDescriptorProto) FileDescriptorProto ¶
func (t *FileDescriptorProto) FileDescriptorProto() *descriptorpb.FileDescriptorProto
func (*FileDescriptorProto) GetDependency ¶
func (t *FileDescriptorProto) GetDependency() (ret []string)
func (*FileDescriptorProto) GetEnumType ¶
func (t *FileDescriptorProto) GetEnumType() (ret []*EnumDescriptorProto)
func (*FileDescriptorProto) GetExtension ¶
func (t *FileDescriptorProto) GetExtension() (ret []*FieldDescriptorProto)
func (*FileDescriptorProto) GetMessageType ¶
func (t *FileDescriptorProto) GetMessageType() (ret []*DescriptorProto)
func (*FileDescriptorProto) GetName ¶
func (t *FileDescriptorProto) GetName() (ret string)
func (*FileDescriptorProto) GetOptions ¶
func (t *FileDescriptorProto) GetOptions() (ret *FileOptions)
func (*FileDescriptorProto) GetPackage ¶
func (t *FileDescriptorProto) GetPackage() (ret string)
func (*FileDescriptorProto) GetPublicDependency ¶
func (t *FileDescriptorProto) GetPublicDependency() (ret []int32)
func (*FileDescriptorProto) GetService ¶
func (t *FileDescriptorProto) GetService() (ret []*ServiceDescriptorProto)
func (*FileDescriptorProto) GetSourceCodeInfo ¶
func (t *FileDescriptorProto) GetSourceCodeInfo() (ret *SourceCodeInfo)
func (*FileDescriptorProto) GetSyntax ¶
func (t *FileDescriptorProto) GetSyntax() (ret string)
func (*FileDescriptorProto) GetWeakDependency ¶
func (t *FileDescriptorProto) GetWeakDependency() (ret []int32)
func (*FileDescriptorProto) Index ¶
func (t *FileDescriptorProto) Index() int
func (*FileDescriptorProto) IsProto2 ¶
func (t *FileDescriptorProto) IsProto2() bool
func (*FileDescriptorProto) IsProto3 ¶
func (t *FileDescriptorProto) IsProto3() bool
func (*FileDescriptorProto) IsTopLevel ¶
func (t *FileDescriptorProto) IsTopLevel() bool
implement DescriptorCommon.IsTopLevel
func (*FileDescriptorProto) LocationPath ¶
func (t *FileDescriptorProto) LocationPath() LocationPath
func (*FileDescriptorProto) MarshalJSON ¶
func (t *FileDescriptorProto) MarshalJSON() (b []byte, err error)
func (*FileDescriptorProto) MessageType ¶
func (t *FileDescriptorProto) MessageType() []*DescriptorProto
func (*FileDescriptorProto) Name ¶
func (t *FileDescriptorProto) Name() string
func (*FileDescriptorProto) Options ¶
func (t *FileDescriptorProto) Options() *FileOptions
func (*FileDescriptorProto) Package ¶
func (t *FileDescriptorProto) Package() string
func (*FileDescriptorProto) Parent ¶
func (t *FileDescriptorProto) Parent() DescriptorCommon
func (*FileDescriptorProto) PbDescriptor ¶
func (t *FileDescriptorProto) PbDescriptor() *descriptorpb.FileDescriptorProto
func (*FileDescriptorProto) PublicDependency ¶
func (t *FileDescriptorProto) PublicDependency() []int32
func (*FileDescriptorProto) Service ¶
func (t *FileDescriptorProto) Service() []*ServiceDescriptorProto
func (*FileDescriptorProto) SourceCodeInfo ¶
func (t *FileDescriptorProto) SourceCodeInfo() *SourceCodeInfo
func (*FileDescriptorProto) Syntax ¶
func (t *FileDescriptorProto) Syntax() string
func (*FileDescriptorProto) WeakDependency ¶
func (t *FileDescriptorProto) WeakDependency() []int32
type FileOptions ¶
type FileOptions struct {
// contains filtered or unexported fields
}
func (*FileOptions) CcEnableArenas ¶
func (t *FileOptions) CcEnableArenas() bool
func (*FileOptions) CcGenericServices ¶
func (t *FileOptions) CcGenericServices() bool
func (*FileOptions) Comments ¶
func (t *FileOptions) Comments() *SourceCodeInfo_Location
func (*FileOptions) CsharpNamespace ¶
func (t *FileOptions) CsharpNamespace() string
func (*FileOptions) Deprecated ¶
func (t *FileOptions) Deprecated() bool
func (*FileOptions) Empty ¶
func (t *FileOptions) Empty() bool
func (*FileOptions) File ¶
func (t *FileOptions) File() *FileDescriptorProto
func (*FileOptions) FileOptions ¶
func (t *FileOptions) FileOptions() *descriptorpb.FileOptions
func (*FileOptions) GetCcEnableArenas ¶
func (t *FileOptions) GetCcEnableArenas() (ret bool)
func (*FileOptions) GetCcGenericServices ¶
func (t *FileOptions) GetCcGenericServices() (ret bool)
func (*FileOptions) GetCsharpNamespace ¶
func (t *FileOptions) GetCsharpNamespace() (ret string)
func (*FileOptions) GetDeprecated ¶
func (t *FileOptions) GetDeprecated() (ret bool)
func (*FileOptions) GetGoPackage ¶
func (t *FileOptions) GetGoPackage() (ret string)
func (*FileOptions) GetJavaGenerateEqualsAndHash ¶
func (t *FileOptions) GetJavaGenerateEqualsAndHash() (ret bool)
func (*FileOptions) GetJavaGenericServices ¶
func (t *FileOptions) GetJavaGenericServices() (ret bool)
func (*FileOptions) GetJavaMultipleFiles ¶
func (t *FileOptions) GetJavaMultipleFiles() (ret bool)
func (*FileOptions) GetJavaOuterClassname ¶
func (t *FileOptions) GetJavaOuterClassname() (ret string)
func (*FileOptions) GetJavaPackage ¶
func (t *FileOptions) GetJavaPackage() (ret string)
func (*FileOptions) GetJavaStringCheckUtf8 ¶
func (t *FileOptions) GetJavaStringCheckUtf8() (ret bool)
func (*FileOptions) GetObjcClassPrefix ¶
func (t *FileOptions) GetObjcClassPrefix() (ret string)
func (*FileOptions) GetOptimizeFor ¶
func (t *FileOptions) GetOptimizeFor() (ret FileOptions_OptimizeMode)
func (*FileOptions) GetPhpClassPrefix ¶
func (t *FileOptions) GetPhpClassPrefix() (ret string)
func (*FileOptions) GetPhpGenericServices ¶
func (t *FileOptions) GetPhpGenericServices() (ret bool)
func (*FileOptions) GetPhpMetadataNamespace ¶
func (t *FileOptions) GetPhpMetadataNamespace() (ret string)
func (*FileOptions) GetPhpNamespace ¶
func (t *FileOptions) GetPhpNamespace() (ret string)
func (*FileOptions) GetPyGenericServices ¶
func (t *FileOptions) GetPyGenericServices() (ret bool)
func (*FileOptions) GetRubyPackage ¶
func (t *FileOptions) GetRubyPackage() (ret string)
func (*FileOptions) GetSwiftPrefix ¶
func (t *FileOptions) GetSwiftPrefix() (ret string)
func (*FileOptions) GetUninterpretedOption ¶
func (t *FileOptions) GetUninterpretedOption() (ret []*UninterpretedOption)
func (*FileOptions) GoPackage ¶
func (t *FileOptions) GoPackage() string
func (*FileOptions) Index ¶
func (t *FileOptions) Index() int
func (*FileOptions) IsTopLevel ¶
func (t *FileOptions) IsTopLevel() bool
implement DescriptorCommon.IsTopLevel
func (*FileOptions) JavaGenerateEqualsAndHash ¶
func (t *FileOptions) JavaGenerateEqualsAndHash() bool
func (*FileOptions) JavaGenericServices ¶
func (t *FileOptions) JavaGenericServices() bool
func (*FileOptions) JavaMultipleFiles ¶
func (t *FileOptions) JavaMultipleFiles() bool
func (*FileOptions) JavaOuterClassname ¶
func (t *FileOptions) JavaOuterClassname() string
func (*FileOptions) JavaPackage ¶
func (t *FileOptions) JavaPackage() string
func (*FileOptions) JavaStringCheckUtf8 ¶
func (t *FileOptions) JavaStringCheckUtf8() bool
func (*FileOptions) LocationPath ¶
func (t *FileOptions) LocationPath() LocationPath
func (*FileOptions) MarshalJSON ¶
func (t *FileOptions) MarshalJSON() (b []byte, err error)
func (*FileOptions) ObjcClassPrefix ¶
func (t *FileOptions) ObjcClassPrefix() string
func (*FileOptions) OptimizeFor ¶
func (t *FileOptions) OptimizeFor() FileOptions_OptimizeMode
func (*FileOptions) Parent ¶
func (t *FileOptions) Parent() DescriptorCommon
func (*FileOptions) PbDescriptor ¶
func (t *FileOptions) PbDescriptor() *descriptorpb.FileOptions
func (*FileOptions) PhpClassPrefix ¶
func (t *FileOptions) PhpClassPrefix() string
func (*FileOptions) PhpGenericServices ¶
func (t *FileOptions) PhpGenericServices() bool
func (*FileOptions) PhpMetadataNamespace ¶
func (t *FileOptions) PhpMetadataNamespace() string
func (*FileOptions) PhpNamespace ¶
func (t *FileOptions) PhpNamespace() string
func (*FileOptions) PyGenericServices ¶
func (t *FileOptions) PyGenericServices() bool
func (*FileOptions) RubyPackage ¶
func (t *FileOptions) RubyPackage() string
func (*FileOptions) SwiftPrefix ¶
func (t *FileOptions) SwiftPrefix() string
func (*FileOptions) UninterpretedOption ¶
func (t *FileOptions) UninterpretedOption() []*UninterpretedOption
type FileOptions_OptimizeMode ¶
type FileOptions_OptimizeMode = descriptorpb.FileOptions_OptimizeMode
FileOptions_OptimizeMode
See descriptorpb.FileOptions_OptimizeMode
Generated classes can be optimized for speed or code size.
type GeneratedCodeInfo ¶
type GeneratedCodeInfo struct {
// contains filtered or unexported fields
}
func (*GeneratedCodeInfo) Annotation ¶
func (t *GeneratedCodeInfo) Annotation() []*GeneratedCodeInfo_Annotation
func (*GeneratedCodeInfo) Comments ¶
func (t *GeneratedCodeInfo) Comments() *SourceCodeInfo_Location
func (*GeneratedCodeInfo) Empty ¶
func (t *GeneratedCodeInfo) Empty() bool
func (*GeneratedCodeInfo) File ¶
func (t *GeneratedCodeInfo) File() *FileDescriptorProto
func (*GeneratedCodeInfo) GeneratedCodeInfo ¶
func (t *GeneratedCodeInfo) GeneratedCodeInfo() *descriptorpb.GeneratedCodeInfo
func (*GeneratedCodeInfo) GetAnnotation ¶
func (t *GeneratedCodeInfo) GetAnnotation() (ret []*GeneratedCodeInfo_Annotation)
func (*GeneratedCodeInfo) Index ¶
func (t *GeneratedCodeInfo) Index() int
func (*GeneratedCodeInfo) IsTopLevel ¶
func (t *GeneratedCodeInfo) IsTopLevel() bool
implement DescriptorCommon.IsTopLevel
func (*GeneratedCodeInfo) LocationPath ¶
func (t *GeneratedCodeInfo) LocationPath() LocationPath
func (*GeneratedCodeInfo) MarshalJSON ¶
func (t *GeneratedCodeInfo) MarshalJSON() (b []byte, err error)
func (*GeneratedCodeInfo) Parent ¶
func (t *GeneratedCodeInfo) Parent() DescriptorCommon
func (*GeneratedCodeInfo) PbDescriptor ¶
func (t *GeneratedCodeInfo) PbDescriptor() *descriptorpb.GeneratedCodeInfo
type GeneratedCodeInfo_Annotation ¶
type GeneratedCodeInfo_Annotation struct {
// contains filtered or unexported fields
}
func (*GeneratedCodeInfo_Annotation) Begin ¶
func (t *GeneratedCodeInfo_Annotation) Begin() int32
func (*GeneratedCodeInfo_Annotation) Comments ¶
func (t *GeneratedCodeInfo_Annotation) Comments() *SourceCodeInfo_Location
func (*GeneratedCodeInfo_Annotation) Empty ¶
func (t *GeneratedCodeInfo_Annotation) Empty() bool
func (*GeneratedCodeInfo_Annotation) End ¶
func (t *GeneratedCodeInfo_Annotation) End() int32
func (*GeneratedCodeInfo_Annotation) File ¶
func (t *GeneratedCodeInfo_Annotation) File() *FileDescriptorProto
func (*GeneratedCodeInfo_Annotation) GeneratedCodeInfo_Annotation ¶
func (t *GeneratedCodeInfo_Annotation) GeneratedCodeInfo_Annotation() *descriptorpb.GeneratedCodeInfo_Annotation
func (*GeneratedCodeInfo_Annotation) GetBegin ¶
func (t *GeneratedCodeInfo_Annotation) GetBegin() (ret int32)
func (*GeneratedCodeInfo_Annotation) GetEnd ¶
func (t *GeneratedCodeInfo_Annotation) GetEnd() (ret int32)
func (*GeneratedCodeInfo_Annotation) GetPath ¶
func (t *GeneratedCodeInfo_Annotation) GetPath() (ret []int32)
func (*GeneratedCodeInfo_Annotation) GetSourceFile ¶
func (t *GeneratedCodeInfo_Annotation) GetSourceFile() (ret string)
func (*GeneratedCodeInfo_Annotation) Index ¶
func (t *GeneratedCodeInfo_Annotation) Index() int
func (*GeneratedCodeInfo_Annotation) IsTopLevel ¶
func (t *GeneratedCodeInfo_Annotation) IsTopLevel() bool
implement DescriptorCommon.IsTopLevel
func (*GeneratedCodeInfo_Annotation) LocationPath ¶
func (t *GeneratedCodeInfo_Annotation) LocationPath() LocationPath
func (*GeneratedCodeInfo_Annotation) MarshalJSON ¶
func (t *GeneratedCodeInfo_Annotation) MarshalJSON() (b []byte, err error)
func (*GeneratedCodeInfo_Annotation) Parent ¶
func (t *GeneratedCodeInfo_Annotation) Parent() DescriptorCommon
func (*GeneratedCodeInfo_Annotation) Path ¶
func (t *GeneratedCodeInfo_Annotation) Path() []int32
func (*GeneratedCodeInfo_Annotation) PbDescriptor ¶
func (t *GeneratedCodeInfo_Annotation) PbDescriptor() *descriptorpb.GeneratedCodeInfo_Annotation
func (*GeneratedCodeInfo_Annotation) SourceFile ¶
func (t *GeneratedCodeInfo_Annotation) SourceFile() string
type LocationPath ¶
type LocationPath []int32
func (LocationPath) String ¶
func (p LocationPath) String() string
type MessageOptions ¶
type MessageOptions struct {
// contains filtered or unexported fields
}
func (*MessageOptions) Comments ¶
func (t *MessageOptions) Comments() *SourceCodeInfo_Location
func (*MessageOptions) Deprecated ¶
func (t *MessageOptions) Deprecated() bool
func (*MessageOptions) Empty ¶
func (t *MessageOptions) Empty() bool
func (*MessageOptions) File ¶
func (t *MessageOptions) File() *FileDescriptorProto
func (*MessageOptions) GetDeprecated ¶
func (t *MessageOptions) GetDeprecated() (ret bool)
func (*MessageOptions) GetMapEntry ¶
func (t *MessageOptions) GetMapEntry() (ret bool)
func (*MessageOptions) GetMessageSetWireFormat ¶
func (t *MessageOptions) GetMessageSetWireFormat() (ret bool)
func (*MessageOptions) GetNoStandardDescriptorAccessor ¶
func (t *MessageOptions) GetNoStandardDescriptorAccessor() (ret bool)
func (*MessageOptions) GetUninterpretedOption ¶
func (t *MessageOptions) GetUninterpretedOption() (ret []*UninterpretedOption)
func (*MessageOptions) Index ¶
func (t *MessageOptions) Index() int
func (*MessageOptions) IsTopLevel ¶
func (t *MessageOptions) IsTopLevel() bool
implement DescriptorCommon.IsTopLevel
func (*MessageOptions) LocationPath ¶
func (t *MessageOptions) LocationPath() LocationPath
func (*MessageOptions) MapEntry ¶
func (t *MessageOptions) MapEntry() bool
func (*MessageOptions) MarshalJSON ¶
func (t *MessageOptions) MarshalJSON() (b []byte, err error)
func (*MessageOptions) MessageOptions ¶
func (t *MessageOptions) MessageOptions() *descriptorpb.MessageOptions
func (*MessageOptions) MessageSetWireFormat ¶
func (t *MessageOptions) MessageSetWireFormat() bool
func (*MessageOptions) NoStandardDescriptorAccessor ¶
func (t *MessageOptions) NoStandardDescriptorAccessor() bool
func (*MessageOptions) Parent ¶
func (t *MessageOptions) Parent() DescriptorCommon
func (*MessageOptions) PbDescriptor ¶
func (t *MessageOptions) PbDescriptor() *descriptorpb.MessageOptions
func (*MessageOptions) UninterpretedOption ¶
func (t *MessageOptions) UninterpretedOption() []*UninterpretedOption
type MethodDescriptorProto ¶
type MethodDescriptorProto struct {
// contains filtered or unexported fields
}
func (*MethodDescriptorProto) ClientStreaming ¶
func (t *MethodDescriptorProto) ClientStreaming() bool
func (*MethodDescriptorProto) Comments ¶
func (t *MethodDescriptorProto) Comments() *SourceCodeInfo_Location
func (*MethodDescriptorProto) Empty ¶
func (t *MethodDescriptorProto) Empty() bool
func (*MethodDescriptorProto) File ¶
func (t *MethodDescriptorProto) File() *FileDescriptorProto
func (*MethodDescriptorProto) GetClientStreaming ¶
func (t *MethodDescriptorProto) GetClientStreaming() (ret bool)
func (*MethodDescriptorProto) GetInputType ¶
func (t *MethodDescriptorProto) GetInputType() (ret string)
func (*MethodDescriptorProto) GetName ¶
func (t *MethodDescriptorProto) GetName() (ret string)
func (*MethodDescriptorProto) GetOptions ¶
func (t *MethodDescriptorProto) GetOptions() (ret *MethodOptions)
func (*MethodDescriptorProto) GetOutputType ¶
func (t *MethodDescriptorProto) GetOutputType() (ret string)
func (*MethodDescriptorProto) GetServerStreaming ¶
func (t *MethodDescriptorProto) GetServerStreaming() (ret bool)
func (*MethodDescriptorProto) Index ¶
func (t *MethodDescriptorProto) Index() int
func (*MethodDescriptorProto) InputType ¶
func (t *MethodDescriptorProto) InputType() string
func (*MethodDescriptorProto) IsTopLevel ¶
func (t *MethodDescriptorProto) IsTopLevel() bool
implement DescriptorCommon.IsTopLevel
func (*MethodDescriptorProto) LocationPath ¶
func (t *MethodDescriptorProto) LocationPath() LocationPath
func (*MethodDescriptorProto) MarshalJSON ¶
func (t *MethodDescriptorProto) MarshalJSON() (b []byte, err error)
func (*MethodDescriptorProto) MethodDescriptorProto ¶
func (t *MethodDescriptorProto) MethodDescriptorProto() *descriptorpb.MethodDescriptorProto
func (*MethodDescriptorProto) Name ¶
func (t *MethodDescriptorProto) Name() string
func (*MethodDescriptorProto) Options ¶
func (t *MethodDescriptorProto) Options() *MethodOptions
func (*MethodDescriptorProto) OutputType ¶
func (t *MethodDescriptorProto) OutputType() string
func (*MethodDescriptorProto) Parent ¶
func (t *MethodDescriptorProto) Parent() DescriptorCommon
func (*MethodDescriptorProto) PbDescriptor ¶
func (t *MethodDescriptorProto) PbDescriptor() *descriptorpb.MethodDescriptorProto
func (*MethodDescriptorProto) ServerStreaming ¶
func (t *MethodDescriptorProto) ServerStreaming() bool
func (*MethodDescriptorProto) Service ¶
func (t *MethodDescriptorProto) Service() *ServiceDescriptorProto
Method 所属的 Service
type MethodOptions ¶
type MethodOptions struct {
// contains filtered or unexported fields
}
func (*MethodOptions) Comments ¶
func (t *MethodOptions) Comments() *SourceCodeInfo_Location
func (*MethodOptions) Deprecated ¶
func (t *MethodOptions) Deprecated() bool
func (*MethodOptions) Empty ¶
func (t *MethodOptions) Empty() bool
func (*MethodOptions) File ¶
func (t *MethodOptions) File() *FileDescriptorProto
func (*MethodOptions) GetDeprecated ¶
func (t *MethodOptions) GetDeprecated() (ret bool)
func (*MethodOptions) GetIdempotencyLevel ¶
func (t *MethodOptions) GetIdempotencyLevel() (ret MethodOptions_IdempotencyLevel)
func (*MethodOptions) GetUninterpretedOption ¶
func (t *MethodOptions) GetUninterpretedOption() (ret []*UninterpretedOption)
func (*MethodOptions) IdempotencyLevel ¶
func (t *MethodOptions) IdempotencyLevel() MethodOptions_IdempotencyLevel
func (*MethodOptions) Index ¶
func (t *MethodOptions) Index() int
func (*MethodOptions) IsTopLevel ¶
func (t *MethodOptions) IsTopLevel() bool
implement DescriptorCommon.IsTopLevel
func (*MethodOptions) LocationPath ¶
func (t *MethodOptions) LocationPath() LocationPath
func (*MethodOptions) MarshalJSON ¶
func (t *MethodOptions) MarshalJSON() (b []byte, err error)
func (*MethodOptions) MethodOptions ¶
func (t *MethodOptions) MethodOptions() *descriptorpb.MethodOptions
func (*MethodOptions) Parent ¶
func (t *MethodOptions) Parent() DescriptorCommon
func (*MethodOptions) PbDescriptor ¶
func (t *MethodOptions) PbDescriptor() *descriptorpb.MethodOptions
func (*MethodOptions) UninterpretedOption ¶
func (t *MethodOptions) UninterpretedOption() []*UninterpretedOption
type MethodOptions_IdempotencyLevel ¶
type MethodOptions_IdempotencyLevel = descriptorpb.MethodOptions_IdempotencyLevel
MethodOptions_IdempotencyLevel
See descriptorpb.MethodOptions_IdempotencyLevel
Is this method side-effect-free (or safe in HTTP parlance), or idempotent, or neither? HTTP based RPC implementation may choose GET verb for safe methods, and PUT verb for idempotent methods instead of the default POST.
type NamedDescriptor ¶
type NamedDescriptor interface { GetName() string DescriptorCommon }
type Nestable ¶
type Nestable interface { NamedDescriptor // 是否嵌套的 IsNested() bool // 所属的message ParentMessage() *DescriptorProto }
可嵌套在message中的结构
See DescriptorProto / EnumDescriptorProto See NestableDescriptors
type OneofDescriptorProto ¶
type OneofDescriptorProto struct {
// contains filtered or unexported fields
}
func (*OneofDescriptorProto) Comments ¶
func (t *OneofDescriptorProto) Comments() *SourceCodeInfo_Location
func (*OneofDescriptorProto) Empty ¶
func (t *OneofDescriptorProto) Empty() bool
func (*OneofDescriptorProto) File ¶
func (t *OneofDescriptorProto) File() *FileDescriptorProto
func (*OneofDescriptorProto) GetName ¶
func (t *OneofDescriptorProto) GetName() (ret string)
func (*OneofDescriptorProto) GetOptions ¶
func (t *OneofDescriptorProto) GetOptions() (ret *OneofOptions)
func (*OneofDescriptorProto) Index ¶
func (t *OneofDescriptorProto) Index() int
func (*OneofDescriptorProto) IsTopLevel ¶
func (t *OneofDescriptorProto) IsTopLevel() bool
implement DescriptorCommon.IsTopLevel
func (*OneofDescriptorProto) LocationPath ¶
func (t *OneofDescriptorProto) LocationPath() LocationPath
func (*OneofDescriptorProto) MarshalJSON ¶
func (t *OneofDescriptorProto) MarshalJSON() (b []byte, err error)
func (*OneofDescriptorProto) Name ¶
func (t *OneofDescriptorProto) Name() string
func (*OneofDescriptorProto) OneofDescriptorProto ¶
func (t *OneofDescriptorProto) OneofDescriptorProto() *descriptorpb.OneofDescriptorProto
func (*OneofDescriptorProto) Options ¶
func (t *OneofDescriptorProto) Options() *OneofOptions
func (*OneofDescriptorProto) Parent ¶
func (t *OneofDescriptorProto) Parent() DescriptorCommon
func (*OneofDescriptorProto) PbDescriptor ¶
func (t *OneofDescriptorProto) PbDescriptor() *descriptorpb.OneofDescriptorProto
type OneofOptions ¶
type OneofOptions struct {
// contains filtered or unexported fields
}
func (*OneofOptions) Comments ¶
func (t *OneofOptions) Comments() *SourceCodeInfo_Location
func (*OneofOptions) Empty ¶
func (t *OneofOptions) Empty() bool
func (*OneofOptions) File ¶
func (t *OneofOptions) File() *FileDescriptorProto
func (*OneofOptions) GetUninterpretedOption ¶
func (t *OneofOptions) GetUninterpretedOption() (ret []*UninterpretedOption)
func (*OneofOptions) Index ¶
func (t *OneofOptions) Index() int
func (*OneofOptions) IsTopLevel ¶
func (t *OneofOptions) IsTopLevel() bool
implement DescriptorCommon.IsTopLevel
func (*OneofOptions) LocationPath ¶
func (t *OneofOptions) LocationPath() LocationPath
func (*OneofOptions) MarshalJSON ¶
func (t *OneofOptions) MarshalJSON() (b []byte, err error)
func (*OneofOptions) OneofOptions ¶
func (t *OneofOptions) OneofOptions() *descriptorpb.OneofOptions
func (*OneofOptions) Parent ¶
func (t *OneofOptions) Parent() DescriptorCommon
func (*OneofOptions) PbDescriptor ¶
func (t *OneofOptions) PbDescriptor() *descriptorpb.OneofOptions
func (*OneofOptions) UninterpretedOption ¶
func (t *OneofOptions) UninterpretedOption() []*UninterpretedOption
type PbTypeInfo ¶
type PbTypeInfo struct {
// contains filtered or unexported fields
}
func (*PbTypeInfo) FullTypeName ¶
func (t *PbTypeInfo) FullTypeName() string
FullTypeName 完整的类型名称,如:.g
func (PbTypeInfo) Package ¶
func (t PbTypeInfo) Package() string
func (*PbTypeInfo) TypeNames ¶
func (t *PbTypeInfo) TypeNames() []string
type ProtoType ¶
type ProtoType interface { NamedDescriptor // proto type 信息 ProtoType() *PbTypeInfo }
proto的基本类型信息. 目前有以下struct实现了此interface - message: DescriptorProto - enum: EnumDescriptorProto See ProtoTypeDescriptors
type ServiceDescriptorProto ¶
type ServiceDescriptorProto struct {
// contains filtered or unexported fields
}
func (*ServiceDescriptorProto) Comments ¶
func (t *ServiceDescriptorProto) Comments() *SourceCodeInfo_Location
func (*ServiceDescriptorProto) Empty ¶
func (t *ServiceDescriptorProto) Empty() bool
func (*ServiceDescriptorProto) File ¶
func (t *ServiceDescriptorProto) File() *FileDescriptorProto
func (*ServiceDescriptorProto) GetMethod ¶
func (t *ServiceDescriptorProto) GetMethod() (ret []*MethodDescriptorProto)
func (*ServiceDescriptorProto) GetName ¶
func (t *ServiceDescriptorProto) GetName() (ret string)
func (*ServiceDescriptorProto) GetOptions ¶
func (t *ServiceDescriptorProto) GetOptions() (ret *ServiceOptions)
func (*ServiceDescriptorProto) Index ¶
func (t *ServiceDescriptorProto) Index() int
func (*ServiceDescriptorProto) IsTopLevel ¶
func (t *ServiceDescriptorProto) IsTopLevel() bool
implement DescriptorCommon.IsTopLevel
func (*ServiceDescriptorProto) LocationPath ¶
func (t *ServiceDescriptorProto) LocationPath() LocationPath
func (*ServiceDescriptorProto) MarshalJSON ¶
func (t *ServiceDescriptorProto) MarshalJSON() (b []byte, err error)
func (*ServiceDescriptorProto) Method ¶
func (t *ServiceDescriptorProto) Method() []*MethodDescriptorProto
func (*ServiceDescriptorProto) Name ¶
func (t *ServiceDescriptorProto) Name() string
func (*ServiceDescriptorProto) Options ¶
func (t *ServiceDescriptorProto) Options() *ServiceOptions
func (*ServiceDescriptorProto) Parent ¶
func (t *ServiceDescriptorProto) Parent() DescriptorCommon
func (*ServiceDescriptorProto) PbDescriptor ¶
func (t *ServiceDescriptorProto) PbDescriptor() *descriptorpb.ServiceDescriptorProto
func (*ServiceDescriptorProto) ServiceDescriptorProto ¶
func (t *ServiceDescriptorProto) ServiceDescriptorProto() *descriptorpb.ServiceDescriptorProto
type ServiceOptions ¶
type ServiceOptions struct {
// contains filtered or unexported fields
}
func (*ServiceOptions) Comments ¶
func (t *ServiceOptions) Comments() *SourceCodeInfo_Location
func (*ServiceOptions) Deprecated ¶
func (t *ServiceOptions) Deprecated() bool
func (*ServiceOptions) Empty ¶
func (t *ServiceOptions) Empty() bool
func (*ServiceOptions) File ¶
func (t *ServiceOptions) File() *FileDescriptorProto
func (*ServiceOptions) GetDeprecated ¶
func (t *ServiceOptions) GetDeprecated() (ret bool)
func (*ServiceOptions) GetUninterpretedOption ¶
func (t *ServiceOptions) GetUninterpretedOption() (ret []*UninterpretedOption)
func (*ServiceOptions) Index ¶
func (t *ServiceOptions) Index() int
func (*ServiceOptions) IsTopLevel ¶
func (t *ServiceOptions) IsTopLevel() bool
implement DescriptorCommon.IsTopLevel
func (*ServiceOptions) LocationPath ¶
func (t *ServiceOptions) LocationPath() LocationPath
func (*ServiceOptions) MarshalJSON ¶
func (t *ServiceOptions) MarshalJSON() (b []byte, err error)
func (*ServiceOptions) Parent ¶
func (t *ServiceOptions) Parent() DescriptorCommon
func (*ServiceOptions) PbDescriptor ¶
func (t *ServiceOptions) PbDescriptor() *descriptorpb.ServiceOptions
func (*ServiceOptions) ServiceOptions ¶
func (t *ServiceOptions) ServiceOptions() *descriptorpb.ServiceOptions
func (*ServiceOptions) UninterpretedOption ¶
func (t *ServiceOptions) UninterpretedOption() []*UninterpretedOption
type SourceCodeInfo ¶
type SourceCodeInfo struct {
// contains filtered or unexported fields
}
func (*SourceCodeInfo) Comments ¶
func (t *SourceCodeInfo) Comments() *SourceCodeInfo_Location
func (*SourceCodeInfo) Empty ¶
func (t *SourceCodeInfo) Empty() bool
func (*SourceCodeInfo) File ¶
func (t *SourceCodeInfo) File() *FileDescriptorProto
func (*SourceCodeInfo) GetLocation ¶
func (t *SourceCodeInfo) GetLocation() (ret []*SourceCodeInfo_Location)
func (*SourceCodeInfo) Index ¶
func (t *SourceCodeInfo) Index() int
func (*SourceCodeInfo) IsTopLevel ¶
func (t *SourceCodeInfo) IsTopLevel() bool
implement DescriptorCommon.IsTopLevel
func (*SourceCodeInfo) Location ¶
func (t *SourceCodeInfo) Location() []*SourceCodeInfo_Location
func (*SourceCodeInfo) LocationPath ¶
func (t *SourceCodeInfo) LocationPath() LocationPath
func (*SourceCodeInfo) MarshalJSON ¶
func (t *SourceCodeInfo) MarshalJSON() (b []byte, err error)
func (*SourceCodeInfo) Parent ¶
func (t *SourceCodeInfo) Parent() DescriptorCommon
func (*SourceCodeInfo) PbDescriptor ¶
func (t *SourceCodeInfo) PbDescriptor() *descriptorpb.SourceCodeInfo
func (*SourceCodeInfo) SourceCodeInfo ¶
func (t *SourceCodeInfo) SourceCodeInfo() *descriptorpb.SourceCodeInfo
type SourceCodeInfo_Location ¶
type SourceCodeInfo_Location struct {
// contains filtered or unexported fields
}
func (*SourceCodeInfo_Location) Comments ¶
func (t *SourceCodeInfo_Location) Comments() *SourceCodeInfo_Location
func (*SourceCodeInfo_Location) Empty ¶
func (t *SourceCodeInfo_Location) Empty() bool
func (*SourceCodeInfo_Location) File ¶
func (t *SourceCodeInfo_Location) File() *FileDescriptorProto
func (*SourceCodeInfo_Location) GetLeadingComments ¶
func (t *SourceCodeInfo_Location) GetLeadingComments() (ret string)
func (*SourceCodeInfo_Location) GetLeadingDetachedComments ¶
func (t *SourceCodeInfo_Location) GetLeadingDetachedComments() (ret []string)
func (*SourceCodeInfo_Location) GetPath ¶
func (t *SourceCodeInfo_Location) GetPath() (ret []int32)
func (*SourceCodeInfo_Location) GetSpan ¶
func (t *SourceCodeInfo_Location) GetSpan() (ret []int32)
func (*SourceCodeInfo_Location) GetTrailingComments ¶
func (t *SourceCodeInfo_Location) GetTrailingComments() (ret string)
func (*SourceCodeInfo_Location) Index ¶
func (t *SourceCodeInfo_Location) Index() int
func (*SourceCodeInfo_Location) IsTopLevel ¶
func (t *SourceCodeInfo_Location) IsTopLevel() bool
implement DescriptorCommon.IsTopLevel
func (*SourceCodeInfo_Location) LeadingComments ¶
func (t *SourceCodeInfo_Location) LeadingComments() string
func (*SourceCodeInfo_Location) LeadingDetachedComments ¶
func (t *SourceCodeInfo_Location) LeadingDetachedComments() []string
func (*SourceCodeInfo_Location) LocationPath ¶
func (t *SourceCodeInfo_Location) LocationPath() LocationPath
func (*SourceCodeInfo_Location) MarshalJSON ¶
func (t *SourceCodeInfo_Location) MarshalJSON() (b []byte, err error)
func (*SourceCodeInfo_Location) Parent ¶
func (t *SourceCodeInfo_Location) Parent() DescriptorCommon
func (*SourceCodeInfo_Location) Path ¶
func (t *SourceCodeInfo_Location) Path() []int32
func (*SourceCodeInfo_Location) PbDescriptor ¶
func (t *SourceCodeInfo_Location) PbDescriptor() *descriptorpb.SourceCodeInfo_Location
func (*SourceCodeInfo_Location) SourceCodeInfo_Location ¶
func (t *SourceCodeInfo_Location) SourceCodeInfo_Location() *descriptorpb.SourceCodeInfo_Location
func (*SourceCodeInfo_Location) Span ¶
func (t *SourceCodeInfo_Location) Span() []int32
func (*SourceCodeInfo_Location) TrailingComments ¶
func (t *SourceCodeInfo_Location) TrailingComments() string
type UninterpretedOption ¶
type UninterpretedOption struct {
// contains filtered or unexported fields
}
func (*UninterpretedOption) AggregateValue ¶
func (t *UninterpretedOption) AggregateValue() string
func (*UninterpretedOption) Comments ¶
func (t *UninterpretedOption) Comments() *SourceCodeInfo_Location
func (*UninterpretedOption) DoubleValue ¶
func (t *UninterpretedOption) DoubleValue() float64
func (*UninterpretedOption) Empty ¶
func (t *UninterpretedOption) Empty() bool
func (*UninterpretedOption) File ¶
func (t *UninterpretedOption) File() *FileDescriptorProto
func (*UninterpretedOption) GetAggregateValue ¶
func (t *UninterpretedOption) GetAggregateValue() (ret string)
func (*UninterpretedOption) GetDoubleValue ¶
func (t *UninterpretedOption) GetDoubleValue() (ret float64)
func (*UninterpretedOption) GetIdentifierValue ¶
func (t *UninterpretedOption) GetIdentifierValue() (ret string)
func (*UninterpretedOption) GetName ¶
func (t *UninterpretedOption) GetName() (ret []*UninterpretedOption_NamePart)
func (*UninterpretedOption) GetNegativeIntValue ¶
func (t *UninterpretedOption) GetNegativeIntValue() (ret int64)
func (*UninterpretedOption) GetPositiveIntValue ¶
func (t *UninterpretedOption) GetPositiveIntValue() (ret uint64)
func (*UninterpretedOption) GetStringValue ¶
func (t *UninterpretedOption) GetStringValue() (ret []byte)
func (*UninterpretedOption) IdentifierValue ¶
func (t *UninterpretedOption) IdentifierValue() string
func (*UninterpretedOption) Index ¶
func (t *UninterpretedOption) Index() int
func (*UninterpretedOption) IsTopLevel ¶
func (t *UninterpretedOption) IsTopLevel() bool
implement DescriptorCommon.IsTopLevel
func (*UninterpretedOption) LocationPath ¶
func (t *UninterpretedOption) LocationPath() LocationPath
func (*UninterpretedOption) MarshalJSON ¶
func (t *UninterpretedOption) MarshalJSON() (b []byte, err error)
func (*UninterpretedOption) Name ¶
func (t *UninterpretedOption) Name() []*UninterpretedOption_NamePart
func (*UninterpretedOption) NegativeIntValue ¶
func (t *UninterpretedOption) NegativeIntValue() int64
func (*UninterpretedOption) Parent ¶
func (t *UninterpretedOption) Parent() DescriptorCommon
func (*UninterpretedOption) PbDescriptor ¶
func (t *UninterpretedOption) PbDescriptor() *descriptorpb.UninterpretedOption
func (*UninterpretedOption) PositiveIntValue ¶
func (t *UninterpretedOption) PositiveIntValue() uint64
func (*UninterpretedOption) StringValue ¶
func (t *UninterpretedOption) StringValue() []byte
func (*UninterpretedOption) UninterpretedOption ¶
func (t *UninterpretedOption) UninterpretedOption() *descriptorpb.UninterpretedOption
type UninterpretedOption_NamePart ¶
type UninterpretedOption_NamePart struct {
// contains filtered or unexported fields
}
func (*UninterpretedOption_NamePart) Comments ¶
func (t *UninterpretedOption_NamePart) Comments() *SourceCodeInfo_Location
func (*UninterpretedOption_NamePart) Empty ¶
func (t *UninterpretedOption_NamePart) Empty() bool
func (*UninterpretedOption_NamePart) File ¶
func (t *UninterpretedOption_NamePart) File() *FileDescriptorProto
func (*UninterpretedOption_NamePart) GetIsExtension ¶
func (t *UninterpretedOption_NamePart) GetIsExtension() (ret bool)
func (*UninterpretedOption_NamePart) GetNamePart ¶
func (t *UninterpretedOption_NamePart) GetNamePart() (ret string)
func (*UninterpretedOption_NamePart) Index ¶
func (t *UninterpretedOption_NamePart) Index() int
func (*UninterpretedOption_NamePart) IsExtension ¶
func (t *UninterpretedOption_NamePart) IsExtension() bool
func (*UninterpretedOption_NamePart) IsTopLevel ¶
func (t *UninterpretedOption_NamePart) IsTopLevel() bool
implement DescriptorCommon.IsTopLevel
func (*UninterpretedOption_NamePart) LocationPath ¶
func (t *UninterpretedOption_NamePart) LocationPath() LocationPath
func (*UninterpretedOption_NamePart) MarshalJSON ¶
func (t *UninterpretedOption_NamePart) MarshalJSON() (b []byte, err error)
func (*UninterpretedOption_NamePart) NamePart ¶
func (t *UninterpretedOption_NamePart) NamePart() string
func (*UninterpretedOption_NamePart) Parent ¶
func (t *UninterpretedOption_NamePart) Parent() DescriptorCommon
func (*UninterpretedOption_NamePart) PbDescriptor ¶
func (t *UninterpretedOption_NamePart) PbDescriptor() *descriptorpb.UninterpretedOption_NamePart
func (*UninterpretedOption_NamePart) UninterpretedOption_NamePart ¶
func (t *UninterpretedOption_NamePart) UninterpretedOption_NamePart() *descriptorpb.UninterpretedOption_NamePart
Source Files ¶
- DescriptorProto.goku.pb.go
- DescriptorProto_ExtensionRange.goku.pb.go
- DescriptorProto_ReservedRange.goku.pb.go
- EnumDescriptorProto.goku.pb.go
- EnumDescriptorProto_EnumReservedRange.goku.pb.go
- EnumOptions.goku.pb.go
- EnumValueDescriptorProto.goku.pb.go
- EnumValueOptions.goku.pb.go
- ExtensionRangeOptions.goku.pb.go
- FieldDescriptorProto.goku.pb.go
- FieldDescriptorProto_Label.goku.pb.go
- FieldDescriptorProto_Type.goku.pb.go
- FieldOptions.goku.pb.go
- FieldOptions_CType.goku.pb.go
- FieldOptions_JSType.goku.pb.go
- FileDescriptorProto.goku.pb.go
- FileOptions.goku.pb.go
- FileOptions_OptimizeMode.goku.pb.go
- GeneratedCodeInfo.goku.pb.go
- GeneratedCodeInfo_Annotation.goku.pb.go
- MessageOptions.goku.pb.go
- MethodDescriptorProto.goku.pb.go
- MethodOptions.goku.pb.go
- MethodOptions_IdempotencyLevel.goku.pb.go
- OneofDescriptorProto.goku.pb.go
- OneofOptions.goku.pb.go
- ServiceDescriptorProto.goku.pb.go
- ServiceOptions.goku.pb.go
- SourceCodeInfo.goku.pb.go
- SourceCodeInfo_Location.goku.pb.go
- UninterpretedOption.goku.pb.go
- UninterpretedOption_NamePart.goku.pb.go
- descriptors-table.goku.pb.go
- descriptors.go