diff --git a/options.go b/options.go index 99dd9aeb..dd3f149f 100644 --- a/options.go +++ b/options.go @@ -17,6 +17,7 @@ type ImageOptions struct { BaseImageRepoName string PreviousImageRepoName string Config *v1.Config + Logger Logger CreatedAt time.Time MediaTypes MediaTypes Platform Platform @@ -43,6 +44,10 @@ type RegistrySetting struct { Insecure bool } +type Logger interface { + Warn(msg string) +} + // FromBaseImage loads the provided image as the manifest, config, and layers for the working image. // If the image is not found, it does nothing. func FromBaseImage(name string) func(*ImageOptions) { @@ -99,6 +104,13 @@ func WithPreviousImage(name string) func(*ImageOptions) { } } +// WithLogger if provided will check if contained is used. +func WithLogger(logger Logger) func(*ImageOptions) { + return func(o *ImageOptions) { + o.Logger = logger + } +} + type IndexOption func(options *IndexOptions) error type IndexOptions struct {