minioUpload

command
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

README

MinIO upload

Upload a file contains the word "test" whither the bucket exists or not at this moment.

Environment

Copy/Rename .env.example to .env
Change the values of the variables to your need in .env file.

Run

Open your terminal in this current path, then run

go run upload.go

Methods

1- NewMinioClient

  • Stablish a connection with MinIO in pkg using the variables from .env file.

2- UploadFileToMinio

  • Ckeck if the bucket exists or not.
    • if exists, then upload the file.
    • if not exists, then will create a bucket with the name delivered from .env file then upload the file.
  • Declares an exchange on the server.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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