utils

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2026 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// UnexpectedErrorMessage is a generic error message for unexpected errors
	// that occur in the deploy engine.
	UnexpectedErrorMessage = "an unexpected error occurred"
)

Variables

View Source
var (
	// ErrUnsupportedBlueprintFormat is the error message for an unsupported blueprint format.
	ErrUnsupportedBlueprintFormat = errors.New("unsupported blueprint format")
)

Functions

func BlueprintFormatFromExtension

func BlueprintFormatFromExtension(filePath string) (schema.SpecFormat, error)

BlueprintFormatFromExtension determines the blueprint input format based on the file extension. An error is returned if the extension is not supported.

func DiagnosticsFromBlueprintValidationError

func DiagnosticsFromBlueprintValidationError(
	err error,
	logger core.Logger,
	fallbackToGeneralDiagnostic bool,
) []*core.Diagnostic

DiagnosticsFromBlueprintValidationError extracts diagnostics from a blueprint validation error.

func ExpandEnv

func ExpandEnv(input string) string

ExpandEnv expands the environment variables in the given string. This supports windows and unix style environment variable expansion.

func HasAtLeastOneError

func HasAtLeastOneError(diagnostics []*core.Diagnostic) bool

HasAtLeastOneError checks if there is at least one error in the provided diagnostics slice.

func NewUUIDv7Generator

func NewUUIDv7Generator() core.IDGenerator

NewUUIDv7Generator creates a new blueprint framework ID generator that uses UUIDv7. This is useful for generating IDs that can be sorted based on time of creation.

Types

This section is empty.

Jump to

Keyboard shortcuts

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