Documentation
¶
Index ¶
- type Config
- type ListObjectsOptions
- type MakeBucketOptions
- type ObjectStore
- func (ostore *ObjectStore) GetObject(ctx context.Context, bucketName, filename string) (*minio.Object, error)
- func (ostore *ObjectStore) GetPresignedURLObject(ctx context.Context, bucketName, filename string, ...) (*url.URL, error)
- func (ostore *ObjectStore) ListAllBucketsObjects(ctx context.Context, opts ListObjectsOptions) ([]minio.ObjectInfo, error)
- func (ostore *ObjectStore) ListBuckets(ctx context.Context) ([]minio.BucketInfo, error)
- func (ostore *ObjectStore) ListObjects(ctx context.Context, bucketName string, opts ListObjectsOptions) <-chan minio.ObjectInfo
- func (ostore *ObjectStore) MakeBucket(ctx context.Context, bucketName string, opts MakeBucketOptions) error
- func (ostore *ObjectStore) SaveObject(ctx context.Context, bucketName, objectName string, reader io.Reader, ...) (minio.UploadInfo, error)
- func (ostore *ObjectStore) SaveObjectFromPath(ctx context.Context, bucketName, objectName, filePath string, ...) (minio.UploadInfo, error)
- type PresignedGetObjectOptions
- type PutObjectOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ListObjectsOptions ¶
type ListObjectsOptions minio.ListObjectsOptions
type MakeBucketOptions ¶
type MakeBucketOptions minio.MakeBucketOptions
type ObjectStore ¶
type ObjectStore struct { PresignedURLExpiration time.Duration // contains filtered or unexported fields }
func New ¶
func New(cfg Config) (*ObjectStore, error)
func (*ObjectStore) GetObject ¶
func (ostore *ObjectStore) GetObject(ctx context.Context, bucketName, filename string) (*minio.Object, error)
GetObject gets object to be written
func (*ObjectStore) GetPresignedURLObject ¶
func (ostore *ObjectStore) GetPresignedURLObject(ctx context.Context, bucketName, filename string, opts PresignedGetObjectOptions) (*url.URL, error)
PresignedGetObject gets presigned URL for object if presignedURLExpiration is not set defaults to a day
func (*ObjectStore) ListAllBucketsObjects ¶
func (ostore *ObjectStore) ListAllBucketsObjects(ctx context.Context, opts ListObjectsOptions) ([]minio.ObjectInfo, error)
func (*ObjectStore) ListBuckets ¶
func (ostore *ObjectStore) ListBuckets(ctx context.Context) ([]minio.BucketInfo, error)
func (*ObjectStore) ListObjects ¶
func (ostore *ObjectStore) ListObjects(ctx context.Context, bucketName string, opts ListObjectsOptions) <-chan minio.ObjectInfo
func (*ObjectStore) MakeBucket ¶
func (ostore *ObjectStore) MakeBucket(ctx context.Context, bucketName string, opts MakeBucketOptions) error
func (*ObjectStore) SaveObject ¶
func (ostore *ObjectStore) SaveObject(ctx context.Context, bucketName, objectName string, reader io.Reader, objectSize int64, opts PutObjectOptions) (minio.UploadInfo, error)
SaveObject saves file from a reader interface to cloud if content type is not set this will try to detect and set what it detects
func (*ObjectStore) SaveObjectFromPath ¶
func (ostore *ObjectStore) SaveObjectFromPath(ctx context.Context, bucketName, objectName, filePath string, opts PutObjectOptions) (minio.UploadInfo, error)
SaveObjectFromPath saves file from local disk to cloud if content type is not set this will try to detect and set what it detects
type PutObjectOptions ¶
type PutObjectOptions minio.PutObjectOptions
Click to show internal directories.
Click to hide internal directories.