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: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetActionReferences

func GetActionReferences(cfg *app.AppConfig, action string) []refs.Ref

func GetComponentReferences

func GetComponentReferences(cfg *app.AppConfig, comp string) []refs.Ref

NOTE(jm): this is a function, because it is used directly within a workflow.

func GetStackReferences

func GetStackReferences(cfg *app.AppConfig) []refs.Ref

func IsEmail

func IsEmail(email string) bool

func PreloadAppActionWorkflowConfigs

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

preload action workflow configs

func PreloadAppBreakGlassConfig

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

break glass config

func PreloadAppConfigComponentConfigConnections

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

component config connections

func PreloadAppConfigInputConfig

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

input config

func PreloadAppConfigPermissionsConfig

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

permissions config

func PreloadAppConfigPolicyConfig

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

policies config

func PreloadAppConfigRunnerConfig

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

runner config

func PreloadAppConfigSandboxConfig

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

sandbox config

func PreloadAppConfigStackConfig

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

cloudformation stack config

func PreloadAppOperationRoleConfig added in v0.19.807

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

component role config

func PreloadAppSecretsConfig

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

secrets config

func PreloadComponentConfigConnections

func PreloadComponentConfigConnections(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) CliVerisionAllowed

func (h *Helpers) CliVerisionAllowed(ctx context.Context, version string) (bool, error)

func (*Helpers) CreateAppBranch

func (h *Helpers) CreateAppBranch(ctx context.Context, orgID, appID, name string, connectedGithubVCSConfigID string) (*app.AppBranch, error)

func (*Helpers) CreateWorkflow

func (s *Helpers) CreateWorkflow(ctx context.Context,
	appBranchID string,
	workflowType app.WorkflowType,
	metadata map[string]string,
	planOnly bool,
) (*app.Workflow, error)

func (*Helpers) DeleteAppComponent

func (s *Helpers) DeleteAppComponent(ctx context.Context, compID string) error

func (*Helpers) GetAppComponents

func (s *Helpers) GetAppComponents(ctx context.Context, appID string) ([]app.Component, error)

func (*Helpers) GetAppComponentsAtConfigVersion

func (h *Helpers) GetAppComponentsAtConfigVersion(ctx context.Context, appID string, appCfgVersion int, componentIDs []string) ([]app.Component, error)

This returns all app components for a point in time

func (*Helpers) GetAppInstalls

func (s *Helpers) GetAppInstalls(ctx context.Context, appID string) ([]app.Install, error)

func (*Helpers) GetAppLatestConfig

func (h *Helpers) GetAppLatestConfig(ctx context.Context, appID string) (*app.AppConfig, error)

func (*Helpers) GetComponentDependents

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

func (*Helpers) GetComponents

func (s *Helpers) GetComponents(ctx context.Context, compIDs []string) ([]app.Component, error)

func (*Helpers) GetConfigComponentDeployOrder

func (h *Helpers) GetConfigComponentDeployOrder(ctx context.Context, cfg *app.AppConfig, compID string) ([]string, error)

func (*Helpers) GetConfigDefaultComponentOrder

func (h *Helpers) GetConfigDefaultComponentOrder(ctx context.Context, cfg *app.AppConfig) ([]string, error)

func (*Helpers) GetConfigGraph

func (h *Helpers) GetConfigGraph(ctx context.Context, cfg *app.AppConfig) (graph.Graph[string, *app.Component], error)

GetConfigGraph builds a directed acyclic graph of component dependencies and returns both the graph and a sorted list of components in deployment order (dependencies first)

func (*Helpers) GetConfigReverseDefaultComponentOrder

func (h *Helpers) GetConfigReverseDefaultComponentOrder(ctx context.Context, cfg *app.AppConfig) ([]string, error)

func (*Helpers) GetFullAppConfig

func (h *Helpers) GetFullAppConfig(ctx context.Context, appConfigID string, skipAdditionalChecks bool) (*app.AppConfig, error)

func (*Helpers) GetPoliciesConfigByAppConfigID

func (h *Helpers) GetPoliciesConfigByAppConfigID(ctx context.Context, appConfigID string) (*app.AppPoliciesConfig, error)

func (*Helpers) GetReverseConfigComponentDeployOrder

func (h *Helpers) GetReverseConfigComponentDeployOrder(ctx context.Context, cfg *app.AppConfig, compID string) ([]string, error)

func (*Helpers) ValidateGraph

func (h *Helpers) ValidateGraph(ctx context.Context, appID string) error

type Params

type Params struct {
	fx.In

	Cfg      *internal.Config
	GhClient *github.Client
	DB       *gorm.DB `name:"psql"`
	V        *validator.Validate
	L        *zap.Logger
}

Jump to

Keyboard shortcuts

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