minio

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultEndpoint = "localhost:9000"
	DefaultRegion   = "cn-north-1"
)

Functions

func New

func New(opts ...Option) (*minio.Client, error)

New returns new minioClient instance with options.

The default options are:

  • Endpoint: DefaultEndpoint
  • UseSSL: false
  • Region: DefaultRegion

Types

type Option added in v0.6.0

type Option func(*Options)

func WithAccessKeyID added in v0.6.0

func WithAccessKeyID(accessKeyID string) Option

WithAccessKeyID sets the access key ID of the MinIO storage.

func WithEndpoint added in v0.6.0

func WithEndpoint(endpoint string) Option

WithEndpoint sets the endpoint of the MinIO storage.

func WithRegion added in v0.6.0

func WithRegion(region string) Option

WithRegion specifies whether to use proxy when accessing the MinIO storage.

func WithSecretAccessKey added in v0.6.0

func WithSecretAccessKey(secretAccessKey string) Option

WithSecretAccessKey sets the secret access key of the MinIO storage.

func WithUseSSL added in v0.6.0

func WithUseSSL(useSSL bool) Option

WithUseSSL specifies whether to use SSL when accessing the MinIO storage.

type Options

type Options struct {
	// Endpoint is the endpoint of the MinIO storage.
	Endpoint string

	// AccessKeyID is the access key ID of the MinIO storage.
	AccessKeyID string

	// SecretAccessKey is the secret access key of the MinIO storage.
	SecretAccessKey string

	// UseSSL specifies whether to use SSL when accessing the MinIO storage.
	UseSSL bool

	// UseProxy specifies whether to use proxy when accessing the MinIO storage.
	Region string
}

Options for MinIO storage.

Jump to

Keyboard shortcuts

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