Documentation
¶
Index ¶
- Constants
- Variables
- func NewDefaultReflector() *jsonschema.Reflector
- type ArrayElementType
- type ConfigDirectoryDefinition
- type ConfigFileDefinition
- type ConfigFileSchema
- type ConfigGen
- type ConfigStructure
- func (c *ConfigStructure) AddActions(cfd ConfigFileDefinition) error
- func (c *ConfigStructure) AddComponent(cfd ConfigFileDefinition) error
- func (c *ConfigStructure) AddDirectoryFile(dirName string, cfd ConfigFileDefinition) error
- func (c *ConfigStructure) AddFile(cfd ConfigFileDefinition, overwrite bool) error
- func (c *ConfigStructure) AddPermission(cfd ConfigFileDefinition) error
- func (c *ConfigStructure) UpdateBreakGlass(cfg *config.BreakGlass) error
- func (c *ConfigStructure) UpdateConfig(cfd ConfigFileDefinition) error
- func (c *ConfigStructure) UpdateInputs(cfg *config.AppInputConfig) error
- func (c *ConfigStructure) UpdateInstaller(cfg *config.InstallerConfig) error
- func (c *ConfigStructure) UpdateMetadata(cfg *config.MetadataConfig) error
- func (c *ConfigStructure) UpdatePolicies(cfg *config.PoliciesConfig) error
- func (c *ConfigStructure) UpdateRunner(cfg *config.AppRunnerConfig) error
- func (c *ConfigStructure) UpdateSandbox(cfg *config.AppSandboxConfig) error
- func (c *ConfigStructure) UpdateSecrets(cfg *config.SecretsConfig) error
- func (c *ConfigStructure) UpdateStack(cfg *config.StackConfig) error
- type InstanceValueExtractor
- func (e *InstanceValueExtractor) GetArrayValue(propertyPath string) (reflect.Value, string, bool)
- func (e *InstanceValueExtractor) GetFieldValue(path string) (any, bool)
- func (e *InstanceValueExtractor) GetMapValue(propertyPath string) (map[string]string, bool)
- func (e *InstanceValueExtractor) HasField(propertyPath string) bool
- func (e *InstanceValueExtractor) HasValue(propertyPath string) bool
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 ¶
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 (*ConfigGen) EncodeToTOML ¶
func (g *ConfigGen) EncodeToTOML(cs *ConfigStructure) 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 (*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
Click to show internal directories.
Click to hide internal directories.