• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..15-Oct-2021-

pkg/H15-Oct-2021-5,5153,399

.gitignoreH A D15-Oct-202133 44

.golangci.ymlH A D15-Oct-2021223 1715

CNAMEH A D15-Oct-202115 11

CONTRIBUTING.mdH A D15-Oct-20211.3 KiB2418

LICENSEH A D15-Oct-202111.1 KiB203169

MAINTAINERS.mdH A D15-Oct-20211.2 KiB3627

MakefileH A D15-Oct-20211.1 KiB3323

NOTICEH A D15-Oct-2021361 107

README.mdH A D15-Oct-202112.6 KiB252201

README_zh_CN.mdH A D15-Oct-202112.1 KiB261209

api-bucket-encryption.goH A D15-Oct-20213.9 KiB13583

api-bucket-lifecycle.goH A D15-Oct-20213.9 KiB14892

api-bucket-notification.goH A D15-Oct-20217.7 KiB256176

api-bucket-policy.goH A D15-Oct-20213.8 KiB14391

api-bucket-replication.goH A D15-Oct-20214.3 KiB15093

api-bucket-tagging.goH A D15-Oct-20213.8 KiB13683

api-bucket-versioning.goH A D15-Oct-20214.1 KiB13883

api-compose-object.goH A D15-Oct-202117.3 KiB578386

api-copy-object.goH A D15-Oct-20212.1 KiB7847

api-datatypes.goH A D15-Oct-20214.9 KiB17484

api-error-response.goH A D15-Oct-20217.7 KiB272184

api-get-object-acl.goH A D15-Oct-20213.9 KiB141106

api-get-object-file.goH A D15-Oct-20213.4 KiB12871

api-get-object.goH A D15-Oct-202119.9 KiB682412

api-get-options.goH A D15-Oct-20214.2 KiB14181

api-list.goH A D15-Oct-202129.3 KiB951595

api-object-legal-hold.goH A D15-Oct-20214.7 KiB177119

api-object-lock.goH A D15-Oct-20216.8 KiB242166

api-object-retention.goH A D15-Oct-20214.6 KiB166115

api-object-tagging.goH A D15-Oct-20214.3 KiB15896

api-presigned.goH A D15-Oct-20217.1 KiB217142

api-put-bucket.goH A D15-Oct-20213.8 KiB12473

api-put-object-common.goH A D15-Oct-20214.3 KiB14988

api-put-object-file-context.goH A D15-Oct-20211.9 KiB6532

api-put-object-multipart.goH A D15-Oct-202112.1 KiB386259

api-put-object-streaming.goH A D15-Oct-202115.5 KiB488299

api-put-object.goH A D15-Oct-202111.1 KiB367246

api-remove.goH A D15-Oct-202111.9 KiB416298

api-s3-datatypes.goH A D15-Oct-202110 KiB362234

api-select.goH A D15-Oct-202120.7 KiB752525

api-stat.goH A D15-Oct-20213.9 KiB12892

api.goH A D15-Oct-202125.7 KiB900567

bucket-cache.goH A D15-Oct-20216.9 KiB254161

code_of_conduct.mdH A D15-Oct-20213.5 KiB8161

constants.goH A D15-Oct-20213 KiB9233

core.goH A D15-Oct-20216.2 KiB13471

go.modH A D15-Oct-2021923 2623

go.sumH A D15-Oct-20217 KiB7776

hook-reader.goH A D15-Oct-20212.4 KiB8648

post-policy.goH A D15-Oct-20219.3 KiB328243

retry-continous.goH A D15-Oct-20211.9 KiB7039

retry.goH A D15-Oct-20213.5 KiB12573

s3-endpoints.goH A D15-Oct-20212.6 KiB5835

s3-error.goH A D15-Oct-20214.6 KiB6240

transport.goH A D15-Oct-20212.4 KiB8447

utils.goH A D15-Oct-202114.3 KiB489342

README.md

