helpers

package
v0.19.913 Latest Latest
Warning

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

Go to latest
Published: May 1, 2026 License: AGPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ComponentWorkflowStepsQueueName is the named queue on each component
	// where execute-workflow-step signals run for component builds.
	ComponentWorkflowStepsQueueName = "component-workflow-steps"
)

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 ComponentQueueIDs added in v0.19.903

type ComponentQueueIDs struct {
	DefaultQueueID       string `json:"default_queue_id"`
	WorkflowStepsQueueID string `json:"workflow_steps_queue_id"`
}

ComponentQueueIDs holds the queue IDs for a component.

type CreateComponentParams added in v0.19.894

type CreateComponentParams struct {
	AppID        string
	Name         string
	VarName      string
	Dependencies []string
	Labels       map[string]string
}

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) CreateComponent added in v0.19.894

func (h *Helpers) CreateComponent(ctx context.Context, params *CreateComponentParams) (*app.Component, 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) EnsureComponentQueues added in v0.19.903

func (h *Helpers) EnsureComponentQueues(ctx context.Context, componentID string) (*ComponentQueueIDs, error)

EnsureComponentQueues creates all Temporal queue workflows for a component and returns the queue IDs. Safe to call multiple times — Create is idempotent.

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) GetComponentByID added in v0.19.903

func (s *Helpers) GetComponentByID(ctx context.Context, componentID 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) GetComponentQueueIDs added in v0.19.903

func (h *Helpers) GetComponentQueueIDs(ctx context.Context, componentID string) (*ComponentQueueIDs, error)

GetComponentQueueIDs looks up existing queue IDs for a component.

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
	QueueClient *queueclient.Client
}

Jump to

Keyboard shortcuts

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