gcs

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	*storage.Client
}

Client is a struct used for accessing Google Cloud Storage.

func NewClient

func NewClient(namespace string, serviceAccountJSON string) (gcsClient *Client, err error)

NewClient handles the details of initializing the connection to Google Cloud Storage. - Note that the permissions are set to ReadWrite.

func (*Client) GetObject

func (c *Client) GetObject(bucket, key string) (stream io.ReadCloser, err error)
GetObject retrieves a specific object from Google Cloud Storage.

- Function Name is meant to be consistent with S3's.

Jump to

Keyboard shortcuts

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