minioservice

package
v0.0.0-...-d1e270b Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Connect

func Connect(endpoint, accessKeyId, secretAccessKey string, useSSL bool) *minio.Client

Connect initializes minio client object

Types

type Service

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

Service prepares the interfaces related with this minio service

func NewService

func NewService(log *logger.Logger, mioCfg config.Minio) *Service

NewService creates a new user service

func (*Service) CreateBucketIfNotExist

func (svc *Service) CreateBucketIfNotExist() error

CreateBucketIfNotExist creates bucket if not exist

func (*Service) GetObjectByObjectName

func (svc *Service) GetObjectByObjectName(filename string) (*bytes.Buffer, error)

GetObjectByObjectName gets object data by filename as a byte buffer

func (*Service) StoreFileToMinio

func (svc *Service) StoreFileToMinio(objectName, fullFilePath, contentType string) error

StoreFileToMinio stores file tp minio

func (*Service) StoreToMinioFromBuffer

func (svc *Service) StoreToMinioFromBuffer(fullPath string, byteBuffer []byte) error

StoreToMinioFromBuffer stores buffer data to minio

Jump to

Keyboard shortcuts

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