Documentation
¶
Index ¶
Constants ¶
View Source
const LanguageRef = "go"
Variables ¶
This section is empty.
Functions ¶
func NewImportMap ¶
func NewImportMap(packageRoot string) *common.DirectImportMap
Types ¶
type Builder ¶
type Builder struct {
Config Config
Tmpl *template.Template
// contains filtered or unexported fields
}
type Config ¶
type Config struct {
// GenerateGoMod indicates whether a go.mod file should be generated.
// If enabled, PackageRoot is used as module path.
GenerateGoMod bool `yaml:"go_mod"`
// SkipRuntime disables runtime-related code generation when enabled.
// Note: builders can NOT be generated with this flag turned on, as they
// rely on the runtime to function.
SkipRuntime bool `yaml:"skip_runtime"`
// BuilderTemplatesDirectories holds a list of directories containing templates
// to be used to override parts of builders.
BuilderTemplatesDirectories []string `yaml:"builder_templates"`
// Root path for imports.
// Ex: github.com/grafana/cog/generated
PackageRoot string `yaml:"package_root"`
// contains filtered or unexported fields
}
func (*Config) InterpolateParameters ¶
type Converter ¶
type Converter struct {
Config Config
NullableConfig languages.NullableConfig
Tmpl *template.Template
// contains filtered or unexported fields
}
type JSONMarshalling ¶
type JSONMarshalling struct {
// contains filtered or unexported fields
}
func NewJSONMarshalling ¶
func NewJSONMarshalling(config Config, tmpl *template.Template, imports *common.DirectImportMap, packageMapper func(string) string, typeFormatter *typeFormatter, apiRefCollector *common.APIReferenceCollector) JSONMarshalling
type Language ¶
type Language struct {
// contains filtered or unexported fields
}
func (*Language) CompilerPasses ¶
func (*Language) NullableKinds ¶
func (language *Language) NullableKinds() languages.NullableConfig
type RawTypes ¶
type RawTypes struct {
Config Config
Tmpl *template.Template
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.