Skip to content
This repository has been archived by the owner on Oct 15, 2021. It is now read-only.

docs: Update README #208

Merged
merged 2 commits into from
Sep 8, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 28 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,38 @@
# go-services-s3

[![Build Status](https://github.com/beyondstorage/go-service-s3/workflows/Unit%20Test/badge.svg?branch=master)](https://github.com/beyondstorage/go-service-s3/actions?query=workflow%3A%22Unit+Test%22)
[![Integration Tests](https://teamcity.beyondstorage.io/app/rest/builds/buildType:(id:GoServiceS3_IntegrationTests)/statusIcon)](https://teamcity.beyondstorage.io/buildConfiguration/GoServiceS3_IntegrationTests)
[![License](https://img.shields.io/badge/license-apache%20v2-blue.svg)](https://github.com/Xuanwo/storage/blob/master/LICENSE)
[![go storage dev](https://img.shields.io/matrix/go-service-s3:aos.dev.svg?server_fqdn=chat.aos.dev&label=%23go-service-s3%3Aaos.dev&logo=matrix)](https://matrix.to/#/#go-service-s3:aos.dev)
[![](https://img.shields.io/matrix/beyondstorage@go-service-s3:matrix.org.svg?logo=matrix)](https://matrix.to/#/#beyondstorage@go-service-s3:matrix.org)

# go-services-s3

s3 services support for [go-storage](https://github.com/beyondstorage/go-storage)
AWS S3 service support for [go-storage](https://github.com/beyondstorage/go-storage).

## Install

```go
go get github.com/beyondstorage/go-service-s3/v2
```

## Usage

```go
import (
"log"

_ "github.com/beyondstorage/go-service-s3/v2"
"github.com/beyondstorage/go-storage/v4/services"
)

func main() {
store, err := services.NewStoragerFromString("s3://bucket_name/path/to/workdir")
if err != nil {
log.Fatal(err)
}

// Write data from io.Reader into hello.txt
n, err := store.Write("hello.txt", r, length)
}
```

- See more examples in [go-storage-example](https://github.com/beyondstorage/go-storage-example).
- Read [more docs](https://beyondstorage.io/docs/go-storage/services/s3) about go-service-s3.