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

Implement GSP-73 Organization rename #9

Merged
merged 1 commit into from
May 21, 2021
Merged
Show file tree
Hide file tree
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
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# go-services-uss

[![Build Status](https://github.com/aos-dev/go-service-uss/workflows/Unit%20Test/badge.svg?branch=master)](https://github.com/aos-dev/go-service-uss/actions?query=workflow%3A%22Unit+Test%22)
[![Build Status](https://github.com/beyondstorage/go-service-uss/workflows/Unit%20Test/badge.svg?branch=master)](https://github.com/beyondstorage/go-service-uss/actions?query=workflow%3A%22Unit+Test%22)
[![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-uss:aos.dev.svg?server_fqdn=chat.aos.dev&label=%23go-service-uss%3Aaos.dev&logo=matrix)](https://matrix.to/#/#go-service-uss:aos.dev)

uss services support for [go-storage](https://github.com/aos-dev/go-storage)
uss services support for [go-storage](https://github.com/beyondstorage/go-storage)

## Install

```go
go get github.com/aos-dev/go-service-uss
go get github.com/beyondstorage/go-service-uss/v2
```
2 changes: 1 addition & 1 deletion doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ Package uss provided support for UPYUN Storage Service (https://www.upyun.com/pr
*/
package uss

//go:generate go run -tags tools github.com/aos-dev/go-storage/v3/cmd/definitions service.toml
//go:generate go run -tags tools github.com/beyondstorage/go-storage/v4/cmd/definitions service.toml
62 changes: 25 additions & 37 deletions generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
module github.com/aos-dev/go-service-uss
module github.com/beyondstorage/go-service-uss/v2

go 1.15

require (
github.com/aos-dev/go-storage/v3 v3.6.1-0.20210510125045-f79d0505cb2b
github.com/beyondstorage/go-storage/v4 v4.0.0-20210521045436-248353dfc077
github.com/upyun/go-sdk/v3 v3.0.2
)
12 changes: 6 additions & 6 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
github.com/Xuanwo/templateutils v0.1.0 h1:WpkWOqQtIQ2vAIpJLa727DdN8WtxhUkkbDGa6UhntJY=
github.com/Xuanwo/templateutils v0.1.0/go.mod h1:OdE0DJ+CJxDBq6psX5DPV+gOZi8bhuHuVUpPCG++Wb8=
github.com/aos-dev/go-storage/v3 v3.6.1-0.20210510125045-f79d0505cb2b h1:3XpTC+Q+bm2zVoEI67AUf52o28Loq8YcZ0L45F/2H4I=
github.com/aos-dev/go-storage/v3 v3.6.1-0.20210510125045-f79d0505cb2b/go.mod h1:ho7Z5P8fj+Q+9pCBng5s+d0XjH06I4hslaht9aiUjaA=
github.com/aos-dev/specs/go v0.0.0-20210510065836-ba70d7b05cda h1:D9DV8kz38iPT6mCHSCTlxYN4Zg9DUfHmWKJKVBvZmfY=
github.com/aos-dev/specs/go v0.0.0-20210510065836-ba70d7b05cda/go.mod h1:gNah3KaPJEfysh7uCCX+sYjQC3g2yx2VgBkFlT945Ws=
github.com/beyondstorage/go-storage/v4 v4.0.0-20210521045436-248353dfc077 h1:BxqrLLELv6ZvP4+DZlwPAwBhNYkQqpZFvujvUT8zGiY=
github.com/beyondstorage/go-storage/v4 v4.0.0-20210521045436-248353dfc077/go.mod h1:oa2dYco+xplPj99WSBnYVw/xXvRkIKWSSVDQKNZ5Kz8=
github.com/beyondstorage/specs/go v0.0.0-20210521044836-3d41c1d9c97f h1:KMXKB/LACUmnOfLfjND8222qtzWT9lWRUdsPOlM4FqE=
github.com/beyondstorage/specs/go v0.0.0-20210521044836-3d41c1d9c97f/go.mod h1:f5VvmLHc/dNJwl+/yAv/TOHdev3phvuEswx8DIXiSQQ=
github.com/dave/dst v0.26.2 h1:lnxLAKI3tx7MgLNVDirFCsDTlTG9nKTk7GcptKcWSwY=
github.com/dave/dst v0.26.2/go.mod h1:UMDJuIRPfyUCC78eFuB+SV/WI8oDeyFDvM/JR6NI3IU=
github.com/dave/gopackages v0.0.0-20170318123100-46e7023ec56e/go.mod h1:i00+b/gKdIDIxuLDFob7ustLAVqhsZRk2qVZrArELGQ=
Expand All @@ -25,8 +25,8 @@ github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORN
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/pelletier/go-toml v1.9.0 h1:NOd0BRdOKpPf0SxkL3HxSQOG7rNh+4kl6PHcBPFs7Q0=
github.com/pelletier/go-toml v1.9.0/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c=
github.com/pelletier/go-toml v1.9.1 h1:a6qW1EVNZWH9WGI6CsYdD8WAylkoXBS5yv0XHlh17Tc=
github.com/pelletier/go-toml v1.9.1/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/sergi/go-diff v1.0.0 h1:Kpca3qRNrduNnOQeazBd0ysaKrUJiIuISHxogkT9RPQ=
Expand Down
12 changes: 6 additions & 6 deletions storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ import (

"github.com/upyun/go-sdk/v3/upyun"

"github.com/aos-dev/go-storage/v3/pkg/headers"
"github.com/aos-dev/go-storage/v3/pkg/iowrap"
"github.com/aos-dev/go-storage/v3/services"
. "github.com/aos-dev/go-storage/v3/types"
"github.com/beyondstorage/go-storage/v4/pkg/headers"
"github.com/beyondstorage/go-storage/v4/pkg/iowrap"
"github.com/beyondstorage/go-storage/v4/services"
. "github.com/beyondstorage/go-storage/v4/types"
)

const (
Expand Down Expand Up @@ -75,11 +75,11 @@ func (s *Storage) list(ctx context.Context, path string, opt pairStorageList) (o
return NewObjectIterator(ctx, nextFn, input), nil
}

func (s *Storage) metadata(ctx context.Context, opt pairStorageMetadata) (meta *StorageMeta, err error) {
func (s *Storage) metadata(opt pairStorageMetadata) (meta *StorageMeta) {
meta = NewStorageMeta()
meta.Name = s.name
meta.WorkDir = s.workDir
return meta, nil
return meta
}

func (s *Storage) nextObjectPageByDir(ctx context.Context, page *ObjectPage) (err error) {
Expand Down
2 changes: 1 addition & 1 deletion tools.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
package uss

import (
_ "github.com/aos-dev/go-storage/v3/cmd/definitions"
_ "github.com/beyondstorage/go-storage/v4/cmd/definitions"
)
12 changes: 6 additions & 6 deletions utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ import (

"github.com/upyun/go-sdk/v3/upyun"

ps "github.com/aos-dev/go-storage/v3/pairs"
"github.com/aos-dev/go-storage/v3/pkg/credential"
"github.com/aos-dev/go-storage/v3/pkg/httpclient"
"github.com/aos-dev/go-storage/v3/services"
typ "github.com/aos-dev/go-storage/v3/types"
ps "github.com/beyondstorage/go-storage/v4/pairs"
"github.com/beyondstorage/go-storage/v4/pkg/credential"
"github.com/beyondstorage/go-storage/v4/pkg/httpclient"
"github.com/beyondstorage/go-storage/v4/services"
typ "github.com/beyondstorage/go-storage/v4/types"
)

// Storage is the uss service.
Expand Down Expand Up @@ -86,7 +86,7 @@ func newStorager(pairs ...typ.Pair) (store *Storage, err error) {

// ref: https://help.upyun.com/knowledge-base/errno/
func formatError(err error) error {
if _, ok := err.(services.AosError); ok {
if _, ok := err.(services.InternalError); ok {
return err
}

Expand Down