codegen

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2022 License: MPL-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const JsonPkg = "github.com/json-iterator/go"

Variables

This section is empty.

Functions

func ConfigUnmarshalFuncName added in v1.8.0

func ConfigUnmarshalFuncName(param *est.Param, md *meta.Data) string

ConfigUnmarshalFuncName returns a unique name for an unmarshal function fo a concrete instance of a type. For example the following types will result in the given names:

- `int` -> `encoreInternal_LoadConfig_int` - `ConfigType` -> `encoreInternal_LoadConfig_ConfigType` - `ConfigType[int, string]` -> `encoreInternal_LoadConfig_ConfigType_int_string_`

Types

type Builder

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

func NewBuilder

func NewBuilder(res *parser.Result, forTesting bool) *Builder

func (*Builder) CacheKeyspaceKeyMapperName added in v1.7.0

func (b *Builder) CacheKeyspaceKeyMapperName(ks *est.CacheKeyspace) string

func (*Builder) ConfigUnmarshalers added in v1.8.0

func (b *Builder) ConfigUnmarshalers(svc *est.Service) (f *File, err error)

ConfigUnmarshalers returns a generated Go file with all the code needed for a service to unmarshal its config.

func (*Builder) Etype added in v1.4.0

func (b *Builder) Etype() (f *File, err error)

func (*Builder) ForceRuntimeDependency added in v1.5.0

func (b *Builder) ForceRuntimeDependency(pkg *est.Package) (f *File, err error)

func (*Builder) Main

func (b *Builder) Main(compilerVersion string) (f *File, err error)

func (*Builder) RenderMiddlewares added in v1.5.0

func (b *Builder) RenderMiddlewares(pkgPath string) (map[*est.Middleware]*Statement, []Code)

func (*Builder) ServiceHandlers added in v1.4.0

func (b *Builder) ServiceHandlers(svc *est.Service) (f *File, err error)

func (*Builder) TestMain

func (b *Builder) TestMain(pkg *est.Package, svcs []*est.Service, envToEmbed []string) *File

func (*Builder) UserFacing added in v1.5.0

func (b *Builder) UserFacing(svc *est.Service, withImpl bool) *File

UserFacing generates the encore.gen.go file containing user-facing generated code. If nothing needs to be generated it returns nil.

Jump to

Keyboard shortcuts

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