maingen

package
v1.14.5 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2023 License: MPL-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Gen

func Gen(p GenParams)

Types

type GenParams

type GenParams struct {
	Gen        *codegen.Generator
	Desc       *app.Desc
	MainModule *pkginfo.Module

	// CompilerVersion is the version of the compiler to embed in the generated code.
	CompilerVersion string
	// AppRevision is the revision of the app to embed in the generated code.
	AppRevision string
	// AppUncommitted tracks whether there were uncommitted changes in the app
	// at the time of build.
	AppUncommitted bool

	APIHandlers    map[*api.Endpoint]*codegen.VarDecl
	AuthHandler    option.Option[*codegen.VarDecl]
	Middleware     map[*middleware.Middleware]*codegen.VarDecl
	ServiceStructs map[*app.Service]*codegen.VarDecl

	// Test contains configuration for generating test code.
	Test option.Option[codegen.TestConfig]

	// ExecScriptMainPkg is the main package to build for an ExecScript execution.
	ExecScriptMainPkg option.Option[paths.Pkg]
}

Jump to

Keyboard shortcuts

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