Help us shape the future of Go! Take the 2026 Go Developer Survey

gcs

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2017 License: MPL-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewGCSBackend

func NewGCSBackend(conf map[string]string, logger log.Logger) (physical.Backend, error)

NewGCSBackend constructs a Google Cloud Storage backend using a pre-existing bucket. Credentials can be provided to the backend, sourced from environment variables or a service account file

Types

type GCSBackend

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

GCSBackend is a physical backend that stores data within an Google Cloud Storage bucket.

func (*GCSBackend) Delete

func (g *GCSBackend) Delete(key string) error

Delete is used to permanently delete an entry

func (*GCSBackend) Get

func (g *GCSBackend) Get(key string) (*physical.Entry, error)

Get is used to fetch an entry

func (*GCSBackend) List

func (g *GCSBackend) List(prefix string) ([]string, error)

List is used to list all the keys under a given prefix, up to the next prefix.

func (*GCSBackend) Put

func (g *GCSBackend) Put(entry *physical.Entry) error

Put is used to insert or update an entry

Jump to

Keyboard shortcuts

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