gcs

package
v0.0.0-...-8742a2b Latest Latest
Warning

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

Go to latest
Published: May 9, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package gcs provides wrappers around Google Cloud Storage (GCS) APIs. Package uses Application Default Credentials assuming that the program runs on GCE.

See the following links for details and API reference: https://cloud.google.com/go/getting-started/using-cloud-storage https://godoc.org/cloud.google.com/go/storage

Index

Constants

View Source
const PublicPrefix = "https://storage.googleapis.com/"

Where things get published.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func NewClient

func NewClient() (*Client, error)

func (*Client) Close

func (client *Client) Close()

func (*Client) FileWriter

func (client *Client) FileWriter(gcsFile string) (io.WriteCloser, error)

func (*Client) Publish

func (client *Client) Publish(gcsFile string) error

Publish lets any user read gcsFile.

func (*Client) Read

func (client *Client) Read(gcsFile string) (*File, error)

func (*Client) UploadFile

func (client *Client) UploadFile(localFile, gcsFile string) error

type File

type File struct {
	Updated time.Time
	// contains filtered or unexported fields
}

func (*File) Reader

func (file *File) Reader() (io.ReadCloser, error)

Jump to

Keyboard shortcuts

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