func New(endpoint, accessKeyID, secretAccessKey string, secure bool) (*Client, error) {
	clnt, err := privateNew(endpoint, Options{
		Creds:        credentials.NewStaticV4(accessKeyID, secretAccessKey, ""),
		Secure:       secure,
		BucketLookup: BucketLookupAuto,
	})
	if err != nil {
		return nil, err
	}
	if s3utils.IsGoogleEndpoint(*clnt.endpointURL) {
		clnt.overrideSignerType = credentials.SignatureV2
	}
	if s3utils.IsAmazonEndpoint(*clnt.endpointURL) {
		clnt.overrideSignerType = credentials.SignatureV4
	}
	return clnt, nil
}
New - instantiate minio client, adds automatic verification of signature.
package minio
import (
	"bytes"
	"context"
	"errors"
	"fmt"
	"io"
	"io/ioutil"
	"math/rand"
	"net"
	"net/http"
	"net/http/cookiejar"
	"net/http/httputil"
	"net/url"
	"os"
	"runtime"
	"strings"
	"sync"
	"time"
	md5simd "github.com/minio/md5-simd"
	"github.com/minio/minio-go/v6/pkg/credentials"
	"github.com/minio/minio-go/v6/pkg/s3utils"
	"github.com/minio/minio-go/v6/pkg/signer"
	"golang.org/x/net/publicsuffix"
)
type Client struct {
	endpointURL *url.URL
	credsProvider *credentials.Credentials
	overrideSignerType credentials.SignatureType
	appInfo struct {
		appName    string
		appVersion string
	}
	secure bool
	httpClient     *http.Client
	bucketLocCache *bucketLocationCache
	isTraceEnabled  bool
	traceErrorsOnly bool
	traceOutput     io.Writer
	s3AccelerateEndpoint string
	region string
	random *rand.Rand
	lookup BucketLookupType
	md5Hasher    func() md5simd.Hasher
	sha256Hasher func() md5simd.Hasher
}
type Options struct {
	Creds        *credentials.Credentials
	Secure       bool
	Region       string
	BucketLookup BucketLookupType
	CustomMD5    func() md5simd.Hasher
	CustomSHA256 func() md5simd.Hasher
}
const (
	libraryName    = "minio-go"
	libraryVersion = "v6.0.57"
)
const (
	libraryUserAgentPrefix = "MinIO (" + runtime.GOOS + "; " + runtime.GOARCH + ") "
	libraryUserAgent       = libraryUserAgentPrefix + libraryName + "/" + libraryVersion
)
type BucketLookupType int
const (
	BucketLookupAuto BucketLookupType = iota
	BucketLookupDNS
	BucketLookupPath
)
func NewV2(endpoint string, accessKeyID, secretAccessKey string, secure bool) (*Client, error) {
	clnt, err := privateNew(endpoint, Options{
		Creds:        credentials.NewStaticV2(accessKeyID, secretAccessKey, ""),
		Secure:       secure,
		BucketLookup: BucketLookupAuto,
	})
	if err != nil {
		return nil, err
	}
	clnt.overrideSignerType = credentials.SignatureV2
	return clnt, nil
}
func NewV4(endpoint string, accessKeyID, secretAccessKey string, secure bool) (*Client, error) {
	clnt, err := privateNew(endpoint, Options{
		Creds:        credentials.NewStaticV4(accessKeyID, secretAccessKey, ""),
		Secure:       secure,
		BucketLookup: BucketLookupAuto,
	})
	if err != nil {
		return nil, err
	}
	clnt.overrideSignerType = credentials.SignatureV4
	return clnt, nil
}