xminio

package module
v0.0.0-...-a912f81 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 18, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Object

type Object interface {
	Read(b []byte) (int, error)
	Stat() (minio.ObjectInfo, error)
	ReadAt(b []byte, offset int64) (int, error)
	Seek(offset int64, whence int) (int64, error)
	Close() error
}

Object is an interface that has exact methods as minio.Object.

func FileObject

func FileObject(f *os.File) Object

FileObject wraps input file to implement Object interface.

func NewBytesObject

func NewBytesObject(data []byte, lastModified time.Time) Object

type ObjectGetter

type ObjectGetter interface {
	GetObject(ctx context.Context, bucket, objectName string, options minio.GetObjectOptions) (Object, error)
}

ObjectGetter is the interface used for getting the object.

type ObjectPutter

type ObjectPutter interface {
	PutObject(ctx context.Context, bucketName, objectName string, reader io.Reader, objectSize int64, input minio.PutObjectOptions) (minio.UploadInfo, error)
}

ObjectPutter is the interface used for uploading the object.

type ObjectPutterGetter

type ObjectPutterGetter interface {
	ObjectPutter
	ObjectGetter
}

ObjectPutterGetter is the interface used for getting and putting objects into minio s3 like storage.

func WrapClient

func WrapClient(c *minio.Client) ObjectPutterGetter

WrapClient wraps *minio.Client to implement ObjectPutterGetter interface.

Directories

Path Synopsis
Package xminiomock is a generated GoMock package.
Package xminiomock is a generated GoMock package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL