Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option func(*Options)
Option is the option wrapper for modifying the storage options.
func WithRootDir ¶
WithRootDir sets the root directory of the storage.
type Options ¶
type Options struct { // RootDir is the root directory of the storage. RootDir string }
Options is the options for the storage.
type Storage ¶
type Storage interface { // PullManifest pulls the manifest from the storage. PullManifest(ctx context.Context, repo, reference string) ([]byte, string, error) // PushManifest pushes the manifest to the storage. PushManifest(ctx context.Context, repo, reference string, body []byte) (string, error) // DeleteManifest deletes the manifest from the storage. DeleteManifest(ctx context.Context, repo, reference string) error // PullBlob pulls the blob from the storage. PullBlob(ctx context.Context, repo, digest string) (io.ReadCloser, error) // PushBlob pushes the blob to the storage. PushBlob(ctx context.Context, repo string, body io.Reader) (string, int64, error) // StatBlob stats the blob in the storage. StatBlob(ctx context.Context, repo, digest string) (bool, error) // ListRepositories lists all the repositories in the storage. ListRepositories(ctx context.Context) ([]string, error) // ListTags lists all the tags in the repository. ListTags(ctx context.Context, repo string) ([]string, error) // PerformGC performs the garbage collection in the storage to free up the space. PerformGC(ctx context.Context, dryRun, removeUntagged bool) error }
Storage is an interface for storage which wraps the storage operations.
Click to show internal directories.
Click to hide internal directories.