language

package
v0.0.0-...-f81b703 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 21, 2024 License: MIT Imports: 9 Imported by: 0

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 (BaseCode) Body

func (b BaseCode) Body() (string, error)

type BodyRenderer

type BodyRenderer interface {
	Body() (string, error)
}

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
}

type FilenameGenerator

type FilenameGenerator interface {
	Filename(file *descriptorpb.FileDescriptorProto, name *string) string
}

type InterfaceCode

type InterfaceCode struct {
	*BaseCode
}

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.

type PHP

type PHP struct {
}

func (PHP) Camelize

func (p PHP) Camelize(word string) string

Camelize "dino_party" -> "DinoParty"

func (PHP) DetectNamespace

func (p PHP) DetectNamespace(file *descriptorpb.FileDescriptorProto) string

func (PHP) Identifier

func (p PHP) Identifier(name string, suffix string) string

Identifier snake_case to CamelCase

func (PHP) Namespace

func (p PHP) Namespace(pkg *string, sep string) string

type PHPCode

type PHPCode struct {
	PHP
}

func NewPHPCode

func NewPHPCode() *PHPCode

func (*PHPCode) Generate

type ServiceCode

type ServiceCode struct {
	*BaseCode
}

type ServiceName

type ServiceName struct {
	// contains filtered or unexported fields
}

func (*ServiceName) Filename

func (f *ServiceName) Filename(file *descriptorpb.FileDescriptorProto, name *string) string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL