Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MinioObjStore ¶
type MinioObjStore struct {
// contains filtered or unexported fields
}
MinioObjectStore is an implementation of ObjectStore using Minio
func NewMinioObjectStore ¶
func NewMinioObjectStore(client *minio.Client) *MinioObjStore
NewMinioObjectStore creates a new instance of MinioObjectStore with the provided Minio client
func (*MinioObjStore) Delete ¶ added in v0.12.0
func (s *MinioObjStore) Delete(ctx context.Context, bucket, obj string) error
Delete removes an object from Minio
func (*MinioObjStore) Get ¶
func (s *MinioObjStore) Get(ctx context.Context, bucket, obj string) (io.ReadCloser, error)
Get retrieves an object from Minio
type ObjectStore ¶
type ObjectStore interface { Put(ctx context.Context, bucket, obj string, reader io.Reader, size int64, contentType string) error Get(ctx context.Context, bucket, obj string) (io.ReadCloser, error) Delete(ctx context.Context, bucket, obj string) error }
ObjectStore is a generic interface for object store operations
type ObjectStoreMock ¶
type ObjectStoreMock struct { PutFunc func(ctx context.Context, bucket, obj string, reader io.Reader, size int64, contentType string) error GetFunc func(ctx context.Context, bucket, obj string) (io.ReadCloser, error) DeleteFunc func(ctx context.Context, bucket, obj string) error }
ObjectStoreMock is a mock implementation of the ObjectStore interface.
func GenerateObjectStoreMock ¶
func GenerateObjectStoreMock() *ObjectStoreMock
GenerateObjectStoreMock generates a new mock instance of the ObjectStore interface.
func (*ObjectStoreMock) Delete ¶ added in v0.13.0
func (m *ObjectStoreMock) Delete(ctx context.Context, bucket, obj string) error
Delete is a mock implementation of the Delete method.
func (*ObjectStoreMock) Get ¶
func (m *ObjectStoreMock) Get(ctx context.Context, bucket, obj string) (io.ReadCloser, error)
Get is a mock implementation of the Get method.
Click to show internal directories.
Click to hide internal directories.