storage

package
v0.0.0-...-11fd6c2 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2021 License: BSD-3-Clause Imports: 8 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 {
	// contains filtered or unexported fields
}

Client encapsulates operations on GCP cloud storage.

func New

func New(ctx context.Context, project string) (Client, error)

New creates a new storage client, scoped to the specified project.

func (Client) PutImage

func (c Client) PutImage(ctx context.Context, u string) (string, error)

PutImage will retrieve an image's contents and store it in the image bucket. It will store the name as an MD5 hash of the URL. The returned value is the hash of the URL.

Jump to

Keyboard shortcuts

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