gcsifaces

package
v0.0.0-...-34898ab Latest Latest
Warning

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

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

Documentation

Overview

Package gcsifaces provides interfaces for Google Cloud Storage.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type StorageBucket

type StorageBucket interface {
	// Object returns a StorageObject for a key.
	Object(key string) StorageObject
}

StorageBucket represents a GCS bucket.

type StorageClient

type StorageClient interface {
	// Bucket gets a StorageBucket.
	Bucket(name string) StorageBucket
	// FindDefaultCredentials finds default Google credentials.
	FindDefaultCredentials(ctx context.Context, scope string) (*google.Credentials, error)
	// JWTConfigFromJSON gets JWT config from a JSON document.
	JWTConfigFromJSON(keyJSON []byte) (*jwt.Config, error)
	// SignedURL returns a signed URL for the specified object.
	SignedURL(bucket, name string, opts *storage.SignedURLOptions) (string, error)
}

StorageClient represents a GCS client.

type StorageObject

type StorageObject interface {
	// NewWriter returns a new StorageWriter.
	NewWriter(ctx context.Context) StorageWriter
}

StorageObject represents a GCS object.

type StorageWriter

type StorageWriter interface {
	io.WriteCloser

	// SetACL sets a pre-defined ACL.
	SetACL(acl string)
}

StorageWriter represents a GCS writer.

Jump to

Keyboard shortcuts

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