store

package
v1.0.0-alpha.11 Latest Latest
Warning

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

Go to latest
Published: May 9, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package store reads OCI manifests and Agentfiles out of oras targets. Two entry points:

  • Load returns the raw manifest and parsed Agentfile.
  • LoadHydrated additionally pulls every layer and populates Agentfile.Agent.Contexts[*].Content and Agent.Adds[*].Content, so the returned value is self-contained (used when a parent agentfile is consumed by a child build that has no access to the parent's source filesystem).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FetchLayer

func FetchLayer(ctx context.Context, store oras.ReadOnlyTarget, desc v1.Descriptor) ([]byte, error)

FetchLayer fetches a layer's content by descriptor from a store.

func Layers

func Layers(manifest *v1.Manifest, mediaType string) []v1.Descriptor

Layers returns all layers matching the given media type.

func Load

Load resolves ref in s and returns the raw manifest and parsed Agentfile. Layer contents (Context.Content, Add.Content) are not hydrated; use LoadHydrated when callers need those fields populated.

func LoadHydrated

func LoadHydrated(ctx context.Context, s oras.ReadOnlyTarget, ref spec.Reference) (*spec.Agentfile, error)

LoadHydrated loads ref and additionally pulls every layer, populating Agentfile.Agent.Contexts[*].Content and Agent.Adds[*].Content so the returned Agentfile is self-contained. Needed for FROM inheritance: a child build consumes a parent Agentfile without access to the parent's source filesystem.

func Manifest

func Manifest(ctx context.Context, store *memory.Store, ref spec.Reference) (*v1.Manifest, error)

Manifest resolves and returns the OCI manifest from a store by ref (e.g. "latest", "v1.0").

Types

This section is empty.

Jump to

Keyboard shortcuts

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