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 ¶
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 ¶
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.
Types ¶
This section is empty.