bucket_connector

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2024 License: Apache-2.0 Imports: 14 Imported by: 1

Documentation

Index

Constants

View Source
const (
	DefaultBucketName = "example.com"
	DefaultJsonKey    = "gcp.json"
)

Variables

This section is empty.

Functions

func Module

func Module(scope string) fx.Option

Types

type BucketConnector

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

func (*BucketConnector) DeleteFile added in v0.0.7

func (c *BucketConnector) DeleteFile(filePath string) error

func (*BucketConnector) DeleteFileWithPrefix added in v0.0.7

func (c *BucketConnector) DeleteFileWithPrefix(filePath string) error

func (*BucketConnector) GetBucket added in v0.0.7

func (c *BucketConnector) GetBucket() *storage.BucketHandle

func (*BucketConnector) GetClient added in v0.0.4

func (c *BucketConnector) GetClient() *storage.Client

func (*BucketConnector) SaveFile

func (c *BucketConnector) SaveFile(req *UploaderReq) (string, error)

func (*BucketConnector) WriteAsFile added in v0.0.6

func (c *BucketConnector) WriteAsFile(filePath string, content []byte) (string, error)

type Params

type Params struct {
	fx.In

	Lifecycle fx.Lifecycle
	Logger    *zap.Logger
}

type UploaderReq

type UploaderReq struct {
	FileName string `json:"file_name"`
	Category string `json:"category"`
	RawData  string `json:"rowData"`
}

Jump to

Keyboard shortcuts

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