restic/vendor/src/github.com/minio/minio-go
2016-02-20 18:33:06 +01:00
..
examples Move things around for gb 2016-02-20 17:31:20 +01:00
api-definitions.go Move things around for gb 2016-02-20 17:31:20 +01:00
api-error-response.go Move things around for gb 2016-02-20 17:31:20 +01:00
api-get-object-file.go Move things around for gb 2016-02-20 17:31:20 +01:00
api-get.go Move things around for gb 2016-02-20 17:31:20 +01:00
api-list.go Move things around for gb 2016-02-20 17:31:20 +01:00
api-presigned.go Move things around for gb 2016-02-20 17:31:20 +01:00
api-put-bucket.go Move things around for gb 2016-02-20 17:31:20 +01:00
api-put-object-common.go Move things around for gb 2016-02-20 17:31:20 +01:00
api-put-object-file.go Move things around for gb 2016-02-20 17:31:20 +01:00
api-put-object-multipart.go Move things around for gb 2016-02-20 17:31:20 +01:00
api-put-object-progress.go Move things around for gb 2016-02-20 17:31:20 +01:00
api-put-object-readat.go Move things around for gb 2016-02-20 17:31:20 +01:00
api-put-object.go Move things around for gb 2016-02-20 17:31:20 +01:00
api-remove.go Move things around for gb 2016-02-20 17:31:20 +01:00
api-s3-definitions.go Move things around for gb 2016-02-20 17:31:20 +01:00
api-stat.go Move things around for gb 2016-02-20 17:31:20 +01:00
api.go Move things around for gb 2016-02-20 17:31:20 +01:00
api_functional_v2_test.go Properly vendor dependencies with gb-vendor 2016-02-20 18:33:06 +01:00
api_functional_v4_test.go Properly vendor dependencies with gb-vendor 2016-02-20 18:33:06 +01:00
api_unit_test.go Properly vendor dependencies with gb-vendor 2016-02-20 18:33:06 +01:00
appveyor.yml Move things around for gb 2016-02-20 17:31:20 +01:00
bucket-acl.go Move things around for gb 2016-02-20 17:31:20 +01:00
bucket-cache.go Move things around for gb 2016-02-20 17:31:20 +01:00
constants.go Move things around for gb 2016-02-20 17:31:20 +01:00
CONTRIBUTING.md Move things around for gb 2016-02-20 17:31:20 +01:00
hook-reader.go Move things around for gb 2016-02-20 17:31:20 +01:00
INSTALLGO.md Move things around for gb 2016-02-20 17:31:20 +01:00
LICENSE Move things around for gb 2016-02-20 17:31:20 +01:00
MAINTAINERS.md Move things around for gb 2016-02-20 17:31:20 +01:00
post-policy.go Move things around for gb 2016-02-20 17:31:20 +01:00
README.md Move things around for gb 2016-02-20 17:31:20 +01:00
request-signature-v2.go Move things around for gb 2016-02-20 17:31:20 +01:00
request-signature-v4.go Move things around for gb 2016-02-20 17:31:20 +01:00
s3-endpoints.go Move things around for gb 2016-02-20 17:31:20 +01:00
signature-type.go Move things around for gb 2016-02-20 17:31:20 +01:00
tempfile.go Move things around for gb 2016-02-20 17:31:20 +01:00
utils.go Move things around for gb 2016-02-20 17:31:20 +01:00

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

Bucket Operations.

Object Operations.

File Object Operations.

Presigned Operations.

API Reference

GoDoc

Contribute

Contributors Guide

Build Status Build status