1# MinIO Go Client SDK for Amazon S3 Compatible Cloud Storage [![Slack](https://slack.min.io/slack?type=svg)](https://slack.min.io) [![Sourcegraph](https://sourcegraph.com/github.com/minio/minio-go/-/badge.svg)](https://sourcegraph.com/github.com/minio/minio-go?badge) [![Apache V2 License](http://img.shields.io/badge/license-Apache%20V2-blue.svg)](https://github.com/minio/minio-go/blob/master/LICENSE)
2
3The MinIO Go Client SDK provides simple APIs to access any Amazon S3 compatible object storage.
4
5This quickstart guide will show you how to install the MinIO client SDK, connect to MinIO, and provide a walkthrough for a simple file uploader. For a complete list of APIs and examples, please take a look at the [Go Client API Reference](https://docs.min.io/docs/golang-client-api-reference).
6
7This document assumes that you have a working [Go development environment](https://golang.org/doc/install).
8
9## Download from Github
10```sh
11GO111MODULE=on go get github.com/minio/minio-go/v7
12```
13
14## Initialize MinIO Client
15MinIO client requires the following four parameters specified to connect to an Amazon S3 compatible object storage.
16
17| Parameter  | Description|
18| :---         |     :---     |
19| endpoint   | URL to object storage service.   |
20| _minio.Options_ | All the options such as credentials, custom transport etc. |
21
22```go
23package main
24
25import (
26	"log"
27
28	"github.com/minio/minio-go/v7"
29	"github.com/minio/minio-go/v7/pkg/credentials"
30)
31
32func main() {
33	endpoint := "play.min.io"
34	accessKeyID := "Q3AM3UQ867SPQQA43P2F"
35	secretAccessKey := "zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG"
36	useSSL := true
37
38	// Initialize minio client object.
39	minioClient, err := minio.New(endpoint, &minio.Options{
40		Creds:  credentials.NewStaticV4(accessKeyID, secretAccessKey, ""),
41		Secure: useSSL,
42	})
43	if err != nil {
44		log.Fatalln(err)
45	}
46
47	log.Printf("%#v\n", minioClient) // minioClient is now set up
48}
49```
50
51## Quick Start Example - File Uploader
52This example program connects to an object storage server, creates a bucket and uploads a file to the bucket.
53
54We will use the MinIO server running at [https://play.min.io](https://play.min.io) in this example. Feel free to use this service for testing and development. Access credentials shown in this example are open to the public.
55
56### FileUploader.go
57```go
58package main
59
60import (
61	"context"
62	"log"
63
64	"github.com/minio/minio-go/v7"
65	"github.com/minio/minio-go/v7/pkg/credentials"
66)
67
68func main() {
69	ctx := context.Background()
70	endpoint := "play.min.io"
71	accessKeyID := "Q3AM3UQ867SPQQA43P2F"
72	secretAccessKey := "zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG"
73	useSSL := true
74
75	// Initialize minio client object.
76	minioClient, err := minio.New(endpoint, &minio.Options{
77		Creds:  credentials.NewStaticV4(accessKeyID, secretAccessKey, ""),
78		Secure: useSSL,
79	})
80	if err != nil {
81		log.Fatalln(err)
82	}
83
84	// Make a new bucket called mymusic.
85	bucketName := "mymusic"
86	location := "us-east-1"
87
88	err = minioClient.MakeBucket(ctx, bucketName, minio.MakeBucketOptions{Region: location})
89	if err != nil {
90		// Check to see if we already own this bucket (which happens if you run this twice)
91		exists, errBucketExists := minioClient.BucketExists(ctx, bucketName)
92		if errBucketExists == nil && exists {
93			log.Printf("We already own %s\n", bucketName)
94		} else {
95			log.Fatalln(err)
96		}
97	} else {
98		log.Printf("Successfully created %s\n", bucketName)
99	}
100
101	// Upload the zip file
102	objectName := "golden-oldies.zip"
103	filePath := "/tmp/golden-oldies.zip"
104	contentType := "application/zip"
105
106	// Upload the zip file with FPutObject
107	n, err := minioClient.FPutObject(ctx, bucketName, objectName, filePath, minio.PutObjectOptions{ContentType: contentType})
108	if err != nil {
109		log.Fatalln(err)
110	}
111
112	log.Printf("Successfully uploaded %s of size %d\n", objectName, n)
113}
114```
115
116### Run FileUploader
117```sh
118export GO111MODULE=on
119go run file-uploader.go
1202016/08/13 17:03:28 Successfully created mymusic
1212016/08/13 17:03:40 Successfully uploaded golden-oldies.zip of size 16253413
122
123mc ls play/mymusic/
124[2016-05-27 16:02:16 PDT]  17MiB golden-oldies.zip
125```
126
127## API Reference
128The full API Reference is available here.
129
130* [Complete API Reference](https://docs.min.io/docs/golang-client-api-reference)
131
132### API Reference : Bucket Operations
133* [`MakeBucket`](https://docs.min.io/docs/golang-client-api-reference#MakeBucket)
134* [`ListBuckets`](https://docs.min.io/docs/golang-client-api-reference#ListBuckets)
135* [`BucketExists`](https://docs.min.io/docs/golang-client-api-reference#BucketExists)
136* [`RemoveBucket`](https://docs.min.io/docs/golang-client-api-reference#RemoveBucket)
137* [`ListObjects`](https://docs.min.io/docs/golang-client-api-reference#ListObjects)
138* [`ListIncompleteUploads`](https://docs.min.io/docs/golang-client-api-reference#ListIncompleteUploads)
139
140### API Reference : Bucket policy Operations
141* [`SetBucketPolicy`](https://docs.min.io/docs/golang-client-api-reference#SetBucketPolicy)
142* [`GetBucketPolicy`](https://docs.min.io/docs/golang-client-api-reference#GetBucketPolicy)
143
144### API Reference : Bucket notification Operations
145* [`SetBucketNotification`](https://docs.min.io/docs/golang-client-api-reference#SetBucketNotification)
146* [`GetBucketNotification`](https://docs.min.io/docs/golang-client-api-reference#GetBucketNotification)
147* [`RemoveAllBucketNotification`](https://docs.min.io/docs/golang-client-api-reference#RemoveAllBucketNotification)
148* [`ListenBucketNotification`](https://docs.min.io/docs/golang-client-api-reference#ListenBucketNotification) (MinIO Extension)
149* [`ListenNotification`](https://docs.min.io/docs/golang-client-api-reference#ListenNotification) (MinIO Extension)
150
151### API Reference : File Object Operations
152* [`FPutObject`](https://docs.min.io/docs/golang-client-api-reference#FPutObject)
153* [`FGetObject`](https://docs.min.io/docs/golang-client-api-reference#FGetObject)
154
155### API Reference : Object Operations
156* [`GetObject`](https://docs.min.io/docs/golang-client-api-reference#GetObject)
157* [`PutObject`](https://docs.min.io/docs/golang-client-api-reference#PutObject)
158* [`PutObjectStreaming`](https://docs.min.io/docs/golang-client-api-reference#PutObjectStreaming)
159* [`StatObject`](https://docs.min.io/docs/golang-client-api-reference#StatObject)
160* [`CopyObject`](https://docs.min.io/docs/golang-client-api-reference#CopyObject)
161* [`RemoveObject`](https://docs.min.io/docs/golang-client-api-reference#RemoveObject)
162* [`RemoveObjects`](https://docs.min.io/docs/golang-client-api-reference#RemoveObjects)
163* [`RemoveIncompleteUpload`](https://docs.min.io/docs/golang-client-api-reference#RemoveIncompleteUpload)
164* [`SelectObjectContent`](https://docs.min.io/docs/golang-client-api-reference#SelectObjectContent)
165
166
167### API Reference : Presigned Operations
168* [`PresignedGetObject`](https://docs.min.io/docs/golang-client-api-reference#PresignedGetObject)
169* [`PresignedPutObject`](https://docs.min.io/docs/golang-client-api-reference#PresignedPutObject)
170* [`PresignedHeadObject`](https://docs.min.io/docs/golang-client-api-reference#PresignedHeadObject)
171* [`PresignedPostPolicy`](https://docs.min.io/docs/golang-client-api-reference#PresignedPostPolicy)
172
173### API Reference : Client custom settings
174* [`SetAppInfo`](http://docs.min.io/docs/golang-client-api-reference#SetAppInfo)
175* [`TraceOn`](http://docs.min.io/docs/golang-client-api-reference#TraceOn)
176* [`TraceOff`](http://docs.min.io/docs/golang-client-api-reference#TraceOff)
177
178## Full Examples
179
180### Full Examples : Bucket Operations
181* [makebucket.go](https://github.com/minio/minio-go/blob/master/examples/s3/makebucket.go)
182* [listbuckets.go](https://github.com/minio/minio-go/blob/master/examples/s3/listbuckets.go)
183* [bucketexists.go](https://github.com/minio/minio-go/blob/master/examples/s3/bucketexists.go)
184* [removebucket.go](https://github.com/minio/minio-go/blob/master/examples/s3/removebucket.go)
185* [listobjects.go](https://github.com/minio/minio-go/blob/master/examples/s3/listobjects.go)
186* [listobjectsV2.go](https://github.com/minio/minio-go/blob/master/examples/s3/listobjectsV2.go)
187* [listincompleteuploads.go](https://github.com/minio/minio-go/blob/master/examples/s3/listincompleteuploads.go)
188
189### Full Examples : Bucket policy Operations
190* [setbucketpolicy.go](https://github.com/minio/minio-go/blob/master/examples/s3/setbucketpolicy.go)
191* [getbucketpolicy.go](https://github.com/minio/minio-go/blob/master/examples/s3/getbucketpolicy.go)
192* [listbucketpolicies.go](https://github.com/minio/minio-go/blob/master/examples/s3/listbucketpolicies.go)
193
194### Full Examples : Bucket lifecycle Operations
195* [setbucketlifecycle.go](https://github.com/minio/minio-go/blob/master/examples/s3/setbucketlifecycle.go)
196* [getbucketlifecycle.go](https://github.com/minio/minio-go/blob/master/examples/s3/getbucketlifecycle.go)
197
198### Full Examples : Bucket encryption Operations
199* [setbucketencryption.go](https://github.com/minio/minio-go/blob/master/examples/s3/setbucketencryption.go)
200* [getbucketencryption.go](https://github.com/minio/minio-go/blob/master/examples/s3/getbucketencryption.go)
201* [deletebucketencryption.go](https://github.com/minio/minio-go/blob/master/examples/s3/deletebucketencryption.go)
202
203### Full Examples : Bucket replication Operations
204* [setbucketreplication.go](https://github.com/minio/minio-go/blob/master/examples/s3/setbucketreplication.go)
205* [getbucketreplication.go](https://github.com/minio/minio-go/blob/master/examples/s3/getbucketreplication.go)
206* [removebucketreplication.go](https://github.com/minio/minio-go/blob/master/examples/s3/removebucketreplication.go)
207
208### Full Examples : Bucket notification Operations
209* [setbucketnotification.go](https://github.com/minio/minio-go/blob/master/examples/s3/setbucketnotification.go)
210* [getbucketnotification.go](https://github.com/minio/minio-go/blob/master/examples/s3/getbucketnotification.go)
211* [removeallbucketnotification.go](https://github.com/minio/minio-go/blob/master/examples/s3/removeallbucketnotification.go)
212* [listenbucketnotification.go](https://github.com/minio/minio-go/blob/master/examples/minio/listenbucketnotification.go) (MinIO Extension)
213* [listennotification.go](https://github.com/minio/minio-go/blob/master/examples/minio/listen-notification.go) (MinIO Extension)
214
215### Full Examples : File Object Operations
216* [fputobject.go](https://github.com/minio/minio-go/blob/master/examples/s3/fputobject.go)
217* [fgetobject.go](https://github.com/minio/minio-go/blob/master/examples/s3/fgetobject.go)
218* [fputobject-context.go](https://github.com/minio/minio-go/blob/master/examples/s3/fputobject-context.go)
219* [fgetobject-context.go](https://github.com/minio/minio-go/blob/master/examples/s3/fgetobject-context.go)
220
221### Full Examples : Object Operations
222* [putobject.go](https://github.com/minio/minio-go/blob/master/examples/s3/putobject.go)
223* [getobject.go](https://github.com/minio/minio-go/blob/master/examples/s3/getobject.go)
224* [putobject-context.go](https://github.com/minio/minio-go/blob/master/examples/s3/putobject-context.go)
225* [getobject-context.go](https://github.com/minio/minio-go/blob/master/examples/s3/getobject-context.go)
226* [statobject.go](https://github.com/minio/minio-go/blob/master/examples/s3/statobject.go)
227* [copyobject.go](https://github.com/minio/minio-go/blob/master/examples/s3/copyobject.go)
228* [removeobject.go](https://github.com/minio/minio-go/blob/master/examples/s3/removeobject.go)
229* [removeincompleteupload.go](https://github.com/minio/minio-go/blob/master/examples/s3/removeincompleteupload.go)
230* [removeobjects.go](https://github.com/minio/minio-go/blob/master/examples/s3/removeobjects.go)
231
232### Full Examples : Encrypted Object Operations
233* [put-encrypted-object.go](https://github.com/minio/minio-go/blob/master/examples/s3/put-encrypted-object.go)
234* [get-encrypted-object.go](https://github.com/minio/minio-go/blob/master/examples/s3/get-encrypted-object.go)
235* [fput-encrypted-object.go](https://github.com/minio/minio-go/blob/master/examples/s3/fputencrypted-object.go)
236
237### Full Examples : Presigned Operations
238* [presignedgetobject.go](https://github.com/minio/minio-go/blob/master/examples/s3/presignedgetobject.go)
239* [presignedputobject.go](https://github.com/minio/minio-go/blob/master/examples/s3/presignedputobject.go)
240* [presignedheadobject.go](https://github.com/minio/minio-go/blob/master/examples/s3/presignedheadobject.go)
241* [presignedpostpolicy.go](https://github.com/minio/minio-go/blob/master/examples/s3/presignedpostpolicy.go)
242
243## Explore Further
244* [Complete Documentation](https://docs.min.io)
245* [MinIO Go Client SDK API Reference](https://docs.min.io/docs/golang-client-api-reference)
246
247## Contribute
248[Contributors Guide](https://github.com/minio/minio-go/blob/master/CONTRIBUTING.md)
249
250## License
251This SDK is distributed under the [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0), see [LICENSE](https://github.com/minio/minio-go/blob/master/LICENSE) and [NOTICE](https://github.com/minio/minio-go/blob/master/NOTICE) for more information.
252

README_zh_CN.md

1# 适用于与Amazon S3兼容云存储的MinIO Go SDK [![Slack](https://slack.min.io/slack?type=svg)](https://slack.min.io) [![Sourcegraph](https://sourcegraph.com/github.com/minio/minio-go/-/badge.svg)](https://sourcegraph.com/github.com/minio/minio-go?badge)
2
3MinIO Go Client SDK提供了简单的API来访问任何与Amazon S3兼容的对象存储服务。
4
5**支持的云存储:**
6
7- AWS Signature Version 4
8   - Amazon S3
9   - MinIO
10
11- AWS Signature Version 2
12   - Google Cloud Storage (兼容模式)
13   - Openstack Swift + Swift3 middleware
14   - Ceph Object Gateway
15   - Riak CS
16
17本文我们将学习如何安装MinIO client SDK,连接到MinIO,并提供一下文件上传的示例。对于完整的API以及示例,请参考[Go Client API Reference](https://docs.min.io/docs/golang-client-api-reference)18
19本文假设你已经有 [Go开发环境](https://golang.org/doc/install)20
21## 从Github下载
22```sh
23go get -u github.com/minio/minio-go
24```
25
26## 初始化MinIO Client
27MinIO client需要以下4个参数来连接与Amazon S3兼容的对象存储。
28
29| 参数  | 描述|
30| :---         |     :---     |
31| endpoint   | 对象存储服务的URL   |
32| accessKeyID | Access key是唯一标识你的账户的用户ID。 |
33| secretAccessKey | Secret key是你账户的密码。 |
34| secure | true代表使用HTTPS |
35
36
37```go
38package main
39
40import (
41	"log"
42
43	"github.com/minio/minio-go/v7"
44	"github.com/minio/minio-go/v7/pkg/credentials"
45)
46
47func main() {
48	endpoint := "play.min.io"
49	accessKeyID := "Q3AM3UQ867SPQQA43P2F"
50	secretAccessKey := "zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG"
51	useSSL := true
52
53	// 初使化 minio client对象。
54	minioClient, err := minio.New(endpoint, &minio.Options{
55		Creds:  credentials.NewStaticV4(accessKeyID, secretAccessKey, ""),
56		Secure: useSSL,
57	})
58	if err != nil {
59		log.Fatalln(err)
60	}
61
62	log.Printf("%#v\n", minioClient) // minioClient初使化成功
63}
64```
65
66## 示例-文件上传
67本示例连接到一个对象存储服务,创建一个存储桶并上传一个文件到存储桶中。
68
69我们在本示例中使用运行在 [https://play.min.io](https://play.min.io) 上的MinIO服务,你可以用这个服务来开发和测试。示例中的访问凭据是公开的。
70
71### FileUploader.go
72```go
73package main
74
75import (
76	"context"
77	"log"
78
79	"github.com/minio/minio-go/v7"
80	"github.com/minio/minio-go/v7/pkg/credentials"
81)
82
83func main() {
84	ctx := context.Background()
85	endpoint := "play.min.io"
86	accessKeyID := "Q3AM3UQ867SPQQA43P2F"
87	secretAccessKey := "zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG"
88	useSSL := true
89
90	// 初使化 minio client对象。
91	minioClient, err := minio.New(endpoint, &minio.Options{
92		Creds:  credentials.NewStaticV4(accessKeyID, secretAccessKey, ""),
93		Secure: useSSL,
94	})
95	if err != nil {
96		log.Fatalln(err)
97	}
98
99	// 创建一个叫mymusic的存储桶。
100	bucketName := "mymusic"
101	location := "us-east-1"
102
103	err = minioClient.MakeBucket(ctx, bucketName, minio.MakeBucketOptions{Region: location})
104	if err != nil {
105		// 检查存储桶是否已经存在。
106		exists, errBucketExists := minioClient.BucketExists(ctx, bucketName)
107		if errBucketExists == nil && exists {
108			log.Printf("We already own %s\n", bucketName)
109		} else {
110			log.Fatalln(err)
111		}
112	} else {
113		log.Printf("Successfully created %s\n", bucketName)
114	}
115
116	// 上传一个zip文件。
117	objectName := "golden-oldies.zip"
118	filePath := "/tmp/golden-oldies.zip"
119	contentType := "application/zip"
120
121	// 使用FPutObject上传一个zip文件。
122	n, err := minioClient.FPutObject(ctx, bucketName, objectName, filePath, minio.PutObjectOptions{ContentType: contentType})
123	if err != nil {
124		log.Fatalln(err)
125	}
126
127	log.Printf("Successfully uploaded %s of size %d\n", objectName, n)
128}
129```
130
131### 运行FileUploader
132```sh
133go run file-uploader.go
1342016/08/13 17:03:28 Successfully created mymusic
1352016/08/13 17:03:40 Successfully uploaded golden-oldies.zip of size 16253413
136
137mc ls play/mymusic/
138[2016-05-27 16:02:16 PDT]  17MiB golden-oldies.zip
139```
140
141## API文档
142完整的API文档在这里。
143* [完整API文档](https://docs.min.io/docs/golang-client-api-reference)
144
145### API文档 : 操作存储桶
146* [`MakeBucket`](https://docs.min.io/docs/golang-client-api-reference#MakeBucket)
147* [`ListBuckets`](https://docs.min.io/docs/golang-client-api-reference#ListBuckets)
148* [`BucketExists`](https://docs.min.io/docs/golang-client-api-reference#BucketExists)
149* [`RemoveBucket`](https://docs.min.io/docs/golang-client-api-reference#RemoveBucket)
150* [`ListObjects`](https://docs.min.io/docs/golang-client-api-reference#ListObjects)
151* [`ListIncompleteUploads`](https://docs.min.io/docs/golang-client-api-reference#ListIncompleteUploads)
152
153### API文档 : 存储桶策略
154* [`SetBucketPolicy`](https://docs.min.io/docs/golang-client-api-reference#SetBucketPolicy)
155* [`GetBucketPolicy`](https://docs.min.io/docs/golang-client-api-reference#GetBucketPolicy)
156
157### API文档 : 存储桶通知
158* [`SetBucketNotification`](https://docs.min.io/docs/golang-client-api-reference#SetBucketNotification)
159* [`GetBucketNotification`](https://docs.min.io/docs/golang-client-api-reference#GetBucketNotification)
160* [`RemoveAllBucketNotification`](https://docs.min.io/docs/golang-client-api-reference#RemoveAllBucketNotification)
161* [`ListenBucketNotification`](https://docs.min.io/docs/golang-client-api-reference#ListenBucketNotification) (MinIO 扩展)
162* [`ListenNotification`](https://docs.min.io/docs/golang-client-api-reference#ListenNotification) (MinIO 扩展)
163
164### API文档 : 操作文件对象
165* [`FPutObject`](https://docs.min.io/docs/golang-client-api-reference#FPutObject)
166* [`FGetObject`](https://docs.min.io/docs/golang-client-api-reference#FPutObject)
167
168### API文档 : 操作对象
169* [`GetObject`](https://docs.min.io/docs/golang-client-api-reference#GetObject)
170* [`PutObject`](https://docs.min.io/docs/golang-client-api-reference#PutObject)
171* [`PutObjectStreaming`](https://docs.min.io/docs/golang-client-api-reference#PutObjectStreaming)
172* [`StatObject`](https://docs.min.io/docs/golang-client-api-reference#StatObject)
173* [`CopyObject`](https://docs.min.io/docs/golang-client-api-reference#CopyObject)
174* [`RemoveObject`](https://docs.min.io/docs/golang-client-api-reference#RemoveObject)
175* [`RemoveObjects`](https://docs.min.io/docs/golang-client-api-reference#RemoveObjects)
176* [`RemoveIncompleteUpload`](https://docs.min.io/docs/golang-client-api-reference#RemoveIncompleteUpload)
177* [`SelectObjectContent`](https://docs.min.io/docs/golang-client-api-reference#SelectObjectContent)
178
179### API文档 : Presigned操作
180* [`PresignedGetObject`](https://docs.min.io/docs/golang-client-api-reference#PresignedGetObject)
181* [`PresignedPutObject`](https://docs.min.io/docs/golang-client-api-reference#PresignedPutObject)
182* [`PresignedHeadObject`](https://docs.min.io/docs/golang-client-api-reference#PresignedHeadObject)
183* [`PresignedPostPolicy`](https://docs.min.io/docs/golang-client-api-reference#PresignedPostPolicy)
184
185### API文档 : 客户端自定义设置
186* [`SetAppInfo`](http://docs.min.io/docs/golang-client-api-reference#SetAppInfo)
187* [`TraceOn`](http://docs.min.io/docs/golang-client-api-reference#TraceOn)
188* [`TraceOff`](http://docs.min.io/docs/golang-client-api-reference#TraceOff)
189
190## 完整示例
191
192### 完整示例 : 操作存储桶
193* [makebucket.go](https://github.com/minio/minio-go/blob/master/examples/s3/makebucket.go)
194* [listbuckets.go](https://github.com/minio/minio-go/blob/master/examples/s3/listbuckets.go)
195* [bucketexists.go](https://github.com/minio/minio-go/blob/master/examples/s3/bucketexists.go)
196* [removebucket.go](https://github.com/minio/minio-go/blob/master/examples/s3/removebucket.go)
197* [listobjects.go](https://github.com/minio/minio-go/blob/master/examples/s3/listobjects.go)
198* [listobjectsV2.go](https://github.com/minio/minio-go/blob/master/examples/s3/listobjectsV2.go)
199* [listincompleteuploads.go](https://github.com/minio/minio-go/blob/master/examples/s3/listincompleteuploads.go)
200
201### 完整示例 : 存储桶策略
202* [setbucketpolicy.go](https://github.com/minio/minio-go/blob/master/examples/s3/setbucketpolicy.go)
203* [getbucketpolicy.go](https://github.com/minio/minio-go/blob/master/examples/s3/getbucketpolicy.go)
204* [listbucketpolicies.go](https://github.com/minio/minio-go/blob/master/examples/s3/listbucketpolicies.go)
205
206### 完整示例 : 存储桶生命周期
207* [setbucketlifecycle.go](https://github.com/minio/minio-go/blob/master/examples/s3/setbucketlifecycle.go)
208* [getbucketlifecycle.go](https://github.com/minio/minio-go/blob/master/examples/s3/getbucketlifecycle.go)
209
210### 完整示例 : 存储桶加密
211* [setbucketencryption.go](https://github.com/minio/minio-go/blob/master/examples/s3/setbucketencryption.go)
212* [getbucketencryption.go](https://github.com/minio/minio-go/blob/master/examples/s3/getbucketencryption.go)
213* [deletebucketencryption.go](https://github.com/minio/minio-go/blob/master/examples/s3/deletebucketencryption.go)
214
215### 完整示例 : 存储桶复制
216* [setbucketreplication.go](https://github.com/minio/minio-go/blob/master/examples/s3/setbucketreplication.go)
217* [getbucketreplication.go](https://github.com/minio/minio-go/blob/master/examples/s3/getbucketreplication.go)
218* [removebucketreplication.go](https://github.com/minio/minio-go/blob/master/examples/s3/removebucketreplication.go)
219
220### 完整示例 : 存储桶通知
221* [setbucketnotification.go](https://github.com/minio/minio-go/blob/master/examples/s3/setbucketnotification.go)
222* [getbucketnotification.go](https://github.com/minio/minio-go/blob/master/examples/s3/getbucketnotification.go)
223* [removeallbucketnotification.go](https://github.com/minio/minio-go/blob/master/examples/s3/removeallbucketnotification.go)
224* [listenbucketnotification.go](https://github.com/minio/minio-go/blob/master/examples/minio/listenbucketnotification.go) (MinIO扩展)
225* [listennotification.go](https://github.com/minio/minio-go/blob/master/examples/minio/listen-notification.go) (MinIO 扩展)
226
227### 完整示例 : 操作文件对象
228* [fputobject.go](https://github.com/minio/minio-go/blob/master/examples/s3/fputobject.go)
229* [fgetobject.go](https://github.com/minio/minio-go/blob/master/examples/s3/fgetobject.go)
230* [fputobject-context.go](https://github.com/minio/minio-go/blob/master/examples/s3/fputobject-context.go)
231* [fgetobject-context.go](https://github.com/minio/minio-go/blob/master/examples/s3/fgetobject-context.go)
232
233### 完整示例 : 操作对象
234* [putobject.go](https://github.com/minio/minio-go/blob/master/examples/s3/putobject.go)
235* [getobject.go](https://github.com/minio/minio-go/blob/master/examples/s3/getobject.go)
236* [putobject-context.go](https://github.com/minio/minio-go/blob/master/examples/s3/putobject-context.go)
237* [getobject-context.go](https://github.com/minio/minio-go/blob/master/examples/s3/getobject-context.go)
238* [statobject.go](https://github.com/minio/minio-go/blob/master/examples/s3/statobject.go)
239* [copyobject.go](https://github.com/minio/minio-go/blob/master/examples/s3/copyobject.go)
240* [removeobject.go](https://github.com/minio/minio-go/blob/master/examples/s3/removeobject.go)
241* [removeincompleteupload.go](https://github.com/minio/minio-go/blob/master/examples/s3/removeincompleteupload.go)
242* [removeobjects.go](https://github.com/minio/minio-go/blob/master/examples/s3/removeobjects.go)
243
244### 完整示例 : 操作加密对象
245* [put-encrypted-object.go](https://github.com/minio/minio-go/blob/master/examples/s3/put-encrypted-object.go)
246* [get-encrypted-object.go](https://github.com/minio/minio-go/blob/master/examples/s3/get-encrypted-object.go)
247* [fput-encrypted-object.go](https://github.com/minio/minio-go/blob/master/examples/s3/fputencrypted-object.go)
248
249### 完整示例 : Presigned操作
250* [presignedgetobject.go](https://github.com/minio/minio-go/blob/master/examples/s3/presignedgetobject.go)
251* [presignedputobject.go](https://github.com/minio/minio-go/blob/master/examples/s3/presignedputobject.go)
252* [presignedheadobject.go](https://github.com/minio/minio-go/blob/master/examples/s3/presignedheadobject.go)
253* [presignedpostpolicy.go](https://github.com/minio/minio-go/blob/master/examples/s3/presignedpostpolicy.go)
254
255## 了解更多
256* [完整文档](https://docs.min.io)
257* [MinIO Go Client SDK API文档](https://docs.min.io/docs/golang-client-api-reference)
258
259## 贡献
260[贡献指南](https://github.com/minio/minio-go/blob/master/docs/zh_CN/CONTRIBUTING.md)
261