Documentation
¶
Overview ¶
Package configdiff computes the difference between two app config versions as it applies to a single install.
Index ¶
- func ComputeCompositeAppConfigTree(ctx context.Context, db *gorm.DB, baselines CompositeBaselines, ...) (*pkgdiff.Diff, error)
- func ComputeCompositeInstallConfigDiff(ctx context.Context, db *gorm.DB, baselines CompositeBaselines, ...) (*app.InstallConfigDiff, error)
- func ComputeInstallConfigDiff(ctx context.Context, db *gorm.DB, oldAppConfigID, newAppConfigID string) (*app.InstallConfigDiff, error)
- func LatestActiveSandboxBuild(ctx context.Context, db *gorm.DB, appConfigID string) (*app.AppSandboxBuild, error)
- func SandboxConfigsEqual(a, b app.AppSandboxConfig) bool
- type CompositeBaselines
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ComputeCompositeAppConfigTree ¶ added in v0.19.1231
func ComputeCompositeAppConfigTree(ctx context.Context, db *gorm.DB, baselines CompositeBaselines, newAppConfigID string) (*pkgdiff.Diff, error)
ComputeCompositeAppConfigTree builds the hierarchical config diff the dashboard renders. Stack, runner, sandbox, and each component come from that entity's applied config. Every other section uses the install applied id. An empty baseline compares that slice to nothing.
func ComputeCompositeInstallConfigDiff ¶ added in v0.19.1231
func ComputeCompositeInstallConfigDiff(ctx context.Context, db *gorm.DB, baselines CompositeBaselines, newAppConfigID string) (*app.InstallConfigDiff, error)
ComputeCompositeInstallConfigDiff unions a stack slice, a sandbox slice, and one slice per component. Each slice is diffed against that entity's baseline, not against a single install pin.
func ComputeInstallConfigDiff ¶
func ComputeInstallConfigDiff(ctx context.Context, db *gorm.DB, oldAppConfigID, newAppConfigID string) (*app.InstallConfigDiff, error)
ComputeInstallConfigDiff diffs oldAppConfigID against newAppConfigID. An empty oldAppConfigID means the install has never been pinned to a config, so everything counts as added.
func LatestActiveSandboxBuild ¶ added in v0.19.1235
func SandboxConfigsEqual ¶ added in v0.19.1235
func SandboxConfigsEqual(a, b app.AppSandboxConfig) bool
Types ¶
type CompositeBaselines ¶ added in v0.19.1231
type CompositeBaselines struct {
Fallback string
Stack string
Sandbox string
Components map[string]string
}
CompositeBaselines is the applied app config for each install entity. An empty id means that entity has never been applied. Callers resolve a missing entity ref to the install's deployed config before calling, so a legacy install is not treated as brand new.