Skip to content

Commit

Permalink
Switch to Scope Handling
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanbenten committed Nov 22, 2019
1 parent b22a410 commit fcbddce
Show file tree
Hide file tree
Showing 5 changed files with 98 additions and 88 deletions.
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,8 @@ s3-endpoint | Custom S3 endpoint. | |
s3-region | region of the s3 bucket | eu-west-1 | S3_REGION
s3-no-multipart | disables s3 multipart upload | false | |
s3-path-style | Forces path style URLs, required for Minio. | false | |
storj-endpoint | Satellite Address including Port | | STORJ_ENDPOINT
storj-apikey | API Key to interact with the project | | STORJ_API_KEY
storj-bucket | Bucket in which to store the data | | STORJ_BUCKET
storj-enckey | Encryption Key for local file encryption | | STORJ_ENC_KEY
storj-scope | Scope to use to access the project | | STORJ_SCOPE
storj-apikey | API Key to interact with the project | | STORJ_BUCKET
storj-skip-peer-ca | Skip's CA Peer Check for local environments | false | STORJ_SKIP_PEER_CA
basedir | path storage for local/gdrive provider| |
gdrive-client-json-filepath | path to oauth client json config for gdrive provider| |
Expand Down
10 changes: 3 additions & 7 deletions cmd/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -392,15 +392,11 @@ func New() *Cmd {
options = append(options, server.UseStorage(storage))
}
case "storj":
if endpoint := c.String("storj-endpoint"); endpoint == "" {
panic("storj-endpoint not set.")
} else if apiKey := c.String("storj-apikey"); apiKey == "" {
panic("storj-apikey not set.")
if scope := c.String("storj-scope"); scope == "" {
panic("storj-scope not set.")
} else if bucket := c.String("storj-bucket"); bucket == "" {
panic("storj-enckey not set.")
} else if encKey := c.String("storj-enckey"); encKey == "" {
panic("storj-bucket not set.")
} else if storage, err := server.NewStorjStorage(endpoint, apiKey, bucket, encKey, c.Bool("storj-skip-peer-ca"), logger); err != nil {
} else if storage, err := server.NewStorjStorage(scope, bucket, c.Bool("storj-skip-peer-ca"), logger); err != nil {
panic(err)
} else {
options = append(options, server.UseStorage(storage))
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,5 @@ require (
google.golang.org/genproto v0.0.0-20191007162740-aa923e3a3354 // indirect
google.golang.org/grpc v1.24.0 // indirect
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15
storj.io/storj v0.24.5
storj.io/storj v0.26.0
)
Loading

0 comments on commit fcbddce

Please sign in to comment.