Documentation ¶
Index ¶
- func ClassNamePrefix(className string, file *descriptor.FileDescriptorProto) string
- func MessageName(msg *typemap.MessageDefinition) string
- func Name(s string) string
- func Namespace(file *descriptor.FileDescriptorProto) string
- func NamespacedName(className string, file *descriptor.FileDescriptorProto) string
- func Path(file *descriptor.FileDescriptorProto) string
- func PathFromNamespace(ns string) string
- func ServiceName(file *descriptor.FileDescriptorProto, svc *descriptor.ServiceDescriptorProto) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClassNamePrefix ¶
func ClassNamePrefix(className string, file *descriptor.FileDescriptorProto) string
ClassNamePrefix calculates class name prefix.
Created based on https://github.com/google/protobuf/blob/67952fab2c766ac5eacc15bb78e5af4039a3d398/src/google/protobuf/compiler/php/php_generator.cc#L137
func MessageName ¶
func MessageName(msg *typemap.MessageDefinition) string
MessageName transforms a message name into a PHP compatible one.
func Namespace ¶
func Namespace(file *descriptor.FileDescriptorProto) string
Namespace guesses the namespace of the file according to the following order of precedence:
1. Explicitly set namespace using the "php_namespace" option 2. Package name with dots replaced with backslashes and segments converted to title
func NamespacedName ¶
func NamespacedName(className string, file *descriptor.FileDescriptorProto) string
NamespacedName calculates a fully qualified class name.
Created based on https://github.com/google/protobuf/blob/67952fab2c766ac5eacc15bb78e5af4039a3d398/src/google/protobuf/compiler/php/php_generator.cc#L195
func Path ¶
func Path(file *descriptor.FileDescriptorProto) string
Path guesses the path of the file based on the (internally calculated) namespace.
func PathFromNamespace ¶
PathFromNamespace guesses the path of the file based on the namespace.
func ServiceName ¶
func ServiceName(file *descriptor.FileDescriptorProto, svc *descriptor.ServiceDescriptorProto) string
ServiceName transforms the service name into a PHP compatible one.
Types ¶
This section is empty.