net

package
v1.3.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 3, 2024 License: BSD-3-Clause Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DownloadImage

func DownloadImage(ctx context.Context, filePath string, netURL string) error

DownloadImage will retrieve an image from an http(s) URI, saving it into the specified file

func IsNetPullRef

func IsNetPullRef(netRef string) bool

IsNetPullRef returns true if the provided string is a valid url reference for a pull operation.

func Pull

func Pull(ctx context.Context, imgCache *cache.Handle, pullFrom string, tmpDir string) (imagePath string, err error)

Pull will pull a http(s) image to the cache or direct to a temporary file if cache is disabled

func PullToFile

func PullToFile(ctx context.Context, imgCache *cache.Handle, pullTo, pullFrom, tmpDir string) (imagePath string, err error)

PullToFile will pull an http(s) image to the specified location, through the cache, or directly if cache is disabled

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL