gcpFS

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2023 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GCPFS

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

func NewGCPStorage

func NewGCPStorage(config *models.GCPFSConfig) (*GCPFS, error)

NewGCPStorage TO Connect successfully you need to have exported your service account.json file as the environment variable GOOGLE_APPLICATION_CREDENTIALS

func (*GCPFS) Connect added in v0.0.6

func (g *GCPFS) Connect() error

Connect to the GCP client

func (*GCPFS) Copy

func (g *GCPFS) Copy(filePathFrom string, filePathTo string) error

func (*GCPFS) Delete

func (g *GCPFS) Delete(filePath string) error

func (*GCPFS) Find

func (g *GCPFS) Find()

func (*GCPFS) List

func (g *GCPFS) List(prefix string) (map[string]*models.FileMetaData, error)

List TODO, we might have to disable the with metadata bit for speed but I will remain optimistic.

func (*GCPFS) Move

func (g *GCPFS) Move(filePathFrom string, filePathTo string) error

func (*GCPFS) Read

func (g *GCPFS) Read(filePath string) ([]byte, *models.FileMetaData, error)

func (*GCPFS) Write

func (g *GCPFS) Write(data []byte, filePath string, metaData *models.FileMetaData) (*models.FileMetaData, error)

Jump to

Keyboard shortcuts

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