Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Builder ¶
type Builder interface {
// BuildLayer builds the layer blob from the given file path.
BuildLayer(ctx context.Context, mediaType, workDir, path string) (ocispec.Descriptor, error)
// BuildConfig builds the config blob of the artifact.
BuildConfig(ctx context.Context) (ocispec.Descriptor, error)
// BuildManifest builds the manifest blob of the artifact.
BuildManifest(ctx context.Context, layers []ocispec.Descriptor, config ocispec.Descriptor, annotations map[string]string) (ocispec.Descriptor, error)
}
Builder is an interface for building artifacts.
type OutputStrategy ¶
type OutputStrategy interface {
// OutputLayer outputs the layer blob to the storage (local or remote).
OutputLayer(ctx context.Context, mediaType, workDir, relPath string, reader io.Reader) (ocispec.Descriptor, error)
// OutputConfig outputs the config blob to the storage (local or remote).
OutputConfig(ctx context.Context, mediaType string, configJSON []byte) (ocispec.Descriptor, error)
// OutputManifest outputs the manifest blob to the storage (local or remote).
OutputManifest(ctx context.Context, mediaType string, manifestJSON []byte) (ocispec.Descriptor, error)
}
func NewLocalOutput ¶
func NewLocalOutput(cfg *config, store storage.Storage, repo, tag string) (OutputStrategy, error)
func NewRemoteOutput ¶
func NewRemoteOutput(cfg *config, repo, tag string) (OutputStrategy, error)
type OutputType ¶
type OutputType string
OutputType defines the type of output to generate.
const ( // OutputTypeLocal indicates that the output should be stored locally in modctl local storage. OutputTypeLocal OutputType = "local" // OutputTypeRemote indicates that the output should be pushed to a remote registry directly. OutputTypeRemote OutputType = "remote" )
Click to show internal directories.
Click to hide internal directories.