Documentation ¶
Index ¶
- Variables
- type Client
- type Config
- type Minio
- func (client *Minio) Delete(ctx context.Context, bucket, objectName string) error
- func (client *Minio) Download(ctx context.Context, bucket, objectName string, buffer []byte) ([]byte, error)
- func (client *Minio) GetBucketLocation(ctx context.Context, bucket string) (string, error)
- func (client *Minio) ListBuckets(ctx context.Context) ([]string, error)
- func (client *Minio) ListBucketsAttribution(ctx context.Context) ([]string, error)
- func (client *Minio) ListObjects(ctx context.Context, bucket, prefix string) []string
- func (client *Minio) MakeBucket(ctx context.Context, bucket, region string) error
- func (client *Minio) RemoveBucket(ctx context.Context, bucket string) error
- func (client *Minio) Upload(ctx context.Context, bucket, objectName string, data []byte) error
- func (client *Minio) UploadMultipart(ctx context.Context, bucket, objectName string, data []byte, partSize int, ...) error
Constants ¶
This section is empty.
Variables ¶
View Source
var MinioError = errs.Class("minio")
MinioError is class for minio errors.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface { MakeBucket(ctx context.Context, bucket, region string) error RemoveBucket(ctx context.Context, bucket string) error GetBucketLocation(ctx context.Context, bucket string) (string, error) ListBuckets(ctx context.Context) ([]string, error) ListBucketsAttribution(ctx context.Context) ([]string, error) Upload(ctx context.Context, bucket, objectName string, data []byte) error Download(ctx context.Context, bucket, objectName string, buffer []byte) ([]byte, error) Delete(ctx context.Context, bucket, objectName string) error ListObjects(ctx context.Context, bucket, prefix string) []string }
Client is the common interface for different implementations.
type Config ¶
type Config struct { S3Gateway string Satellite string AccessKey string SecretKey string APIKey string EncryptionKey string NoSSL bool ConfigDir string }
Config is the setup for a particular client.
type Minio ¶
Minio implements basic S3 Client with minio.
func (*Minio) Download ¶
func (client *Minio) Download(ctx context.Context, bucket, objectName string, buffer []byte) ([]byte, error)
Download downloads object data.
func (*Minio) GetBucketLocation ¶
GetBucketLocation returns the bucket's location.
func (*Minio) ListBuckets ¶
ListBuckets lists all buckets.
func (*Minio) ListBucketsAttribution ¶
ListBucketsAttribution lists all buckets with attribution.
func (*Minio) ListObjects ¶
ListObjects lists objects.
func (*Minio) MakeBucket ¶
MakeBucket makes a new bucket.
func (*Minio) RemoveBucket ¶
RemoveBucket removes a bucket.
Click to show internal directories.
Click to hide internal directories.