Documentation
¶
Index ¶
- Constants
- func BuildClickhouseAWSEKSConfigStructure(ctx context.Context, configName string) (*generator.ConfigStructure, error)
- func BuildCockroachdbAWSEKSConfigStructure(ctx context.Context, configName string) (*generator.ConfigStructure, error)
- func BuildConfigStructureFromParams(path string, params *InitParams) *generator.ConfigStructure
- func BuildECSBreakglassConfigStructure(ctx context.Context, configName string) (*generator.ConfigStructure, error)
- func BuildECSSimpleConfigStructure(ctx context.Context, configName string) (*generator.ConfigStructure, error)
- func BuildEKSAutoConfigStructure(ctx context.Context, configName string) (*generator.ConfigStructure, error)
- func BuildEKSSimpleConfigStructure(ctx context.Context, configName string) (*generator.ConfigStructure, error)
- func BuildGrafanaAWSEKSConfigStructure(ctx context.Context, configName string) (*generator.ConfigStructure, error)
- func BuildNamedConfigStructure(ctx context.Context, configName, folderName string) (*generator.ConfigStructure, error)
- func ConvertToConfigStructure(appConfig *config.AppConfig, targetPath string) (*generator.ConfigStructure, error)
- func NewGen(params ConfigGenParams) *generator.ConfigGen
- func ReadAndConvertConfig(ctx context.Context, params ConfigReaderParams, targetPath string) (*generator.ConfigStructure, error)
- type ActionParams
- type BuildOutcome
- type ConfigGenParams
- type ConfigReader
- type ConfigReaderParams
- type HelmChartComponentParams
- type InitParams
- type KubernetesManifestComponentParams
- type RunnerParams
- type SampleActionsParams
- type SampleComponentParams
- type SandboxParams
- type Service
- func (s *Service) Build(ctx context.Context, appID, configID string) error
- func (s *Service) Create(ctx context.Context, appName string, asJSON, noSelect bool) error
- func (s *Service) CreateBranch(ctx context.Context, appID, name string, asJSON bool) error
- func (s *Service) Delete(ctx context.Context, appID string, asJSON bool) error
- func (s *Service) DeleteBranch(ctx context.Context, appID, branchID string, asJSON bool) error
- func (s *Service) DeprecatedSyncDir(ctx context.Context, dir string, version string, opts SyncOptions) error
- func (s *Service) Deselect(ctx context.Context) error
- func (s *Service) Get(ctx context.Context, appID string, asJSON bool) error
- func (s *Service) GetBranch(ctx context.Context, appID, branchID string, asJSON bool) error
- func (s *Service) GetInputConfig(ctx context.Context, appID string, asJSON bool) error
- func (s *Service) GetRunnerConfig(ctx context.Context, appID string, asJSON bool) error
- func (s *Service) GetSandboxConfig(ctx context.Context, appID string, asJSON bool) error
- func (s *Service) Init(ctx context.Context, genParams ConfigGenParams, params *InitParams) error
- func (s *Service) InitActionConfig(ctx context.Context, genParams ConfigGenParams, params ActionParams) error
- func (s *Service) InitConfigFile(ctx context.Context, path string, configType string, genParams ConfigGenParams) error
- func (s *Service) InitHelmChartComponentConfig(ctx context.Context, genParams ConfigGenParams, ...) error
- func (s *Service) InitKubernetesManifestComponentConfig(ctx context.Context, genParams ConfigGenParams, ...) error
- func (s *Service) InitRunnerConfig(ctx context.Context, genParams ConfigGenParams, params RunnerParams) error
- func (s *Service) InitSampleActions(ctx context.Context, genParams ConfigGenParams, params SampleActionsParams) error
- func (s *Service) InitSampleComponents(ctx context.Context, genParams ConfigGenParams, params SampleComponentParams) error
- func (s *Service) InitSandboxConfig(ctx context.Context, genParams ConfigGenParams, params SandboxParams) error
- func (s *Service) InitStackConfig(ctx context.Context, genParams ConfigGenParams, params StackParams) error
- func (s *Service) InitTerraformModuleComponentConfig(ctx context.Context, genParams ConfigGenParams, ...) error
- func (s *Service) List(ctx context.Context, offset, limit int, asJSON bool) error
- func (s *Service) ListBranchRuns(ctx context.Context, appID, branchID string, asJSON bool) error
- func (s *Service) ListBranches(ctx context.Context, appID string, asJSON bool) error
- func (s *Service) ListConfigs(ctx context.Context, appID string, offset, limit int, asJSON bool) error
- func (s *Service) Parse(ctx context.Context, file string)
- func (s *Service) Rename(ctx context.Context, appID string, name string, rename, asJSON bool) error
- func (s *Service) Select(ctx context.Context, appID string, asJSON bool) error
- func (s *Service) SetCurrent(ctx context.Context, appID string, asJSON bool) error
- func (s *Service) SyncDir(ctx context.Context, dir string, version string, opts SyncOptions) error
- func (s *Service) SyncDirWithCreate(ctx context.Context, dir string, version string, opts SyncOptions) error
- func (s *Service) TriggerBranchRun(ctx context.Context, appID, branchID string, planOnly, force, asJSON bool) error
- func (s *Service) UnsetCurrent(ctx context.Context) error
- func (s *Service) ValidateDir(ctx context.Context, dir string) error
- type StackParams
- type SyncOptions
- type TerraformModuleComponentParams
Constants ¶
const ( ExampleAppConfigsRepo = "https://github.com/nuonco/example-app-configs" DefaultBranch = "main" DefaultTempDirectory = "/tmp/" )
Variables ¶
This section is empty.
Functions ¶
func BuildConfigStructureFromParams ¶
func BuildConfigStructureFromParams(path string, params *InitParams) *generator.ConfigStructure
build config structure from raw params
func NewGen ¶
func NewGen(params ConfigGenParams) *generator.ConfigGen
func ReadAndConvertConfig ¶
func ReadAndConvertConfig(ctx context.Context, params ConfigReaderParams, targetPath string) (*generator.ConfigStructure, error)
ReadAndConvertConfig is a convenience function that clones, reads, and converts the config in one call
Types ¶
type ActionParams ¶
type ActionParams struct {
Name string
Timeout string
TriggerType string
CronSchedule string
ComponentName string
StepName string
StepCommand string
InlineContents string
EnvVars map[string]string
PublicRepo string
PublicRepoDir string
PublicRepoBranch string
ConnectedRepo string
ConnectedRepoDir string
ConnectedBranch string
BreakGlassRole string
Dependencies []string
}
type BuildOutcome ¶ added in v0.19.1049
type BuildOutcome struct {
ComponentID string `json:"component_id"`
ComponentName string `json:"component_name"`
Status string `json:"status"`
}
BuildOutcome describes the terminal state of one scheduled component build.
type ConfigGenParams ¶
type ConfigReader ¶
type ConfigReader struct {
// contains filtered or unexported fields
}
ConfigReader handles cloning and reading app configs from remote repositories
func NewConfigReader ¶
func NewConfigReader(params ConfigReaderParams) (*ConfigReader, error)
func (*ConfigReader) Cleanup ¶
func (r *ConfigReader) Cleanup() error
func (*ConfigReader) ReadConfig ¶
type ConfigReaderParams ¶
type ConfigReaderParams struct {
// RepoURL url to configs repo, default nuonco/example-app-config
RepoURL string
// Branch, default branch main
Branch string
// Folder is app config folder
Folder string
// TempDir is location of temp directory used to clone repo
TempDir string
}
ConfigReaderParams holds parameters for reading remote app configs
type HelmChartComponentParams ¶
type HelmChartComponentParams struct {
Name string
VarName string
Dependencies []string
ChartName string
Values map[string]string
ValuesFiles []string
PublicRepo string
PublicRepoDir string
PublicRepoBranch string
ConnectedRepo string
ConnectedRepoDir string
ConnectedBranch string
HelmRepoURL string
HelmChart string
HelmVersion string
Namespace string
StorageDriver string
TakeOwnership bool
DriftSchedule string
}
HelmChartComponentParams holds parameters for Helm chart component configuration
type InitParams ¶
type KubernetesManifestComponentParams ¶
type KubernetesManifestComponentParams struct {
Name string
VarName string
Dependencies []string
Manifest string
Namespace string
DriftSchedule string
}
KubernetesManifestComponentParams holds parameters for Kubernetes manifest component configuration
type RunnerParams ¶
type SampleActionsParams ¶
type SampleComponentParams ¶
type SandboxParams ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func (*Service) CreateBranch ¶ added in v0.19.1012
func (*Service) DeleteBranch ¶ added in v0.19.1025
func (*Service) DeprecatedSyncDir ¶
func (*Service) GetInputConfig ¶
func (*Service) GetRunnerConfig ¶
func (*Service) GetSandboxConfig ¶
func (*Service) Init ¶
func (s *Service) Init(ctx context.Context, genParams ConfigGenParams, params *InitParams) error
func (*Service) InitActionConfig ¶
func (s *Service) InitActionConfig(ctx context.Context, genParams ConfigGenParams, params ActionParams) error
func (*Service) InitConfigFile ¶
func (*Service) InitHelmChartComponentConfig ¶
func (s *Service) InitHelmChartComponentConfig(ctx context.Context, genParams ConfigGenParams, params HelmChartComponentParams) error
func (*Service) InitKubernetesManifestComponentConfig ¶
func (s *Service) InitKubernetesManifestComponentConfig(ctx context.Context, genParams ConfigGenParams, params KubernetesManifestComponentParams) error
func (*Service) InitRunnerConfig ¶
func (s *Service) InitRunnerConfig(ctx context.Context, genParams ConfigGenParams, params RunnerParams) error
func (*Service) InitSampleActions ¶
func (s *Service) InitSampleActions(ctx context.Context, genParams ConfigGenParams, params SampleActionsParams) error
func (*Service) InitSampleComponents ¶
func (s *Service) InitSampleComponents(ctx context.Context, genParams ConfigGenParams, params SampleComponentParams) error
func (*Service) InitSandboxConfig ¶
func (s *Service) InitSandboxConfig(ctx context.Context, genParams ConfigGenParams, params SandboxParams) error
func (*Service) InitStackConfig ¶
func (s *Service) InitStackConfig(ctx context.Context, genParams ConfigGenParams, params StackParams) error
func (*Service) InitTerraformModuleComponentConfig ¶
func (s *Service) InitTerraformModuleComponentConfig(ctx context.Context, genParams ConfigGenParams, params TerraformModuleComponentParams) error
func (*Service) ListBranchRuns ¶ added in v0.19.1012
func (*Service) ListBranches ¶ added in v0.19.1012
func (*Service) ListConfigs ¶
func (*Service) SetCurrent ¶
func (*Service) SyncDirWithCreate ¶ added in v0.19.894
func (*Service) TriggerBranchRun ¶ added in v0.19.1012
type StackParams ¶
type SyncOptions ¶ added in v0.19.963
type SyncOptions struct {
// AppFlag is the resolved value of the --app-id flag (ID or name) or picked from context.
AppFlag string
// Force, when true, suppresses the directory-mismatch confirmation prompt
// and syncs to AppFlag regardless of the working directory name.
Force bool
// Create indicates the app should be created if it does not exist.
Create bool
// Branch optionally targets a specific app branch for this sync.
Branch string
// AppBranch triggers interactive branch selection when true.
AppBranch bool
// Preview creates a plan-only run (no apply). Only used with Branch or AppBranch.
Preview bool
// PrintJSON emits a machine-readable result on success (--output json/agent).
PrintJSON bool
// NoWait skips waiting for scheduled component builds to complete; the
// exit code then reflects the sync only.
NoWait bool
}
SyncOptions controls how the target app is resolved when syncing a directory.
type TerraformModuleComponentParams ¶
type TerraformModuleComponentParams struct {
Name string
VarName string
Dependencies []string
TerraformVersion string
EnvVars map[string]string
Vars map[string]string
VarFiles []string
PublicRepo string
PublicRepoDir string
PublicRepoBranch string
ConnectedRepo string
ConnectedRepoDir string
ConnectedBranch string
DriftSchedule string
}
TerraformModuleComponentParams holds parameters for Terraform module component configuration