Documentation ¶
Index ¶
- func AddPBGo(pg *PBGo)
- func Base64Decode(str string) ([]byte, error)
- func Base64Encode(bs []byte) string
- func Collect(dirs ...string)
- func Cond(dir string, info os.FileInfo) (ifExec bool, skip error)
- func DecodeFileDescriptorSet(method string, fileDescriptorSet *descriptor.FileDescriptorSet) (*descriptor.FileDescriptorSet, error)
- func DecodeFileDescriptorSetByBase64Str(descSetOut string, raws []string) (*descriptor.FileDescriptorSet, error)
- func DecodeFileDescriptorSetByRaw(descSetOut string, raws []string) (*descriptor.FileDescriptorSet, error)
- func DecodeGoGoFileDescriptorSetByBase64Str(descSetOut string, raws []string) (*gogodescriptor.FileDescriptorSet, error)
- func ExtractFile(gz []byte) (*descriptor.FileDescriptorProto, error)
- func ExtractGoGoFile(gz []byte) (*gogodescriptor.FileDescriptorProto, error)
- func GenDescriptorSet(protoPath, descSetOut, incImp string) error
- func GetDescriptor(protoBasePath, method, incImp string, reuseDesc bool, rawDescs []string) (*descriptor.FileDescriptorSet, error)
- func GetDescriptorSource(protoBasePath, method, incImp string, reuseDesc bool, rawDescs []string) (grpcurl.DescriptorSource, error)
- func GetMethod(method string) (string, error)
- func GetPackageName(method string) (string, error)
- func GetServiceName(method string) (string, error)
- func Parse2Byte(v string) byte
- func Parse2Bytes(strs []string) []byte
- func ParseStr2Bytes(str string) []byte
- func SearchDescSrcByRawDescs(method string, rawDescs []string, pbDirs ...string) (grpcurl.DescriptorSource, error)
- func SetLog(logLevel string)
- func SortFileDescriptorSet(fileDescriptorSet *descriptor.FileDescriptorSet, ...) (*descriptor.FileDescriptorSet, error)
- func Try(method string, pbDirs ...string) (grpcurl.DescriptorSource, error)
- type AssociPB
- type PBGo
- type ProtoDesc
- type ServiceDescriptor
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Base64Decode ¶
func Base64Encode ¶
func DecodeFileDescriptorSet ¶
func DecodeFileDescriptorSet(method string, fileDescriptorSet *descriptor.FileDescriptorSet) (*descriptor.FileDescriptorSet, error)
func DecodeFileDescriptorSetByBase64Str ¶
func DecodeFileDescriptorSetByBase64Str(descSetOut string, raws []string) (*descriptor.FileDescriptorSet, error)
func DecodeFileDescriptorSetByRaw ¶
func DecodeFileDescriptorSetByRaw(descSetOut string, raws []string) (*descriptor.FileDescriptorSet, error)
func DecodeGoGoFileDescriptorSetByBase64Str ¶
func DecodeGoGoFileDescriptorSetByBase64Str(descSetOut string, raws []string) (*gogodescriptor.FileDescriptorSet, error)
func ExtractFile ¶
func ExtractFile(gz []byte) (*descriptor.FileDescriptorProto, error)
extractFile extracts a FileDescriptorProto from a gzip'd buffer.
func ExtractGoGoFile ¶
func ExtractGoGoFile(gz []byte) (*gogodescriptor.FileDescriptorProto, error)
extractFile extracts a FileDescriptorProto from a gzip'd buffer.
func GenDescriptorSet ¶
protoPath 与 incImp 不能有重叠部分 incImp例子:服务目录/服务proto文件
func GetDescriptor ¶
func GetDescriptor(protoBasePath, method, incImp string, reuseDesc bool, rawDescs []string) (*descriptor.FileDescriptorSet, error)
method: pkg.Service incImp:pkg.service.proto
func GetDescriptorSource ¶
func Parse2Byte ¶
func Parse2Bytes ¶
func ParseStr2Bytes ¶
func SearchDescSrcByRawDescs ¶
func SortFileDescriptorSet ¶
func SortFileDescriptorSet(fileDescriptorSet *descriptor.FileDescriptorSet, fileDescriptorProto *descriptor.FileDescriptorProto) (*descriptor.FileDescriptorSet, error)
Types ¶
type AssociPB ¶
type AssociPB struct {
PBs []*PBGo
}
相似pb
func SearchByFilename ¶
func SearchByImportFilename ¶
type PBGo ¶
func (*PBGo) ImportName ¶
type ProtoDesc ¶
type ProtoDesc struct {
// contains filtered or unexported fields
}
func NewProtoDesc ¶
func NewProtoDesc(fileDescriptorSet *descriptor.FileDescriptorSet, rawDescs []string, pbDirs ...string) *ProtoDesc
type ServiceDescriptor ¶
type ServiceDescriptor struct { *descriptor.ServiceDescriptorProto FullyQualifiedPath string FileDescriptorProto *descriptor.FileDescriptorProto FileDescriptorSet *descriptor.FileDescriptorSet }
Descriptor is an extracted service.
func GetServiceDescriptor ¶
func GetServiceDescriptor(fileDescriptorSets []*descriptor.FileDescriptorSet, path string) (*ServiceDescriptor, error)
Click to show internal directories.
Click to hide internal directories.