Documentation
¶
Index ¶
- Constants
- func Cleanup()deprecated
- func ExtractSchemeSource(userInput string, sources ...string) (source, newInput string)
- func GetImage(ctx context.Context, imgStr string, options ...Option) (*image.Image, error)
- func GetImageFromSource(ctx context.Context, imgStr string, source image.Source, options ...Option) (*image.Image, error)
- func ImageProviders(cfg ImageProviderConfig) []collections.TaggedValue[image.Provider]
- func SetBus(b *partybus.Bus)
- func SetLogger(logger logger.Logger)
- type ImageProviderConfig
- type Option
- func WithAdditionalMetadata(metadata ...image.AdditionalMetadata) Option
- func WithCredentials(credentials ...image.RegistryCredentials) Option
- func WithInsecureAllowHTTP() Option
- func WithInsecureSkipTLSVerify() Option
- func WithLazyLayerSquashes() Option
- func WithPlatform(platform string) Option
- func WithRegistryOptions(options image.RegistryOptions) Option
Constants ¶
const ( // FileTag marks providers that read a pre-existing archive/directory from disk (no daemon or store involved). FileTag = "file" // DirTag marks providers that read from an OCI directory layout on disk. DirTag = "dir" // DaemonTag marks providers that resolve images via a running local daemon (docker, podman, containerd). DaemonTag = "daemon" // PullTag marks providers usable for auto-resolution of a bare image reference (i.e. not a file/dir path): // daemon providers, local content-addressed stores (e.g. containers-storage), and registry pulls all carry // this tag. It does not imply network access on its own. PullTag = "pull" // RegistryTag marks providers that resolve images directly from an OCI/docker registry. RegistryTag = "registry" )
Variables ¶
This section is empty.
Functions ¶
func Cleanup
deprecated
func Cleanup()
Cleanup deletes all directories created by stereoscope calls.
Deprecated: please use image.Image.Cleanup() over this.
func ExtractSchemeSource ¶ added in v0.0.2
ExtractSchemeSource parses a string with any colon-delimited prefix and validates it against the set of known provider tags, returning a valid source name and input string to use for GetImageFromSource
NOTE: since it is now possible to select which providers to use, using schemes in the user input text is not necessary and should be avoided due to some ambiguity this introduces
func GetImage ¶
GetImage parses the user provided image string and provides an image object; note: the source where the image should be referenced from is automatically inferred.
Cancelling ctx stops the read, but does not cut it short: see image.Image.Read for what a cancelled read still waits for and how long that can be.
func GetImageFromSource ¶
func GetImageFromSource(ctx context.Context, imgStr string, source image.Source, options ...Option) (*image.Image, error)
GetImageFromSource returns an image from the explicitly provided source. See GetImage for what cancelling ctx does.
func ImageProviders ¶ added in v0.0.2
func ImageProviders(cfg ImageProviderConfig) []collections.TaggedValue[image.Provider]
Types ¶
type ImageProviderConfig ¶ added in v0.0.2
type ImageProviderConfig struct {
UserInput string
Platform *image.Platform
Registry image.RegistryOptions
}
ImageProviderConfig is the user-configuration containing all configuration needed by stereoscope image providers
type Option ¶
type Option func(*config) error
func WithAdditionalMetadata ¶
func WithAdditionalMetadata(metadata ...image.AdditionalMetadata) Option
func WithCredentials ¶
func WithCredentials(credentials ...image.RegistryCredentials) Option
func WithInsecureAllowHTTP ¶
func WithInsecureAllowHTTP() Option
func WithInsecureSkipTLSVerify ¶
func WithInsecureSkipTLSVerify() Option
func WithLazyLayerSquashes ¶ added in v0.4.0
func WithLazyLayerSquashes() Option
WithLazyLayerSquashes builds only the image squash during the read, and each lower layer's squash the first time something uses it. It applies to this call only. A context from image.WithLazyLayerSquashes gets lazy squashes with or without it. See image.WithLazyLayerSquashes for what changes for lower layers.
func WithPlatform ¶
func WithRegistryOptions ¶
func WithRegistryOptions(options image.RegistryOptions) Option
Directories
¶
| Path | Synopsis |
|---|---|
|
pkg
|
|
|
test
|
|
|
linter/closecheck
command
Command closecheck is an SSA-based analyzer that flags io.Closer values returned from a call that are then dropped -- neither closed nor allowed to escape (returned, stored, or captured by a closure).
|
Command closecheck is an SSA-based analyzer that flags io.Closer values returned from a call that are then dropped -- neither closed nor allowed to escape (returned, stored, or captured by a closure). |
|
linter/filenodewrite
command
Command filenodewrite flags any write through a *filenode.FileNode in non-test code.
|
Command filenodewrite flags any write through a *filenode.FileNode in non-test code. |