src/server/pkg/obj/obj.go
func NewMinioClientFromSecret(bucket string) (Client, error) {
	var err error
	if bucket == "" {
		bucket, err = readSecretFile("/minio-bucket")
		if err != nil {
			return nil, err
		}
	}
	endpoint, err := readSecretFile("/minio-endpoint")
	if err != nil {
		return nil, err
	}
	id, err := readSecretFile("/minio-id")
	if err != nil {
		return nil, err
	}
	secret, err := readSecretFile("/minio-secret")
	if err != nil {
		return nil, err
	}
	secure, err := readSecretFile("/minio-secure")
	if err != nil {
		return nil, err
	}
	isS3V2, err := readSecretFile("/minio-signature")
	if err != nil {
		return nil, err
	}
	return NewMinioClient(endpoint, bucket, id, secret, secure == "1", isS3V2 == "1")
}
func NewMinioClientFromSecret(bucket string) (Client, error) {
	var err error
	if bucket == "" {
		bucket, err = readSecretFile("/minio-bucket")
		if err != nil {
			return nil, err
		}
	}
	endpoint, err := readSecretFile("/minio-endpoint")
	if err != nil {
		return nil, err
	}
	id, err := readSecretFile("/minio-id")
	if err != nil {
		return nil, err
	}
	secret, err := readSecretFile("/minio-secret")
	if err != nil {
		return nil, err
	}
	secure, err := readSecretFile("/minio-secure")
	if err != nil {
		return nil, err
	}
	isS3V2, err := readSecretFile("/minio-signature")
	if err != nil {
		return nil, err
	}
	return NewMinioClient(endpoint, bucket, id, secret, secure == "1", isS3V2 == "1")
}
func NewMinioClientFromSecret ( bucket string ) ( Client , error ) { var err error if bucket == " " { bucket , err = readSecretFile ( " " ) if err != nil { return nil , err } } endpoint , err := readSecretFile ( " " ) if err != nil { return nil , err } id , err := readSecretFile ( " " ) if err != nil { return nil , err } secret , err := readSecretFile ( " " ) if err != nil { return nil , err } secure , err := readSecretFile ( " " ) if err != nil { return nil , err } isS3V2 , err := readSecretFile ( " " ) if err != nil { return nil , err } return NewMinioClient ( endpoint , bucket , id , secret , secure == " " , isS3V2 == " " ) }
// NewMinioClientFromSecret constructs an s3 compatible client by reading
// credentials from a mounted AmazonSecret. You may pass "" for bucket in which case it
// will read the bucket from the secret.
NewMinioClientFromSecret constructs an s3 compatible client by reading credentials from a mounted AmazonSecret . You may pass for bucket in which case it will read the bucket from the secret .