gcs

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: May 12, 2022 License: MIT Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Storage

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

Storage is a gcs storage.

func NewStorage

func NewStorage(ctx context.Context, credentialsFile, bucket string) (*Storage, error)

NewStorage returns a new Storage.

func (*Storage) Delete

func (g *Storage) Delete(ctx context.Context, path string) error

Delete deletes path.

func (*Storage) Open

func (g *Storage) Open(ctx context.Context, path string) (io.ReadCloser, error)

Open opens path for reading.

func (*Storage) Save

func (g *Storage) Save(ctx context.Context, content io.Reader, path string) (rerr error)

Save saves content to path.

func (*Storage) Stat

func (g *Storage) Stat(ctx context.Context, path string) (*gostorages.Stat, error)

Stat returns path metadata.

Jump to

Keyboard shortcuts

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