Documentation
¶
Overview ¶
Package resource loads author manifests and validates self-contained resources.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ArtifactInput ¶
type ArtifactOutput ¶
type Artifacts ¶
type Artifacts struct {
Inputs []ArtifactInput `json:"inputs"`
Outputs []ArtifactOutput `json:"outputs"`
}
type Expected ¶
type Expected struct {
ExitCode *int `json:"exit-code"` // nil means the exit code is not checked.
Stdout *OutputExpectation `json:"stdout"`
Stderr *OutputExpectation `json:"stderr"`
}
type ImageBuild ¶
type ImageBuild struct {
Context string `json:"context"`
Dockerfile string `json:"dockerfile"`
Image string `json:"image"`
Platforms []string `json:"platforms"`
}
ImageBuild holds CI settings; build files are not read by this package.
type Manifest ¶
type Manifest struct {
Resources []Resource `json:"resources"`
SandboxImages map[string]ImageBuild `json:"sandbox-images"`
}
Manifest contains resolved resources in registration order and CI image build settings.
func LoadManifest ¶
LoadManifest validates manifest.yaml and resolves every registered resource. The caller must keep the input directory stable throughout the call.
type OutputExpectation ¶
type Resource ¶
type Resource struct {
Metadata Metadata `json:"metadata"`
Workflows map[string]Workflow `json:"workflows"`
}
Resource contains resolved data and retains neither source paths nor file handles. Marshal it with encoding/json to save or distribute it.
func DecodeResource ¶
DecodeResource restores one resolved JSON resource, rejecting unknown fields and invalid runtime data. It does not read files or apply authoring defaults.
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
resource-ci
command
resource-ci runs this repository's GitHub validation and publication tasks.
|
resource-ci runs this repository's GitHub validation and publication tasks. |
|
resource-spec
command
|
|
|
internal
|
|
|
publishing
Package publishing implements this repository's GitHub publication workflow.
|
Package publishing implements this repository's GitHub publication workflow. |