adapter

package
v0.0.0-...-9058691 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateBucket

func CreateBucket(client *minio.Client, bucketName string) error

func RegisterMinioClient

func RegisterMinioClient(cfg *configs.Configuration) (*minio.Client, error)

func SetPermission

func SetPermission(client *minio.Client, bucketName string) error

Types

type MinioAdapter

type MinioAdapter struct {
	// contains filtered or unexported fields
}

func (*MinioAdapter) DeleteData

func (ma *MinioAdapter) DeleteData(objectName string) error

func (*MinioAdapter) DeleteDataList

func (ma *MinioAdapter) DeleteDataList() error

func (*MinioAdapter) GetData

func (ma *MinioAdapter) GetData(objectName string) (file io.Reader)

func (*MinioAdapter) GetDataList

func (ma *MinioAdapter) GetDataList() (file []io.Reader)

func (*MinioAdapter) UploadData

func (ma *MinioAdapter) UploadData(objectName string, data io.Reader) error

type ResourceAdapter

type ResourceAdapter interface {
	GetData(objectName string) (file io.Reader)

	GetDataList() (file []io.Reader)

	UploadData(objectName string, file io.Reader) error

	DeleteData(objectName string) error

	DeleteDataList() error
}

func NewMinioAdapter

func NewMinioAdapter(c *minio.Client, bucketName string, cfg *configs.Configuration) ResourceAdapter

Jump to

Keyboard shortcuts

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