Documentation ¶
Index ¶
- Variables
- type BaseTypeDesc
- func (BaseTypeDesc) Descriptor() protoreflect.EnumDescriptor
- func (x BaseTypeDesc) Enum() *BaseTypeDesc
- func (BaseTypeDesc) EnumDescriptor() ([]byte, []int)deprecated
- func (x BaseTypeDesc) Number() protoreflect.EnumNumber
- func (x BaseTypeDesc) String() string
- func (BaseTypeDesc) Type() protoreflect.EnumType
- type BuildOutput
- type BuildRQ
- type BuildRS
- type DocDesc
- type EnumDesc
- func (*EnumDesc) Descriptor() ([]byte, []int)deprecated
- func (x *EnumDesc) GetDoc() *DocDesc
- func (x *EnumDesc) GetName() string
- func (x *EnumDesc) GetOptions() *OptionDesc
- func (x *EnumDesc) GetValues() []*EnumValue
- func (*EnumDesc) ProtoMessage()
- func (x *EnumDesc) ProtoReflect() protoreflect.Message
- func (x *EnumDesc) Reset()
- func (x *EnumDesc) String() string
- type EnumValue
- func (*EnumValue) Descriptor() ([]byte, []int)deprecated
- func (x *EnumValue) GetDoc() *DocDesc
- func (x *EnumValue) GetName() string
- func (x *EnumValue) GetValue() int64
- func (*EnumValue) ProtoMessage()
- func (x *EnumValue) ProtoReflect() protoreflect.Message
- func (x *EnumValue) Reset()
- func (x *EnumValue) String() string
- type Field
- func (x *Field) ContainCustom() bool
- func (x Field) CustomMsg() *MsgDesc
- func (*Field) Descriptor() ([]byte, []int)deprecated
- func (x *Field) GetDoc() *DocDesc
- func (x *Field) GetInt64(opt string, def int64) (val int64)
- func (x *Field) GetIntCheck(opt string) (val int64, ok bool)
- func (x *Field) GetName() string
- func (x *Field) GetNo() int32
- func (x *Field) GetOptions() *OptionDesc
- func (x *Field) GetString(opt, def string) string
- func (x *Field) GetStringCheck(opt string) (val string, ok bool)
- func (x *Field) GetStringSlice(opt, sep string, def ...string) (slice []string, ok bool)
- func (x *Field) GetType() *TypeDesc
- func (x *Field) GoType() (v string, err error)
- func (x *Field) HasOption(opt string) (ok bool)
- func (x *Field) IsBasicType() bool
- func (x *Field) IsCustom() bool
- func (x *Field) IsList() bool
- func (x *Field) IsMap() bool
- func (*Field) ProtoMessage()
- func (x *Field) ProtoReflect() protoreflect.Message
- func (x *Field) Reset()
- func (x *Field) String() string
- type FieldType
- type FileDesc
- func (*FileDesc) Descriptor() ([]byte, []int)deprecated
- func (x *FileDesc) GetEnums() []*EnumDesc
- func (x *FileDesc) GetFile() string
- func (x *FileDesc) GetImports() []*ImportDesc
- func (x *FileDesc) GetInt64(opt string, def int64) (val int64)
- func (x *FileDesc) GetIntCheck(opt string) (val int64, ok bool)
- func (x *FileDesc) GetMsgs() []*MsgDesc
- func (x *FileDesc) GetOptions() *OptionDesc
- func (x *FileDesc) GetPkg() *PackageDesc
- func (x *FileDesc) GetProjects() []*ProjectDesc
- func (x *FileDesc) GetServices() []*ServiceDesc
- func (x *FileDesc) GetString(opt, def string) string
- func (x *FileDesc) GetStringCheck(opt string) (val string, ok bool)
- func (x *FileDesc) GetStringSlice(opt, sep string, def ...string) (slice []string, ok bool)
- func (x *FileDesc) HasOption(opt string) (ok bool)
- func (*FileDesc) ProtoMessage()
- func (x *FileDesc) ProtoReflect() protoreflect.Message
- func (x *FileDesc) Reset()
- func (x *FileDesc) String() string
- type ImportDesc
- func (*ImportDesc) Descriptor() ([]byte, []int)deprecated
- func (x *ImportDesc) GetAlias() string
- func (x *ImportDesc) GetDoc() *DocDesc
- func (x *ImportDesc) GetFile() string
- func (*ImportDesc) ProtoMessage()
- func (x *ImportDesc) ProtoReflect() protoreflect.Message
- func (x *ImportDesc) Reset()
- func (x *ImportDesc) String() string
- type MethodDesc
- func (*MethodDesc) Descriptor() ([]byte, []int)deprecated
- func (x *MethodDesc) GetDoc() *DocDesc
- func (x *MethodDesc) GetInt64(opt string, def int64) (val int64)
- func (x *MethodDesc) GetIntCheck(opt string) (val int64, ok bool)
- func (x *MethodDesc) GetMethodFlag() int32
- func (x *MethodDesc) GetMethodID() int64
- func (x *MethodDesc) GetName() string
- func (x *MethodDesc) GetOptions() *OptionDesc
- func (x *MethodDesc) GetReply() *MsgDesc
- func (x *MethodDesc) GetRequest() *MsgDesc
- func (x *MethodDesc) GetString(opt, def string) string
- func (x *MethodDesc) GetStringCheck(opt string) (val string, ok bool)
- func (x *MethodDesc) GetStringSlice(opt, sep string, def ...string) (slice []string, ok bool)
- func (x *MethodDesc) HasOption(opt string) (ok bool)
- func (*MethodDesc) ProtoMessage()
- func (x *MethodDesc) ProtoReflect() protoreflect.Message
- func (x *MethodDesc) Reset()
- func (x *MethodDesc) String() string
- type MethodType
- type MsgDesc
- func (x *MsgDesc) ContainCustom() bool
- func (*MsgDesc) Descriptor() ([]byte, []int)deprecated
- func (x *MsgDesc) GetDoc() *DocDesc
- func (x *MsgDesc) GetFields() []*Field
- func (x *MsgDesc) GetInt64(opt string, def int64) (val int64)
- func (x *MsgDesc) GetIntCheck(opt string) (val int64, ok bool)
- func (x *MsgDesc) GetName() string
- func (x *MsgDesc) GetOptions() *OptionDesc
- func (x *MsgDesc) GetString(opt, def string) string
- func (x *MsgDesc) GetStringCheck(opt string) (val string, ok bool)
- func (x *MsgDesc) GetStringSlice(opt, sep string, def ...string) (slice []string, ok bool)
- func (x *MsgDesc) GetSubMsgs() []*MsgDesc
- func (x *MsgDesc) HasOption(opt string) (ok bool)
- func (*MsgDesc) ProtoMessage()
- func (x *MsgDesc) ProtoReflect() protoreflect.Message
- func (x *MsgDesc) Reset()
- func (x *MsgDesc) String() string
- type OptionDesc
- func (*OptionDesc) Descriptor() ([]byte, []int)deprecated
- func (x *OptionDesc) GetInt64(opt string, def int64) (val int64)
- func (x *OptionDesc) GetIntCheck(opt string) (val int64, ok bool)
- func (x *OptionDesc) GetOptions() map[string]*OptionValue
- func (x *OptionDesc) GetString(opt, def string) string
- func (x *OptionDesc) GetStringCheck(opt string) (val string, ok bool)
- func (x *OptionDesc) GetStringSlice(opt, sep string, def ...string) (slice []string, ok bool)
- func (x *OptionDesc) HasOption(opt string) (ok bool)
- func (*OptionDesc) ProtoMessage()
- func (x *OptionDesc) ProtoReflect() protoreflect.Message
- func (x *OptionDesc) Reset()
- func (x *OptionDesc) String() string
- type OptionValue
- func (*OptionValue) Descriptor() ([]byte, []int)deprecated
- func (x *OptionValue) GetDoc() *DocDesc
- func (x *OptionValue) GetIntValue() int64
- func (x *OptionValue) GetValue() string
- func (*OptionValue) ProtoMessage()
- func (x *OptionValue) ProtoReflect() protoreflect.Message
- func (x *OptionValue) Reset()
- func (x *OptionValue) String() string
- type PackageDesc
- func (*PackageDesc) Descriptor() ([]byte, []int)deprecated
- func (x *PackageDesc) GetDoc() *DocDesc
- func (x *PackageDesc) GetPackage() string
- func (*PackageDesc) ProtoMessage()
- func (x *PackageDesc) ProtoReflect() protoreflect.Message
- func (x *PackageDesc) Reset()
- func (x *PackageDesc) String() string
- type ProjectDesc
- func (*ProjectDesc) Descriptor() ([]byte, []int)deprecated
- func (x *ProjectDesc) GetConf() map[string]*OptionDesc
- func (x *ProjectDesc) GetDoc() *DocDesc
- func (x *ProjectDesc) GetName() string
- func (*ProjectDesc) ProtoMessage()
- func (x *ProjectDesc) ProtoReflect() protoreflect.Message
- func (x *ProjectDesc) Reset()
- func (x *ProjectDesc) String() string
- type ServiceDesc
- func (*ServiceDesc) Descriptor() ([]byte, []int)deprecated
- func (x *ServiceDesc) GetDoc() *DocDesc
- func (x *ServiceDesc) GetInt64(opt string, def int64) (val int64)
- func (x *ServiceDesc) GetIntCheck(opt string) (val int64, ok bool)
- func (x *ServiceDesc) GetMethods() []*MethodDesc
- func (x *ServiceDesc) GetName() string
- func (x *ServiceDesc) GetOptions() *OptionDesc
- func (x *ServiceDesc) GetString(opt, def string) string
- func (x *ServiceDesc) GetStringCheck(opt string) (val string, ok bool)
- func (x *ServiceDesc) GetStringSlice(opt, sep string, def ...string) (slice []string, ok bool)
- func (x *ServiceDesc) HasOption(opt string) (ok bool)
- func (*ServiceDesc) ProtoMessage()
- func (x *ServiceDesc) ProtoReflect() protoreflect.Message
- func (x *ServiceDesc) Reset()
- func (x *ServiceDesc) String() string
- type TypeDesc
- func (*TypeDesc) Descriptor() ([]byte, []int)deprecated
- func (x *TypeDesc) GetElemCustom() bool
- func (x *TypeDesc) GetKey() string
- func (x *TypeDesc) GetKeyBase() BaseTypeDesc
- func (x *TypeDesc) GetMsg() *MsgDesc
- func (x *TypeDesc) GetType() FieldType
- func (x *TypeDesc) GetValue() string
- func (x *TypeDesc) GetValueBase() BaseTypeDesc
- func (*TypeDesc) ProtoMessage()
- func (x *TypeDesc) ProtoReflect() protoreflect.Message
- func (x *TypeDesc) Reset()
- func (x *TypeDesc) String() string
Constants ¶
This section is empty.
Variables ¶
var ( FieldType_name = map[int32]string{ 0: "Unkown", 1: "BaseType", 2: "ListType", 3: "MapType", 4: "CustomType", } FieldType_value = map[string]int32{ "Unkown": 0, "BaseType": 1, "ListType": 2, "MapType": 3, "CustomType": 4, } )
Enum value maps for FieldType.
var ( MethodType_name = map[int32]string{ 0: "Call", 1: "Notify", } MethodType_value = map[string]int32{ "Call": 0, "Notify": 1, } )
Enum value maps for MethodType.
var ( BaseTypeDesc_name = map[int32]string{ 0: "Int8", 1: "Uint8", 2: "Int16", 3: "Uint16", 4: "Int32", 5: "Uint32", 6: "Int64", 7: "Uint64", 8: "String", 9: "Binary", 10: "Bool", 11: "Float32", 12: "Float64", } BaseTypeDesc_value = map[string]int32{ "Int8": 0, "Uint8": 1, "Int16": 2, "Uint16": 3, "Int32": 4, "Uint32": 5, "Int64": 6, "Uint64": 7, "String": 8, "Binary": 9, "Bool": 10, "Float32": 11, "Float64": 12, } )
Enum value maps for BaseTypeDesc.
var File_buildpb_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type BaseTypeDesc ¶
type BaseTypeDesc int32
const ( BaseTypeDesc_Int8 BaseTypeDesc = 0 BaseTypeDesc_Uint8 BaseTypeDesc = 1 BaseTypeDesc_Int16 BaseTypeDesc = 2 BaseTypeDesc_Uint16 BaseTypeDesc = 3 BaseTypeDesc_Int32 BaseTypeDesc = 4 BaseTypeDesc_Uint32 BaseTypeDesc = 5 BaseTypeDesc_Int64 BaseTypeDesc = 6 BaseTypeDesc_Uint64 BaseTypeDesc = 7 BaseTypeDesc_String BaseTypeDesc = 8 BaseTypeDesc_Binary BaseTypeDesc = 9 BaseTypeDesc_Bool BaseTypeDesc = 10 BaseTypeDesc_Float32 BaseTypeDesc = 11 BaseTypeDesc_Float64 BaseTypeDesc = 12 )
func (BaseTypeDesc) Descriptor ¶
func (BaseTypeDesc) Descriptor() protoreflect.EnumDescriptor
func (BaseTypeDesc) Enum ¶
func (x BaseTypeDesc) Enum() *BaseTypeDesc
func (BaseTypeDesc) EnumDescriptor
deprecated
func (BaseTypeDesc) EnumDescriptor() ([]byte, []int)
Deprecated: Use BaseTypeDesc.Descriptor instead.
func (BaseTypeDesc) Number ¶
func (x BaseTypeDesc) Number() protoreflect.EnumNumber
func (BaseTypeDesc) String ¶
func (x BaseTypeDesc) String() string
func (BaseTypeDesc) Type ¶
func (BaseTypeDesc) Type() protoreflect.EnumType
type BuildOutput ¶
type BuildOutput struct { File string `protobuf:"bytes,1,opt,name=File,proto3" json:"File,omitempty"` Data []byte `protobuf:"bytes,2,opt,name=Data,proto3" json:"Data,omitempty"` // contains filtered or unexported fields }
func (*BuildOutput) Descriptor
deprecated
func (*BuildOutput) Descriptor() ([]byte, []int)
Deprecated: Use BuildOutput.ProtoReflect.Descriptor instead.
func (*BuildOutput) GetData ¶
func (x *BuildOutput) GetData() []byte
func (*BuildOutput) GetFile ¶
func (x *BuildOutput) GetFile() string
func (*BuildOutput) ProtoMessage ¶
func (*BuildOutput) ProtoMessage()
func (*BuildOutput) ProtoReflect ¶
func (x *BuildOutput) ProtoReflect() protoreflect.Message
func (*BuildOutput) Reset ¶
func (x *BuildOutput) Reset()
func (*BuildOutput) String ¶
func (x *BuildOutput) String() string
type BuildRQ ¶
type BuildRQ struct { // 需要生成的原文件名 Files []string `protobuf:"bytes,1,rep,name=Files,proto3" json:"Files,omitempty"` // 文件详细信息 Programs map[string]*FileDesc `` /* 157-byte string literal not displayed */ // contains filtered or unexported fields }
func (*BuildRQ) Descriptor
deprecated
func (*BuildRQ) GetPrograms ¶
func (*BuildRQ) ProtoMessage ¶
func (*BuildRQ) ProtoMessage()
func (*BuildRQ) ProtoReflect ¶
func (x *BuildRQ) ProtoReflect() protoreflect.Message
type BuildRS ¶
type BuildRS struct { Result []*BuildOutput `protobuf:"bytes,1,rep,name=Result,proto3" json:"Result,omitempty"` // contains filtered or unexported fields }
func (*BuildRS) Descriptor
deprecated
func (*BuildRS) GetResult ¶
func (x *BuildRS) GetResult() []*BuildOutput
func (*BuildRS) ProtoMessage ¶
func (*BuildRS) ProtoMessage()
func (*BuildRS) ProtoReflect ¶
func (x *BuildRS) ProtoReflect() protoreflect.Message
type DocDesc ¶
type DocDesc struct { Doc []string `protobuf:"bytes,1,rep,name=Doc,proto3" json:"Doc,omitempty"` TailDoc string `protobuf:"bytes,2,opt,name=TailDoc,proto3" json:"TailDoc,omitempty"` // contains filtered or unexported fields }
func (*DocDesc) Descriptor
deprecated
func (*DocDesc) GetTailDoc ¶
func (*DocDesc) ProtoMessage ¶
func (*DocDesc) ProtoMessage()
func (*DocDesc) ProtoReflect ¶
func (x *DocDesc) ProtoReflect() protoreflect.Message
type EnumDesc ¶
type EnumDesc struct { Name string `protobuf:"bytes,1,opt,name=Name,proto3" json:"Name,omitempty"` // 注释 Doc *DocDesc `protobuf:"bytes,2,opt,name=Doc,proto3" json:"Doc,omitempty"` // 文件选项 Options *OptionDesc `protobuf:"bytes,3,opt,name=Options,proto3" json:"Options,omitempty"` Values []*EnumValue `protobuf:"bytes,4,rep,name=Values,proto3" json:"Values,omitempty"` // contains filtered or unexported fields }
枚举定义
func (*EnumDesc) Descriptor
deprecated
func (*EnumDesc) GetOptions ¶
func (x *EnumDesc) GetOptions() *OptionDesc
func (*EnumDesc) ProtoMessage ¶
func (*EnumDesc) ProtoMessage()
func (*EnumDesc) ProtoReflect ¶
func (x *EnumDesc) ProtoReflect() protoreflect.Message
type EnumValue ¶
type EnumValue struct { Name string `protobuf:"bytes,1,opt,name=Name,proto3" json:"Name,omitempty"` // 注释 Doc *DocDesc `protobuf:"bytes,2,opt,name=Doc,proto3" json:"Doc,omitempty"` Value int64 `protobuf:"varint,3,opt,name=Value,proto3" json:"Value,omitempty"` // contains filtered or unexported fields }
枚举数值
func (*EnumValue) Descriptor
deprecated
func (*EnumValue) ProtoMessage ¶
func (*EnumValue) ProtoMessage()
func (*EnumValue) ProtoReflect ¶
func (x *EnumValue) ProtoReflect() protoreflect.Message
type Field ¶
type Field struct { Name string `protobuf:"bytes,1,opt,name=Name,proto3" json:"Name,omitempty"` // 注释 Doc *DocDesc `protobuf:"bytes,2,opt,name=Doc,proto3" json:"Doc,omitempty"` // 文件选项 Options *OptionDesc `protobuf:"bytes,3,opt,name=Options,proto3" json:"Options,omitempty"` // 字段序号 No int32 `protobuf:"varint,4,opt,name=No,proto3" json:"No,omitempty"` // 字段类型 Type *TypeDesc `protobuf:"bytes,5,opt,name=Type,proto3" json:"Type,omitempty"` // contains filtered or unexported fields }
func (*Field) ContainCustom ¶
func (*Field) Descriptor
deprecated
func (*Field) GetOptions ¶
func (x *Field) GetOptions() *OptionDesc
func (*Field) GetStringSlice ¶
func (*Field) IsBasicType ¶
func (*Field) ProtoMessage ¶
func (*Field) ProtoMessage()
func (*Field) ProtoReflect ¶
func (x *Field) ProtoReflect() protoreflect.Message
type FieldType ¶
type FieldType int32
func (FieldType) Descriptor ¶
func (FieldType) Descriptor() protoreflect.EnumDescriptor
func (FieldType) EnumDescriptor
deprecated
func (FieldType) Number ¶
func (x FieldType) Number() protoreflect.EnumNumber
func (FieldType) Type ¶
func (FieldType) Type() protoreflect.EnumType
type FileDesc ¶
type FileDesc struct { File string `protobuf:"bytes,1,opt,name=File,proto3" json:"File,omitempty"` // 包名 Pkg *PackageDesc `protobuf:"bytes,2,opt,name=Pkg,proto3" json:"Pkg,omitempty"` // 依赖文件 Imports []*ImportDesc `protobuf:"bytes,3,rep,name=Imports,proto3" json:"Imports,omitempty"` // 文件选项 Options *OptionDesc `protobuf:"bytes,4,opt,name=Options,proto3" json:"Options,omitempty"` // 枚举 Enums []*EnumDesc `protobuf:"bytes,5,rep,name=Enums,proto3" json:"Enums,omitempty"` // 消息 Msgs []*MsgDesc `protobuf:"bytes,6,rep,name=Msgs,proto3" json:"Msgs,omitempty"` // 服务 Services []*ServiceDesc `protobuf:"bytes,7,rep,name=Services,proto3" json:"Services,omitempty"` // 项目 Projects []*ProjectDesc `protobuf:"bytes,8,rep,name=Projects,proto3" json:"Projects,omitempty"` // contains filtered or unexported fields }
func (*FileDesc) Descriptor
deprecated
func (*FileDesc) GetImports ¶
func (x *FileDesc) GetImports() []*ImportDesc
func (*FileDesc) GetOptions ¶
func (x *FileDesc) GetOptions() *OptionDesc
func (*FileDesc) GetPkg ¶
func (x *FileDesc) GetPkg() *PackageDesc
func (*FileDesc) GetProjects ¶
func (x *FileDesc) GetProjects() []*ProjectDesc
func (*FileDesc) GetServices ¶
func (x *FileDesc) GetServices() []*ServiceDesc
func (*FileDesc) GetStringCheck ¶
func (*FileDesc) GetStringSlice ¶
func (*FileDesc) ProtoMessage ¶
func (*FileDesc) ProtoMessage()
func (*FileDesc) ProtoReflect ¶
func (x *FileDesc) ProtoReflect() protoreflect.Message
type ImportDesc ¶
type ImportDesc struct { // 注释 Doc *DocDesc `protobuf:"bytes,1,opt,name=Doc,proto3" json:"Doc,omitempty"` // 别名 Alias string `protobuf:"bytes,2,opt,name=Alias,proto3" json:"Alias,omitempty"` // 文件名 File string `protobuf:"bytes,3,opt,name=File,proto3" json:"File,omitempty"` // contains filtered or unexported fields }
func (*ImportDesc) Descriptor
deprecated
func (*ImportDesc) Descriptor() ([]byte, []int)
Deprecated: Use ImportDesc.ProtoReflect.Descriptor instead.
func (*ImportDesc) GetAlias ¶
func (x *ImportDesc) GetAlias() string
func (*ImportDesc) GetDoc ¶
func (x *ImportDesc) GetDoc() *DocDesc
func (*ImportDesc) GetFile ¶
func (x *ImportDesc) GetFile() string
func (*ImportDesc) ProtoMessage ¶
func (*ImportDesc) ProtoMessage()
func (*ImportDesc) ProtoReflect ¶
func (x *ImportDesc) ProtoReflect() protoreflect.Message
func (*ImportDesc) Reset ¶
func (x *ImportDesc) Reset()
func (*ImportDesc) String ¶
func (x *ImportDesc) String() string
type MethodDesc ¶
type MethodDesc struct { Name string `protobuf:"bytes,1,opt,name=Name,proto3" json:"Name,omitempty"` // 注释 Doc *DocDesc `protobuf:"bytes,2,opt,name=Doc,proto3" json:"Doc,omitempty"` // 文件选项 Options *OptionDesc `protobuf:"bytes,3,opt,name=Options,proto3" json:"Options,omitempty"` Request *MsgDesc `protobuf:"bytes,4,opt,name=Request,proto3" json:"Request,omitempty"` Reply *MsgDesc `protobuf:"bytes,5,opt,name=Reply,proto3" json:"Reply,omitempty"` MethodID int64 `protobuf:"varint,6,opt,name=MethodID,proto3" json:"MethodID,omitempty"` // flag MethodFlag int32 `protobuf:"varint,7,opt,name=MethodFlag,proto3" json:"MethodFlag,omitempty"` // contains filtered or unexported fields }
func (*MethodDesc) Descriptor
deprecated
func (*MethodDesc) Descriptor() ([]byte, []int)
Deprecated: Use MethodDesc.ProtoReflect.Descriptor instead.
func (*MethodDesc) GetDoc ¶
func (x *MethodDesc) GetDoc() *DocDesc
func (*MethodDesc) GetIntCheck ¶
func (x *MethodDesc) GetIntCheck(opt string) (val int64, ok bool)
func (*MethodDesc) GetMethodFlag ¶
func (x *MethodDesc) GetMethodFlag() int32
func (*MethodDesc) GetMethodID ¶
func (x *MethodDesc) GetMethodID() int64
func (*MethodDesc) GetName ¶
func (x *MethodDesc) GetName() string
func (*MethodDesc) GetOptions ¶
func (x *MethodDesc) GetOptions() *OptionDesc
func (*MethodDesc) GetReply ¶
func (x *MethodDesc) GetReply() *MsgDesc
func (*MethodDesc) GetRequest ¶
func (x *MethodDesc) GetRequest() *MsgDesc
func (*MethodDesc) GetString ¶
func (x *MethodDesc) GetString(opt, def string) string
func (*MethodDesc) GetStringCheck ¶
func (x *MethodDesc) GetStringCheck(opt string) (val string, ok bool)
func (*MethodDesc) GetStringSlice ¶
func (x *MethodDesc) GetStringSlice(opt, sep string, def ...string) (slice []string, ok bool)
func (*MethodDesc) HasOption ¶
func (x *MethodDesc) HasOption(opt string) (ok bool)
func (*MethodDesc) ProtoMessage ¶
func (*MethodDesc) ProtoMessage()
func (*MethodDesc) ProtoReflect ¶
func (x *MethodDesc) ProtoReflect() protoreflect.Message
func (*MethodDesc) Reset ¶
func (x *MethodDesc) Reset()
func (*MethodDesc) String ¶
func (x *MethodDesc) String() string
type MethodType ¶
type MethodType int32
const ( MethodType_Call MethodType = 0 MethodType_Notify MethodType = 1 )
func (MethodType) Descriptor ¶
func (MethodType) Descriptor() protoreflect.EnumDescriptor
func (MethodType) Enum ¶
func (x MethodType) Enum() *MethodType
func (MethodType) EnumDescriptor
deprecated
func (MethodType) EnumDescriptor() ([]byte, []int)
Deprecated: Use MethodType.Descriptor instead.
func (MethodType) Number ¶
func (x MethodType) Number() protoreflect.EnumNumber
func (MethodType) String ¶
func (x MethodType) String() string
func (MethodType) Type ¶
func (MethodType) Type() protoreflect.EnumType
type MsgDesc ¶
type MsgDesc struct { Name string `protobuf:"bytes,1,opt,name=Name,proto3" json:"Name,omitempty"` // 注释 Doc *DocDesc `protobuf:"bytes,2,opt,name=Doc,proto3" json:"Doc,omitempty"` // 文件选项 Options *OptionDesc `protobuf:"bytes,3,opt,name=Options,proto3" json:"Options,omitempty"` // 字段 Fields []*Field `protobuf:"bytes,4,rep,name=Fields,proto3" json:"Fields,omitempty"` // 子消息 SubMsgs []*MsgDesc `protobuf:"bytes,5,rep,name=SubMsgs,proto3" json:"SubMsgs,omitempty"` // contains filtered or unexported fields }
func (*MsgDesc) ContainCustom ¶
func (*MsgDesc) Descriptor
deprecated
func (*MsgDesc) GetOptions ¶
func (x *MsgDesc) GetOptions() *OptionDesc
func (*MsgDesc) GetStringSlice ¶
func (*MsgDesc) GetSubMsgs ¶
func (*MsgDesc) ProtoMessage ¶
func (*MsgDesc) ProtoMessage()
func (*MsgDesc) ProtoReflect ¶
func (x *MsgDesc) ProtoReflect() protoreflect.Message
type OptionDesc ¶
type OptionDesc struct { // 文件选项 Options map[string]*OptionValue `` /* 155-byte string literal not displayed */ // contains filtered or unexported fields }
选项定义
func (*OptionDesc) Descriptor
deprecated
func (*OptionDesc) Descriptor() ([]byte, []int)
Deprecated: Use OptionDesc.ProtoReflect.Descriptor instead.
func (*OptionDesc) GetIntCheck ¶
func (x *OptionDesc) GetIntCheck(opt string) (val int64, ok bool)
func (*OptionDesc) GetOptions ¶
func (x *OptionDesc) GetOptions() map[string]*OptionValue
func (*OptionDesc) GetString ¶
func (x *OptionDesc) GetString(opt, def string) string
func (*OptionDesc) GetStringCheck ¶
func (x *OptionDesc) GetStringCheck(opt string) (val string, ok bool)
func (*OptionDesc) GetStringSlice ¶
func (x *OptionDesc) GetStringSlice(opt, sep string, def ...string) (slice []string, ok bool)
func (*OptionDesc) HasOption ¶
func (x *OptionDesc) HasOption(opt string) (ok bool)
func (*OptionDesc) ProtoMessage ¶
func (*OptionDesc) ProtoMessage()
func (*OptionDesc) ProtoReflect ¶
func (x *OptionDesc) ProtoReflect() protoreflect.Message
func (*OptionDesc) Reset ¶
func (x *OptionDesc) Reset()
func (*OptionDesc) String ¶
func (x *OptionDesc) String() string
type OptionValue ¶
type OptionValue struct { Value string `protobuf:"bytes,1,opt,name=Value,proto3" json:"Value,omitempty"` IntValue int64 `protobuf:"varint,2,opt,name=IntValue,proto3" json:"IntValue,omitempty"` // 注释 Doc *DocDesc `protobuf:"bytes,3,opt,name=Doc,proto3" json:"Doc,omitempty"` // contains filtered or unexported fields }
选项数值
func (*OptionValue) Descriptor
deprecated
func (*OptionValue) Descriptor() ([]byte, []int)
Deprecated: Use OptionValue.ProtoReflect.Descriptor instead.
func (*OptionValue) GetDoc ¶
func (x *OptionValue) GetDoc() *DocDesc
func (*OptionValue) GetIntValue ¶
func (x *OptionValue) GetIntValue() int64
func (*OptionValue) GetValue ¶
func (x *OptionValue) GetValue() string
func (*OptionValue) ProtoMessage ¶
func (*OptionValue) ProtoMessage()
func (*OptionValue) ProtoReflect ¶
func (x *OptionValue) ProtoReflect() protoreflect.Message
func (*OptionValue) Reset ¶
func (x *OptionValue) Reset()
func (*OptionValue) String ¶
func (x *OptionValue) String() string
type PackageDesc ¶
type PackageDesc struct { // 包名 Package string `protobuf:"bytes,1,opt,name=Package,proto3" json:"Package,omitempty"` // 包注释 Doc *DocDesc `protobuf:"bytes,2,opt,name=Doc,proto3" json:"Doc,omitempty"` // contains filtered or unexported fields }
func (*PackageDesc) Descriptor
deprecated
func (*PackageDesc) Descriptor() ([]byte, []int)
Deprecated: Use PackageDesc.ProtoReflect.Descriptor instead.
func (*PackageDesc) GetDoc ¶
func (x *PackageDesc) GetDoc() *DocDesc
func (*PackageDesc) GetPackage ¶
func (x *PackageDesc) GetPackage() string
func (*PackageDesc) ProtoMessage ¶
func (*PackageDesc) ProtoMessage()
func (*PackageDesc) ProtoReflect ¶
func (x *PackageDesc) ProtoReflect() protoreflect.Message
func (*PackageDesc) Reset ¶
func (x *PackageDesc) Reset()
func (*PackageDesc) String ¶
func (x *PackageDesc) String() string
type ProjectDesc ¶
type ProjectDesc struct { Name string `protobuf:"bytes,1,opt,name=Name,proto3" json:"Name,omitempty"` // 注释 Doc *DocDesc `protobuf:"bytes,2,opt,name=Doc,proto3" json:"Doc,omitempty"` // 文件选项 Conf map[string]*OptionDesc `` /* 149-byte string literal not displayed */ // contains filtered or unexported fields }
func (*ProjectDesc) Descriptor
deprecated
func (*ProjectDesc) Descriptor() ([]byte, []int)
Deprecated: Use ProjectDesc.ProtoReflect.Descriptor instead.
func (*ProjectDesc) GetConf ¶
func (x *ProjectDesc) GetConf() map[string]*OptionDesc
func (*ProjectDesc) GetDoc ¶
func (x *ProjectDesc) GetDoc() *DocDesc
func (*ProjectDesc) GetName ¶
func (x *ProjectDesc) GetName() string
func (*ProjectDesc) ProtoMessage ¶
func (*ProjectDesc) ProtoMessage()
func (*ProjectDesc) ProtoReflect ¶
func (x *ProjectDesc) ProtoReflect() protoreflect.Message
func (*ProjectDesc) Reset ¶
func (x *ProjectDesc) Reset()
func (*ProjectDesc) String ¶
func (x *ProjectDesc) String() string
type ServiceDesc ¶
type ServiceDesc struct { Name string `protobuf:"bytes,1,opt,name=Name,proto3" json:"Name,omitempty"` // 注释 Doc *DocDesc `protobuf:"bytes,2,opt,name=Doc,proto3" json:"Doc,omitempty"` // 文件选项 Options *OptionDesc `protobuf:"bytes,3,opt,name=Options,proto3" json:"Options,omitempty"` // 方法集合 Methods []*MethodDesc `protobuf:"bytes,4,rep,name=Methods,proto3" json:"Methods,omitempty"` // contains filtered or unexported fields }
func (*ServiceDesc) Descriptor
deprecated
func (*ServiceDesc) Descriptor() ([]byte, []int)
Deprecated: Use ServiceDesc.ProtoReflect.Descriptor instead.
func (*ServiceDesc) GetDoc ¶
func (x *ServiceDesc) GetDoc() *DocDesc
func (*ServiceDesc) GetIntCheck ¶
func (x *ServiceDesc) GetIntCheck(opt string) (val int64, ok bool)
func (*ServiceDesc) GetMethods ¶
func (x *ServiceDesc) GetMethods() []*MethodDesc
func (*ServiceDesc) GetName ¶
func (x *ServiceDesc) GetName() string
func (*ServiceDesc) GetOptions ¶
func (x *ServiceDesc) GetOptions() *OptionDesc
func (*ServiceDesc) GetString ¶
func (x *ServiceDesc) GetString(opt, def string) string
func (*ServiceDesc) GetStringCheck ¶
func (x *ServiceDesc) GetStringCheck(opt string) (val string, ok bool)
func (*ServiceDesc) GetStringSlice ¶
func (x *ServiceDesc) GetStringSlice(opt, sep string, def ...string) (slice []string, ok bool)
func (*ServiceDesc) HasOption ¶
func (x *ServiceDesc) HasOption(opt string) (ok bool)
func (*ServiceDesc) ProtoMessage ¶
func (*ServiceDesc) ProtoMessage()
func (*ServiceDesc) ProtoReflect ¶
func (x *ServiceDesc) ProtoReflect() protoreflect.Message
func (*ServiceDesc) Reset ¶
func (x *ServiceDesc) Reset()
func (*ServiceDesc) String ¶
func (x *ServiceDesc) String() string
type TypeDesc ¶
type TypeDesc struct { Type FieldType `protobuf:"varint,1,opt,name=Type,proto3,enum=buildpb.FieldType" json:"Type,omitempty"` // Type = BaseType,CustomType // 使用 Key // Type = ListType // 使用 Key 根据ElemCustom判断 数组元素是自定义类型还是基础类型 // Type = MapType // Key 是基础类型. Value 根据ElemCustom判断 数组元素是自定义类型还是基础类型 Key string `protobuf:"bytes,2,opt,name=Key,proto3" json:"Key,omitempty"` Value string `protobuf:"bytes,3,opt,name=Value,proto3" json:"Value,omitempty"` // 元素 是基础类型还是自定义类型 ElemCustom bool `protobuf:"varint,4,opt,name=ElemCustom,proto3" json:"ElemCustom,omitempty"` // 基础类型 和Key/Value 同时填充 KeyBase BaseTypeDesc `protobuf:"varint,5,opt,name=KeyBase,proto3,enum=buildpb.BaseTypeDesc" json:"KeyBase,omitempty"` ValueBase BaseTypeDesc `protobuf:"varint,6,opt,name=ValueBase,proto3,enum=buildpb.BaseTypeDesc" json:"ValueBase,omitempty"` // 关联自定义类型 Msg *MsgDesc `protobuf:"bytes,7,opt,name=Msg,proto3" json:"Msg,omitempty"` // contains filtered or unexported fields }
func (*TypeDesc) Descriptor
deprecated
func (*TypeDesc) GetElemCustom ¶
func (*TypeDesc) GetKeyBase ¶
func (x *TypeDesc) GetKeyBase() BaseTypeDesc
func (*TypeDesc) GetValueBase ¶
func (x *TypeDesc) GetValueBase() BaseTypeDesc
func (*TypeDesc) ProtoMessage ¶
func (*TypeDesc) ProtoMessage()
func (*TypeDesc) ProtoReflect ¶
func (x *TypeDesc) ProtoReflect() protoreflect.Message