copy

package
v0.0.13 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2023 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Overview

package copy provides methods for copying the contents of remote resources in to `blob.Bucket` instances.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CopyURLStringToBucket

func CopyURLStringToBucket(ctx context.Context, opts *CopyURLOptions, uri string) error

CopyURLToBucket will parse 'uri' to ensure it is a valid `url.URL` instance and then fetch and copy its contents to a file in a `blob.Bucket` instance.

func CopyURLToBucket

func CopyURLToBucket(ctx context.Context, opts *CopyURLOptions, u *url.URL) error

CopyURLToBucket will fetch and copy the contents of 'u' to a file in a `blob.Bucket` instance.

Types

type CopyURLOptions

type CopyURLOptions struct {
	// The `blob.Bucket` instance where the body of URL requests will be copied to.
	Bucket *blob.Bucket
	// Any option `blob.WriterOptions` to specify when creating a new `blob.Writer` instance.
	WriterOptions *blob.WriterOptions
	// An optional filename for the new file. If empty then basename of the URL's `Path` component will be used.
	Filename string
	// Display a progress meter as a file is being copied in to a bucket
	ShowProgress bool
}

Jump to

Keyboard shortcuts

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