bucketfile

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2021 License: BSD-3-Clause Imports: 7 Imported by: 0

README

Bucketfile

Upload, get and list files in a Google Cloud storage bucket

  • Version: 1.0.0
  • License: BSD-3

Documentation

Overview

Package bucketfile provides an easy way to: * upload a file to a bucket * get a file from a bucket * list files in a bucket

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Get

func Get(bucket, object string) ([]byte, error)

Get takes a bucket name and an object name and returns the file data as a slice of bytes. It has a 50 second timeout.

func List

func List(bucket string) ([]string, error)

List lists objects within the specified bucket It has a 10 second timeout.

func Upload

func Upload(file io.Reader, bucket, object string) error

Upload takes an io.Reader, bucket name and object name and uploads the file to the bucket. It has a 50 second timeout.

Types

This section is empty.

Jump to

Keyboard shortcuts

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