You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+91-27
Original file line number
Diff line number
Diff line change
@@ -1,24 +1,28 @@
1
1
# MinIO Go Client SDK for Amazon S3 Compatible Cloud Storage [](https://slack.min.io)[](https://sourcegraph.com/github.com/minio/minio-go?badge)[](https://github.com/minio/minio-go/blob/master/LICENSE)
2
2
3
-
The MinIO Go Client SDK provides simple APIs to access any Amazon S3 compatible object storage.
3
+
The MinIO Go Client SDK provides straightforward APIs to access any Amazon S3 compatible object storage.
4
4
5
-
This quickstart guide will show you how to install the MinIO client SDK, connect to MinIO, and provide a walkthrough for a simple file uploader.
6
-
For a complete list of APIs and examples, please take a look at the [godoc documentation](https://pkg.go.dev/github.com/minio/minio-go/v7) or [Go Client API Reference](https://min.io/docs/minio/linux/developers/go/API.html).
5
+
This Quickstart Guide covers how to install the MinIO client SDK, connect to MinIO, and create a sample file uploader.
6
+
For a complete list of APIs and examples, see the [godoc documentation](https://pkg.go.dev/github.com/minio/minio-go/v7) or [Go Client API Reference](https://min.io/docs/minio/linux/developers/go/API.html).
7
7
8
-
This document assumes that you have a working [Go development environment](https://golang.org/doc/install).
8
+
These examples presume a working [Go development environment](https://golang.org/doc/install) and the [MinIO `mc` command line tool](https://min.io/docs/minio/linux/reference/minio-mc.html).
9
9
10
10
## Download from Github
11
+
12
+
From your project directory:
13
+
11
14
```sh
12
15
go get github.com/minio/minio-go/v7
13
16
```
14
17
15
-
## Initialize MinIO Client
16
-
MinIO client requires the following four parameters specified to connect to an Amazon S3 compatible object storage.
18
+
## Initialize a MinIO Client Object
19
+
20
+
The MinIO client requires the following parameters to connect to an Amazon S3 compatible object storage:
17
21
18
-
| Parameter | Description|
19
-
|:---| :---|
20
-
| endpoint | URL to object storage service. |
21
-
|_minio.Options_| All the options such as credentials, custom transport etc. |
|`_minio.Options_`| All the options such as credentials, custom transport etc. |
22
26
23
27
```go
24
28
package main
@@ -49,13 +53,25 @@ func main() {
49
53
}
50
54
```
51
55
52
-
## Quick Start Example - File Uploader
53
-
This example program connects to an object storage server, creates a bucket and uploads a file to the bucket.
56
+
## Example - File Uploader
54
57
55
-
We 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.
58
+
This sample code connects to an object storage server, creates a bucket, and uploads a file to the bucket.
59
+
It uses the MinIO `play` server, a public MinIO cluster located at [https://play.min.io](https://play.min.io).
60
+
61
+
The `play` server runs the latest stable version of MinIO and may be used for testing and development.
62
+
The access credentials shown in this example are open to the public and all data uploaded to `play` should be considered public and non-protected.
56
63
57
64
### FileUploader.go
65
+
66
+
This example does the following:
67
+
68
+
- Connects to the MinIO `play` server using the provided credentials.
This SDK is distributed under the [Apache License, Version 2.0](https://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.
0 commit comments