storage_client

package
v0.0.0-...-5d38aa0 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MinioClient

type MinioClient struct {
	Client *minio.Client
	// contains filtered or unexported fields
}

func InitMinio

func InitMinio(config *env_config.AppEnvConfig) (error, *MinioClient)

Setup minio client and setup basic setup on the minio

func (*MinioClient) GetObject

func (client *MinioClient) GetObject(ctx context.Context, objectName string) (error, io.Reader)

Get object from the client

func (*MinioClient) PutObject

func (client *MinioClient) PutObject(ctx context.Context, fileName string, reader io.Reader, size int64) (error, int64)

Put object into the bucket

type StorageClient

type StorageClient interface {
	PutObject(ctx context.Context, fileName string, reader io.Reader, size int64) (error, int64)
	GetObject(ctx context.Context, objectName string) (error, io.Reader)
}

Jump to

Keyboard shortcuts

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