Documentation ¶
Index ¶
- func ClassNamePrefix(className string, file *protogen.File) string
- func MessageName(file *protogen.File, message *protogen.Message) string
- func Name(s string) string
- func Namespace(file *protogen.File) string
- func NamespacedName(className string, file *protogen.File) string
- func Path(file *protogen.File) string
- func PathFromNamespace(ns string) string
- func ServiceName(file *protogen.File, svc *protogen.Service) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClassNamePrefix ¶
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 ¶
MessageName transforms a message name into a PHP compatible one.
func Namespace ¶
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 ¶
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 PathFromNamespace ¶
PathFromNamespace guesses the path of the file based on the namespace.
Types ¶
This section is empty.