local

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2025 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BlobPathForManifest

func BlobPathForManifest(store LocalStorage, desc ocispec.Descriptor) string

func MigrateStorage

func MigrateStorage(ctx context.Context, baseStoragePath string) error

func NeedsMigrate

func NeedsMigrate(baseStoragePath string) (bool, error)

Types

type LocalRepo

func GetAllLocalRepos

func GetAllLocalRepos(storagePath string) ([]LocalRepo, error)

func NewLocalRepo

func NewLocalRepo(storagePath string, ref *registry.Reference) (LocalRepo, error)

type LocalStorage

type LocalStorage interface {
	GetRepo() string
	GetIndex() (*ocispec.Index, error)

	oras.Target
	content.Deleter
	content.Untagger
	// contains filtered or unexported methods
}

func GetAllLocalStores

func GetAllLocalStores(storageRoot string) ([]LocalStorage, error)

GetAllLocalStores returns all local OCI indexes in the storageRoot path. As OCI indexes only support tags and not registry/repository, the storageRoot may contain multiple OCI indexes at separate paths (stored in <storageRoot>/registry/repository/index.json)

func NewLocalStore

func NewLocalStore(storageRoot string, ref *registry.Reference) (LocalStorage, error)

NewLocalStore returns a new LocalStorage for the provided *registry.Reference's registry and repository. The returned storage will only contain blobs present in this index.

type LocalStore

type LocalStore struct {
	*oci.Store
	// contains filtered or unexported fields
}

func (*LocalStore) GetIndex

func (s *LocalStore) GetIndex() (*ocispec.Index, error)

GetIndex is a shortcut to reading the index.json for an OCI index, allowing for listing all manfiests stored.

func (*LocalStore) GetRepo

func (s *LocalStore) GetRepo() string

GetRepo returns the registry and repository for the current OCI store.

Jump to

Keyboard shortcuts

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