codegen

package
v2.16.0 Latest Latest
Warning

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

Go to latest
Published: May 19, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Trace = false

Trace enables debug output for code generation.

Functions

func GetTSHeaderComment

func GetTSHeaderComment() string

func RenderGoRPCClients

func RenderGoRPCClients(services model.ServiceList, longPackageName, packageName string, config *config.Target) (gocode string, err error)

func RenderGoRPCProxies

func RenderGoRPCProxies(services model.ServiceList, longPackageName, packageName string, config *config.Target) (gocode string, err error)

func RenderGoTSRPCClients

func RenderGoTSRPCClients(services model.ServiceList, longPackageName, packageName string, config *config.Target) (gocode string, err error)

func RenderGoTSRPCProxies

func RenderGoTSRPCProxies(services model.ServiceList, longPackageName, packageName string, config *config.Target, unions map[string][]string) (gocode string, err error)

func RenderTypeScriptServices

func RenderTypeScriptServices(services model.ServiceList, mappings config.TypeScriptMappings, scalars map[string]*model.Scalar, structs map[string]*model.Struct, target *config.Target) (typeScript string, err error)

func RenderTypescriptStructsToPackages

func RenderTypescriptStructsToPackages(
	structs map[string]*model.Struct,
	mappings config.TypeScriptMappings,
	constantTypes map[string]map[string]any,
	scalarTypes map[string]*model.Scalar,
	mappedTypeScript map[string]map[string]*Code,
) (err error)

func Split

func Split(str string, seps []string) []string

Types

type Code

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

func NewCode

func NewCode(tab string) *Code

func (*Code) App

func (c *Code) App(str string) *Code

func (*Code) Ind

func (c *Code) Ind(inc int) *Code

func (*Code) L

func (c *Code) L(line string) *Code

func (*Code) NL

func (c *Code) NL() *Code

func (*Code) String

func (c *Code) String() string

Jump to

Keyboard shortcuts

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