Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseCode ¶
type BaseCode struct { Req *pluginpb.CodeGeneratorRequest File *descriptorpb.FileDescriptorProto Service *descriptorpb.ServiceDescriptorProto Namespace *Namespace Embed embed.FS Template *template.Template TemplateFile string }
func NewBaseCode ¶
func NewBaseCode(req *pluginpb.CodeGeneratorRequest, file *descriptorpb.FileDescriptorProto, service *descriptorpb.ServiceDescriptorProto, template *template.Template, templateFile string) *BaseCode
type BodyRenderer ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) Filename ¶
func (f *Client) Filename(file *descriptorpb.FileDescriptorProto, name *string) string
type ClientCode ¶
type ClientCode struct {
*BaseCode
}
func NewClientCode ¶
func NewClientCode(req *pluginpb.CodeGeneratorRequest, file *descriptorpb.FileDescriptorProto, service *descriptorpb.ServiceDescriptorProto, ns *Namespace) *ClientCode
type FilenameGenerator ¶
type FilenameGenerator interface {
Filename(file *descriptorpb.FileDescriptorProto, name *string) string
}
type InterfaceCode ¶
type InterfaceCode struct {
*BaseCode
}
func NewInterfaceCode ¶
func NewInterfaceCode(req *pluginpb.CodeGeneratorRequest, file *descriptorpb.FileDescriptorProto, service *descriptorpb.ServiceDescriptorProto, ns *Namespace) *InterfaceCode
type InterfaceName ¶
type InterfaceName struct {
// contains filtered or unexported fields
}
func (*InterfaceName) Filename ¶
func (f *InterfaceName) Filename(file *descriptorpb.FileDescriptorProto, name *string) string
type Namespace ¶
type Namespace struct { // Package defines file package. Package string // Namespace defines namespace. Namespace string // Import declares what namespaces to be imported Import map[string]string // contains filtered or unexported fields }
Namespace defines namespace struct.
func NewNamespace ¶
func NewNamespace( p PHP, req *pluginpb.CodeGeneratorRequest, file *descriptorpb.FileDescriptorProto, service *descriptorpb.ServiceDescriptorProto) *Namespace
type PHP ¶
type PHP struct { }
func (PHP) DetectNamespace ¶
func (p PHP) DetectNamespace(file *descriptorpb.FileDescriptorProto) string
func (PHP) Identifier ¶
Identifier snake_case to CamelCase
type PHPCode ¶
type PHPCode struct {
PHP
}
func NewPHPCode ¶
func NewPHPCode() *PHPCode
func (*PHPCode) Generate ¶
func (p *PHPCode) Generate(request *pluginpb.CodeGeneratorRequest) *pluginpb.CodeGeneratorResponse
type ServiceCode ¶
type ServiceCode struct {
*BaseCode
}
func NewServiceCode ¶
func NewServiceCode(req *pluginpb.CodeGeneratorRequest, file *descriptorpb.FileDescriptorProto, service *descriptorpb.ServiceDescriptorProto, ns *Namespace) *ServiceCode
type ServiceName ¶
type ServiceName struct {
// contains filtered or unexported fields
}
func (*ServiceName) Filename ¶
func (f *ServiceName) Filename(file *descriptorpb.FileDescriptorProto, name *string) string
Click to show internal directories.
Click to hide internal directories.