Documentation ¶
Index ¶
- Variables
- func GetGcpInteractor() (gcpInteractor *usecases.GcpInteractor, err error)
- func GetLocalInteractor() (localInteractor *usecases.LocalInteractor, err error)
- type GcpHandler
- func (handler *GcpHandler) DownloadFile(fileName string) (success bool, err error)
- func (handler *GcpHandler) FileExists(fileName string) (fileExists bool, err error)
- func (handler *GcpHandler) GetBucketObject(flowType domain.FlowType, projectId string, bucketName string, fileName string) storage.ObjectHandle
- func (handler *GcpHandler) ListBuckets(flowType domain.FlowType, projectId string) (buckets []domain.Bucket, err error)
- func (handler *GcpHandler) UploadFile(fileName string) (success bool, err error)
- type LocalHandler
Constants ¶
This section is empty.
Variables ¶
View Source
var GcpInteractor *usecases.GcpInteractor
View Source
var LocalInteractor *usecases.LocalInteractor
Functions ¶
func GetGcpInteractor ¶
func GetGcpInteractor() (gcpInteractor *usecases.GcpInteractor, err error)
func GetLocalInteractor ¶
func GetLocalInteractor() (localInteractor *usecases.LocalInteractor, err error)
Types ¶
type GcpHandler ¶
func NewGcpHandler ¶
func NewGcpHandler(keyFile string) (gcpHandler *GcpHandler, err error)
A keyFile for source and another keyFile for sink
func (*GcpHandler) DownloadFile ¶
func (handler *GcpHandler) DownloadFile(fileName string) (success bool, err error)
Download will download file, save file and parse file
func (*GcpHandler) FileExists ¶
func (handler *GcpHandler) FileExists(fileName string) (fileExists bool, err error)
FileExists returns true if it exists in the specified google cloud provider bucket
func (*GcpHandler) GetBucketObject ¶
func (handler *GcpHandler) GetBucketObject(flowType domain.FlowType, projectId string, bucketName string, fileName string) storage.ObjectHandle
GetBucketObject is a helper method that returns the file Object that GCP requires
func (*GcpHandler) ListBuckets ¶
func (*GcpHandler) UploadFile ¶
func (handler *GcpHandler) UploadFile(fileName string) (success bool, err error)
UploadFile will upload a file from the file system to the target/sink bucket
type LocalHandler ¶
type LocalHandler struct{}
func NewLocalHandler ¶
func NewLocalHandler() *LocalHandler
func (*LocalHandler) FileExists ¶
func (handler *LocalHandler) FileExists(fileName string) (fileExists bool, err error)
Click to show internal directories.
Click to hide internal directories.