Documentation
¶
Index ¶
- Variables
- func DecodeComponent(fromType reflect.Type, toType reflect.Type, from interface{}) (interface{}, error)
- func DecodeInstallInputs(fromType reflect.Type, toType reflect.Type, from interface{}) (interface{}, error)
- func DecodeSource(fromType reflect.Type, toType reflect.Type, from interface{}) (interface{}, error)
- func DecoderConfig() *mapstructure.DecoderConfig
- func IsWarningErr(err error) bool
- func TerraformVariables(input []TerraformVariable) []string
- func ToJSON(obj interface{}) ([]byte, error)
- func ToTOML(a interface{}) ([]byte, error)
- func ToTerraformVarsMap(inp []TerraformVariable) map[string]string
- type AWSAccount
- type AWSECRConfig
- type ActionConfig
- type ActionStepConfig
- type ActionTriggerConfig
- type AppAWSIAMPolicy
- type AppAWSIAMRole
- type AppBranchConfig
- type AppConfig
- type AppInput
- type AppInputConfig
- type AppInputGroup
- type AppInputSource
- type AppPolicy
- func (a *AppPolicy) GetSourceFile() string
- func (a *AppPolicy) GetSourceLine() int
- func (a AppPolicy) JSONSchemaExtend(schema *jsonschema.Schema)
- func (a *AppPolicy) SetNameFromContents()
- func (a *AppPolicy) SetNameFromSourceFile()
- func (a *AppPolicy) SetSourceFile(path string)
- func (a *AppPolicy) SetSourceLine(line int)
- type AppPolicyEngine
- type AppPolicyList
- type AppPolicyType
- type AppRunnerConfig
- type AppSandboxConfig
- type AppSecret
- type BackendType
- type BreakGlass
- type Component
- type ComponentList
- type ComponentType
- type ConnectedRepoConfig
- type DockerBuildComponentConfig
- type EnvironmentVariable
- type ErrConfig
- type ExternalImageComponentConfig
- type FieldBuilder
- func (fb *FieldBuilder) Const(value any) *FieldBuilder
- func (fb *FieldBuilder) Default(value any) *FieldBuilder
- func (fb *FieldBuilder) Deprecated(reason string) *FieldBuilder
- func (fb *FieldBuilder) Description(desc string) *FieldBuilder
- func (fb *FieldBuilder) Enum(values ...any) *FieldBuilder
- func (fb *FieldBuilder) Example(v any) *FieldBuilder
- func (fb *FieldBuilder) Examples(values ...any) *FieldBuilder
- func (fb *FieldBuilder) ExclusiveMaximum(max float64) *FieldBuilder
- func (fb *FieldBuilder) ExclusiveMinimum(min float64) *FieldBuilder
- func (fb *FieldBuilder) Field(name string) *FieldBuilder
- func (fb *FieldBuilder) Format(format string) *FieldBuilder
- func (fb *FieldBuilder) Items(itemSchema *jsonschema.Schema) *FieldBuilder
- func (fb *FieldBuilder) Long(desc string) *FieldBuilder
- func (fb *FieldBuilder) MaxLength(max uint64) *FieldBuilder
- func (fb *FieldBuilder) Maximum(max float64) *FieldBuilder
- func (fb *FieldBuilder) MinItems(min uint64) *FieldBuilder
- func (fb *FieldBuilder) MinLength(min uint64) *FieldBuilder
- func (fb *FieldBuilder) Minimum(min float64) *FieldBuilder
- func (fb *FieldBuilder) MultipleOf(multiple float64) *FieldBuilder
- func (fb *FieldBuilder) Object(callback func(*SchemaBuilder)) *FieldBuilder
- func (fb *FieldBuilder) ObjectRequired(requiredFields ...string) *FieldBuilder
- func (fb *FieldBuilder) OneOfRequired(groupName string) *FieldBuilder
- func (fb *FieldBuilder) Pattern(regex string) *FieldBuilder
- func (fb *FieldBuilder) ReadOnly(readOnly bool) *FieldBuilder
- func (fb *FieldBuilder) Required() *FieldBuilder
- func (fb *FieldBuilder) SchemaBackref() *SchemaBuilder
- func (fb *FieldBuilder) Short(desc string) *FieldBuilder
- func (fb *FieldBuilder) String() string
- func (fb *FieldBuilder) Title(title string) *FieldBuilder
- func (fb *FieldBuilder) Type(schemaType string) *FieldBuilder
- func (fb *FieldBuilder) WriteOnly(writeOnly bool) *FieldBuilder
- type HelmChartComponentConfig
- type HelmRepoConfig
- type HelmValue
- type HelmValuesFile
- type InputGroup
- type Install
- type InstallApprovalOption
- type InstallerConfig
- type JobComponentConfig
- type KubernetesManifestComponentConfig
- type KustomizeConfig
- type MetadataConfig
- type PermissionsConfig
- type PermissionsRoleType
- type PoliciesConfig
- type PublicImageConfig
- type PublicRepoConfig
- type SchemaBuilder
- type SecretsConfig
- type SourceFileGetter
- type SourceFileSetter
- type StackConfig
- type TerraformModuleComponentConfig
- type TerraformVariable
- type TerraformVariablesFile
Constants ¶
This section is empty.
Variables ¶
var AllAppPolicyEngines = []AppPolicyEngine{ AppPolicyEngineKyverno, AppPolicyEngineOPA, }
AllAppPolicyEngines contains all valid policy engines
var AllAppPolicyTypes = []AppPolicyType{ AppPolicyTypeKubernetesCluster, AppPolicyTypeTerraformModule, AppPolicyTypeHelmChart, AppPolicyTypeKubernetesManifest, AppPolicyTypeDockerBuild, AppPolicyTypeContainerImage, AppPolicyTypeSandbox, }
AllAppPolicyTypes contains all valid policy types
var AllPermissionsRoleTypes []PermissionsRoleType = []PermissionsRoleType{ PermissionsRoleTypeMaintenance, PermissionsRoleTypeProvision, PermissionsRoleTypeDeprovision, }
Functions ¶
func DecodeComponent ¶
func DecodeInstallInputs ¶
func DecodeInstallInputs(fromType reflect.Type, toType reflect.Type, from interface{}) (interface{}, error)
DecodeInstallInputs decodes inputs for an install.
func DecodeSource ¶
func DecodeSource(fromType reflect.Type, toType reflect.Type, from interface{}) (interface{}, error)
DecodeSource is a global decoder supporting all sources
func DecoderConfig ¶
func DecoderConfig() *mapstructure.DecoderConfig
func IsWarningErr ¶
func TerraformVariables ¶
func TerraformVariables(input []TerraformVariable) []string
func ToTerraformVarsMap ¶
func ToTerraformVarsMap(inp []TerraformVariable) map[string]string
Types ¶
type AWSAccount ¶
type AWSAccount struct {
Region string `mapstructure:"region,omitempty" toml:"region,omitempty" jsonschema:"required"`
}
func (AWSAccount) JSONSchemaExtend ¶
func (a AWSAccount) JSONSchemaExtend(schema *jsonschema.Schema)
type AWSECRConfig ¶
type AWSECRConfig struct {
IAMRoleARN string `mapstructure:"iam_role_arn,omitempty" toml:"iam_role_arn,omitempty" jsonschema:"required"`
AWSRegion string `mapstructure:"region,omitempty" toml:"region,omitempty" jsonschema:"required"`
ImageURL string `mapstructure:"image_url,omitempty" toml:"image_url,omitempty" jsonschema:"required"`
Tag string `mapstructure:"tag,omitempty" toml:"tag,omitempty" jsonschema:"required"`
}
func (AWSECRConfig) JSONSchemaExtend ¶
func (a AWSECRConfig) JSONSchemaExtend(schema *jsonschema.Schema)
type ActionConfig ¶
type ActionConfig struct {
Name string `mapstructure:"name" toml:"name" jsonschema:"required"`
Timeout string `mapstructure:"timeout,omitempty" toml:"timeout,omitempty"`
Triggers []*ActionTriggerConfig `mapstructure:"triggers" toml:"triggers" jsonschema:"required"`
Steps []*ActionStepConfig `mapstructure:"steps" toml:"steps" jsonschema:"required"`
References []refs.Ref `mapstructure:"-" jsonschema:"-"`
Dependencies []string `mapstructure:"dependencies,omitempty" toml:"dependencies,omitempty"`
BreakGlassRole string `mapstructure:"break_glass_role,omitempty" toml:"break_glass_role,omitempty"`
}
func (ActionConfig) JSONSchemaExtend ¶
func (a ActionConfig) JSONSchemaExtend(schema *jsonschema.Schema)
type ActionStepConfig ¶
type ActionStepConfig struct {
Name string `mapstructure:"name" toml:"name" jsonschema:"required"`
EnvVarMap map[string]string `mapstructure:"env_vars,omitempty" toml:"env_vars,omitempty"`
PublicRepo *PublicRepoConfig `mapstructure:"public_repo,omitempty" toml:"public_repo,omitempty"`
ConnectedRepo *ConnectedRepoConfig `mapstructure:"connected_repo,omitempty" toml:"connected_repo,omitempty"`
Command string `mapstructure:"command" toml:"command" features:"template"`
InlineContents string `mapstructure:"inline_contents" toml:"inline_contents" features:"get,template"`
// created during parsing
References []refs.Ref `mapstructure:"-" jsonschema:"-"`
}
func (ActionStepConfig) JSONSchemaExtend ¶
func (a ActionStepConfig) JSONSchemaExtend(schema *jsonschema.Schema)
type ActionTriggerConfig ¶
type ActionTriggerConfig struct {
Type string `mapstructure:"type" toml:"type" jsonschema:"required"`
Index int64 `mapstructure:"index,omitempty" toml:"index,omitempty"`
CronSchedule string `mapstructure:"cron_schedule,omitempty" toml:"cron_schedule,omitempty"`
ComponentName string `mapstructure:"component_name,omitempty" toml:"component_name,omitempty"`
}
func (ActionTriggerConfig) JSONSchemaExtend ¶
func (a ActionTriggerConfig) JSONSchemaExtend(schema *jsonschema.Schema)
type AppAWSIAMPolicy ¶
type AppAWSIAMPolicy struct {
ManagedPolicyName string `mapstructure:"managed_policy_name,omitempty" toml:"managed_policy_name,omitempty"`
Name string `mapstructure:"name" toml:"name" jsonschema:"required"`
Contents string `mapstructure:"contents" toml:"contents" features:"template,get"`
}
func (AppAWSIAMPolicy) JSONSchemaExtend ¶
func (a AppAWSIAMPolicy) JSONSchemaExtend(schema *jsonschema.Schema)
type AppAWSIAMRole ¶
type AppAWSIAMRole struct {
Type string `mapstructure:"type" toml:"type"`
Name string `mapstructure:"name" toml:"name" jsonschema:"required" features:"template"`
Description string `mapstructure:"description" toml:"description" jsonschema:"required" features:"template"`
DisplayName string `mapstructure:"display_name,omitempty" toml:"display_name,omitempty" features:"template"`
Policies []AppAWSIAMPolicy `mapstructure:"policies" toml:"policies" jsonschema:"required"`
PermissionsBoundary string `mapstructure:"permissions_boundary,omitempty" toml:"permissions_boundary,omitempty" features:"template,get"`
}
func (AppAWSIAMRole) JSONSchemaExtend ¶
func (a AppAWSIAMRole) JSONSchemaExtend(schema *jsonschema.Schema)
type AppBranchConfig ¶
type AppBranchConfig struct {
Name string `mapstructure:"name" toml:"name" jsonschema:"required"`
ConnectedRepo *ConnectedRepoConfig `mapstructure:"connected_repo,omitempty" toml:"connected_repo,omitempty" jsonschema:"required"`
}
func (AppBranchConfig) JSONSchemaExtend ¶
func (c AppBranchConfig) JSONSchemaExtend(schema *jsonschema.Schema)
func (*AppBranchConfig) Validate ¶
func (c *AppBranchConfig) Validate() error
type AppConfig ¶
type AppConfig struct {
// Config file version
Version string `mapstructure:"version" toml:"version" jsonschema:"required"`
// Description for your app, which is rendered in the installers
Description string `mapstructure:"description,omitempty" toml:"description,omitempty"`
// Display name for the app, rendered in the installer
DisplayName string `mapstructure:"display_name,omitempty" toml:"display_name,omitempty"`
// Slack webhook url to receive notifications
SlackWebhookURL string `mapstructure:"slack_webhook_url" toml:"slack_webhook_url"`
// Readme for the app
Readme string `mapstructure:"readme,omitempty" toml:"readme,omitempty" features:"get,template"`
// Default App Branch config
Branch *AppBranchConfig `mapstructure:"branch,omitempty" toml:"branch,omitempty"`
// Input configuration
Inputs *AppInputConfig `mapstructure:"inputs,omitempty" toml:"inputs,omitempty"`
// Sandbox configuration
Sandbox *AppSandboxConfig `mapstructure:"sandbox" toml:"sandbox" jsonschema:"required"`
// Runner configuration
Runner *AppRunnerConfig `mapstructure:"runner" toml:"runner" jsonschema:"required"`
// Permissions config
Permissions *PermissionsConfig `mapstructure:"permissions,omitempty" toml:"permissions,omitempty"`
// Policies config
Policies *PoliciesConfig `mapstructure:"policies,omitempty" toml:"policies,omitempty"`
// Secrets config
Secrets *SecretsConfig `mapstructure:"secrets,omitempty" toml:"secrets,omitempty"`
// Break-glass config
BreakGlass *BreakGlass `mapstructure:"break_glass,omitempty" toml:"break_glass,omitempty"`
// Stack config
Stack *StackConfig `mapstructure:"stack,omitempty" toml:"stack,omitempty"`
// Components are used to connect container images, automation and infrastructure as code to your Nuon App
Components ComponentList `mapstructure:"components,omitempty" toml:"components,omitempty"`
Installs []*Install `mapstructure:"installs,omitempty" toml:"installs,omitempty"`
Actions []*ActionConfig `mapstructure:"actions,omitempty" toml:"actions,omitempty"`
}
func (AppConfig) JSONSchemaExtend ¶
func (a AppConfig) JSONSchemaExtend(schema *jsonschema.Schema)
type AppInput ¶
type AppInput struct {
Name string `mapstructure:"name" toml:"name"`
DisplayName string `mapstructure:"display_name" toml:"display_name" jsonschema:"required"`
Description string `mapstructure:"description" toml:"description" jsonschema:"required"`
Group string `mapstructure:"group" toml:"group" jsonschema:"required"`
Default any `mapstructure:"default,omitempty" toml:"default,omitempty"`
Required bool `mapstructure:"required,omitempty" toml:"required,omitempty"`
Sensitive bool `mapstructure:"sensitive" toml:"sensitive"`
Type string `mapstructure:"type" toml:"type"`
Internal bool `mapstructure:"internal" toml:"internal"`
UserConfigurable bool `mapstructure:"user_configurable" toml:"user_configurable"`
}
func (AppInput) JSONSchemaExtend ¶
func (a AppInput) JSONSchemaExtend(schema *jsonschema.Schema)
type AppInputConfig ¶
type AppInputConfig struct {
Inputs []AppInput `mapstructure:"input,omitempty" toml:"input"`
Groups []AppInputGroup `mapstructure:"group,omitempty" toml:"group"`
Source string `mapstructure:"source,omitempty" toml:"source,omitempty"`
Sources []string `mapstructure:"sources,omitempty" toml:"sources,omitempty"`
}
func (AppInputConfig) JSONSchemaExtend ¶
func (a AppInputConfig) JSONSchemaExtend(schema *jsonschema.Schema)
func (*AppInputConfig) ValidateInputs ¶
func (a *AppInputConfig) ValidateInputs() error
type AppInputGroup ¶
type AppInputGroup struct {
Name string `mapstructure:"name" toml:"name" jsonschema:"required"`
Description string `mapstructure:"description" toml:"description" jsonschema:"required"`
DisplayName string `mapstructure:"display_name,omitempty" toml:"display_name,omitempty"`
}
func (AppInputGroup) JSONSchemaExtend ¶
func (a AppInputGroup) JSONSchemaExtend(schema *jsonschema.Schema)
type AppInputSource ¶
type AppInputSource string
const ( AppInputSourceVendor AppInputSource = "vendor" AppInputSourceCustomer AppInputSource = "customer" )
type AppPolicy ¶
type AppPolicy struct {
Type AppPolicyType `mapstructure:"type"`
Engine AppPolicyEngine `mapstructure:"engine,omitempty"`
Name string `mapstructure:"name,omitempty"`
Contents string `mapstructure:"contents" features:"get,template"`
Components []string `mapstructure:"components,omitempty"`
// SourceFile is the file path this policy was parsed from (set during parsing, not serialized)
SourceFile string `mapstructure:"-" toml:"-" json:"-" jsonschema:"-"`
// SourceLine is the line number in the source file where this policy starts (1-indexed)
SourceLine int `mapstructure:"-" toml:"-" json:"-" jsonschema:"-"`
}
func (*AppPolicy) GetSourceFile ¶
func (*AppPolicy) GetSourceLine ¶
func (AppPolicy) JSONSchemaExtend ¶
func (a AppPolicy) JSONSchemaExtend(schema *jsonschema.Schema)
func (*AppPolicy) SetNameFromContents ¶ added in v0.19.771
func (a *AppPolicy) SetNameFromContents()
SetNameFromContents derives the policy name from the Contents path when Name is not set. This is used when policies are defined in policies.toml with Contents referencing a file (e.g., "./block-mutable-tags.rego" → "block-mutable-tags").
func (*AppPolicy) SetNameFromSourceFile ¶ added in v0.19.771
func (a *AppPolicy) SetNameFromSourceFile()
SetNameFromSourceFile derives the policy name from the source filename by stripping the directory path and file extension (e.g., "policies/block-mutable-tags.rego" → "block-mutable-tags"). This is only called if Name is not already set.
func (*AppPolicy) SetSourceFile ¶
func (*AppPolicy) SetSourceLine ¶
type AppPolicyEngine ¶
type AppPolicyEngine string
const ( AppPolicyEngineKyverno AppPolicyEngine = "kyverno" AppPolicyEngineOPA AppPolicyEngine = "opa" )
type AppPolicyList ¶
type AppPolicyList struct {
Policy []AppPolicy `mapstructure:"policy" toml:"policy"`
}
func (AppPolicyList) JSONSchemaExtend ¶
func (a AppPolicyList) JSONSchemaExtend(s *jsonschema.Schema)
type AppPolicyType ¶
type AppPolicyType string
const ( // AppPolicyTypeKubernetesCluster applies to kubernetes cluster-level resources (e.g., namespaces, CRDs) AppPolicyTypeKubernetesCluster AppPolicyType = "kubernetes_cluster" // AppPolicyTypeTerraformModule applies to terraform module components AppPolicyTypeTerraformModule AppPolicyType = "terraform_module" // AppPolicyTypeHelmChart applies to helm chart components AppPolicyTypeHelmChart AppPolicyType = "helm_chart" // AppPolicyTypeKubernetesManifest applies to kubernetes manifest components AppPolicyTypeKubernetesManifest AppPolicyType = "kubernetes_manifest" // AppPolicyTypeDockerBuild applies to docker build components AppPolicyTypeDockerBuild AppPolicyType = "docker_build" // AppPolicyTypeContainerImage applies to container image components AppPolicyTypeContainerImage AppPolicyType = "container_image" // AppPolicyTypeSandbox applies to sandbox infrastructure AppPolicyTypeSandbox AppPolicyType = "sandbox" )
type AppRunnerConfig ¶
type AppRunnerConfig struct {
Source string `mapstructure:"source,omitempty" toml:"source,omitempty"`
RunnerType string `mapstructure:"runner_type" toml:"runner_type" jsonschema:"required"`
EnvVarMap map[string]string `mapstructure:"env_vars,omitempty" toml:"env_vars,omitempty"`
HelmDriver string `mapstructure:"helm_driver,omitempty" toml:"helm_driver,omitempty"`
InitScriptURL string `mapstructure:"init_script_url" toml:"init_script_url"`
// Deprecated
EnvVars []EnvironmentVariable `mapstructure:"env_var,omitempty" toml:"env_var"`
}
func (AppRunnerConfig) JSONSchemaExtend ¶
func (a AppRunnerConfig) JSONSchemaExtend(schema *jsonschema.Schema)
type AppSandboxConfig ¶
type AppSandboxConfig struct {
Source string `mapstructure:"source,omitempty" toml:"source,omitempty"`
TerraformVersion string `mapstructure:"terraform_version" toml:"terraform_version" jsonschema:"required"`
ConnectedRepo *ConnectedRepoConfig `mapstructure:"connected_repo,omitempty" toml:"connected_repo,omitempty" jsonschema:"oneof_required=connected_repo"`
PublicRepo *PublicRepoConfig `mapstructure:"public_repo,omitempty" toml:"public_repo,omitempty" jsonschema:"oneof_required=public_repo"`
DriftSchedule *string `mapstructure:"drift_schedule,omitempty" toml:"drift_schedule,omitempty"`
EnvVarMap map[string]string `mapstructure:"env_vars,omitempty" toml:"env_vars,omitempty"`
VarsMap map[string]string `mapstructure:"vars,omitempty" toml:"vars,omitempty"`
VariablesFiles []TerraformVariablesFile `mapstructure:"var_file,omitempty" toml:"var_file,omitempty"`
References []refs.Ref `mapstructure:"-" jsonschema:"-" nuonhash:"-"`
}
func (AppSandboxConfig) JSONSchemaExtend ¶
func (a AppSandboxConfig) JSONSchemaExtend(schema *jsonschema.Schema)
type AppSecret ¶
type AppSecret struct {
Name string `mapstructure:"name" toml:"name" jsonschema:"required"`
DisplayName string `mapstructure:"display_name,omitempty" toml:"display_name,omitempty"`
Description string `mapstructure:"description" toml:"description" jsonschema:"required"`
Required bool `mapstructure:"required,omitempty" toml:"required,omitempty"`
AutoGenerate bool `mapstructure:"auto_generate,omitempty" toml:"auto_generate,omitempty"`
Format string `mapstructure:"format,omitempty" toml:"format,omitempty"`
Default string `mapstructure:"default,omitempty" toml:"default,omitempty"`
// optional fields
KubernetesSync bool `mapstructure:"kubernetes_sync,omitempty" toml:"kubernetes_sync,omitempty"`
KubernetesSecretNamespace string `mapstructure:"kubernetes_secret_namespace,omitempty" toml:"kubernetes_secret_namespace,omitempty"`
KubernetesSecretName string `mapstructure:"kubernetes_secret_name,omitempty" toml:"kubernetes_secret_name,omitempty"`
}
func (AppSecret) JSONSchemaExtend ¶
func (a AppSecret) JSONSchemaExtend(schema *jsonschema.Schema)
type BackendType ¶
type BackendType string
const ( BackendTypeS3 BackendType = "s3" BackendTypeLocal BackendType = "local" )
type BreakGlass ¶
type BreakGlass struct {
Roles []*AppAWSIAMRole `mapstructure:"role,omitempty" toml:"role,omitempty"`
}
func (BreakGlass) JSONSchemaExtend ¶
func (a BreakGlass) JSONSchemaExtend(schema *jsonschema.Schema)
type Component ¶
type Component struct {
Source string `mapstructure:"source,omitempty" toml:"source,omitempty"`
Type ComponentType `mapstructure:"type,omitempty" toml:"type,omitempty" jsonschema:"required"`
Name string `mapstructure:"name" toml:"name" jsonschema:"required"`
// SourceFile is the file path this component was parsed from (set during parsing, not serialized)
SourceFile string `mapstructure:"-" toml:"-" json:"-" jsonschema:"-" nuonhash:"-"`
VarName string `mapstructure:"var_name,omitempty" toml:"var_name,omitempty"`
Dependencies []string `mapstructure:"dependencies,omitempty" toml:"dependencies,omitempty"`
// WARNING: properties below should be ignored by nuonhash when empty
HelmChart *HelmChartComponentConfig `mapstructure:"helm_chart,omitempty" toml:"helm_chart,omitempty" jsonschema:"oneof_required=helm" nuonhash:"omitempty"`
TerraformModule *TerraformModuleComponentConfig `` /* 141-byte string literal not displayed */
DockerBuild *DockerBuildComponentConfig `` /* 129-byte string literal not displayed */
Job *JobComponentConfig `mapstructure:"job,omitempty" toml:"job,omitempty" jsonschema:"oneof_required=job" nuonhash:"omitempty"`
ExternalImage *ExternalImageComponentConfig `` /* 135-byte string literal not displayed */
KubernetesManifest *KubernetesManifestComponentConfig `` /* 150-byte string literal not displayed */
// created during parsing
// WARNING: properties below should not be hashed with nuonhash
References []refs.Ref `mapstructure:"-" jsonschema:"-" nuonhash:"-"`
Checksum string `mapstructure:"-" jsonschema:"-" toml:"checksum" nuonhash:"-"`
}
Component is a flattened configuration type that allows us to define components using a `type: type` field.
func (*Component) AddDependency ¶
func (*Component) GetSourceFile ¶
func (Component) JSONSchemaExtend ¶
func (c Component) JSONSchemaExtend(schema *jsonschema.Schema)
func (*Component) SetSourceFile ¶
type ComponentList ¶
type ComponentList []*Component
func (*ComponentList) Validate ¶
func (a *ComponentList) Validate() error
type ComponentType ¶
type ComponentType string
const ( // TerraformModuleComponentType is the type for a terraform module component TerraformModuleComponentType ComponentType = "terraform_module" // HelmChartComponentType is the type for a helm chart component HelmChartComponentType ComponentType = "helm_chart" // DockerBuildComponentType is the type for a docker build component DockerBuildComponentType ComponentType = "docker_build" // ContainerImageComponentType is the type for an external image component ContainerImageComponentType ComponentType = "container_image" ExternalImageComponentType ComponentType = "external_image" // JobComponentType is the type for a job component JobComponentType ComponentType = "job" // KubernetesManifestComponentType is a type for kubernetes manifest compnent KubernetesManifestComponentType ComponentType = "kubernetes_manifest" ComponentTypeUnknown ComponentType = "" )
func (ComponentType) APIType ¶
func (c ComponentType) APIType() models.AppComponentType
type ConnectedRepoConfig ¶
type ConnectedRepoConfig struct {
Repo string `mapstructure:"repo,omitempty" toml:"repo,omitempty" jsonschema:"required"`
Directory string `mapstructure:"directory,omitempty" toml:"directory,omitempty" jsonschema:"required"`
Branch string `mapstructure:"branch,omitempty" toml:"branch,omitempty" jsonschema:"required"`
}
func (ConnectedRepoConfig) JSONSchemaExtend ¶
func (c ConnectedRepoConfig) JSONSchemaExtend(schema *jsonschema.Schema)
type DockerBuildComponentConfig ¶
type DockerBuildComponentConfig struct {
Dockerfile string `mapstructure:"dockerfile" toml:"dockerfile" jsonschema:"required"`
EnvVarMap map[string]string `mapstructure:"env_vars,omitempty" toml:"env_vars,omitempty"`
PublicRepo *PublicRepoConfig `mapstructure:"public_repo,omitempty" toml:"public_repo,omitempty" jsonschema:"oneof_required=connected_repo"`
ConnectedRepo *ConnectedRepoConfig `mapstructure:"connected_repo,omitempty" toml:"connected_repo,omitempty" jsonschema:"oneof_required=public_repo"`
BuildTimeout string `mapstructure:"build_timeout,omitempty" toml:"build_timeout,omitempty" features:"template" nuonhash:"omitempty"`
DeployTimeout string `mapstructure:"deploy_timeout,omitempty" toml:"deploy_timeout,omitempty" features:"template" nuonhash:"omitempty"`
}
NOTE(jm): components are parsed using mapstructure. Please refer to the wiki entry for more.
func (DockerBuildComponentConfig) JSONSchemaExtend ¶
func (d DockerBuildComponentConfig) JSONSchemaExtend(schema *jsonschema.Schema)
func (*DockerBuildComponentConfig) Parse ¶
func (t *DockerBuildComponentConfig) Parse() error
func (*DockerBuildComponentConfig) Validate ¶
func (t *DockerBuildComponentConfig) Validate() error
type EnvironmentVariable ¶
type EnvironmentVariable struct {
Name string `mapstructure:"name,omitempty" toml:"name"`
Value string `mapstructure:"value,omitempty" toml:"value"`
}
func (EnvironmentVariable) JSONSchemaExtend ¶
func (e EnvironmentVariable) JSONSchemaExtend(schema *jsonschema.Schema)
type ExternalImageComponentConfig ¶
type ExternalImageComponentConfig struct {
AWSECRImageConfig *AWSECRConfig `mapstructure:"aws_ecr,omitempty" toml:"aws_ecr,omitempty" jsonschema:"oneof_required=public"`
PublicImageConfig *PublicImageConfig `mapstructure:"public,omitempty" toml:"public,omitempty" jsonschema:"oneof_required=aws_ecr"`
BuildTimeout string `mapstructure:"build_timeout,omitempty" toml:"build_timeout,omitempty" features:"template" nuonhash:"omitempty"`
DeployTimeout string `mapstructure:"deploy_timeout,omitempty" toml:"deploy_timeout,omitempty" features:"template" nuonhash:"omitempty"`
}
NOTE(jm): components are parsed using mapstructure. Please refer to the wiki entry for more.
func (ExternalImageComponentConfig) JSONSchemaExtend ¶
func (e ExternalImageComponentConfig) JSONSchemaExtend(schema *jsonschema.Schema)
func (*ExternalImageComponentConfig) Parse ¶
func (t *ExternalImageComponentConfig) Parse() error
func (*ExternalImageComponentConfig) Validate ¶
func (t *ExternalImageComponentConfig) Validate() error
type FieldBuilder ¶
type FieldBuilder struct {
// contains filtered or unexported fields
}
FieldBuilder provides a fluent API for building individual schema field properties.
func (*FieldBuilder) Const ¶
func (fb *FieldBuilder) Const(value any) *FieldBuilder
Const sets a constant value constraint for the field.
func (*FieldBuilder) Default ¶
func (fb *FieldBuilder) Default(value any) *FieldBuilder
Default sets the default value for the field.
func (*FieldBuilder) Deprecated ¶
func (fb *FieldBuilder) Deprecated(reason string) *FieldBuilder
Deprecated marks the field as deprecated with an optional reason message. The reason will be appended to the description if provided.
func (*FieldBuilder) Description ¶
func (fb *FieldBuilder) Description(desc string) *FieldBuilder
Description sets the description for the field (replaces existing description).
func (*FieldBuilder) Enum ¶
func (fb *FieldBuilder) Enum(values ...any) *FieldBuilder
Enum sets the allowed values for the field.
func (*FieldBuilder) Example ¶
func (fb *FieldBuilder) Example(v any) *FieldBuilder
Example adds an example value to the field's examples list.
func (*FieldBuilder) Examples ¶
func (fb *FieldBuilder) Examples(values ...any) *FieldBuilder
Examples sets the complete examples list for the field (replacing any existing examples).
func (*FieldBuilder) ExclusiveMaximum ¶
func (fb *FieldBuilder) ExclusiveMaximum(max float64) *FieldBuilder
ExclusiveMaximum sets the exclusive maximum value constraint for numeric fields.
func (*FieldBuilder) ExclusiveMinimum ¶
func (fb *FieldBuilder) ExclusiveMinimum(min float64) *FieldBuilder
ExclusiveMinimum sets the exclusive minimum value constraint for numeric fields.
func (*FieldBuilder) Field ¶
func (fb *FieldBuilder) Field(name string) *FieldBuilder
Field returns a new FieldBuilder for a different field within the same schema. This allows chaining multiple field definitions.
func (*FieldBuilder) Format ¶
func (fb *FieldBuilder) Format(format string) *FieldBuilder
Format sets the format constraint for the field (e.g., "date-time", "email", "uri").
func (*FieldBuilder) Items ¶
func (fb *FieldBuilder) Items(itemSchema *jsonschema.Schema) *FieldBuilder
Items sets the schema for array items.
func (*FieldBuilder) Long ¶
func (fb *FieldBuilder) Long(desc string) *FieldBuilder
Long sets a longer description for the field, appending to existing description if present.
func (*FieldBuilder) MaxLength ¶
func (fb *FieldBuilder) MaxLength(max uint64) *FieldBuilder
MaxLength sets the maximum length constraint for string fields.
func (*FieldBuilder) Maximum ¶
func (fb *FieldBuilder) Maximum(max float64) *FieldBuilder
Maximum sets the maximum value constraint for numeric fields.
func (*FieldBuilder) MinItems ¶
func (fb *FieldBuilder) MinItems(min uint64) *FieldBuilder
MinItems sets the minimum number of items constraint for array fields.
func (*FieldBuilder) MinLength ¶
func (fb *FieldBuilder) MinLength(min uint64) *FieldBuilder
MinLength sets the minimum length constraint for string fields.
func (*FieldBuilder) Minimum ¶
func (fb *FieldBuilder) Minimum(min float64) *FieldBuilder
Minimum sets the minimum value constraint for numeric fields.
func (*FieldBuilder) MultipleOf ¶
func (fb *FieldBuilder) MultipleOf(multiple float64) *FieldBuilder
MultipleOf sets the multipleOf constraint for numeric fields.
func (*FieldBuilder) Object ¶
func (fb *FieldBuilder) Object(callback func(*SchemaBuilder)) *FieldBuilder
Object marks the field as an object type and provides a builder for its nested properties. The callback function receives a SchemaBuilder for the nested object's properties. Example:
NewSchemaBuilder(s).Field("config").Object(func(sb *SchemaBuilder) {
sb.Field("host").Short("Server hostname").Required()
sb.Field("port").Short("Server port").Type("integer").Required()
})
func (*FieldBuilder) ObjectRequired ¶
func (fb *FieldBuilder) ObjectRequired(requiredFields ...string) *FieldBuilder
ObjectRequired marks the field as an object and sets which nested properties are required. Use with Object() to set both the nested properties and required fields.
func (*FieldBuilder) OneOfRequired ¶
func (fb *FieldBuilder) OneOfRequired(groupName string) *FieldBuilder
OneOfRequired marks the field as part of a one-of constraint group with the given group name. This is used to indicate that exactly one field in the group must be present. The group name should match the value in the struct tag (e.g., jsonschema:"oneof_required=group_name").
func (*FieldBuilder) Pattern ¶
func (fb *FieldBuilder) Pattern(regex string) *FieldBuilder
Pattern sets a regex pattern constraint for the field.
func (*FieldBuilder) ReadOnly ¶
func (fb *FieldBuilder) ReadOnly(readOnly bool) *FieldBuilder
ReadOnly marks the field as read-only.
func (*FieldBuilder) Required ¶
func (fb *FieldBuilder) Required() *FieldBuilder
Required marks the field as required in the parent schema.
func (*FieldBuilder) SchemaBackref ¶
func (fb *FieldBuilder) SchemaBackref() *SchemaBuilder
SchemaBackref returns the underlying SchemaBuilder to allow switching back to schema-level operations.
func (*FieldBuilder) Short ¶
func (fb *FieldBuilder) Short(desc string) *FieldBuilder
Short sets a brief description for the field.
func (*FieldBuilder) String ¶
func (fb *FieldBuilder) String() string
String returns a string representation of the field builder for debugging.
func (*FieldBuilder) Title ¶
func (fb *FieldBuilder) Title(title string) *FieldBuilder
Title sets the title/display name for the field.
func (*FieldBuilder) Type ¶
func (fb *FieldBuilder) Type(schemaType string) *FieldBuilder
Type sets the JSON Schema type for the field (e.g., "string", "number", "boolean", "array", "object").
func (*FieldBuilder) WriteOnly ¶
func (fb *FieldBuilder) WriteOnly(writeOnly bool) *FieldBuilder
WriteOnly marks the field as write-only.
type HelmChartComponentConfig ¶
type HelmChartComponentConfig struct {
ChartName string `mapstructure:"chart_name,omitempty" toml:"chart_name,omitempty" jsonschema:"required"`
ValuesMap map[string]string `mapstructure:"values,omitempty" toml:"values,omitempty"`
ValuesFiles []HelmValuesFile `mapstructure:"values_file,omitempty" toml:"values_file,omitempty"`
PublicRepo *PublicRepoConfig `mapstructure:"public_repo,omitempty" toml:"public_repo,omitempty" jsonschema:"oneof_required=public_repo"`
ConnectedRepo *ConnectedRepoConfig `mapstructure:"connected_repo,omitempty" toml:"connected_repo,omitempty" jsonschema:"oneof_required=connected_repo"`
HelmRepo *HelmRepoConfig `mapstructure:"helm_repo,omitempty" toml:"helm_repo,omitempty" jsonschema:"oneof_required=helm_repo"`
Namespace string `mapstructure:"namespace" toml:"namespace" features:"template"`
StorageDriver string `mapstructure:"storage_driver,omitempty" toml:"storage_driver,omitempty" features:"template"`
TakeOwnership bool `mapstructure:"take_ownership" toml:"take_ownership" features:"template"`
DriftSchedule *string `mapstructure:"drift_schedule,omitempty" toml:"drift_schedule,omitempty" features:"template" nuonhash:"omitempty"`
BuildTimeout string `mapstructure:"build_timeout,omitempty" toml:"build_timeout,omitempty" features:"template" nuonhash:"omitempty"`
DeployTimeout string `mapstructure:"deploy_timeout,omitempty" toml:"deploy_timeout,omitempty" features:"template" nuonhash:"omitempty"`
// deprecated
Values []HelmValue `mapstructure:"value,omitempty" toml:"value,omitempty"`
}
NOTE(jm): components are parsed using mapstructure. Please refer to the wiki entry for more.
func (HelmChartComponentConfig) JSONSchemaExtend ¶
func (a HelmChartComponentConfig) JSONSchemaExtend(schema *jsonschema.Schema)
func (*HelmChartComponentConfig) Parse ¶
func (h *HelmChartComponentConfig) Parse() error
func (*HelmChartComponentConfig) Validate ¶
func (t *HelmChartComponentConfig) Validate() error
type HelmRepoConfig ¶
type HelmRepoConfig struct {
RepoURL string `mapstructure:"repo_url" toml:"repo_url" jsonschema:"required"`
Chart string `mapstructure:"chart" toml:"chart" jsonschema:"required"`
Version string `mapstructure:"version,omitempty" toml:"version,omitempty"`
}
func (HelmRepoConfig) JSONSchemaExtend ¶
func (h HelmRepoConfig) JSONSchemaExtend(schema *jsonschema.Schema)
type HelmValue ¶
type HelmValue struct {
Name string `toml:"name" mapstructure:"name,omitempty"`
Value string `toml:"value" mapstructure:"value,omitempty"`
}
func (HelmValue) JSONSchemaExtend ¶
func (h HelmValue) JSONSchemaExtend(schema *jsonschema.Schema)
type HelmValuesFile ¶
type HelmValuesFile struct {
Source string `toml:"source" mapstructure:"source,omitempty" features:"get,template"`
Contents string `toml:"contents" mapstructure:"contents,omitempty" features:"get,template"`
Path string `toml:"path" mapstructure:"path,omitempty" features:"get"`
}
func (HelmValuesFile) JSONSchemaExtend ¶
func (h HelmValuesFile) JSONSchemaExtend(schema *jsonschema.Schema)
type InputGroup ¶
type InputGroup struct {
// mapstructure is able to decode map into Inputgroup because the type of InputGroup.Inputs matches that of what
// expected by mapstructure.
Inputs map[string]string `mapstructure:"inputs" toml:"inputs"`
// this property should only be used for writing comment for input group, and should not be used anywhere else.
Group string `mapstructure:"group" toml:"group"`
}
func (InputGroup) JSONSchemaExtend ¶
func (ig InputGroup) JSONSchemaExtend(schema *jsonschema.Schema)
func (InputGroup) MarshalJSON ¶
func (ig InputGroup) MarshalJSON() ([]byte, error)
func (InputGroup) MarshalTOML ¶
func (ig InputGroup) MarshalTOML() ([]byte, error)
func (InputGroup) TOMLComment ¶
func (ig InputGroup) TOMLComment() string
func (*InputGroup) UnmarshalTOML ¶
func (ig *InputGroup) UnmarshalTOML(data []byte) error
type Install ¶
type Install struct {
Name string `` /* 130-byte string literal not displayed */
ApprovalOption InstallApprovalOption `mapstructure:"approval_option,omitempty" toml:"approval_option,omitempty"`
AWSAccount *AWSAccount `mapstructure:"aws_account,omitempty" toml:"aws_account,omitempty"`
InputGroups []InputGroup `mapstructure:"inputs,omitempty" toml:"inputs,omitempty"`
}
Install is a flattened configuration type that allows us to define installs for an app.
func (*Install) FlattenedInputs ¶
func (Install) JSONSchemaExtend ¶
func (a Install) JSONSchemaExtend(schema *jsonschema.Schema)
type InstallApprovalOption ¶
type InstallApprovalOption string
const ( InstallApprovalOptionApproveAll InstallApprovalOption = "approve-all" InstallApprovalOptionPrompt InstallApprovalOption = "prompt" InstallApprovalOptionUnknown InstallApprovalOption = "" )
func (InstallApprovalOption) APIType ¶
func (o InstallApprovalOption) APIType() models.AppInstallApprovalOption
type InstallerConfig ¶
type InstallerConfig struct {
Source string `mapstructure:"source,omitempty" toml:"source,omitempty"`
Name string `mapstructure:"name,omitempty" toml:"name"`
Description string `mapstructure:"description,omitempty" toml:"description"`
Slug string `mapstructure:"slug,omitempty" toml:"slug"`
Apps []string `mapstructure:"apps,omitempty" toml:"apps"`
DocumentationURL string `mapstructure:"documentation_url,omitempty" toml:"documentation_url"`
CommunityURL string `mapstructure:"community_url,omitempty" toml:"community_url"`
HomepageURL string `mapstructure:"homepage_url,omitempty" toml:"homepage_url"`
GithubURL string `mapstructure:"github_url,omitempty" toml:"github_url"`
LogoURL string `mapstructure:"logo_url,omitempty" toml:"logo_url"`
FaviconURL string `mapstructure:"favicon_url,omitempty" toml:"favicon_url"`
OgImageURL string `mapstructure:"og_image_url" toml:"og_image_url"`
DemoURL string `mapstructure:"demo_url" toml:"demo_url"`
PostInstallMarkdown string `mapstructure:"post_install_markdown" toml:"post_install_markdown"`
CopyrightMarkdown string `mapstructure:"copyright_markdown" toml:"copyright_markdown"`
}
func (InstallerConfig) JSONSchemaExtend ¶
func (a InstallerConfig) JSONSchemaExtend(schema *jsonschema.Schema)
func (*InstallerConfig) Validate ¶
func (a *InstallerConfig) Validate() error
type JobComponentConfig ¶
type JobComponentConfig struct {
ImageURL string `mapstructure:"image_url" toml:"image_url" jsonschema:"required"`
Tag string `mapstructure:"tag" toml:"tag" jsonschema:"required"`
Cmd []string `mapstructure:"cmd" toml:"cmd"`
EnvVarMap map[string]string `mapstructure:"env_vars,omitempty" toml:"env_vars,omitempty"`
Args []string `mapstructure:"args,omitempty" toml:"args,omitempty"`
BuildTimeout string `mapstructure:"build_timeout,omitempty" toml:"build_timeout,omitempty" features:"template" nuonhash:"omitempty"`
DeployTimeout string `mapstructure:"deploy_timeout,omitempty" toml:"deploy_timeout,omitempty" features:"template" nuonhash:"omitempty"`
// deprecated
EnvVars []EnvironmentVariable `mapstructure:"env_var,omitempty" toml:"env_var,omitempty"`
}
NOTE(jm): components are parsed using mapstructure. Please refer to the wiki entry for more.
func (JobComponentConfig) JSONSchemaExtend ¶
func (j JobComponentConfig) JSONSchemaExtend(schema *jsonschema.Schema)
func (*JobComponentConfig) Parse ¶
func (t *JobComponentConfig) Parse() error
func (*JobComponentConfig) Validate ¶
func (t *JobComponentConfig) Validate() error
type KubernetesManifestComponentConfig ¶
type KubernetesManifestComponentConfig struct {
// Inline manifest (mutually exclusive with Kustomize)
Manifest string `mapstructure:"manifest,omitempty" toml:"manifest,omitempty" features:"get,template"`
// Kustomize configuration (mutually exclusive with Manifest)
Kustomize *KustomizeConfig `mapstructure:"kustomize,omitempty" toml:"kustomize"`
// VCS configuration for kustomize sources (similar to Helm chart)
PublicRepo *PublicRepoConfig `mapstructure:"public_repo,omitempty" toml:"public_repo,omitempty"`
ConnectedRepo *ConnectedRepoConfig `mapstructure:"connected_repo,omitempty" toml:"connected_repo,omitempty"`
// Namespace supports template variables (e.g., {{.nuon.install.id}})
Namespace string `mapstructure:"namespace,omitempty" toml:"namespace,omitempty" jsonschema:"required"`
DriftSchedule *string `mapstructure:"drift_schedule,omitempty" toml:"drift_schedule,omitempty" features:"template" nuonhash:"omitempty"`
BuildTimeout string `mapstructure:"build_timeout,omitempty" toml:"build_timeout,omitempty" features:"template" nuonhash:"omitempty"`
DeployTimeout string `mapstructure:"deploy_timeout,omitempty" toml:"deploy_timeout,omitempty" features:"template" nuonhash:"omitempty"`
}
func (KubernetesManifestComponentConfig) JSONSchemaExtend ¶
func (k KubernetesManifestComponentConfig) JSONSchemaExtend(schema *jsonschema.Schema)
func (*KubernetesManifestComponentConfig) Parse ¶
func (k *KubernetesManifestComponentConfig) Parse() error
func (*KubernetesManifestComponentConfig) Validate ¶
func (t *KubernetesManifestComponentConfig) Validate() error
type KustomizeConfig ¶
type KustomizeConfig struct {
// Path to kustomization directory (relative to source root)
Path string `mapstructure:"path" jsonschema:"required" toml:"path"`
// Additional patch files to apply after kustomize build
Patches []string `mapstructure:"patches,omitempty" toml:"patches,omitempty"`
// Enable Helm chart inflation during kustomize build
EnableHelm bool `mapstructure:"enable_helm,omitempty" toml:"enable_helm,omitempty"`
// Load restrictor: none, rootOnly (default: rootOnly)
LoadRestrictor string `mapstructure:"load_restrictor,omitempty" toml:"load_restrictor,omitempty"`
}
KustomizeConfig configures kustomize build options
func (KustomizeConfig) JSONSchemaExtend ¶
func (k KustomizeConfig) JSONSchemaExtend(schema *jsonschema.Schema)
type MetadataConfig ¶
type MetadataConfig struct {
// Config file version
Version string `mapstructure:"version" toml:"version" jsonschema:"required"`
// Description for your app, which is rendered in the installers
Description string `mapstructure:"description,omitempty" toml:"description,omitempty"`
// Display name for the app, rendered in the installer
DisplayName string `mapstructure:"display_name,omitempty" toml:"display_name,omitempty"`
// Slack webhook url to receive notifications
SlackWebhookURL string `mapstructure:"slack_webhook_url" toml:"slack_webhook_url"`
// Readme for the app
Readme string `mapstructure:"readme,omitempty" toml:"readme,omitempty"`
}
func (MetadataConfig) JSONSchemaExtend ¶
func (m MetadataConfig) JSONSchemaExtend(schema *jsonschema.Schema)
type PermissionsConfig ¶
type PermissionsConfig struct {
ProvisionRole *AppAWSIAMRole `mapstructure:"provision_role,omitempty" toml:"provision_role,omitempty"`
DeprovisionRole *AppAWSIAMRole `mapstructure:"deprovision_role,omitempty" toml:"deprovision_role,omitempty"`
MaintenanceRole *AppAWSIAMRole `mapstructure:"maintenance_role,omitempty" toml:"maintenance_role,omitempty"`
Roles []*AppAWSIAMRole `mapstructure:"roles,omitempty" toml:"roles,omitempty"`
}
func (PermissionsConfig) JSONSchemaExtend ¶
func (a PermissionsConfig) JSONSchemaExtend(schema *jsonschema.Schema)
func (*PermissionsConfig) Validate ¶
func (a *PermissionsConfig) Validate() error
type PermissionsRoleType ¶
type PermissionsRoleType string
const ( PermissionsRoleTypeProvision PermissionsRoleType = "provision" PermissionsRoleTypeDeprovision PermissionsRoleType = "deprovision" PermissionsRoleTypeMaintenance PermissionsRoleType = "maintenance" )
type PoliciesConfig ¶
type PoliciesConfig struct {
Policies []AppPolicy `mapstructure:"policy,omitempty" toml:"policy,omitempty"`
// SourceFile is the file path this config was parsed from (set during parsing, not serialized)
SourceFile string `mapstructure:"-" toml:"-" json:"-" jsonschema:"-"`
}
func (*PoliciesConfig) GetSourceFile ¶
func (a *PoliciesConfig) GetSourceFile() string
func (PoliciesConfig) JSONSchemaExtend ¶
func (a PoliciesConfig) JSONSchemaExtend(schema *jsonschema.Schema)
func (*PoliciesConfig) SetSourceFile ¶
func (a *PoliciesConfig) SetSourceFile(path string)
type PublicImageConfig ¶
type PublicImageConfig struct {
ImageURL string `mapstructure:"image_url,omitempty" toml:"image_url,omitempty" jsonschema:"required" `
Tag string `mapstructure:"tag,omitempty" toml:"tag,omitempty" jsonschema:"required"`
}
func (PublicImageConfig) JSONSchemaExtend ¶
func (p PublicImageConfig) JSONSchemaExtend(schema *jsonschema.Schema)
type PublicRepoConfig ¶
type PublicRepoConfig struct {
Repo string `mapstructure:"repo,omitempty" toml:"repo,omitempty" jsonschema:"required"`
Directory string `mapstructure:"directory,omitempty" toml:"directory,omitempty" jsonschema:"required"`
Branch string `mapstructure:"branch,omitempty" toml:"branch,omitempty" jsonschema:"required"`
}
func (PublicRepoConfig) JSONSchemaExtend ¶
func (p PublicRepoConfig) JSONSchemaExtend(schema *jsonschema.Schema)
type SchemaBuilder ¶
type SchemaBuilder struct {
// contains filtered or unexported fields
}
SchemaBuilder provides a Cobra-style fluent builder API for constructing JSON Schema properties. It wraps a jsonschema.Schema and provides Field() method to start building individual fields.
Example usage with nested objects:
func (h HelmRepoConfig) JSONSchemaExtend(s *jsonschema.Schema) {
NewSchemaBuilder(s).
Field("repo_url").
Short("URL of repo").
Long("Full URL to the Helm chart repository").
Example("https://charts.bitnami.com/bitnami").
Required().
Field("helm_repo").
Short("Helm repository configuration").
Object(func(sb *SchemaBuilder) {
sb.Field("repo_url").Short("Repository URL").Format("uri")
sb.Field("chart").Short("Chart name")
sb.Field("version").Short("Chart version")
}).
ObjectRequired("repo_url", "chart")
}
func NewSchemaBuilder ¶
func NewSchemaBuilder(s *jsonschema.Schema) *SchemaBuilder
NewSchemaBuilder creates a new SchemaBuilder for the given JSON schema.
func (*SchemaBuilder) Field ¶
func (sb *SchemaBuilder) Field(name string) *FieldBuilder
Field returns a FieldBuilder for the property with the given name. If the property doesn't exist in the schema, it will be created.
type SecretsConfig ¶
type SecretsConfig struct {
Secrets []*AppSecret `mapstructure:"secret,omitempty" toml:"secret,omitempty"`
}
func (SecretsConfig) JSONSchemaExtend ¶
func (a SecretsConfig) JSONSchemaExtend(schema *jsonschema.Schema)
func (*SecretsConfig) Validate ¶
func (a *SecretsConfig) Validate() error
type SourceFileGetter ¶
type SourceFileGetter interface {
GetSourceFile() string
}
SourceFileGetter is implemented by config types that can report their source file path.
type SourceFileSetter ¶
type SourceFileSetter interface {
SetSourceFile(path string)
}
SourceFileSetter is implemented by config types that can track their source file path. This is used during parsing to record which file a config object was loaded from.
type StackConfig ¶
type StackConfig struct {
Type string `mapstructure:"type" toml:"type"`
Name string `mapstructure:"name" toml:"name" jsonschema:"required" features:"template"`
Description string `mapstructure:"description" toml:"description" jsonschema:"required" features:"template"`
VPCNestedTemplateURL string `mapstructure:"vpc_nested_template_url" toml:"vpc_nested_template_url" features:"template"`
RunnerNestedTemplateURL string `mapstructure:"runner_nested_template_url" toml:"runner_nested_template_url" features:"template"`
}
func (StackConfig) JSONSchemaExtend ¶
func (a StackConfig) JSONSchemaExtend(schema *jsonschema.Schema)
type TerraformModuleComponentConfig ¶
type TerraformModuleComponentConfig struct {
TerraformVersion string `mapstructure:"terraform_version" toml:"terraform_version" jsonschema:"required"`
EnvVarMap map[string]string `mapstructure:"env_vars,omitempty" toml:"env_vars,omitempty"`
VarsMap map[string]string `mapstructure:"vars,omitempty" toml:"vars,omitempty"`
VariablesFiles []TerraformVariablesFile `mapstructure:"var_file,omitempty" toml:"var_file,omitempty"`
PublicRepo *PublicRepoConfig `mapstructure:"public_repo,omitempty" toml:"public_repo,omitempty" jsonschema:"oneof_required=connected_repo"`
ConnectedRepo *ConnectedRepoConfig `mapstructure:"connected_repo,omitempty" toml:"connected_repo,omitempty" jsonschema:"oneof_required=public_repo"`
DriftSchedule *string `mapstructure:"drift_schedule,omitempty" toml:"drift_schedule,omitempty" features:"template" nuonhash:"omitempty"`
BuildTimeout string `mapstructure:"build_timeout,omitempty" toml:"build_timeout,omitempty" features:"template" nuonhash:"omitempty"`
DeployTimeout string `mapstructure:"deploy_timeout,omitempty" toml:"deploy_timeout,omitempty" features:"template" nuonhash:"omitempty"`
// deprecated
Variables []TerraformVariable `mapstructure:"var,omitempty" toml:"var,omitempty"`
EnvVars []EnvironmentVariable `mapstructure:"env_var,omitempty" toml:"env_var,omitempty"`
}
NOTE(jm): components are parsed using mapstructure. Please refer to the wiki entry for more.
func (TerraformModuleComponentConfig) JSONSchemaExtend ¶
func (t TerraformModuleComponentConfig) JSONSchemaExtend(schema *jsonschema.Schema)
func (*TerraformModuleComponentConfig) Parse ¶
func (t *TerraformModuleComponentConfig) Parse() error
func (*TerraformModuleComponentConfig) Validate ¶
func (t *TerraformModuleComponentConfig) Validate() error
type TerraformVariable ¶
type TerraformVariable struct {
Name string `mapstructure:"name,omitempty" toml:"name"`
Value string `mapstructure:"value,omitempty" toml:"value"`
}
func (TerraformVariable) JSONSchemaExtend ¶
func (t TerraformVariable) JSONSchemaExtend(schema *jsonschema.Schema)
type TerraformVariablesFile ¶
type TerraformVariablesFile struct {
Contents string `toml:"contents" mapstructure:"contents,omitempty" features:"get,template"`
}
func (TerraformVariablesFile) JSONSchemaExtend ¶
func (t TerraformVariablesFile) JSONSchemaExtend(schema *jsonschema.Schema)
Source Files
¶
- action_config.go
- app_branch_config.go
- app_break_glass.go
- app_input.go
- app_permissions.go
- app_policies.go
- app_runner.go
- app_sandbox.go
- app_secrets.go
- app_stack.go
- backend.go
- component.go
- config.go
- decode_component.go
- decode_install.go
- decode_sources.go
- decoder.go
- docker_build_component.go
- err.go
- external_image_component.go
- helm_chart_component.go
- install.go
- installer.go
- job_component.go
- json.go
- kubernetes_manifest_component.go
- mapstructure.go
- metadata.go
- resource.go
- schema.go
- schema_builder.go
- shared.go
- shared_aws_iam_policy.go
- shared_aws_iam_role.go
- source_file.go
- terraform_module_component.go
- toml.go
- vcs.go