apps

package
v0.19.783 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2026 License: AGPL-3.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ExampleAppConfigsRepo = "https://github.com/nuonco/example-app-configs"
	DefaultBranch         = "main"
	DefaultTempDirectory  = "/tmp/"
)

Variables

This section is empty.

Functions

func BuildClickhouseAWSEKSConfigStructure

func BuildClickhouseAWSEKSConfigStructure(ctx context.Context, configName string) (*generator.ConfigStructure, error)

func BuildCockroachdbAWSEKSConfigStructure

func BuildCockroachdbAWSEKSConfigStructure(ctx context.Context, configName string) (*generator.ConfigStructure, error)

func BuildConfigStructureFromParams

func BuildConfigStructureFromParams(path string, params *InitParams) *generator.ConfigStructure

build config structure from raw params

func BuildECSBreakglassConfigStructure

func BuildECSBreakglassConfigStructure(ctx context.Context, configName string) (*generator.ConfigStructure, error)

func BuildECSSimpleConfigStructure

func BuildECSSimpleConfigStructure(ctx context.Context, configName string) (*generator.ConfigStructure, error)

func BuildEKSAutoConfigStructure

func BuildEKSAutoConfigStructure(ctx context.Context, configName string) (*generator.ConfigStructure, error)

func BuildEKSSimpleConfigStructure

func BuildEKSSimpleConfigStructure(ctx context.Context, configName string) (*generator.ConfigStructure, error)

func BuildGrafanaAWSEKSConfigStructure

func BuildGrafanaAWSEKSConfigStructure(ctx context.Context, configName string) (*generator.ConfigStructure, error)

func BuildNamedConfigStructure

func BuildNamedConfigStructure(ctx context.Context, configName, folderName string) (*generator.ConfigStructure, error)

func ConvertToConfigStructure

func ConvertToConfigStructure(appConfig *config.AppConfig, targetPath string) (*generator.ConfigStructure, error)

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 ConfigGenParams

type ConfigGenParams struct {
	Path            string
	EnableDefaults  bool
	EnableComments  bool
	Overwrite       bool
	SkipNonRequired bool
}

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) Clone

func (r *ConfigReader) Clone(ctx context.Context) error

func (*ConfigReader) ReadConfig

func (r *ConfigReader) ReadConfig(ctx context.Context) (*config.AppConfig, error)

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 InitParams struct {
	TerraformVersion string
	AppName          string
	StackType        string
	RunnerType       string
	ComponentTypes   []string
	Actions          []string
	PrebuiltTemplate string
}

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 RunnerParams struct {
	RunnerType    string
	EnvVars       map[string]string
	HelmDriver    string
	InitScriptURL string
}

type SampleActionsParams

type SampleActionsParams struct {
	EnableSampleActions bool
	Actions             []string
}

type SampleComponentParams

type SampleComponentParams struct {
	EnableSampleComponents bool
	ComponentTypes         []string
}

type SandboxParams

type SandboxParams struct {
	TerraformVersion string
	PublicRepo       string
	PublicRepoDir    string
	PublicRepoBranch string
	ConnectedRepo    string
	ConnectedRepoDir string
	ConnectedBranch  string
	DriftSchedule    string
	EnvVars          map[string]string
	Vars             map[string]string
	VarFiles         []string
}

type Service

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

func New

func New(v *validator.Validate, apiClient nuon.Client, cfg *config.Config) *Service

func (*Service) Create

func (s *Service) Create(ctx context.Context, appName string, asJSON, noSelect bool) error

func (*Service) Delete

func (s *Service) Delete(ctx context.Context, appID string, asJSON bool) error

func (*Service) DeprecatedSyncDir

func (s *Service) DeprecatedSyncDir(ctx context.Context, dir string, version string) error

func (*Service) Get

func (s *Service) Get(ctx context.Context, appID string, asJSON bool) error

func (*Service) GetInputConfig

func (s *Service) GetInputConfig(ctx context.Context, appID string, asJSON bool) error

func (*Service) GetRunnerConfig

func (s *Service) GetRunnerConfig(ctx context.Context, appID string, asJSON bool) error

func (*Service) GetSandboxConfig

func (s *Service) GetSandboxConfig(ctx context.Context, appID string, asJSON bool) error

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 (s *Service) InitConfigFile(ctx context.Context, path string, configType string, genParams ConfigGenParams) error

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) List

func (s *Service) List(ctx context.Context, offset, limit int, asJSON bool) error

func (*Service) ListConfigs

func (s *Service) ListConfigs(ctx context.Context, appID string, offset, limit int, asJSON bool) error

func (*Service) Parse

func (s *Service) Parse(ctx context.Context, file string)

func (*Service) Rename

func (s *Service) Rename(ctx context.Context, appID string, name string, rename, asJSON bool) error

func (*Service) Select

func (s *Service) Select(ctx context.Context, appID string, asJSON bool) error

func (*Service) SetCurrent

func (s *Service) SetCurrent(ctx context.Context, appID string, asJSON bool) error

func (*Service) SyncDir

func (s *Service) SyncDir(ctx context.Context, dir string, version string) error

func (*Service) UnsetCurrent

func (s *Service) UnsetCurrent(ctx context.Context) error

func (*Service) ValidateDir

func (s *Service) ValidateDir(ctx context.Context, dir string) error

type StackParams

type StackParams struct {
	Type                    string
	Name                    string
	Description             string
	VPCNestedTemplateURL    string
	RunnerNestedTemplateURL string
}

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

Jump to

Keyboard shortcuts

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