storage

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MinioConfig

type MinioConfig struct {
	Endpoint        string
	AccessKeyID     string
	SecretAccessKey string
	UseSSL          bool
}

type ObjectStorageClient

type ObjectStorageClient interface {
	MakeBucket(ctx context.Context, bucketName string, opts minio.MakeBucketOptions) error
	BucketExists(ctx context.Context, bucketName string) (bool, error)
	PutObject(ctx context.Context, bucketName string, objectName string, reader io.Reader, objectSize int64, opts minio.PutObjectOptions) (minio.UploadInfo, error)
	GetObject(ctx context.Context, bucketName string, objectName string, opts minio.GetObjectOptions) (*minio.Object, error)
	ListObjects(ctx context.Context, bucketName string, opts minio.ListObjectsOptions) <-chan minio.ObjectInfo
}

func NewObjectStorageClient

func NewObjectStorageClient(config *configs.Configuration) (ObjectStorageClient, *errors.GimmeError)

NewObjectStorageClient create a new object storage client

type ObjectStorageManager

type ObjectStorageManager interface {
	CreateBucket(bucketName string, location string) *errors.GimmeError
	AddObject(objectName string, file *zip.File) *errors.GimmeError
	GetObject(objectName string) (*minio.Object, *errors.GimmeError)
	ObjectExists(objectName string) bool
	ListObjects(objectName string) []minio.ObjectInfo
}

func NewObjectStorageManager

func NewObjectStorageManager(client ObjectStorageClient) ObjectStorageManager

NewObjectStorageManager create a new object storage manager

Jump to

Keyboard shortcuts

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