Documentation ¶
Index ¶
- type GCPStorage
- func (g *GCPStorage) Close() error
- func (g *GCPStorage) CreateDir(ctx context.Context, req *model.CreateFileRequest) error
- func (g *GCPStorage) CreateFile(ctx context.Context, req *model.CreateFileRequest, file io.Reader) error
- func (g *GCPStorage) DeleteDir(ctx context.Context, path string) error
- func (g *GCPStorage) DeleteFile(ctx context.Context, path string) error
- func (g *GCPStorage) DoesExists(ctx context.Context, path string) error
- func (g *GCPStorage) GetState(ctx context.Context) error
- func (g *GCPStorage) GetStoreType() utils.FileStoreType
- func (g *GCPStorage) ListDir(ctx context.Context, req *model.ListFilesRequest) ([]*model.ListFilesResponse, error)
- func (g *GCPStorage) ReadFile(ctx context.Context, path string) (*model.File, error)
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 (*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 ¶
func (g *GCPStorage) ListDir(ctx context.Context, req *model.ListFilesRequest) ([]*model.ListFilesResponse, error)
ListDir lists a directory in GCPStorage
Click to show internal directories.
Click to hide internal directories.