storage

package
v1.15.2 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2024 License: GPL-3.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const GCSSchema = "gs://"
View Source
const S3Schema = "s3://"

Variables

This section is empty.

Functions

func CompleteBucketsGCS added in v1.15.0

func CompleteBucketsGCS(u *url.URL, projectID string) ([]string, cobra.ShellCompDirective)

func CompleteBucketsS3 added in v1.15.0

func CompleteBucketsS3(u *url.URL) ([]string, cobra.ShellCompDirective)

func CompleteObjectsGCS added in v1.15.0

func CompleteObjectsGCS(u *url.URL, exts []string, dirOnly bool) ([]string, cobra.ShellCompDirective)

func CompleteObjectsS3 added in v1.15.0

func CompleteObjectsS3(u *url.URL, exts []string, dirOnly bool) ([]string, cobra.ShellCompDirective)

func DownloadGCS added in v1.15.0

func DownloadGCS(ctx context.Context, key string) (*storage.Reader, error)

func DownloadS3 added in v1.15.0

func DownloadS3(ctx context.Context, w *S3DownloadPipe, key string) error

func IsCloud

func IsCloud(path string) bool

func IsCloudDir

func IsCloudDir(path string) bool

func IsGCS

func IsGCS(path string) bool

func IsGCSDir

func IsGCSDir(path string) bool

func IsS3

func IsS3(path string) bool

func IsS3Dir

func IsS3Dir(path string) bool

func ListBucketsGCS added in v1.15.0

func ListBucketsGCS(ctx context.Context, projectID string) iter.Seq2[*storage.BucketAttrs, error]

func ListBucketsS3 added in v1.15.0

func ListBucketsS3(ctx context.Context, input *s3.ListBucketsInput) iter.Seq2[*s3.ListBucketsOutput, error]

func ListObjectsGCS added in v1.15.0

func ListObjectsGCS(ctx context.Context, key string) iter.Seq2[*storage.ObjectAttrs, error]

func ListObjectsS3 added in v1.15.0

func ListObjectsS3(ctx context.Context, key string) iter.Seq2[*s3.ListObjectsV2Output, error]

func UploadGCS added in v1.15.0

func UploadGCS(ctx context.Context, key string) (*storage.Writer, error)

func UploadS3 added in v1.15.0

func UploadS3(ctx context.Context, r io.ReadCloser, key string) error

Types

type S3DownloadPipe added in v1.15.0

type S3DownloadPipe struct {
	// contains filtered or unexported fields
}

func NewS3DownloadPipe added in v1.15.0

func NewS3DownloadPipe() *S3DownloadPipe

func (*S3DownloadPipe) Close added in v1.15.0

func (s *S3DownloadPipe) Close() error

func (*S3DownloadPipe) CloseWithError added in v1.15.0

func (s *S3DownloadPipe) CloseWithError(err error) error

func (*S3DownloadPipe) Read added in v1.15.0

func (s *S3DownloadPipe) Read(p []byte) (int, error)

func (*S3DownloadPipe) WriteAt added in v1.15.0

func (s *S3DownloadPipe) WriteAt(p []byte, off int64) (int, error)

Jump to

Keyboard shortcuts

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