Discover Packages
github.com/kyverno/kuttl
pkg
http
package
Version:
v0.0.0-...-159d35f
Opens a new window with list of versions in this module.
Published: Feb 16, 2024
License: Apache-2.0
Opens a new window with license information.
Imports: 13
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
IsURL returns true if string is an URL
Read returns a buffer for the file at the url
ToObjects takes a url, pulls the file and returns []runtime.Object
url must be a full path to a manifest file. that file can have multiple runtime objects.
type Client struct {
UserAgent string
}
Client is client used to simplified http requests for tarballs
NewClient creates HTTP client
Download takes a url to download and a filepath to write it to
this will write the response to any url request to a file.
DownloadFile expects a url with a file and will save that file to the path provided preserving the file name.
Get performs an HTTP get and returns the Response. The caller is responsible for closing the response.
Get performs HTTP get, retrieves the contents and returns a bytes.Buffer of the entire contents
this could be dangerous against an extremely large file
Source Files
¶
Click to show internal directories.
Click to hide internal directories.