Documentation
¶
Index ¶
- Variables
- func LoadAppConf(ctx context.Context, appDir string, logger *log.Logger) (*apps.Config, error)
- func LoadEmbeddedConf(ctx context.Context, moduleDir string, logger *log.Logger) (*modules.Config, error)
- func LoadGlobalConf(ctx context.Context, logger *log.Logger) (*global.Config, error)
- func LoadModuleConf(ctx context.Context, moduleDir string, logger *log.Logger) (*modules.Config, error)
Constants ¶
This section is empty.
Variables ¶
var ( // ErrFileWrongExtension is returned when a file has an unexpected extension for a batch hook ErrFileWrongExtension = errors.New("file has wrong extension") // ErrFileNotBatchHook is returned when a file doesn't respond correctly to "hook list" ErrFileNotBatchHook = errors.New("file is not batch hook") // ErrFileNotExecutable is returned when a hook file lacks executable permissions ErrFileNotExecutable = errors.New("no executable permissions, chmod +x is required to run this hook") )
var ( // ErrPackageNotFound is returned when the requested package directory doesn't exist ErrPackageNotFound = errors.New("package not found") )
Functions ¶
func LoadAppConf ¶
LoadAppConf loads an application package from the given directory on the filesystem. The directory name must follow the "namespace.name" convention (e.g., "default.my-app").
Steps:
- Validates the package directory exists
- Loads the package definition (package.yaml)
- Loads values (static values.yaml and OpenAPI schemas)
- Extracts namespace and name from the directory basename
- Discovers and loads batch hooks
- Loads image digests (images_digests.json)
Returns ErrPackageNotFound if the directory doesn't exist.
func LoadEmbeddedConf ¶ added in v1.76.0
func LoadEmbeddedConf(ctx context.Context, moduleDir string, logger *log.Logger) (*modules.Config, error)
LoadEmbeddedConf loads a module config from an embedded (built-in) module directory. Unlike LoadModuleConf, it does not resolve version by symlinks.
func LoadGlobalConf ¶ added in v1.76.0
LoadGlobalConf loads the global module configuration from the globalPath directory. Unlike app and module loading, global hooks come from the compiled-in Go SDK registry, not from the filesystem. Only values and OpenAPI schemas are read from disk.
Returns ErrPackageNotFound if the global-hooks directory doesn't exist.
func LoadModuleConf ¶
func LoadModuleConf(ctx context.Context, moduleDir string, logger *log.Logger) (*modules.Config, error)
LoadModuleConf loads a module package from the given directory on the filesystem.
Steps:
- Validates the module directory exists
- Loads the package definition (package.yaml, falling back to module.yaml)
- Loads values (static values.yaml and OpenAPI schemas)
- Discovers and loads batch hooks
- Loads image digests (images_digests.json)
Returns ErrPackageNotFound if the directory doesn't exist.
Types ¶
This section is empty.