Minio Go Library for Amazon S3 compatible cloud storage
Go to file
Harshavardhana a12165af80 api: Simplify copyObject API, return only error if any.
- Add a new example and update API spec.
- Fix signV2 test being used inside V4 in previous patch.
2016-03-27 16:15:46 -07:00
examples/s3 api: Simplify copyObject API, return only error if any. 2016-03-27 16:15:46 -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: Simplify copyObject API, return only error if any. 2016-03-27 16:15:46 -07: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 [GH-340] api: Implement bucket policy APIs 2016-03-18 12:26:48 -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-get-object-file.go utils: isValidBucketName should fail for bucket names with successive 'periods' 2016-01-21 11:18:34 -08:00
api-get.go [GH-340] api: Implement bucket policy APIs 2016-03-18 12:26:48 -07:00
api-list.go retry: Implement transparent retry logic for all requests. 2016-03-05 14:56:29 -08:00
api-presigned.go retry: Implement transparent retry logic for all requests. 2016-03-05 14:56:29 -08:00
api-put-bucket.go api: set Content-Md5 when makeBucket has LocationConstraint. 2016-03-19 15:48:09 -07:00
api-put-object-common.go api: GetObject now only fetches the Reader when offset changes. 2016-03-11 16:19:44 -08: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 putObject: using buffer.Bytes() causes byte copy. Avoid it. 2016-03-24 12:08:17 -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 changes to make sure progress bar is updated after checking the status of upload 2016-03-10 07:10:47 +05:30
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 Bump to 1.0.1 2016-03-22 21:37:11 -07:00
api_functional_v2_test.go api: Simplify copyObject API, return only error if any. 2016-03-27 16:15:46 -07:00
api_functional_v4_test.go api: Simplify copyObject API, return only error if any. 2016-03-27 16:15:46 -07:00
api_unit_test.go [GH-340] api: Implement bucket policy APIs 2016-03-18 12:26:48 -07:00
appveyor.yml putObjectReadAt: use sectionReader itself rather than looping over ReadAt. 2016-01-20 14:41:28 -08:00
bucket-cache.go [GH-340] api: Implement bucket policy APIs 2016-03-18 12:26:48 -07:00
bucket-policy.go [GH-340] api: Implement bucket policy APIs 2016-03-18 12:26:48 -07:00
constants.go putObjectReadAt: use sectionReader itself rather than looping over ReadAt. 2016-01-20 14:41:28 -08: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 api: set Content-Md5 when makeBucket has LocationConstraint. 2016-03-19 15:48:09 -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: Remove duplicated code. 2016-03-14 18:33:51 -07:00
s3-endpoints.go putObjectReadAt: use sectionReader itself rather than looping over ReadAt. 2016-01-20 14:41:28 -08:00
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
utils.go [GH-340] api: Implement bucket policy APIs 2016-03-18 12:26:48 -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 insecure=true 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.
	s3Client, err := minio.New("s3.amazonaws.com", "YOUR-ACCESS-KEY-HERE", "YOUR-SECRET-KEY-HERE", false)
	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