Documentation
¶
Index ¶
- Constants
- func Extract(dst string, r io.Reader) (string, error)
- func ExtractWithOptions(dst string, r io.Reader, opts ExtractOptions) (_ string, retErr error)
- func IsManifestMediaType(mediaType string) bool
- func Successors(mediaType string, b []byte) ([]ocispec.Descriptor, error)
- func TotalSize(ctx context.Context, src oras.ReadOnlyTarget, desc ocispec.Descriptor) (int64, error)
- func VerifyBlobs(dir string) error
- type Action
- type ActionDefinition
- type ActionStepDefinition
- type ActionTriggerDefinition
- type Artifact
- type Bundle
- type Component
- type ComponentDefinition
- type Documents
- type ExtractOptions
- type GenerateOptions
- type Image
- type LogicalManifest
- type Member
- type PackageIdentity
- type ReleaseIdentity
- type Result
- func Generate(ctx context.Context, dst io.Writer, logical LogicalManifest, roots []Root) (Result, error)
- func GenerateWithDocuments(ctx context.Context, dst io.Writer, logical LogicalManifest, ...) (Result, error)
- func GenerateWithOptions(ctx context.Context, dst io.Writer, logical LogicalManifest, ...) (Result, error)
- type Root
- type Runbook
- type RunbookDefinition
- type RunbookInputDefinition
- type RunbookStepDefinition
- type RunbookTriggerDefinition
- type Runner
- type Sandbox
- type Source
- type StackAsset
- type Step
- type Target
Constants ¶
View Source
const ( CurrentSchemaVersion = 3 LogicalManifestMediaType = "application/vnd.nuon.appbundle.manifest.v1+json" ProvenanceMediaType = "application/vnd.nuon.appbundle.provenance.v1+json" QualificationMediaType = "application/vnd.nuon.appbundle.qualification.v1+json" PlanEnvelopeMediaType = "application/vnd.nuon.appbundle.plan.v1+json" SourceArchiveMediaType = "application/vnd.nuon.appbundle.source-archive.v1+json" BundleArtifactType = "application/vnd.nuon.appbundle.bundle.v1" RunnerBinaryArtifactType = "application/vnd.nuon.appbundle.runner-binary.v1" RunnerBinaryMediaType = "application/octet-stream" )
Variables ¶
This section is empty.
Functions ¶
func ExtractWithOptions ¶
func IsManifestMediaType ¶
func Successors ¶
func Successors(mediaType string, b []byte) ([]ocispec.Descriptor, error)
func TotalSize ¶
func TotalSize(ctx context.Context, src oras.ReadOnlyTarget, desc ocispec.Descriptor) (int64, error)
func VerifyBlobs ¶
Types ¶
type Action ¶
type Action struct {
Name string `json:"name"`
ConfigDigest string `json:"config_digest"`
Definition *ActionDefinition `json:"definition,omitempty"`
Steps []Step `json:"steps,omitempty"`
}
type ActionDefinition ¶
type ActionDefinition struct {
Image string `json:"image,omitempty"`
TimeoutNanos int64 `json:"timeout_nanos,omitempty"`
Role string `json:"role,omitempty"`
BreakGlassRoleARN string `json:"break_glass_role_arn,omitempty"`
EnableKubeConfig bool `json:"enable_kube_config,omitempty"`
KubernetesContextName string `json:"kubernetes_context_name,omitempty"`
ComponentDependencies []string `json:"component_dependencies,omitempty"`
References []string `json:"references,omitempty"`
Triggers []ActionTriggerDefinition `json:"triggers,omitempty"`
Steps []ActionStepDefinition `json:"steps,omitempty"`
}
type ActionStepDefinition ¶
type ActionTriggerDefinition ¶
type Bundle ¶
type Bundle struct {
Manifest LogicalManifest
BundleDescriptor ocispec.Descriptor
Roots []ocispec.Descriptor
Provenance json.RawMessage
Qualification json.RawMessage
PlanEnvelope json.RawMessage
// contains filtered or unexported fields
}
func (*Bundle) ExtractRunnerBinary ¶
ExtractRunnerBinary streams the packaged runner binary to w. The manifest artifact is the packed OCI manifest; the binary itself is its single octet-stream layer.
func (*Bundle) Store ¶
func (b *Bundle) Store() oras.ReadOnlyTarget
type ComponentDefinition ¶
type Documents ¶
type Documents struct {
Provenance json.RawMessage
QualificationReport json.RawMessage
PlanEnvelope json.RawMessage
SourceArchive json.RawMessage
}
type ExtractOptions ¶
type GenerateOptions ¶
type GenerateOptions struct {
MaxContentBytes int64
MaxBlobBytes int64
OnBlobVerified func(ocispec.Descriptor)
}
type LogicalManifest ¶
type LogicalManifest struct {
SchemaVersion int `json:"schema_version"`
Release ReleaseIdentity `json:"release"`
Package PackageIdentity `json:"package"`
Target Target `json:"target"`
Components []Component `json:"components,omitempty"`
Sandbox *Sandbox `json:"sandbox,omitempty"`
Images []Image `json:"images,omitempty"`
Actions []Action `json:"actions,omitempty"`
Runbooks []Runbook `json:"runbooks,omitempty"`
StackAssets []StackAsset `json:"stack_assets,omitempty"`
Runner *Runner `json:"runner,omitempty"`
}
type PackageIdentity ¶
type ReleaseIdentity ¶
type Result ¶
type Result struct {
ManifestDescriptor ocispec.Descriptor
BundleDescriptor ocispec.Descriptor
TransportSHA256 string
Index json.RawMessage
}
func GenerateWithDocuments ¶
func GenerateWithOptions ¶
func GenerateWithOptions(ctx context.Context, dst io.Writer, logical LogicalManifest, documents Documents, roots []Root, opts GenerateOptions) (Result, error)
type Root ¶
type Root struct {
Descriptor ocispec.Descriptor
Source oras.ReadOnlyTarget
}
type Runbook ¶
type Runbook struct {
Name string `json:"name"`
ConfigDigest string `json:"config_digest"`
Definition RunbookDefinition `json:"definition"`
}
type RunbookDefinition ¶
type RunbookDefinition struct {
ReadmeDigest string `json:"readme_digest,omitempty"`
Triggers []RunbookTriggerDefinition `json:"triggers,omitempty"`
Inputs []RunbookInputDefinition `json:"inputs,omitempty"`
Steps []RunbookStepDefinition `json:"steps"`
}
type RunbookInputDefinition ¶
type RunbookInputDefinition struct {
Name string `json:"name"`
DisplayName string `json:"display_name,omitempty"`
Description string `json:"description,omitempty"`
Default string `json:"default,omitempty"`
Type string `json:"type,omitempty"`
Index int `json:"index,omitempty"`
Required bool `json:"required,omitempty"`
Sensitive bool `json:"sensitive,omitempty"`
}
type RunbookStepDefinition ¶
type RunbookStepDefinition struct {
Kind string `json:"kind"`
Name string `json:"name,omitempty"`
Index int `json:"index,omitempty"`
Reference string `json:"reference,omitempty"`
Component string `json:"component,omitempty"`
Role string `json:"role,omitempty"`
PlanOnly bool `json:"plan_only,omitempty"`
DeployDependents bool `json:"deploy_dependents,omitempty"`
TearDownDependents bool `json:"tear_down_dependents,omitempty"`
SkipComponentDeploys bool `json:"skip_component_deploys,omitempty"`
Command string `json:"command,omitempty"`
InlineContentsDigest string `json:"inline_contents_digest,omitempty"`
Environment map[string]string `json:"environment,omitempty"`
TimeoutNanos int64 `json:"timeout_nanos,omitempty"`
TriggerName string `json:"trigger_name,omitempty"`
EventTypes []string `json:"event_types,omitempty"`
FiltersDigest string `json:"filters_digest,omitempty"`
}
type RunbookTriggerDefinition ¶ added in v0.19.1243
type Runner ¶
type Runner struct {
Version string `json:"version,omitempty"`
SourceURL string `json:"source_url,omitempty"`
Binary *Artifact `json:"binary,omitempty"`
Image *Image `json:"image,omitempty"`
}
Runner packages the runner itself so an offline install never phones home: a standalone binary matching the bundle target, and optionally the runner container image for hosts that run it under a container runtime.
type StackAsset ¶
Click to show internal directories.
Click to hide internal directories.