gcs

package
v0.0.0-...-c3d1141 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GCSClient

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

func NewGCSClientFromCredentials

func NewGCSClientFromCredentials(credentialsFilePath string) (*GCSClient, error)

NewGCSClientFromCredentials returns a new GCSClient loading the credentials from the file present in the specified path

func NewGCSClientFromJSON

func NewGCSClientFromJSON(jsonBytes []byte) (*GCSClient, error)

NewGCSClientFromJSON returns a new GCSClient loading the credentials from the given JSON string

func (*GCSClient) Close

func (h *GCSClient) Close() error

Close closes the GCS client contained in the GCSClient

func (*GCSClient) DeleteObject

func (h *GCSClient) DeleteObject(bucketName, objectName string) error

DeleteObject deletes the content of the specified object

func (*GCSClient) GetObject

func (h *GCSClient) GetObject(bucketName, objectName string) (*storage.ObjectHandle, error)

GetObject returns a object handle

func (*GCSClient) TransferFromGCS

func (h *GCSClient) TransferFromGCS(w io.Writer, bucketName, objectName string) error

TransferFromGCS streams backup data from GCS.

func (*GCSClient) TransferToGCS

func (h *GCSClient) TransferToGCS(r io.Reader, bucketName, objectName string) error

TransferToGCS streams backup data to GCS.

Jump to

Keyboard shortcuts

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