Documentation ¶
Index ¶
- Constants
- Variables
- type DataStoreClient
- type DataStoreConfig
- type IDataStoreClient
- type LocalClient
- func (c *LocalClient) DeleteFiles(object string, bucket string) error
- func (c *LocalClient) GetDataPath() string
- func (c *LocalClient) GetFile(object string, bucket string) ([]byte, error)
- func (c *LocalClient) List(bucket string, prefix string) ([]string, error)
- func (c *LocalClient) ListChan(ctx context.Context, bucket string, prefix string) (<-chan string, error)
- func (c *LocalClient) RenameFile(oldObject string, newObject string, bucket string) error
- func (c *LocalClient) StorageType() string
- func (c *LocalClient) UploadFromBytes(data []byte, folder string, name string) error
- func (c *LocalClient) UploadFromFile(name string, folder string) error
- func (c *LocalClient) UploadFromReader(data io.Reader, size int64, folder string, name string) error
- type MinioClient
- func (c *MinioClient) DeleteFiles(object string, bucket string) error
- func (c *MinioClient) GetClient() *minio.Client
- func (c *MinioClient) GetContentType() string
- func (c *MinioClient) GetFile(object string, bucket string) ([]byte, error)
- func (c *MinioClient) List(bucket string, prefix string) ([]string, error)
- func (c *MinioClient) ListChan(ctx context.Context, bucket string, prefix string) (<-chan string, error)
- func (c *MinioClient) RenameFile(oldObject string, newObject string, bucket string) error
- func (c *MinioClient) StorageType() string
- func (c *MinioClient) UploadFromBytes(data []byte, folder string, name string) error
- func (c *MinioClient) UploadFromFile(name string, folder string) error
- func (c *MinioClient) UploadFromReader(data io.Reader, size int64, folder string, name string) error
- type S5cmdClient
- func (c *S5cmdClient) DeleteFiles(object string, bucket string) error
- func (c *S5cmdClient) GetClient() *s5store.S3
- func (c *S5cmdClient) GetContentType() string
- func (c *S5cmdClient) GetFile(object string, bucket string) ([]byte, error)
- func (c *S5cmdClient) List(bucket string, prefix string) ([]string, error)
- func (c *S5cmdClient) ListChan(ctx context.Context, bucket string, prefix string) (<-chan string, error)
- func (c *S5cmdClient) RenameFile(oldObject string, newObject string, bucket string) error
- func (c *S5cmdClient) StorageType() string
- func (c *S5cmdClient) UploadFromBytes(data []byte, folder string, name string) error
- func (c *S5cmdClient) UploadFromFile(name string, folder string) error
- func (c *S5cmdClient) UploadFromReader(data io.Reader, size int64, folder string, name string) error
- type S5cmdList
Constants ¶
View Source
const ( S5Storage = "s5" S3Storage = "s3" LocalStorage = "local" ContentType = "application/octet-stream" DataPath = "data" S3url = "s3://" Localurl = "file://" )
Variables ¶
View Source
var (
ErrFileNotFound = fmt.Errorf("file not found")
)
Functions ¶
This section is empty.
Types ¶
type DataStoreClient ¶
type DataStoreClient struct {
Client IDataStoreClient
}
func NewDataStoreClient ¶
func NewDataStoreClient(config DataStoreConfig) (DataStoreClient, error)
type DataStoreConfig ¶
type IDataStoreClient ¶
type IDataStoreClient interface { GetFile(name string, location string) ([]byte, error) UploadFromFile(filePath string, dest string) error UploadFromBytes(data []byte, destFolder string, destName string) error UploadFromReader(data io.Reader, size int64, destFolder string, destName string) error List(dir string, prefix string) ([]string, error) ListChan(ctx context.Context, dir string, prefix string) (<-chan string, error) StorageType() string DeleteFiles(name string, location string) error RenameFile(oldName string, newName string, bucket string) error }
type LocalClient ¶
type LocalClient struct {
// contains filtered or unexported fields
}
func (*LocalClient) DeleteFiles ¶ added in v1.3.4
func (c *LocalClient) DeleteFiles(object string, bucket string) error
func (*LocalClient) GetDataPath ¶ added in v1.3.0
func (c *LocalClient) GetDataPath() string
func (*LocalClient) GetFile ¶
func (c *LocalClient) GetFile(object string, bucket string) ([]byte, error)
func (*LocalClient) List ¶
func (c *LocalClient) List(bucket string, prefix string) ([]string, error)
func (*LocalClient) RenameFile ¶ added in v1.3.4
func (c *LocalClient) RenameFile(oldObject string, newObject string, bucket string) error
func (*LocalClient) StorageType ¶
func (c *LocalClient) StorageType() string
func (*LocalClient) UploadFromBytes ¶ added in v1.2.3
func (c *LocalClient) UploadFromBytes(data []byte, folder string, name string) error
func (*LocalClient) UploadFromFile ¶ added in v1.2.3
func (c *LocalClient) UploadFromFile(name string, folder string) error
func (*LocalClient) UploadFromReader ¶ added in v1.3.0
type MinioClient ¶
type MinioClient struct {
// contains filtered or unexported fields
}
func (*MinioClient) DeleteFiles ¶ added in v1.3.4
func (c *MinioClient) DeleteFiles(object string, bucket string) error
func (*MinioClient) GetClient ¶
func (c *MinioClient) GetClient() *minio.Client
func (*MinioClient) GetContentType ¶ added in v1.3.0
func (c *MinioClient) GetContentType() string
func (*MinioClient) GetFile ¶
func (c *MinioClient) GetFile(object string, bucket string) ([]byte, error)
func (*MinioClient) List ¶
func (c *MinioClient) List(bucket string, prefix string) ([]string, error)
func (*MinioClient) RenameFile ¶ added in v1.3.4
func (c *MinioClient) RenameFile(oldObject string, newObject string, bucket string) error
func (*MinioClient) StorageType ¶
func (c *MinioClient) StorageType() string
func (*MinioClient) UploadFromBytes ¶ added in v1.2.3
func (c *MinioClient) UploadFromBytes(data []byte, folder string, name string) error
func (*MinioClient) UploadFromFile ¶ added in v1.2.3
func (c *MinioClient) UploadFromFile(name string, folder string) error
func (*MinioClient) UploadFromReader ¶ added in v1.3.0
type S5cmdClient ¶ added in v1.3.0
type S5cmdClient struct {
// contains filtered or unexported fields
}
func (*S5cmdClient) DeleteFiles ¶ added in v1.3.4
func (c *S5cmdClient) DeleteFiles(object string, bucket string) error
func (*S5cmdClient) GetClient ¶ added in v1.3.0
func (c *S5cmdClient) GetClient() *s5store.S3
func (*S5cmdClient) GetContentType ¶ added in v1.3.0
func (c *S5cmdClient) GetContentType() string
func (*S5cmdClient) GetFile ¶ added in v1.3.0
func (c *S5cmdClient) GetFile(object string, bucket string) ([]byte, error)
func (*S5cmdClient) List ¶ added in v1.3.0
func (c *S5cmdClient) List(bucket string, prefix string) ([]string, error)
func (*S5cmdClient) RenameFile ¶ added in v1.3.4
func (c *S5cmdClient) RenameFile(oldObject string, newObject string, bucket string) error
func (*S5cmdClient) StorageType ¶ added in v1.3.0
func (c *S5cmdClient) StorageType() string
func (*S5cmdClient) UploadFromBytes ¶ added in v1.3.0
func (c *S5cmdClient) UploadFromBytes(data []byte, folder string, name string) error
func (*S5cmdClient) UploadFromFile ¶ added in v1.3.0
func (c *S5cmdClient) UploadFromFile(name string, folder string) error
func (*S5cmdClient) UploadFromReader ¶ added in v1.3.0
Click to show internal directories.
Click to hide internal directories.