ategcs

package
v0.0.0 Latest Latest
Warning

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

Go to latest
Published: May 19, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FetchFromGCS

func FetchFromGCS(ctx context.Context, client ObjectStorage, gsURL string) ([]byte, error)

func FetchLocalFileFromGCS

func FetchLocalFileFromGCS(ctx context.Context, client ObjectStorage, gsURL, localPath string, mode os.FileMode) error

func FetchLocalFileFromGCSWithZstd

func FetchLocalFileFromGCSWithZstd(ctx context.Context, client ObjectStorage, gsURL string, localFilePath string) (err error)

func ParseGCSURL

func ParseGCSURL(gsURL string) (string, string, error)

func SendLocalFileToGCSWithZstd

func SendLocalFileToGCSWithZstd(ctx context.Context, client ObjectStorage, gsURL string, localFilePath string) (err error)

func SendToGCSWithZstd

func SendToGCSWithZstd(ctx context.Context, client ObjectStorage, gsURL string, content io.Reader) (err error)

Types

type ObjectStorage

type ObjectStorage interface {
	GetObject(ctx context.Context, bucket, object string) (io.ReadCloser, error)
	PutObject(ctx context.Context, bucket, object string, reader io.Reader) error
}

func NewGCSClient

func NewGCSClient(client *storage.Client) ObjectStorage

func NewS3Client

func NewS3Client(client *s3.Client) ObjectStorage

Jump to

Keyboard shortcuts

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