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 ¶
- func FetchLayer(ctx context.Context, store oras.ReadOnlyTarget, desc v1.Descriptor) ([]byte, error)
- func Layers(manifest *v1.Manifest, mediaType string) []v1.Descriptor
- func Load(ctx context.Context, s oras.ReadOnlyTarget, ref spec.Reference) (*v1.Manifest, *spec.Agentfile, error)
- func LoadHydrated(ctx context.Context, s oras.ReadOnlyTarget, ref spec.Reference) (*spec.Agentfile, error)
- func Manifest(ctx context.Context, store *memory.Store, ref spec.Reference) (*v1.Manifest, error)
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 ¶
func Load(ctx context.Context, s oras.ReadOnlyTarget, ref spec.Reference) (*v1.Manifest, *spec.Agentfile, error)
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.
Types ¶
This section is empty.