helpers

package
v0.19.821 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2026 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PreloadComponentBuildConfig

func PreloadComponentBuildConfig(db *gorm.DB) *gorm.DB

component config connections

func PreloadLatestConfig

func PreloadLatestConfig(db *gorm.DB) *gorm.DB

component config connections

Types

type Helpers

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

func New

func New(params Params) *Helpers

func (*Helpers) ClearComponentDependencies

func (h *Helpers) ClearComponentDependencies(ctx context.Context, compID string) error

func (*Helpers) CreateComponentBuild

func (s *Helpers) CreateComponentBuild(ctx context.Context, cmpID string, useLatest bool, gitRef *string) (*app.ComponentBuild, error)

func (*Helpers) CreateComponentDependencies

func (h *Helpers) CreateComponentDependencies(ctx context.Context, compID string, dependencyIDs []string) error

NOTE: GORM does not support callbacks when using a custom join table on many2many relationships + associations mode, so this is a helper used to create component dependencies

func (*Helpers) EnsureInstallComponents

func (h *Helpers) EnsureInstallComponents(ctx context.Context, appID string, installIDs []string) error

func (*Helpers) GetComponent

func (s *Helpers) GetComponent(ctx context.Context, cmpID string) (*app.Component, error)

func (*Helpers) GetComponentByName

func (s *Helpers) GetComponentByName(ctx context.Context, appID, name string) (*app.Component, error)

func (*Helpers) GetComponentCommit

func (s *Helpers) GetComponentCommit(ctx context.Context, cmpID string) (*app.VCSConnectionCommit, error)

GetComponentCommit will return a commit for a component, when a connected git source is attached.

func (*Helpers) GetComponentIDs

func (s *Helpers) GetComponentIDs(ctx context.Context, appID string, comps []string) ([]string, error)

func (*Helpers) GetComponentLatestBuilds

func (s *Helpers) GetComponentLatestBuilds(ctx context.Context, cmpIDs ...string) ([]app.ComponentBuild, error)

func (*Helpers) HelmChartFromICs

func (h *Helpers) HelmChartFromICs(ics []app.InstallComponent, helmCmps map[string]bool) []app.HelmChart

func (*Helpers) HelmReleaseFromIC

func (h *Helpers) HelmReleaseFromIC(ic app.InstallComponent) app.HelmChart

func (*Helpers) TFWorkSpaceFromIC

func (h *Helpers) TFWorkSpaceFromIC(ic app.InstallComponent) app.TerraformWorkspace

func (*Helpers) TFWorkspacesFromICs

func (h *Helpers) TFWorkspacesFromICs(ics []app.InstallComponent) []app.TerraformWorkspace

func (*Helpers) UpdateComponentType

func (s *Helpers) UpdateComponentType(ctx context.Context, cmpID string, cmpType app.ComponentType) error

type Params

type Params struct {
	fx.In

	V          *validator.Validate
	Cfg        *internal.Config
	DB         *gorm.DB `name:"psql"`
	VcsHelpers *vcshelpers.Helpers
}

Jump to

Keyboard shortcuts

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