gcp

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GcpClient

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

func NewGcpClient

func NewGcpClient(ctx context.Context, opts []option.ClientOption) (*GcpClient, error)

func (*GcpClient) DeleteFolder

func (gcp *GcpClient) DeleteFolder(ctx context.Context, bucket, path string) (err error)

deletes a folder in a bucket at a given path

func (*GcpClient) GetAttributes

func (gcp *GcpClient) GetAttributes(ctx context.Context, bucket, path string) (attrs *model.ObjAttrs, err error)

func (*GcpClient) GetPathSize

func (gcp *GcpClient) GetPathSize(ctx context.Context, bucket string, path string) (size int64, err error)

returns the size of a folder in MB in a bucket at a given path

func (*GcpClient) GetSignedDownloadURL

func (gcp *GcpClient) GetSignedDownloadURL(ctx context.Context, bucket, path string, expiry time.Time) (url string, err error)

returns a signed download URL for a file in a bucket at a given path

func (*GcpClient) GetSignedUploadUrl

func (gcp *GcpClient) GetSignedUploadUrl(ctx context.Context, bucket, path string, expiry time.Time) (url string, err error)

func (*GcpClient) ListBuckets

func (gcp *GcpClient) ListBuckets(ctx context.Context, projectId string) (buckets []string, err error)

returns the list of buckets in a project

func (*GcpClient) ListObjects

func (gcp *GcpClient) ListObjects(ctx context.Context, bucket string, path string) (objs []string, err error)

returns the list of objects in a bucket at a given path

Jump to

Keyboard shortcuts

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