generator

package
v0.19.968 Latest Latest
Warning

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

Go to latest
Published: May 23, 2026 License: AGPL-3.0 Imports: 9 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	StructTagOneofRequired                   = "oneof_required"
	StructTagOneofRequiredGroupComponentType = "component_type"
	StructTagOneofRequiredGroupGitRepository = "git_repository"
)
View Source
const (
	ArrayElementTypePremitive = "premitive"
	ArrayElementtypeObject    = "object"
)

Variables

View Source
var (
	StructTagOneOfRequiredGroups = []string{StructTagOneofRequiredGroupComponentType, StructTagOneofRequiredGroupGitRepository}
	IgnoredProperties            = []string{
		"source",
		"helm_chart",
		"terraform_module",
		"docker_build",
		"job",
		"external_image",
		"kubernetes_manifest",
	}
)

Functions

func NewDefaultReflector

func NewDefaultReflector() *jsonschema.Reflector

Types

type ArrayElementType

type ArrayElementType string

type ConfigDirectoryDefinition

type ConfigDirectoryDefinition struct {
	Name string
	// configFiles
	Configs []ConfigFileDefinition
}

type ConfigFileDefinition

type ConfigFileDefinition struct {
	Header      string
	Name        string
	Schemas     []ConfigFileSchema
	TomlEncoded string
}

type ConfigFileSchema

type ConfigFileSchema struct {
	SkipNonRequired bool
	Instance        any
}

func (*ConfigFileSchema) Schema

func (c *ConfigFileSchema) Schema() *jsonschema.Schema

type ConfigGen

type ConfigGen struct {
	EnableDefaults          bool
	EnableInfoComments      bool
	EnableDeprecated        bool
	SkipNonRequired         bool
	OverwriteConfigContents bool
}

func NewConfigGen

func NewConfigGen(EnableDefaults, EnableInfoComments, EnableDeprecated, OverwriteConfigContents, SkipNonRequired bool) *ConfigGen

func (*ConfigGen) EncodeToTOML

func (g *ConfigGen) EncodeToTOML(cs *ConfigStructure) error

func (*ConfigGen) Gen

func (g *ConfigGen) Gen(path string, c *ConfigStructure) error

func (*ConfigGen) Validate

func (g *ConfigGen) Validate(path string) error

func (*ConfigGen) WriteConfigToDisk

func (g *ConfigGen) WriteConfigToDisk(c *ConfigStructure) error

type ConfigStructure

type ConfigStructure struct {
	Name string
	// config files
	Configs []ConfigFileDefinition
	// directory containing config files
	ConfigDirectories []ConfigDirectoryDefinition
}

func DefaultAppConfigConfigStructure

func DefaultAppConfigConfigStructure(name string) *ConfigStructure

func NewConfigStructure

func NewConfigStructure(name string) ConfigStructure

func (*ConfigStructure) AddActions

func (c *ConfigStructure) AddActions(cfd ConfigFileDefinition) error

func (*ConfigStructure) AddComponent

func (c *ConfigStructure) AddComponent(cfd ConfigFileDefinition) error

func (*ConfigStructure) AddDirectoryFile

func (c *ConfigStructure) AddDirectoryFile(dirName string, cfd ConfigFileDefinition) error

func (*ConfigStructure) AddFile

func (c *ConfigStructure) AddFile(cfd ConfigFileDefinition, overwrite bool) error

func (*ConfigStructure) AddPermission

func (c *ConfigStructure) AddPermission(cfd ConfigFileDefinition) error

func (*ConfigStructure) UpdateBreakGlass

func (c *ConfigStructure) UpdateBreakGlass(cfg *config.BreakGlass) error

UpdateBreakGlass updates the break_glass.toml configuration

func (*ConfigStructure) UpdateConfig

func (c *ConfigStructure) UpdateConfig(cfd ConfigFileDefinition) error

updates the config in the structure

func (*ConfigStructure) UpdateInputs

func (c *ConfigStructure) UpdateInputs(cfg *config.AppInputConfig) error

UpdateInputs updates the inputs.toml configuration

func (*ConfigStructure) UpdateInstaller

func (c *ConfigStructure) UpdateInstaller(cfg *config.InstallerConfig) error

UpdateInstaller updates the installer.toml configuration

func (*ConfigStructure) UpdateMetadata

func (c *ConfigStructure) UpdateMetadata(cfg *config.MetadataConfig) error

UpdateMetadata updates the metadata.toml configuration

func (*ConfigStructure) UpdatePolicies

func (c *ConfigStructure) UpdatePolicies(cfg *config.PoliciesConfig) error

UpdatePolicies updates the policies.toml configuration

func (*ConfigStructure) UpdateRunner

func (c *ConfigStructure) UpdateRunner(cfg *config.AppRunnerConfig) error

UpdateRunner updates the runner.toml configuration

func (*ConfigStructure) UpdateSandbox

func (c *ConfigStructure) UpdateSandbox(cfg *config.AppSandboxConfig) error

UpdateSandbox updates the sandbox.toml configuration

func (*ConfigStructure) UpdateSecrets

func (c *ConfigStructure) UpdateSecrets(cfg *config.SecretsConfig) error

UpdateSecrets updates the secrets.toml configuration

func (*ConfigStructure) UpdateStack

func (c *ConfigStructure) UpdateStack(cfg *config.StackConfig) error

UpdateStack updates the stack.toml configuration

type InstanceValueExtractor

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

func NewInstanceValueExtractor

func NewInstanceValueExtractor(instance any) *InstanceValueExtractor

func (*InstanceValueExtractor) GetArrayValue

func (e *InstanceValueExtractor) GetArrayValue(propertyPath string) (reflect.Value, string, bool)

func (*InstanceValueExtractor) GetFieldValue

func (e *InstanceValueExtractor) GetFieldValue(path string) (any, bool)

func (*InstanceValueExtractor) GetMapValue

func (e *InstanceValueExtractor) GetMapValue(propertyPath string) (map[string]string, bool)

func (*InstanceValueExtractor) HasField

func (e *InstanceValueExtractor) HasField(propertyPath string) bool

HasField checks if a field exists in the instance, regardless of whether it's zero/empty. This is useful when processing instance data where we want to include all fields.

func (*InstanceValueExtractor) HasValue

func (e *InstanceValueExtractor) HasValue(propertyPath string) bool

Jump to

Keyboard shortcuts

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