config

package
v0.19.896 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2026 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCompleteInputConfig

func GetCompleteInputConfig() *config.AppInputConfig

GetCompleteInputConfig returns an input config with sample groups and inputs.

func GetDockerBuildComponent

func GetDockerBuildComponent(name string) *config.Component

GetDockerBuildComponent returns a fake docker build component with the given name.

func GetExternalImageComponent

func GetExternalImageComponent(name string) *config.Component

GetExternalImageComponent returns a fake external image component with the given name.

func GetHelmComponent

func GetHelmComponent(name string) *config.Component

GetHelmComponent returns a fake helm chart component with the given name.

func GetInput

func GetInput(name, group string) config.AppInput

GetInput returns a fake input for the given group.

Parameters:

  • name: the input name (used for templating)
  • group: the group this input belongs to

func GetInputGroup

func GetInputGroup(name string) config.AppInputGroup

GetInputGroup returns a fake input group with the given name.

func GetJobComponent

func GetJobComponent(name string) *config.Component

GetJobComponent returns a fake job component with the given name.

func GetKubernetesManifestComponent

func GetKubernetesManifestComponent(name string) *config.Component

GetKubernetesManifestComponent returns a fake kubernetes manifest component with the given name.

func GetMinimalAppConfig

func GetMinimalAppConfig() *config.AppConfig

GetMinimalAppConfig returns a minimal valid AppConfig for use in tests. This is the recommended way to get a fake AppConfig in tests.

Example usage:

cfg := testseedconfig.GetMinimalAppConfig()
// Customize as needed
cfg.Components = append(cfg.Components, myComponent)

func GetMinimalBreakGlassConfig

func GetMinimalBreakGlassConfig() *config.BreakGlass

GetMinimalBreakGlassConfig returns a minimal valid BreakGlass config. Returns an empty config (no roles) which is valid.

func GetMinimalInputConfig

func GetMinimalInputConfig() *config.AppInputConfig

GetMinimalInputConfig returns a minimal valid AppInputConfig for use in tests. Returns an empty config (no inputs or groups) which is valid.

Example usage:

inputs := testseedconfig.GetMinimalInputConfig()
inputs.Groups = append(inputs.Groups, GetInputGroup("database"))
inputs.Inputs = append(inputs.Inputs, GetInput("db_url", "database"))

func GetMinimalPermissionsConfig

func GetMinimalPermissionsConfig() *config.PermissionsConfig

GetMinimalPermissionsConfig returns a minimal valid PermissionsConfig. Returns an empty config (no roles) which is valid.

func GetMinimalPoliciesConfig

func GetMinimalPoliciesConfig() *config.PoliciesConfig

GetMinimalPoliciesConfig returns a minimal valid PoliciesConfig. Returns an empty config (no policies) which is valid.

func GetMinimalRunnerConfig

func GetMinimalRunnerConfig() *config.AppRunnerConfig

GetMinimalRunnerConfig returns a minimal valid AppRunnerConfig for use in tests.

Uses "kubernetes" runner type which is the most common in production.

Example usage:

runner := testseedconfig.GetMinimalRunnerConfig()
runner.EnvVarMap["DEBUG"] = "true"

func GetMinimalSandboxConfig

func GetMinimalSandboxConfig() *config.AppSandboxConfig

GetMinimalSandboxConfig returns a minimal valid AppSandboxConfig for use in tests.

Uses PublicRepo configuration which doesn't require VCS connections. This is the simplest valid sandbox config for testing.

Example usage:

sandbox := testseedconfig.GetMinimalSandboxConfig()
sandbox.DriftSchedule = generics.ToPtr("0 0 * * *")

func GetMinimalSandboxConfigWithConnectedRepo

func GetMinimalSandboxConfigWithConnectedRepo() *config.AppSandboxConfig

GetMinimalSandboxConfigWithConnectedRepo returns a sandbox config using a connected repo. Use this when testing VCS connection functionality.

func GetMinimalSecretsConfig

func GetMinimalSecretsConfig() *config.SecretsConfig

GetMinimalSecretsConfig returns a minimal valid SecretsConfig. Returns an empty config (no secrets) which is valid.

func GetMinimalStackConfig

func GetMinimalStackConfig() *config.StackConfig

GetMinimalStackConfig returns a minimal valid StackConfig.

func GetTerraformComponent

func GetTerraformComponent(name string) *config.Component

GetTerraformComponent returns a fake terraform module component with the given name.

Types

This section is empty.

Jump to

Keyboard shortcuts

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