Documentation
¶
Index ¶
- Variables
- func GetConfig(ctx context.Context, store oras.ReadOnlyTarget, configDesc ocispec.Descriptor) (*artifact.KitFile, error)
- func GetKitfileForManifest(ctx context.Context, store oras.ReadOnlyTarget, manifest *ocispec.Manifest) (*artifact.KitFile, error)
- func GetManifest(ctx context.Context, store oras.ReadOnlyTarget, ...) (*ocispec.Manifest, error)
- func GetManifestAndKitfile(ctx context.Context, store oras.ReadOnlyTarget, ...) (*ocispec.Manifest, *artifact.KitFile, error)
- func LayerPathsFromKitfile(kitfile *artifact.KitFile) []string
- func RepoPath(storagePath string, ref *registry.Reference) string
- func ResolveManifest(ctx context.Context, store oras.Target, reference string) (ocispec.Descriptor, *ocispec.Manifest, error)
- func ResolveManifestAndConfig(ctx context.Context, store oras.Target, reference string) (ocispec.Descriptor, *ocispec.Manifest, *artifact.KitFile, error)
Constants ¶
This section is empty.
Variables ¶
var ErrNoKitfile = errors.New("artifact does not contain a Kitfile")
var ErrNotAModelKit = errors.New("reference exists but is not a modelkit")
Functions ¶
func GetConfig ¶
func GetConfig(ctx context.Context, store oras.ReadOnlyTarget, configDesc ocispec.Descriptor) (*artifact.KitFile, error)
GetConfig returns the config (Kitfile) described by a descriptor. Returns an error if the config blob cannot be resolved or if the descriptor does not describe a Kitfile.
func GetKitfileForManifest ¶ added in v1.10.0
func GetKitfileForManifest(ctx context.Context, store oras.ReadOnlyTarget, manifest *ocispec.Manifest) (*artifact.KitFile, error)
GetKitfileForManifest returns the Kitfile for a given manifest, either by retrieving it from an OCI store or by reading it from manifest annotations. If manifest type is unrecognized, returns ErrNotAModelKit. If the manifest is recognized but does not contain a Kitfile (e.g. it was not created by Kit), returns ErrNoKitfile.
func GetManifest ¶
func GetManifest(ctx context.Context, store oras.ReadOnlyTarget, manifestDesc ocispec.Descriptor) (*ocispec.Manifest, error)
GetManifest returns the Manifest described by a Descriptor. Returns an error if the manifest blob cannot be resolved or does not represent a modelkit manifest.
func GetManifestAndKitfile ¶ added in v1.10.0
func GetManifestAndKitfile(ctx context.Context, store oras.ReadOnlyTarget, manifestDesc ocispec.Descriptor) (*ocispec.Manifest, *artifact.KitFile, error)
GetManifestAndKitfile returns the manifest and config (Kitfile) for a manifest Descriptor. Calls GetManifest and GetKitfileForManifest. If the manifest is retrieved but no Kitfile can be found, returns the manifest and error equal to ErrNoKitfile
func LayerPathsFromKitfile ¶
func RepoPath ¶
RepoPath returns the path that should be used for creating a local OCI index given a specific *registry.Reference.
func ResolveManifest ¶
func ResolveManifest(ctx context.Context, store oras.Target, reference string) (ocispec.Descriptor, *ocispec.Manifest, error)
ResolveManifest returns the manifest for a reference (tag), if present in the target store
func ResolveManifestAndConfig ¶
func ResolveManifestAndConfig(ctx context.Context, store oras.Target, reference string) (ocispec.Descriptor, *ocispec.Manifest, *artifact.KitFile, error)
ResolveManifestAndConfig returns the manifest and config (Kitfile) for a given reference (tag), if present in the store. Calls GetManifest and GetKitfileForManifest. If the manifest is retrieved but no Kitfile can be found, returns the manifest and error equal to ErrNoKitfile
Types ¶
This section is empty.