source

package
v1.223.1-rc.3 Latest Latest
Warning

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

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

Documentation

Overview

Package source resolves scaffold templates from local paths or remote sources (git, https, s3) into a templates.Configuration ready for generation. It is the seam that lets `atmos init`/`atmos scaffold` distribute templates remotely while reusing the existing generator engine.

Index

Constants

View Source
const DefaultFetchTimeout = 5 * time.Minute

DefaultFetchTimeout bounds how long a remote scaffold fetch may take.

Variables

This section is empty.

Functions

func Hydrate

func Hydrate(stub *templates.Configuration, override string) (func(), error)

Hydrate materializes a catalog/remote stub (a Configuration with no Files but a Source) into a full template by fetching its Source. Full templates (embedded or already-loaded local) are returned unchanged with a no-op cleanup. The returned cleanup must be called after generation completes.

func IsTemplateSource

func IsTemplateSource(value string) bool

IsTemplateSource reports whether an init/scaffold template argument looks like a direct source rather than a catalog or embedded template key.

func Resolve

func Resolve(atmosConfig *schema.AtmosConfiguration, name, src string, timeout time.Duration) (*templates.Configuration, func(), error)

Resolve fetches a scaffold template from src (a local path, file://, or a go-getter remote such as git/https/s3) into a usable templates.Configuration. The returned cleanup function removes any temporary download directory; it is never nil and is always safe to call.

func WithRef

func WithRef(src, ref string) string

WithRef applies --ref sugar to a go-getter source. Existing ref query parameters win; local paths and file/OCI/S3 sources are returned unchanged.

Types

This section is empty.

Jump to

Keyboard shortcuts

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