Documentation ¶
Index ¶
- Constants
- func Cleanup()
- 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 WithPlatform(platform string) Option
- func WithRegistryOptions(options image.RegistryOptions) Option
Constants ¶
const ( FileTag = "file" DirTag = "dir" DaemonTag = "daemon" PullTag = "pull" RegistryTag = "registry" )
Variables ¶
This section is empty.
Functions ¶
func Cleanup ¶
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.
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.
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 WithPlatform ¶
func WithRegistryOptions ¶
func WithRegistryOptions(options image.RegistryOptions) Option