Categorygithub.com/minio/minio-go
modulepackage
0.2.5
Repository: https://github.com/minio/minio-go.git
Documentation: pkg.go.dev

# README

Minio Go Library for Amazon S3 Compatible Cloud Storage Gitter

Install Build Status

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

Example

package main

import (
	"log"

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

func main() {
	config := minio.Config{
		AccessKeyID:     "YOUR-ACCESS-KEY-HERE",
		SecretAccessKey: "YOUR-PASSWORD-HERE",
		Endpoint:        "https://s3.amazonaws.com",
	}
	s3Client, err := minio.New(config)
	if err != nil {
	    log.Fatalln(err)
	}
	for bucket := range s3Client.ListBuckets() {
		if bucket.Err != nil {
			log.Fatalln(bucket.Err)
		}
		log.Println(bucket.Stat)
	}
}

Documentation

Bucket Level

Object Level

API Reference

GoDoc

Contribute

Contributors Guide

# Functions

BodyToErrorResponse returns a new encoded ErrorResponse structure.
New - instantiate a new minio api client.
ToErrorResponse returns parsed ErrorResponse struct, if input is nil or not ErrorResponse return value is nil this fuction is useful when some one wants to dig deeper into the error structures over the network.

# Constants

Global constants.
Global constants.

# Structs

BucketStat container for bucket metadata.
BucketStatCh - bucket metadata over read channel.
Config - main configuration struct used by all to set endpoint, credentials, and other options for requests.
ErrorResponse is the type error returned by some API operations.
ObjectStat container for object metadata.
ObjectStatCh - object metadata over read channel.

# Interfaces

API - Cloud Storage API interface.
BucketAPI - bucket specific Read/Write/Stat interface.
ObjectAPI - object specific Read/Write/Stat interface.
PresignedAPI - object specific for now.

# Type aliases

BucketACL - bucket level access control.