includes

package
v0.24.0 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2025 License: Apache-2.0 Imports: 5 Imported by: 7

Documentation

Index

Constants

View Source
const (
	// ErrorReasonCodeInvalidPath is an error that is returned when the path
	// provided to the file system child resolver is invalid.
	ErrorReasonCodeInvalidPath errors.ErrorReasonCode = "invalid_path"
	// ErrorReasonCodeBlueprintNotFound is an error that is returned when the
	// blueprint file is not found in a child resolver.
	ErrorReasonCodeBlueprintNotFound errors.ErrorReasonCode = "blueprint_not_found"
	// ErrorReasonCodePermissions is an error that is returned when the
	// file system child resolver encounters a permission error.
	ErrorReasonCodePermissions errors.ErrorReasonCode = "permission_error"
	// ErrorReasonCodeInvalidMetadata is an error that is returned when the
	// metadata provided to a child resolver is not valid based on the resolver's
	// requirements. (e.g. missing bucket field for an S3 include)
	ErrorReasonCodeInvalidMetadata errors.ErrorReasonCode = "invalid_metadata"
	// ErrorReasonCodeResolveFailure is an error that is returned when a child
	// resolver fails to resolve a child blueprint for a reason specific to the
	// resolver implementation.
	ErrorReasonCodeResolveFailure errors.ErrorReasonCode = "resolve_failure"
)

Variables

This section is empty.

Functions

func ErrBlueprintNotFound

func ErrBlueprintNotFound(includeName string, path string) error

func ErrInvalidMetadata

func ErrInvalidMetadata(includeName, message string) error

func ErrInvalidPath

func ErrInvalidPath(includeName string, resolverName string) error

func ErrPermissions

func ErrPermissions(includeName string, path string, err error) error

func ErrResolveFailure

func ErrResolveFailure(includeName string, err error) error

Types

type ChildBlueprintInfo

type ChildBlueprintInfo struct {
	// AbsolutePath is the absolute path to the child blueprint
	// on the local file system.
	AbsolutePath *string
	// BlueprintSource is the child blueprint loaded into memory.
	BlueprintSource *string
}

ChildBlueprintInfo provides information about a child blueprint that has been resolved.

type ChildResolver

type ChildResolver interface {
	// Resolve deals with resolving a child blueprint
	// referenced through the "include" property in a blueprint.
	// This should resolve to a file path on the local file system
	// or the source of the child blueprint loaded into memory.
	Resolve(
		ctx context.Context,
		includeName string,
		include *subengine.ResolvedInclude,
		params core.BlueprintParams,
	) (*ChildBlueprintInfo, error)
}

ChildResolver is an interface for a service that resolves child blueprints referenced through the "include" property in a blueprint. An example of a ChildResolver implementation would be one that resolves includes from a local file system or a remote source such as Amazon S3.

Jump to

Keyboard shortcuts

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