generator

package
v1.1.4 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2022 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// EnableStylingCheckOption is the option name for EnableStylingCheck
	EnableStylingCheckOption = "enable_styling_check"
)

Variables

This section is empty.

Functions

func GetFetchModuleTemplate

func GetFetchModuleTemplate() *template.Template

GetFetchModuleTemplate returns the go template for fetch module

func GetTemplate

func GetTemplate(r *registry.Registry) *template.Template

GetTemplate gets the templates to for the typescript file

Types

type TypeScriptGRPCGatewayGenerator

type TypeScriptGRPCGatewayGenerator struct {
	Registry *registry.Registry
	// EnableStylingCheck enables both eslint and tsc check for the generated code
	// This option will only turn on in integration test to ensure the readability in
	// the generated code.
	EnableStylingCheck bool
}

TypeScriptGRPCGatewayGenerator is the protobuf generator for typescript

func New

func New(paramsMap map[string]string) (*TypeScriptGRPCGatewayGenerator, error)

New returns an initialised generator

func (*TypeScriptGRPCGatewayGenerator) Generate

Generate take a code generator request and returns a response. it analyse request with registry and use the generated data to render ts files

Jump to

Keyboard shortcuts

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