golang

package
v0.0.0-...-fe5df96 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const LanguageRef = "go"

Variables

This section is empty.

Functions

func NewImportMap

func NewImportMap() *common.DirectImportMap

func PostProcessFile

func PostProcessFile(file codejen.File) (codejen.File, error)

Types

type Builder

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

func (*Builder) Generate

func (jenny *Builder) Generate(context common.Context) (codejen.Files, error)

func (*Builder) JennyName

func (jenny *Builder) JennyName() string

type Config

type Config struct {
	Debug bool

	// GenerateGoMod indicates whether a go.mod file should be generated.
	// If enabled, PackageRoot is used as module path.
	GenerateGoMod bool

	// Root path for imports.
	// Ex: github.com/grafana/cog/generated
	PackageRoot string
}

func (Config) MergeWithGlobal

func (config Config) MergeWithGlobal(global common.Config) Config

type GoMod

type GoMod struct {
	Config Config
}

func (GoMod) Generate

func (jenny GoMod) Generate(_ common.Context) (codejen.Files, error)

func (GoMod) JennyName

func (jenny GoMod) JennyName() string

type JSONMarshalling

type JSONMarshalling struct {
	Config Config
	// contains filtered or unexported fields
}

func (JSONMarshalling) Generate

func (jenny JSONMarshalling) Generate(context common.Context) (codejen.Files, error)

func (JSONMarshalling) JennyName

func (jenny JSONMarshalling) JennyName() string

type Language

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

func New

func New() *Language

func (*Language) CompilerPasses

func (language *Language) CompilerPasses() compiler.Passes

func (*Language) Jennies

func (language *Language) Jennies(globalConfig common.Config) *codejen.JennyList[common.Context]

func (*Language) RegisterCliFlags

func (language *Language) RegisterCliFlags(cmd *cobra.Command)

type RawTypes

type RawTypes struct {
	Config Config
	// contains filtered or unexported fields
}

func (RawTypes) Generate

func (jenny RawTypes) Generate(context common.Context) (codejen.Files, error)

func (RawTypes) JennyName

func (jenny RawTypes) JennyName() string

type Runtime

type Runtime struct {
	Config Config
}

func (Runtime) Generate

func (jenny Runtime) Generate(_ common.Context) (codejen.Files, error)

func (Runtime) JennyName

func (jenny Runtime) JennyName() string

func (Runtime) Runtime

func (jenny Runtime) Runtime() (string, error)

type VariantsPlugins

type VariantsPlugins struct {
	Config Config
}

func (VariantsPlugins) Generate

func (jenny VariantsPlugins) Generate(context common.Context) (codejen.Files, error)

func (VariantsPlugins) JennyName

func (jenny VariantsPlugins) JennyName() string

Jump to

Keyboard shortcuts

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