Documentation
¶
Index ¶
- func AddLenHeader(content []byte) []byte
- func AppendFileBatch(content []byte, path string, perm os.FileMode) error
- func EnsureBucketNotification(uri, creds, filterSuffix string, arn *notification.Arn) (*minio.Client, error)
- func IsFile(uri string) bool
- func NewS3Client(uri, creds string) (client *minio.Client, bucketName, objectName string, err error)
- func ReadFile(uri, creds string) ([]byte, error)
- func ReadFileBatch(path string) ([][]byte, error)
- func ReadFileBatchFromBytes(content []byte) ([][]byte, error)
- func WriteFile(content []byte, uri, creds string) error
- type UriType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddLenHeader ¶
func AppendFileBatch ¶
AppendFileBatch appends a []byte to an existing file or to a new file if not there
func EnsureBucketNotification ¶
func EnsureBucketNotification(uri, creds, filterSuffix string, arn *notification.Arn) (*minio.Client, error)
EnsureBucketNotification check that a bucket exists and if not it creates it If a bucket is created, and notification information is provided then creates a bucket notification
func NewS3Client ¶
func ReadFile ¶
ReadFile use this function to generically fetch a file from a URI regardless of the type of location the file is in supported URI schemes are: - if prefix http:// or https:// then fetches from http endpoint - if prefix is none then reads from file system - if prefix is s3:// or s3s:// then fetches from s3 bucket endpoint - if prefix is ftp then returns a not supported error credentials are valid for http and s3 URIs and follow the syntax "user:pwd"
func ReadFileBatch ¶
func ReadFileBatchFromBytes ¶
func WriteFile ¶
WriteFile writes a file to a URI supported URI schemes are: - if prefix is none then writes to file system - if prefix is s3:// or s3s:// then put the file to s3 bucket endpoint - if prefix http:// or https:// then returns a not supported error - if prefix is ftp then returns a not supported error credentials are valid for s3 URIs and follow the syntax "user:pwd"