filesys
packageThis package is not in the latest version of its module.
Details
Validgo.mod file
The Go module system was introduced in Go 1.11 and is the official dependency management solution for Go.
Redistributable license
Redistributable licenses place minimal restrictions on how software can be used, modified, and redistributed.
Tagged version
Modules with tagged versions give importers more predictable builds.
Stable version
When a project reaches major version v1 it is considered stable.
- Learn more about best practices
Repository
Links
Documentation¶
Index¶
- func CopyFromLocalRecursive(fs FileSysClient, localPath string, remotePath string) (totalBytes int64, err error)
- func CopyFromRemoteRecursive(fs FileSysClient, remotePath string, localPath string) (totalBytes int64, err error)
- func CopyRecursive(fromFs, toFs FileSysClient, fromPath, toPath string) (totalBytes int64, err error)
- func Delete(fs FileSysClient, uri string) (err error)
- func GetDataflow(fs FileSysClient, nodes FileNodes, cfg iop.FileStreamConfig) (df *iop.Dataflow, err error)
- func GetDataflowViaDuckDB(fs FileSysClient, uri string, nodes FileNodes, cfg iop.FileStreamConfig) (df *iop.Dataflow, err error)
- func GetDeepestParent(path string) string
- func GetDeepestPartitionParent(path string) string
- func GetFirstDatePartURI(fs FileSysClient, mask string) (uri string, err error)
- func InferFileFormat(path string, defaults ...dbio.FileType) dbio.FileType
- func MakeDatastream(reader io.Reader, cfg map[string]string) (ds *iop.Datastream, err error)
- func MergeReaders(fs FileSysClient, fileType dbio.FileType, nodes FileNodes, ...) (ds *iop.Datastream, err error)
- func NormalizeURI(fs FileSysClient, uri string) string
- func ParseURL(uri string) (host, path string, err error)
- func ParseURLType(uri string) (uType dbio.Type, host string, path string, err error)
- func PeekFileType(reader io.Reader) (ft dbio.FileType, reader2 io.Reader, err error)
- func TestFsPermissions(fs FileSysClient, pathURL string) (err error)
- func Write(reader io.Reader, writer io.Writer) (bw int64, err error)
- func WriteDataflow(fs FileSysClient, df *iop.Dataflow, url string) (bw int64, err error)
- func WriteDataflowReadyViaDuckDB(fs FileSysClient, df *iop.Dataflow, uri string, fileReadyChn chan FileReady, ...) (bw int64, err error)
- func WriteDataflowViaDuckDB(fs FileSysClient, df *iop.Dataflow, uri string) (bw int64, err error)
- type ABFSFileSysClient
- func (fs *ABFSFileSysClient) Buckets() (paths []string, err error)
- func (fs *ABFSFileSysClient) Connect() (err error)
- func (fs *ABFSFileSysClient) GetPath(uri string) (path string, err error)
- func (fs *ABFSFileSysClient) GetReader(uri string) (reader io.Reader, err error)
- func (fs *ABFSFileSysClient) Init(ctx context.Context) (err error)
- func (fs *ABFSFileSysClient) List(uri string) (nodes FileNodes, err error)
- func (fs *ABFSFileSysClient) ListRecursive(uri string) (nodes FileNodes, err error)
- func (fs *ABFSFileSysClient) Prefix(suffix ...string) string
- func (fs *ABFSFileSysClient) Write(uri string, reader io.Reader) (bw int64, err error)
- type AzureFileSysClient
- func (fs *AzureFileSysClient) Buckets() (paths []string, err error)
- func (fs *AzureFileSysClient) Connect() (err error)
- func (fs *AzureFileSysClient) GetPath(uri string) (path string, err error)
- func (fs *AzureFileSysClient) GetReader(uri string) (reader io.Reader, err error)
- func (fs *AzureFileSysClient) Init(ctx context.Context) (err error)
- func (fs *AzureFileSysClient) List(uri string) (nodes FileNodes, err error)
- func (fs *AzureFileSysClient) ListRecursive(uri string) (nodes FileNodes, err error)
- func (fs *AzureFileSysClient) Prefix(suffix ...string) string
- func (fs *AzureFileSysClient) Write(uri string, reader io.Reader) (bw int64, err error)
- type BaseFileSysClient
- func (fs *BaseFileSysClient) Buckets() (paths []string, err error)
- func (fs *BaseFileSysClient) Client() *BaseFileSysClient
- func (fs *BaseFileSysClient) Close() error
- func (fs *BaseFileSysClient) Context() (context *g.Context)
- func (fs *BaseFileSysClient) FsType() dbio.Type
- func (fs *BaseFileSysClient) GetDatastream(uri string, cfg ...iop.FileStreamConfig) (ds *iop.Datastream, err error)
- func (fs *BaseFileSysClient) GetProp(key string, keys ...string) string
- func (fs *BaseFileSysClient) GetReaders(paths ...string) (readers []io.Reader, err error)
- func (fs *BaseFileSysClient) GetRefTs() time.Time
- func (fs *BaseFileSysClient) Prefix(suffix ...string) string
- func (fs *BaseFileSysClient) Props() map[string]string
- func (fs *BaseFileSysClient) Query(uri, sql string) (data iop.Dataset, err error)
- func (fs *BaseFileSysClient) ReadDataflow(url string, cfg ...iop.FileStreamConfig) (df *iop.Dataflow, err error)
- func (fs *BaseFileSysClient) Self() FileSysClient
- func (fs *BaseFileSysClient) SetProp(key string, val string)
- func (fs *BaseFileSysClient) WriteDataflowReady(df *iop.Dataflow, url string, fileReadyChn chan FileReady, sc iop.StreamConfig) (bw int64, err error)
- type FileNode
- type FileNodes
- func (fns *FileNodes) Add(ns ...FileNode)
- func (fns *FileNodes) AddWhere(pattern *glob.Glob, after int64, ns ...FileNode)
- func (fns FileNodes) After(ts time.Time) (nodes FileNodes)
- func (fns FileNodes) AvgSize() uint64
- func (fns FileNodes) Columns() map[string]iop.Column
- func (fns FileNodes) Files() (nodes FileNodes)
- func (fns FileNodes) Folders() (nodes FileNodes)
- func (fns FileNodes) InferFormat() (format dbio.FileType)
- func (fns FileNodes) Paths() (paths []string)
- func (fns FileNodes) SelectWithPrefix(prefixes ...string) (nodes FileNodes)
- func (fns FileNodes) Sort()
- func (fns FileNodes) TotalSize() uint64
- func (fns FileNodes) URIs() (uris []string)
- type FileReady
- type FileSysClient
- func NewFileSysClient(fst dbio.Type, props ...string) (fsClient FileSysClient, err error)
- func NewFileSysClientContext(ctx context.Context, fst dbio.Type, props ...string) (fsClient FileSysClient, err error)
- func NewFileSysClientFromURL(url string, props ...string) (fsClient FileSysClient, err error)
- func NewFileSysClientFromURLContext(ctx context.Context, url string, props ...string) (fsClient FileSysClient, err error)
- type FtpFileSysClient
- func (fs *FtpFileSysClient) Close() error
- func (fs *FtpFileSysClient) Connect() (err error)
- func (fs *FtpFileSysClient) GetPath(uri string) (path string, err error)
- func (fs *FtpFileSysClient) GetReader(urlStr string) (reader io.Reader, err error)
- func (fs *FtpFileSysClient) Init(ctx context.Context) (err error)
- func (fs *FtpFileSysClient) List(url string) (nodes FileNodes, err error)
- func (fs *FtpFileSysClient) ListRecursive(url string) (nodes FileNodes, err error)
- func (fs *FtpFileSysClient) MkdirAll(path string) (err error)
- func (fs *FtpFileSysClient) Prefix(suffix ...string) string
- func (fs *FtpFileSysClient) Reconnect(reason string)
- func (fs *FtpFileSysClient) Write(urlStr string, reader io.Reader) (bw int64, err error)
- type GoogleDriveFileSysClient
- func (fs *GoogleDriveFileSysClient) Buckets() (paths []string, err error)
- func (fs *GoogleDriveFileSysClient) Connect() (err error)
- func (fs *GoogleDriveFileSysClient) GetPath(uri string) (path string, err error)
- func (fs *GoogleDriveFileSysClient) GetReader(uri string) (reader io.Reader, err error)
- func (fs *GoogleDriveFileSysClient) Init(ctx context.Context) (err error)
- func (fs *GoogleDriveFileSysClient) List(uri string) (nodes FileNodes, err error)
- func (fs *GoogleDriveFileSysClient) ListRecursive(uri string) (nodes FileNodes, err error)
- func (fs *GoogleDriveFileSysClient) MkdirAll(path string) (err error)
- func (fs *GoogleDriveFileSysClient) Prefix(suffix ...string) string
- func (fs *GoogleDriveFileSysClient) Write(uri string, reader io.Reader) (bw int64, err error)
- type GoogleFileSysClient
- func (fs *GoogleFileSysClient) Buckets() (paths []string, err error)
- func (fs *GoogleFileSysClient) Connect() (err error)
- func (fs *GoogleFileSysClient) GetPath(uri string) (path string, err error)
- func (fs *GoogleFileSysClient) GetReader(path string) (reader io.Reader, err error)
- func (fs *GoogleFileSysClient) Init(ctx context.Context) (err error)
- func (fs *GoogleFileSysClient) List(uri string) (nodes FileNodes, err error)
- func (fs *GoogleFileSysClient) ListRecursive(uri string) (nodes FileNodes, err error)
- func (fs *GoogleFileSysClient) Prefix(suffix ...string) string
- func (fs *GoogleFileSysClient) Write(path string, reader io.Reader) (bw int64, err error)
- type HTTPFileSysClient
- func (fs *HTTPFileSysClient) Connect() (err error)
- func (fs *HTTPFileSysClient) GetPath(uri string) (path string, err error)
- func (fs *HTTPFileSysClient) GetReader(url string) (reader io.Reader, err error)
- func (fs *HTTPFileSysClient) Init(ctx context.Context) (err error)
- func (fs *HTTPFileSysClient) List(url string) (nodes FileNodes, err error)
- func (fs *HTTPFileSysClient) ListRecursive(url string) (nodes FileNodes, err error)
- func (fs *HTTPFileSysClient) Prefix(suffix ...string) string
- func (fs *HTTPFileSysClient) Write(urlStr string, reader io.Reader) (bw int64, err error)
- type LocalFileSysClient
- func (fs *LocalFileSysClient) GetDatastream(uri string, cfg ...iop.FileStreamConfig) (ds *iop.Datastream, err error)
- func (fs *LocalFileSysClient) GetPath(uri string) (path string, err error)
- func (fs *LocalFileSysClient) GetReader(uri string) (reader io.Reader, err error)
- func (fs *LocalFileSysClient) GetWriter(uri string) (writer io.Writer, err error)
- func (fs *LocalFileSysClient) Init(ctx context.Context) (err error)
- func (fs *LocalFileSysClient) List(uri string) (nodes FileNodes, err error)
- func (fs *LocalFileSysClient) ListRecursive(uri string) (nodes FileNodes, err error)
- func (fs *LocalFileSysClient) MkdirAll(uri string) (err error)
- func (fs *LocalFileSysClient) Prefix(suffix ...string) string
- func (fs *LocalFileSysClient) Write(uri string, reader io.Reader) (bw int64, err error)
- type S3FileSysClient
- func (fs *S3FileSysClient) Buckets() (paths []string, err error)
- func (fs *S3FileSysClient) Connect() (err error)
- func (fs *S3FileSysClient) GenerateS3PreSignedURL(s3URL string, dur time.Duration) (httpURL string, err error)
- func (fs *S3FileSysClient) GetPath(uri string) (path string, err error)
- func (fs *S3FileSysClient) GetReader(uri string) (reader io.Reader, err error)
- func (fs *S3FileSysClient) GetWriter(uri string) (writer io.Writer, err error)
- func (fs *S3FileSysClient) Init(ctx context.Context) (err error)
- func (fs *S3FileSysClient) List(uri string) (nodes FileNodes, err error)
- func (fs *S3FileSysClient) ListRecursive(uri string) (nodes FileNodes, err error)
- func (fs *S3FileSysClient) Prefix(suffix ...string) string
- func (fs *S3FileSysClient) Write(uri string, reader io.Reader) (bw int64, err error)
- type S3ReaderWrapper
- type SftpFileSysClient
- func (fs *SftpFileSysClient) Close() error
- func (fs *SftpFileSysClient) Connect() (err error)
- func (fs *SftpFileSysClient) GetPath(uri string) (path string, err error)
- func (fs *SftpFileSysClient) GetReader(urlStr string) (reader io.Reader, err error)
- func (fs *SftpFileSysClient) GetWriter(urlStr string) (writer io.Writer, err error)
- func (fs *SftpFileSysClient) Init(ctx context.Context) (err error)
- func (fs *SftpFileSysClient) List(url string) (nodes FileNodes, err error)
- func (fs *SftpFileSysClient) ListRecursive(uri string) (nodes FileNodes, err error)
- func (fs *SftpFileSysClient) MkdirAll(path string) (err error)
- func (fs *SftpFileSysClient) Prefix(suffix ...string) string
- func (fs *SftpFileSysClient) Write(urlStr string, reader io.Reader) (bw int64, err error)
Constants¶
This section is empty.
Variables¶
This section is empty.
Functions¶
funcCopyFromLocalRecursive¶added inv1.2.25
func CopyFromLocalRecursive(fsFileSysClient, localPathstring, remotePathstring) (totalBytesint64, errerror)
CopyFromLocalRecursive copies a local file or directory recursively to a remote filesystem
funcCopyFromRemoteRecursive¶added inv1.3.5
func CopyFromRemoteRecursive(fsFileSysClient, remotePathstring, localPathstring) (totalBytesint64, errerror)
CopyFromRemoteRecursive copies a remote file or directory recursively to a local filesystem
funcCopyRecursive¶added inv1.3.6
func CopyRecursive(fromFs, toFsFileSysClient, fromPath, toPathstring) (totalBytesint64, errerror)
CopyRecursive copies from/to remote systems by streaming. The folderstructure should be maintained. The read/write operations should be done concurrently.
funcDelete¶
func Delete(fsFileSysClient, uristring) (errerror)
Delete deletes the provided path before writingwith some safeguards so to not accidentally delete some root path
funcGetDataflow¶
func GetDataflow(fsFileSysClient, nodesFileNodes, cfgiop.FileStreamConfig) (df *iop.Dataflow, errerror)
GetDataflow returns a dataflow from specified paths in specified FileSysClient
funcGetDataflowViaDuckDB¶added inv1.3.5
func GetDataflowViaDuckDB(fsFileSysClient, uristring, nodesFileNodes, cfgiop.FileStreamConfig) (df *iop.Dataflow, errerror)
GetDataflowViaDuckDB returns a dataflow from specified paths in specified FileSysClient
funcGetDeepestParent¶added inv1.1.15
funcGetDeepestPartitionParent¶added inv1.3.6
funcGetFirstDatePartURI¶added inv1.3.6
func GetFirstDatePartURI(fsFileSysClient, maskstring) (uristring, errerror)
GetFirstDatePartURI determines the first part for the URI mask provided
funcMakeDatastream¶
MakeDatastream create a datastream from a reader
funcMergeReaders¶
func MergeReaders(fsFileSysClient, fileTypedbio.FileType, nodesFileNodes, cfgiop.FileStreamConfig) (ds *iop.Datastream, errerror)
funcNormalizeURI¶added inv1.1.15
func NormalizeURI(fsFileSysClient, uristring)string
funcParseURLType¶added inv1.2.16
ParseURL parses a URL
funcPeekFileType¶
PeekFileType peeks into the file to try determine the file typeCSV is the default
funcTestFsPermissions¶
func TestFsPermissions(fsFileSysClient, pathURLstring) (errerror)
TestFsPermissions tests read/write permisions
funcWriteDataflow¶added inv1.2.10
WriteDataflow writes a dataflow to a file sys.
funcWriteDataflowReadyViaDuckDB¶added inv1.4.24
func WriteDataflowReadyViaDuckDB(fsFileSysClient, df *iop.Dataflow, uristring, fileReadyChn chanFileReady, sciop.StreamConfig) (bwint64, errerror)
WriteDataflowViaDuckDB writes to parquet / csv via duckdb
funcWriteDataflowViaDuckDB¶added inv1.3.6
Types¶
typeABFSFileSysClient¶added inv1.4.24
type ABFSFileSysClient struct {BaseFileSysClient// contains filtered or unexported fields}ABFSFileSysClient is a file system client to write file to Azure Data Lake Storage Gen2 (ABFS)
func (*ABFSFileSysClient)Buckets¶added inv1.4.24
func (fs *ABFSFileSysClient) Buckets() (paths []string, errerror)
Buckets returns the filesystems found in the account
func (*ABFSFileSysClient)Connect¶added inv1.4.24
func (fs *ABFSFileSysClient) Connect() (errerror)
Connect initiates the fs client connection
func (*ABFSFileSysClient)GetPath¶added inv1.4.24
func (fs *ABFSFileSysClient) GetPath(uristring) (pathstring, errerror)
GetPath returns the path of url
func (*ABFSFileSysClient)GetReader¶added inv1.4.24
func (fs *ABFSFileSysClient) GetReader(uristring) (readerio.Reader, errerror)
GetReader returns an ABFS reader
func (*ABFSFileSysClient)Init¶added inv1.4.24
func (fs *ABFSFileSysClient) Init(ctxcontext.Context) (errerror)
Init initializes the fs client
func (*ABFSFileSysClient)List¶added inv1.4.24
func (fs *ABFSFileSysClient) List(uristring) (nodesFileNodes, errerror)
List list objects in path (non-recursive)
func (*ABFSFileSysClient)ListRecursive¶added inv1.4.24
func (fs *ABFSFileSysClient) ListRecursive(uristring) (nodesFileNodes, errerror)
ListRecursive list objects in path recursively
func (*ABFSFileSysClient)Prefix¶added inv1.4.24
func (fs *ABFSFileSysClient) Prefix(suffix ...string)string
Prefix returns the url prefix
typeAzureFileSysClient¶
type AzureFileSysClient struct {BaseFileSysClient// contains filtered or unexported fields}AzureFileSysClient is a file system client to write file to Microsoft's Azure file sys.
func (*AzureFileSysClient)Buckets¶
func (fs *AzureFileSysClient) Buckets() (paths []string, errerror)
Buckets returns the containers found in the project
func (*AzureFileSysClient)Connect¶
func (fs *AzureFileSysClient) Connect() (errerror)
Connect initiates the fs client connection
func (*AzureFileSysClient)GetPath¶added inv1.1.15
func (fs *AzureFileSysClient) GetPath(uristring) (pathstring, errerror)
GetPath returns the path of url
func (*AzureFileSysClient)GetReader¶
func (fs *AzureFileSysClient) GetReader(uristring) (readerio.Reader, errerror)
GetReader returns an Azure FS reader
func (*AzureFileSysClient)Init¶
func (fs *AzureFileSysClient) Init(ctxcontext.Context) (errerror)
Init initializes the fs client
func (*AzureFileSysClient)List¶
func (fs *AzureFileSysClient) List(uristring) (nodesFileNodes, errerror)
List list objects in path
func (*AzureFileSysClient)ListRecursive¶
func (fs *AzureFileSysClient) ListRecursive(uristring) (nodesFileNodes, errerror)
ListRecursive list objects in path
func (*AzureFileSysClient)Prefix¶added inv1.1.15
func (fs *AzureFileSysClient) Prefix(suffix ...string)string
Prefix returns the url prefix
typeBaseFileSysClient¶
type BaseFileSysClient struct {FileSysClient// contains filtered or unexported fields}BaseFileSysClient is the base file system type.
func (*BaseFileSysClient)Buckets¶
func (fs *BaseFileSysClient) Buckets() (paths []string, errerror)
Buckets returns the buckets found in the account
func (*BaseFileSysClient)Client¶
func (fs *BaseFileSysClient) Client() *BaseFileSysClient
Client provides a pointer to itself
func (*BaseFileSysClient)Close¶added inv1.2.12
func (fs *BaseFileSysClient) Close()error
Close closes the client
func (*BaseFileSysClient)Context¶
func (fs *BaseFileSysClient) Context() (context *g.Context)
Context provides a pointer to context
func (*BaseFileSysClient)FsType¶
func (fs *BaseFileSysClient) FsType()dbio.Type
FsType return the type of the client
func (*BaseFileSysClient)GetDatastream¶
func (fs *BaseFileSysClient) GetDatastream(uristring, cfg ...iop.FileStreamConfig) (ds *iop.Datastream, errerror)
GetDatastream return a datastream for the given path
func (*BaseFileSysClient)GetProp¶
func (fs *BaseFileSysClient) GetProp(keystring, keys ...string)string
GetProp returns the value of a property
func (*BaseFileSysClient)GetReaders¶
func (fs *BaseFileSysClient) GetReaders(paths ...string) (readers []io.Reader, errerror)
GetReaders returns one or more readers from specified paths in specified FileSysClient
func (*BaseFileSysClient)GetRefTs¶
func (fs *BaseFileSysClient) GetRefTs()time.Time
func (*BaseFileSysClient)Prefix¶added inv1.1.15
func (fs *BaseFileSysClient) Prefix(suffix ...string)string
Prefix returns the url prefix
func (*BaseFileSysClient)Props¶
func (fs *BaseFileSysClient) Props() map[string]string
Props returns a copy of the properties map
func (*BaseFileSysClient)Query¶added inv1.2.16
func (fs *BaseFileSysClient) Query(uri, sqlstring) (dataiop.Dataset, errerror)
Query queries the file system via duckdb
func (*BaseFileSysClient)ReadDataflow¶
func (fs *BaseFileSysClient) ReadDataflow(urlstring, cfg ...iop.FileStreamConfig) (df *iop.Dataflow, errerror)
ReadDataflow read
func (*BaseFileSysClient)Self¶
func (fs *BaseFileSysClient) Self()FileSysClient
Instance returns the respective connection InstanceThis is useful to refer back to a subclass methodfrom the superclass level. (Aka overloading)
func (*BaseFileSysClient)SetProp¶
func (fs *BaseFileSysClient) SetProp(keystring, valstring)
SetProp sets the value of a property
func (*BaseFileSysClient)WriteDataflowReady¶
func (fs *BaseFileSysClient) WriteDataflowReady(df *iop.Dataflow, urlstring, fileReadyChn chanFileReady, sciop.StreamConfig) (bwint64, errerror)
WriteDataflowReady writes to a file sys and notifies the fileReady chan.
typeFileNode¶added inv1.2.16
type FileNode struct {URIstring `json:"uri"`IsDirbool `json:"is_dir"`Sizeuint64 `json:"size,omitempty"`Createdint64 `json:"created,omitempty"`Updatedint64 `json:"updated,omitempty"`Ownerstring `json:"owner,omitempty"`Columnsiop.Columns `json:"columns,omitempty"`ChildrenFileNodes `json:"children,omitempty"`// contains filtered or unexported fields}FileNode represents a file node
func (*FileNode)MarshalJSON¶added inv1.2.19
typeFileNodes¶added inv1.2.16
type FileNodes []FileNode
FileNodes represent file nodes
funcCopyFromRemoteNodes¶added inv1.3.5
func CopyFromRemoteNodes(fsFileSysClient, urlstring, nodesFileNodes, localRootstring) (totalBytesint64, localNodesFileNodes, errerror)
CopyFromRemoteNodes copies the nodes to local path maintaining the same folder structure
funcNewFileNodes¶added inv1.2.16
NewFileNodes creates fileNodes from slice of maps
func (*FileNodes)AddWhere¶added inv1.2.16
AddWhere adds a new node to list if pattern matches name and after timestamp
func (FileNodes)InferFormat¶added inv1.3.5
InferFormat returns the most common file format
func (FileNodes)SelectWithPrefix¶added inv1.3.6
SelectWithPrefix returns only nodes with one of the prefixes
typeFileSysClient¶
type FileSysClient interface {Self()FileSysClientInit(ctxcontext.Context) (errerror)Close() (errerror)Client() *BaseFileSysClientContext() (context *g.Context)FsType()dbio.TypeGetReader(pathstring) (readerio.Reader, errerror)GetReaders(paths ...string) (readers []io.Reader, errerror)GetDatastream(pathstring, cfg ...iop.FileStreamConfig) (ds *iop.Datastream, errerror)GetWriter(pathstring) (writerio.Writer, errerror)Buckets() (paths []string, errerror)List(pathstring) (pathsFileNodes, errerror)ListRecursive(pathstring) (pathsFileNodes, errerror)Write(pathstring, readerio.Reader) (bwint64, errerror)Prefix(suffix ...string)stringReadDataflow(urlstring, cfg ...iop.FileStreamConfig) (df *iop.Dataflow, errerror)WriteDataflowReady(df *iop.Dataflow, urlstring, fileReadyChn chanFileReady, sciop.StreamConfig) (bwint64, errerror)GetProp(keystring, keys ...string) (valstring)SetProp(keystring, valstring)Props() map[string]stringMkdirAll(pathstring) (errerror)GetPath(uristring) (pathstring, errerror)Query(uri, sqlstring) (dataiop.Dataset, errerror)// contains filtered or unexported methods}FileSysClient is a client to a file systemssuch as local, s3, hdfs, azure storage, google cloud storage
funcNewFileSysClient¶
func NewFileSysClient(fstdbio.Type, props ...string) (fsClientFileSysClient, errerror)
NewFileSysClient create a file system clientsuch as local, s3, azure storage, google cloud storageprops are provided as `"Prop1=Value1", "Prop2=Value2", ...`
funcNewFileSysClientContext¶
func NewFileSysClientContext(ctxcontext.Context, fstdbio.Type, props ...string) (fsClientFileSysClient, errerror)
NewFileSysClientContext create a file system client with contextsuch as local, s3, azure storage, google cloud storageprops are provided as `"Prop1=Value1", "Prop2=Value2", ...`
funcNewFileSysClientFromURL¶
func NewFileSysClientFromURL(urlstring, props ...string) (fsClientFileSysClient, errerror)
NewFileSysClientFromURL returns the proper fs client for the given pathprops are provided as `"Prop1=Value1", "Prop2=Value2", ...`
funcNewFileSysClientFromURLContext¶
func NewFileSysClientFromURLContext(ctxcontext.Context, urlstring, props ...string) (fsClientFileSysClient, errerror)
NewFileSysClientFromURLContext returns the proper fs client for the given path with contextprops are provided as `"Prop1=Value1", "Prop2=Value2", ...`
typeFtpFileSysClient¶added inv1.1.12
type FtpFileSysClient struct {BaseFileSysClient// contains filtered or unexported fields}FtpFileSysClient is for FTP file systems
func (*FtpFileSysClient)Close¶added inv1.1.12
func (fs *FtpFileSysClient) Close()error
func (*FtpFileSysClient)Connect¶added inv1.1.12
func (fs *FtpFileSysClient) Connect() (errerror)
Connect initiates the Google Cloud Storage client
func (*FtpFileSysClient)GetPath¶added inv1.1.15
func (fs *FtpFileSysClient) GetPath(uristring) (pathstring, errerror)
GetPath returns the path of url
func (*FtpFileSysClient)GetReader¶added inv1.1.12
func (fs *FtpFileSysClient) GetReader(urlStrstring) (readerio.Reader, errerror)
GetReader return a reader for the given path
func (*FtpFileSysClient)Init¶added inv1.1.12
func (fs *FtpFileSysClient) Init(ctxcontext.Context) (errerror)
Init initializes the fs client
func (*FtpFileSysClient)List¶added inv1.1.12
func (fs *FtpFileSysClient) List(urlstring) (nodesFileNodes, errerror)
List list objects in path
func (*FtpFileSysClient)ListRecursive¶added inv1.1.12
func (fs *FtpFileSysClient) ListRecursive(urlstring) (nodesFileNodes, errerror)
ListRecursive list objects in path recursively
func (*FtpFileSysClient)MkdirAll¶added inv1.1.12
func (fs *FtpFileSysClient) MkdirAll(pathstring) (errerror)
MkdirAll creates child directories
func (*FtpFileSysClient)Prefix¶added inv1.1.15
func (fs *FtpFileSysClient) Prefix(suffix ...string)string
Prefix returns the url prefix
func (*FtpFileSysClient)Reconnect¶added inv1.2.12
func (fs *FtpFileSysClient) Reconnect(reasonstring)
typeGoogleDriveFileSysClient¶added inv1.4.10
type GoogleDriveFileSysClient struct {BaseFileSysClient// contains filtered or unexported fields}GoogleDriveFileSysClient is a file system client for Google Drive
func (*GoogleDriveFileSysClient)Buckets¶added inv1.4.10
func (fs *GoogleDriveFileSysClient) Buckets() (paths []string, errerror)
Buckets returns the root folder (Google Drive doesn't have buckets)
func (*GoogleDriveFileSysClient)Connect¶added inv1.4.10
func (fs *GoogleDriveFileSysClient) Connect() (errerror)
Connect initiates the Google Drive client
func (*GoogleDriveFileSysClient)GetPath¶added inv1.4.10
func (fs *GoogleDriveFileSysClient) GetPath(uristring) (pathstring, errerror)
GetPath returns the path of url
func (*GoogleDriveFileSysClient)GetReader¶added inv1.4.10
func (fs *GoogleDriveFileSysClient) GetReader(uristring) (readerio.Reader, errerror)
GetReader returns a reader for the given path
func (*GoogleDriveFileSysClient)Init¶added inv1.4.10
func (fs *GoogleDriveFileSysClient) Init(ctxcontext.Context) (errerror)
Init initializes the fs client
func (*GoogleDriveFileSysClient)List¶added inv1.4.10
func (fs *GoogleDriveFileSysClient) List(uristring) (nodesFileNodes, errerror)
List returns the list of objects
func (*GoogleDriveFileSysClient)ListRecursive¶added inv1.4.10
func (fs *GoogleDriveFileSysClient) ListRecursive(uristring) (nodesFileNodes, errerror)
ListRecursive returns the list of objects recursively
func (*GoogleDriveFileSysClient)MkdirAll¶added inv1.4.10
func (fs *GoogleDriveFileSysClient) MkdirAll(pathstring) (errerror)
MkdirAll creates a directory path and all parents that don't exist
func (*GoogleDriveFileSysClient)Prefix¶added inv1.4.10
func (fs *GoogleDriveFileSysClient) Prefix(suffix ...string)string
Prefix returns the url prefix
typeGoogleFileSysClient¶
type GoogleFileSysClient struct {BaseFileSysClient// contains filtered or unexported fields}GoogleFileSysClient is a file system client to write file to Amazon's S3 file sys.
func (*GoogleFileSysClient)Buckets¶
func (fs *GoogleFileSysClient) Buckets() (paths []string, errerror)
Buckets returns the buckets found in the project
func (*GoogleFileSysClient)Connect¶
func (fs *GoogleFileSysClient) Connect() (errerror)
Connect initiates the Google Cloud Storage client
func (*GoogleFileSysClient)GetPath¶added inv1.1.15
func (fs *GoogleFileSysClient) GetPath(uristring) (pathstring, errerror)
GetPath returns the path of url
func (*GoogleFileSysClient)GetReader¶
func (fs *GoogleFileSysClient) GetReader(pathstring) (readerio.Reader, errerror)
GetReader returns the reader for the given path
func (*GoogleFileSysClient)Init¶
func (fs *GoogleFileSysClient) Init(ctxcontext.Context) (errerror)
Init initializes the fs client
func (*GoogleFileSysClient)List¶
func (fs *GoogleFileSysClient) List(uristring) (nodesFileNodes, errerror)
List returns the list of objects
func (*GoogleFileSysClient)ListRecursive¶
func (fs *GoogleFileSysClient) ListRecursive(uristring) (nodesFileNodes, errerror)
ListRecursive returns the list of objects recursively
func (*GoogleFileSysClient)Prefix¶added inv1.1.15
func (fs *GoogleFileSysClient) Prefix(suffix ...string)string
Prefix returns the url prefix
typeHTTPFileSysClient¶
type HTTPFileSysClient struct {BaseFileSysClient// contains filtered or unexported fields}HTTPFileSysClient is for HTTP files
func (*HTTPFileSysClient)Connect¶
func (fs *HTTPFileSysClient) Connect() (errerror)
Connect initiates the http client
func (*HTTPFileSysClient)GetPath¶added inv1.1.15
func (fs *HTTPFileSysClient) GetPath(uristring) (pathstring, errerror)
GetPath returns the path of url
func (*HTTPFileSysClient)GetReader¶
func (fs *HTTPFileSysClient) GetReader(urlstring) (readerio.Reader, errerror)
GetReader gets a reader for an HTTP resource (download)
func (*HTTPFileSysClient)Init¶
func (fs *HTTPFileSysClient) Init(ctxcontext.Context) (errerror)
Init initializes the fs client
func (*HTTPFileSysClient)List¶
func (fs *HTTPFileSysClient) List(urlstring) (nodesFileNodes, errerror)
List lists all urls on the page
func (*HTTPFileSysClient)ListRecursive¶
func (fs *HTTPFileSysClient) ListRecursive(urlstring) (nodesFileNodes, errerror)
ListRecursive lists all urls on the page
func (*HTTPFileSysClient)Prefix¶added inv1.1.15
func (fs *HTTPFileSysClient) Prefix(suffix ...string)string
Prefix returns the url prefix
typeLocalFileSysClient¶
type LocalFileSysClient struct {BaseFileSysClient// contains filtered or unexported fields}LocalFileSysClient is a file system client to write file to local file sys.
func (*LocalFileSysClient)GetDatastream¶
func (fs *LocalFileSysClient) GetDatastream(uristring, cfg ...iop.FileStreamConfig) (ds *iop.Datastream, errerror)
GetDatastream return a datastream for the given path
func (*LocalFileSysClient)GetPath¶added inv1.1.15
func (fs *LocalFileSysClient) GetPath(uristring) (pathstring, errerror)
GetPath returns the path of url
func (*LocalFileSysClient)GetReader¶
func (fs *LocalFileSysClient) GetReader(uristring) (readerio.Reader, errerror)
GetReader return a reader for the given path
func (*LocalFileSysClient)GetWriter¶
func (fs *LocalFileSysClient) GetWriter(uristring) (writerio.Writer, errerror)
GetWriter creates the file if non-existent and return a writer
func (*LocalFileSysClient)Init¶
func (fs *LocalFileSysClient) Init(ctxcontext.Context) (errerror)
Init initializes the fs client
func (*LocalFileSysClient)List¶
func (fs *LocalFileSysClient) List(uristring) (nodesFileNodes, errerror)
List lists the file in given directory path
func (*LocalFileSysClient)ListRecursive¶
func (fs *LocalFileSysClient) ListRecursive(uristring) (nodesFileNodes, errerror)
ListRecursive lists the file in given directory path recursively
func (*LocalFileSysClient)MkdirAll¶
func (fs *LocalFileSysClient) MkdirAll(uristring) (errerror)
MkdirAll creates child directories
func (*LocalFileSysClient)Prefix¶added inv1.1.15
func (fs *LocalFileSysClient) Prefix(suffix ...string)string
Prefix returns the url prefix
typeS3FileSysClient¶
type S3FileSysClient struct {BaseFileSysClientRegionMap map[string]string// contains filtered or unexported fields}S3FileSysClient is a file system client to write file to Amazon's S3 file sys.
func (*S3FileSysClient)Buckets¶
func (fs *S3FileSysClient) Buckets() (paths []string, errerror)
Buckets returns the buckets found in the account
func (*S3FileSysClient)Connect¶
func (fs *S3FileSysClient) Connect() (errerror)
Connect initiates the S3 client
func (*S3FileSysClient)GenerateS3PreSignedURL¶
func (*S3FileSysClient)GetPath¶added inv1.1.15
func (fs *S3FileSysClient) GetPath(uristring) (pathstring, errerror)
GetPath returns the path of url
func (*S3FileSysClient)GetReader¶
func (fs *S3FileSysClient) GetReader(uristring) (readerio.Reader, errerror)
GetReader return a reader for the given pathpath should specify the full path with scheme:`s3://my_bucket/key/to/file.txt` or `s3://my_bucket/key/to/directory`
func (*S3FileSysClient)GetWriter¶
func (fs *S3FileSysClient) GetWriter(uristring) (writerio.Writer, errerror)
GetWriter creates the file if non-existent and return a writerpath should specify the full path with scheme:`s3://my_bucket/key/to/file.txt`
func (*S3FileSysClient)Init¶
func (fs *S3FileSysClient) Init(ctxcontext.Context) (errerror)
Init initializes the fs client
func (*S3FileSysClient)List¶
func (fs *S3FileSysClient) List(uristring) (nodesFileNodes, errerror)
List lists the file in given directory path
func (*S3FileSysClient)ListRecursive¶
func (fs *S3FileSysClient) ListRecursive(uristring) (nodesFileNodes, errerror)
ListRecursive lists the file in given directory path recusivelypath should specify the full path with scheme:`s3://my_bucket/key/to/directory`
func (*S3FileSysClient)Prefix¶added inv1.1.15
func (fs *S3FileSysClient) Prefix(suffix ...string)string
Prefix returns the url prefix
typeS3ReaderWrapper¶added inv1.4.13
type S3ReaderWrapper struct {io.ReadCloser// contains filtered or unexported fields}S3ReaderWrapper wraps an io.ReadCloser and ensures proper cleanup
func (*S3ReaderWrapper)Close¶added inv1.4.13
func (r *S3ReaderWrapper) Close()error
Close ensures the underlying ReadCloser is closed only once
typeSftpFileSysClient¶
type SftpFileSysClient struct {BaseFileSysClient// contains filtered or unexported fields}SftpFileSysClient is for SFTP / SSH file ops
func (*SftpFileSysClient)Close¶added inv1.2.12
func (fs *SftpFileSysClient) Close()error
Close closes the client
func (*SftpFileSysClient)Connect¶
func (fs *SftpFileSysClient) Connect() (errerror)
Connect initiates the Google Cloud Storage client
func (*SftpFileSysClient)GetPath¶added inv1.1.15
func (fs *SftpFileSysClient) GetPath(uristring) (pathstring, errerror)
GetPath returns the path of url
func (*SftpFileSysClient)GetReader¶
func (fs *SftpFileSysClient) GetReader(urlStrstring) (readerio.Reader, errerror)
GetReader return a reader for the given path
func (*SftpFileSysClient)GetWriter¶
func (fs *SftpFileSysClient) GetWriter(urlStrstring) (writerio.Writer, errerror)
GetWriter creates the file if non-existent and return a writer
func (*SftpFileSysClient)Init¶
func (fs *SftpFileSysClient) Init(ctxcontext.Context) (errerror)
Init initializes the fs client
func (*SftpFileSysClient)List¶
func (fs *SftpFileSysClient) List(urlstring) (nodesFileNodes, errerror)
List list objects in path
func (*SftpFileSysClient)ListRecursive¶
func (fs *SftpFileSysClient) ListRecursive(uristring) (nodesFileNodes, errerror)
ListRecursive list objects in path recursively
func (*SftpFileSysClient)MkdirAll¶
func (fs *SftpFileSysClient) MkdirAll(pathstring) (errerror)
MkdirAll creates child directories
func (*SftpFileSysClient)Prefix¶added inv1.1.15
func (fs *SftpFileSysClient) Prefix(suffix ...string)string
Prefix returns the url prefix