minio

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2023 License: MIT Imports: 11 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 {
	// contains filtered or unexported fields
}

Wrapper around minio library

func NewClient

func NewClient(dir string, debug bool, cfg *environment.EnvConfig) (*MinioClient, error)

NewClient creates a new minio client

func (*MinioClient) DownloadFile added in v0.2.0

func (c *MinioClient) DownloadFile(ctx context.Context, input string, customPath string) error

DownloadFile downloads a file from minio by the given input url, if customPath = "" file path will be the same as the URL object path

func (*MinioClient) UploadFile

func (c *MinioClient) UploadFile(
	ctx context.Context,
	filePath string,
	public bool,
) (string, error)

UploadFile uploads a file to minio and returns the share link

Jump to

Keyboard shortcuts

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