Documentation ¶
Index ¶
- func CreateBucketURL(name, kind, cloudProvider string) (string, error)
- func KubeProviderToBucketScheme(provider string) string
- func ReadBucketURL(ctx context.Context, u *url.URL, timeout time.Duration) (io.ReadCloser, error)
- func ReadHTTPURL(u string, headerFunc func(*http.Request), timeout time.Duration) (io.ReadCloser, error)
- func ReadURL(ctx context.Context, urlText string, timeout time.Duration, ...) (io.ReadCloser, error)
- func SplitBucketURL(u *url.URL) (string, string)
- func WriteBucket(ctx context.Context, bucketURL, key string, reader io.Reader, ...) (err error)
- func WriteBucketURL(ctx context.Context, u *url.URL, data io.Reader, timeout time.Duration) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateBucketURL ¶
CreateBucketURL creates a go-cloud URL to a bucket
func KubeProviderToBucketScheme ¶
KubeProviderToBucketScheme returns the bucket scheme for the cloud provider
func ReadBucketURL ¶
ReadBucketURL reads the content of a bucket URL of the for 's3://bucketName/foo/bar/whatnot.txt?param=123' where any of the query arguments are applied to the underlying Bucket URL and the path is extracted and resolved within the bucket
func ReadHTTPURL ¶
func ReadHTTPURL(u string, headerFunc func(*http.Request), timeout time.Duration) (io.ReadCloser, error)
ReadHTTPURL reads the HTTP based URL, modifying the headers as needed, and returns the data or returning an error if a 2xx status is not returned
func ReadURL ¶
func ReadURL(ctx context.Context, urlText string, timeout time.Duration, httpFn func(urlString string) (string, func(*http.Request), error)) (io.ReadCloser, error)
ReadURL reads the given URL from either a http/https endpoint or a bucket URL path. if specified the httpFn is a function which can append the user/password or token and/or add a header with the token if using a git provider
func SplitBucketURL ¶
SplitBucketURL splits the full bucket URL into the URL to open the bucket and the file name to refer to within the bucket
Types ¶
This section is empty.