gcp

package
v0.0.0-...-f5a181e Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const ReadUntilEOF int64 = -1

ReadUntilEOF is a value to provide to NewRangeReader()'s length argument to request reading the object until the end.

Variables

This section is empty.

Functions

func NewClientOptionsFromConfiguration

func NewClientOptionsFromConfiguration(configuration *gcp_pb.ClientOptionsConfiguration, name string) ([]option.ClientOption, error)

NewClientOptionsFromConfiguration creates a list of Google Cloud SDK client options based on options specified in a Protobuf configuration message. The resulting client options object can be used to access GCP services such as GCS.

Types

type StorageBucketHandle

type StorageBucketHandle interface {
	Object(name string) StorageObjectHandle
}

StorageBucketHandle contains the methods of the Google Cloud SDK's storage.BucketHandle type that are used by this code base. This interface has been added to permit unit testing.

type StorageClient

type StorageClient interface {
	Bucket(name string) StorageBucketHandle
}

StorageClient contains the methods of the Google Cloud SDK's storage.Client type that are used by this code base. This interface has been added to permit unit testing.

func NewWrappedStorageClient

func NewWrappedStorageClient(impl *storage.Client) StorageClient

NewWrappedStorageClient converts a concrete instance of storage.Client to the StorageClient interface, so that it can be used in code that can be unit tested.

type StorageObjectHandle

type StorageObjectHandle interface {
	NewRangeReader(ctx context.Context, offset, length int64) (io.ReadCloser, error)
}

StorageObjectHandle contains the methods of the Google Cloud SDK's storage.ObjectHandle type that are used by this code base. This interface has been added to permit unit testing.

Jump to

Keyboard shortcuts

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