gcpstorage

package
v0.0.0-...-260b785 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GCPStorage

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

GCPStorage holds the GCPStorage client

func Init

func Init(bucket string) (*GCPStorage, error)

Init initializes a GCPStorage client

func (*GCPStorage) Close

func (g *GCPStorage) Close() error

Close gracefully close the GCPStorage module

func (*GCPStorage) CreateDir

func (g *GCPStorage) CreateDir(ctx context.Context, req *model.CreateFileRequest) error

CreateDir creates a directory in GCPStorage

func (*GCPStorage) CreateFile

func (g *GCPStorage) CreateFile(ctx context.Context, req *model.CreateFileRequest, file io.Reader) error

CreateFile creates a file in GCPStorage

func (*GCPStorage) DeleteDir

func (g *GCPStorage) DeleteDir(ctx context.Context, path string) error

DeleteDir deletes a directory in GCPStorage

func (*GCPStorage) DeleteFile

func (g *GCPStorage) DeleteFile(ctx context.Context, path string) error

DeleteFile deletes a file from GCPStorage

func (*GCPStorage) DoesExists

func (g *GCPStorage) DoesExists(ctx context.Context, path string) error

DoesExists checks if the path exists

func (*GCPStorage) GetState

func (g *GCPStorage) GetState(ctx context.Context) error

GetState checks if sc is able to query gcp storage

func (*GCPStorage) GetStoreType

func (g *GCPStorage) GetStoreType() utils.FileStoreType

GetStoreType returns the file store type

func (*GCPStorage) ListDir

ListDir lists a directory in GCPStorage

func (*GCPStorage) ReadFile

func (g *GCPStorage) ReadFile(ctx context.Context, path string) (*model.File, error)

ReadFile reads a file from GCPStorage

Jump to

Keyboard shortcuts

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