Minio Go Library for Amazon S3 compatible cloud storage
Go to file
starkandwayne-bot 84b6f99a8d Updating CODE_OF_CONDUCT.md 2019-01-15 15:31:06 -05:00
examples/s3 api: Fix missing secure flag everywhere. 2016-05-19 03:25:00 -07:00
.gitignore Remove erroneous binary 2015-09-21 02:28:03 -07:00
.travis.yml request: Add expect header with 100-continue 2016-03-04 13:52:10 -08:00
API.md api: Fix missing secure flag everywhere. 2016-05-19 03:25:00 -07:00
CODE_OF_CONDUCT.md Updating CODE_OF_CONDUCT.md 2019-01-15 15:31:06 -05:00
CONTRIBUTING.md http/Client: Add a sensible 30sec timeout to wait for response. 2016-02-14 14:44:56 -08:00
INSTALLGO.md [GH-340] api: Implement bucket policy APIs 2016-03-18 12:26:48 -07:00
LICENSE Object storage library - first commit 2015-05-01 23:59:31 -07:00
MAINTAINERS.md minio-go: Move request into Client, rename API as Client. 2015-12-16 21:03:24 -08:00
README.md api: Fix missing secure flag everywhere. 2016-05-19 03:25:00 -07:00
api-datatypes.go api: Rename definitions to datatypes. 2016-03-19 23:53:40 -07:00
api-error-response.go retry: Enhance retry to support cases of restricted bucket policy. 2016-03-06 19:11:42 -08:00
api-error-response_test.go Api error response tests added (#383) 2016-04-18 21:16:18 -07:00
api-get-object-file.go utils: isValidBucketName should fail for bucket names with successive 'periods' 2016-01-21 11:18:34 -08:00
api-get-object.go Bucket policy related unit tests, functional test and code refactoring. (#377) 2016-04-10 20:25:33 -07:00
api-get-policy.go tests for bucket location cache and response parsing (#385) 2016-04-20 15:00:24 -07:00
api-get-policy_test.go tests for bucket location cache and response parsing (#385) 2016-04-20 15:00:24 -07:00
api-list.go list: Fix listObjects to avoid large bufferred channels to facilitate doneCh. 2016-04-22 13:13:47 -07:00
api-presigned.go api: Change PresignedPostPolicy to return back proper URL (#393) 2016-05-10 20:04:29 -07:00
api-put-bucket.go Bucket policy related unit tests, functional test and code refactoring. (#377) 2016-04-10 20:25:33 -07:00
api-put-bucket_test.go tests for bucket location cache and response parsing (#385) 2016-04-20 15:00:24 -07:00
api-put-object-common.go Merge branch 'master' of github.com:starkandwayne/minio-go into HEAD 2016-05-22 10:54:37 -07:00
api-put-object-copy.go api: Simplify copyObject API, return only error if any. 2016-03-27 16:15:46 -07:00
api-put-object-file.go FPutObject: Implement automatic detection of mime-type if not provided 2016-03-25 13:57:29 -04:00
api-put-object-multipart.go api: Only use Multipart if size>5MiB (#395) 2016-05-11 01:36:08 -07:00
api-put-object-progress.go retry: Enhance retry to support cases of restricted bucket policy. 2016-03-06 19:11:42 -08:00
api-put-object-readat.go putObject: using buffer.Bytes() causes byte copy. Avoid it. 2016-03-24 12:08:17 -07:00
api-put-object.go api: getReaderSize - Supports Len() function 2016-05-18 12:00:28 -07:00
api-remove.go [GH-340] api: Implement bucket policy APIs 2016-03-18 12:26:48 -07:00
api-s3-datatypes.go api: support copy object api 2016-03-27 13:55:24 -07:00
api-stat.go retry: Implement transparent retry logic for all requests. 2016-03-05 14:56:29 -08:00
api.go Removed http.Client timeout to avoid premature disconnection while streaming large objects (#403) 2016-05-19 20:17:21 -07:00
api_functional_v2_test.go api: CopyObject Etags are different from source. (#401) 2016-05-19 03:19:25 -07:00
api_functional_v4_test.go api: CopyObject Etags are different from source. (#401) 2016-05-19 03:19:25 -07:00
api_unit_test.go tests for utils.go 2016-03-28 10:14:30 +05:30
appveyor.yml Support for S3 china added 2016-04-07 14:37:58 +05:30
bucket-cache.go tests for bucket location cache and response parsing (#385) 2016-04-20 15:00:24 -07:00
bucket-cache_test.go tests for bucket location cache and response parsing (#385) 2016-04-20 15:00:24 -07:00
bucket-policy.go Bucket policy related unit tests, functional test and code refactoring. (#377) 2016-04-10 20:25:33 -07:00
bucket-policy_test.go Bucket policy related unit tests, functional test and code refactoring. (#377) 2016-04-10 20:25:33 -07:00
constants.go Public mutators are good 2016-05-24 15:27:11 -07:00
copy-conditions.go api: Simplify copyObject API, return only error if any. 2016-03-27 16:15:46 -07:00
hook-reader.go retry: Implement transparent retry logic for all requests. 2016-03-05 14:56:29 -08:00
post-policy.go Implement object type. 2016-01-06 14:47:51 -08:00
request-signature-v2.go Do not sort requestList in each call and add an unit test to check if it is already correctly sorted (#376) 2016-04-08 17:16:20 -07:00
request-signature-v2_test.go Do not sort requestList in each call and add an unit test to check if it is already correctly sorted (#376) 2016-04-08 17:16:20 -07:00
request-signature-v4.go api: Make functions private which are not publicly usable. 2016-01-21 14:22:14 -08:00
retry.go retry: Retry api requests for two more cases. (#390) 2016-04-25 01:09:41 -07:00
s3-endpoints.go Support for S3 china added 2016-04-07 14:37:58 +05:30
signature-type.go Implement object type. 2016-01-06 14:47:51 -08:00
tempfile.go Implement object type. 2016-01-06 14:47:51 -08:00
test-utils_test.go tests for bucket location cache and response parsing (#385) 2016-04-20 15:00:24 -07:00
utils.go api: Change insecure to secure param for New() (#399) 2016-05-17 01:21:39 -07:00
utils_test.go api: Change insecure to secure param for New() (#399) 2016-05-17 01:21:39 -07:00

README.md

Minio Go Library for Amazon S3 Compatible Cloud Storage Gitter

Description

Minio Go library is a simple client library for S3 compatible cloud storage servers. Supports AWS Signature Version 4 and 2. AWS Signature Version 4 is chosen as default.

List of supported cloud storage providers.

  • AWS Signature Version 4

    • Amazon S3
    • Minio
  • AWS Signature Version 2

    • Google Cloud Storage (Compatibility Mode)
    • Openstack Swift + Swift3 middleware
    • Ceph Object Gateway
    • Riak CS

Install

If you do not have a working Golang environment, please follow Install Golang.

$ go get github.com/minio/minio-go

Example

ListBuckets()

This example shows how to List your buckets.

package main

import (
	"log"

	"github.com/minio/minio-go"
)

func main() {
	// Requests are always secure (HTTPS) by default. Set secure=false to enable insecure (HTTP) access.
	// This boolean value is the last argument for New().

	// New returns an Amazon S3 compatible client object. API copatibality (v2 or v4) is automatically
	// determined based on the Endpoint value.
    secure := true // Defaults to HTTPS requests.
	s3Client, err := minio.New("s3.amazonaws.com", "YOUR-ACCESS-KEY-HERE", "YOUR-SECRET-KEY-HERE", secure)
	if err != nil {
	    log.Fatalln(err)
	}
	buckets, err := s3Client.ListBuckets()
	if err != nil {
		log.Fatalln(err)
	}
	for _, bucket := range buckets {
		log.Println(bucket)
	}
}

Documentation

API documentation

Examples

Bucket Operations.

Object Operations.

File Object Operations.

Presigned Operations.

Bucket Policy Operations.

API Reference

GoDoc

Contribute

Contributors Guide

Build Status Build status