Documentation
¶
Index ¶
- func FetchFromGCS(ctx context.Context, client ObjectStorage, gsURL string) ([]byte, error)
- func FetchLocalFileFromGCS(ctx context.Context, client ObjectStorage, gsURL, localPath string, ...) error
- func FetchLocalFileFromGCSWithZstd(ctx context.Context, client ObjectStorage, gsURL string, localFilePath string) (err error)
- func ParseGCSURL(gsURL string) (string, string, error)
- func SendLocalFileToGCSWithZstd(ctx context.Context, client ObjectStorage, gsURL string, localFilePath string) (err error)
- func SendToGCSWithZstd(ctx context.Context, client ObjectStorage, gsURL string, content io.Reader) (err error)
- type ObjectStorage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FetchFromGCS ¶
func FetchLocalFileFromGCS ¶
func SendToGCSWithZstd ¶
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
Click to show internal directories.
Click to hide internal directories.