Documentation ¶
Index ¶
- func GetBucketNameError(bucket string) error
- func GetObjectNameError(object string) error
- func IsBucketNameValid(bucket string) bool
- func IsObjectNameValid(object string) bool
- func PathJoin(elem ...string) string
- type Accessor
- type DataChunkTransport
- type File
- type MinIO
- func (m *MinIO) BufferGet(bucketName, objectName string) (*bytes.Buffer, error)
- func (m *MinIO) BufferGetA(addr *common.S3Address) (*bytes.Buffer, error)
- func (m *MinIO) Copy(dstBucketName, dstObjectName, srcBucketName, srcObjectName string) error
- func (m *MinIO) CopyA(dst, src *common.S3Address) error
- func (m *MinIO) CreateBucket(bucketName string) error
- func (m *MinIO) Digest(bucketName, objectName string, _type common.DigestType) (*common.Digest, error)
- func (m *MinIO) DigestA(addr *common.S3Address, _type common.DigestType) (*common.Digest, error)
- func (m *MinIO) FGet(bucketName, objectName, fileName string) error
- func (m *MinIO) FGetA(addr *common.S3Address, fileName string) error
- func (m *MinIO) FGetTempFile(bucketName, objectName, dir, pattern string) (string, error)
- func (m *MinIO) FGetTempFileA(addr *common.S3Address, dir, pattern string) (string, error)
- func (m *MinIO) FPut(bucketName, objectName, fileName string) (int64, error)
- func (m *MinIO) FPutA(addr *common.S3Address, fileName string) (int64, error)
- func (m *MinIO) FPutUUID(bucketName, path, fileName string) (*common.S3Address, int64, error)
- func (m *MinIO) FPutUUIDA(addr *common.S3Address, fileName string) (*common.S3Address, int64, error)
- func (m *MinIO) Get(bucketName, objectName string) (io.Reader, error)
- func (m *MinIO) GetA(addr *common.S3Address) (io.Reader, error)
- func (m *MinIO) List(bucket, prefix string, n int) ([]minio.ObjectInfo, error)
- func (m *MinIO) ListBuckets() ([]string, error)
- func (m *MinIO) Move(dstBucketName, dstObjectName, srcBucketName, srcObjectName string) error
- func (m *MinIO) MoveA(dst, src *common.S3Address) error
- func (m *MinIO) Put(bucketName, objectName string, reader io.Reader) (int64, error)
- func (m *MinIO) PutA(addr *common.S3Address, reader io.Reader) (int64, error)
- func (m *MinIO) PutUUID(bucketName string, path string, reader io.Reader) (*common.S3Address, int64, error)
- func (m *MinIO) PutUUIDA(addr *common.S3Address, reader io.Reader) (*common.S3Address, int64, error)
- func (m *MinIO) Remove(bucketName, objectName string) error
- func (m *MinIO) RemoveA(addr *common.S3Address) error
- func (m *MinIO) RemoveBucket(bucketName string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetBucketNameError ¶
GetBucketNameError returns an error with description in case bucket name is not valid according to AWS s3 bucket naming rules. https://docs.aws.amazon.com/AmazonS3/latest/userguide/bucketnamingrules.html
func GetObjectNameError ¶
GetObjectNameError returns an error with description in case object name is not valid according to AWS s2 object naming rules.
func IsBucketNameValid ¶
IsBucketNameValid checks whether bucket name is valid according to AWS s3 bucket naming rules. https://docs.aws.amazon.com/AmazonS3/latest/userguide/bucketnamingrules.html
func IsObjectNameValid ¶
IsObjectNameValid checks whether object name is valid according to AWS s2 object naming rules.
Types ¶
type Accessor ¶
type Accessor struct {
// contains filtered or unexported fields
}
func NewAccessor ¶
NewAccessor
type DataChunkTransport ¶
type DataChunkTransport struct {
Accessor
}
func NewDataChunkTransport ¶
func NewDataChunkTransport(mi *MinIO, s3address *common.S3Address) *DataChunkTransport
NewDataChunkTransport
type File ¶
type File struct {
Accessor
}
File Inspired by os.File handler and is expected to be used in the same context.
type MinIO ¶
type MinIO struct { Endpoint string Secure bool AccessKeyID string SecretAccessKey string BucketAutoCreate bool Region string Perm os.FileMode // contains filtered or unexported fields }
MinIO specifies MinIO/S3 access structure
func NewMinIO ¶
func NewMinIO( endpoint string, secure bool, insecureSkipVerify bool, accessKeyID, secretAccessKey string, bucketAutoCreate bool, region string, ) (*MinIO, error)
NewMinIO creates new MinIO
func NewMinIOFromConfig ¶
func NewMinIOFromConfig(cfg sections.MinIOConfigurator) (*MinIO, error)
NewMinIOFromConfig creates new MinIO from config
func (*MinIO) BufferGetA ¶
BufferGetA downloads specified object into memory buffer
func (*MinIO) CreateBucket ¶
CreateBucket creates specified bucket
func (*MinIO) Digest ¶
func (m *MinIO) Digest(bucketName, objectName string, _type common.DigestType) (*common.Digest, error)
Digest calculates digest of the specified object
func (*MinIO) FGetTempFile ¶
FGetTempFile downloads specified object into temp file created in specified dir with name pattern See ioutil.TempFile() for more into about dir and name pattern
func (*MinIO) FGetTempFileA ¶
FGetTempFileA downloads specified object into temp file created in specified dir with name pattern See ioutil.TempFile() for more into about dir and name pattern
func (*MinIO) FPutUUID ¶
FPutUUID creates object in specified bucket named by generated UUID from the file
func (*MinIO) FPutUUIDA ¶
func (m *MinIO) FPutUUIDA(addr *common.S3Address, fileName string) (*common.S3Address, int64, error)
FPutUUIDA creates object in specified bucket named by generated UUID from the file
func (*MinIO) ListBuckets ¶
ListBuckets lists all buckets
func (*MinIO) PutUUID ¶
func (m *MinIO) PutUUID(bucketName string, path string, reader io.Reader) (*common.S3Address, int64, error)
PutUUID creates object in specified bucket named by generated UUID from the reader
func (*MinIO) PutUUIDA ¶
func (m *MinIO) PutUUIDA(addr *common.S3Address, reader io.Reader) (*common.S3Address, int64, error)
PutUUIDA creates object in specified bucket named by generated UUID from the reader
func (*MinIO) RemoveBucket ¶
RemoveBucket removes/deletes specified bucket