Documentation ¶
Index ¶
- func GetGoPackageName(file *descriptor.FileDescriptorProto) string
- func HasHTTPRuleOptions(method *descriptor.MethodDescriptorProto) bool
- func New(jsonpb bool) generator.Generator
- func TargetFilePath(file *descriptor.FileDescriptorProto) string
- type BMGenerate
- type BMMethodDescriptor
- type BMServerDescriptor
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetGoPackageName ¶
func GetGoPackageName(file *descriptor.FileDescriptorProto) string
GetGoPackageName last element from proto package name or go_package option
func HasHTTPRuleOptions ¶
func HasHTTPRuleOptions(method *descriptor.MethodDescriptorProto) bool
HasHTTPRuleOptions check method has httprule extension
func TargetFilePath ¶
func TargetFilePath(file *descriptor.FileDescriptorProto) string
TargetFilePath find target file path
Types ¶
type BMGenerate ¶
type BMGenerate struct {
// contains filtered or unexported fields
}
BMGenerate generate bm server code
func NewBMGenerate ¶
func NewBMGenerate(packageName string, descs []*BMServerDescriptor, jsonpb bool) *BMGenerate
NewBMGenerate BMGenerate
type BMMethodDescriptor ¶
type BMMethodDescriptor struct { Name string Method string PathPattern string RequestType string ReplyType string ProtoMethod *descriptor.MethodDescriptorProto HTTPRule *annotations.HttpRule }
BMMethodDescriptor descriptor for BM http method
func ParseBMMethod ¶
func ParseBMMethod(method *descriptor.MethodDescriptorProto) (*BMMethodDescriptor, error)
ParseBMMethod parse BMMethodDescriptor form method descriptor proto
type BMServerDescriptor ¶
type BMServerDescriptor struct { Name string ProtoService *descriptor.ServiceDescriptorProto Methods []*BMMethodDescriptor }
BMServerDescriptor descriptor for BM server
func ParseBMServer ¶
func ParseBMServer(service *descriptor.ServiceDescriptorProto) (*BMServerDescriptor, error)
ParseBMServer parse BMServerDescriptor form service descriptor proto
Click to show internal directories.
Click to hide internal directories.