-
Notifications
You must be signed in to change notification settings - Fork 162
feat(object): add config commands for s3 tools #874
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
37 commits
Select commit
Hold shift + click to select a range
dce048b
feat(object): add export config commands for upstream s3 tools
remyleone 761fa23
Fix
remyleone d4a9b87
Fix
remyleone 72a0f3c
Fix
remyleone f5d89d7
Fix
remyleone 3c11ea4
Fix
remyleone 176d663
Fix
remyleone 546fb6a
Fix
remyleone f8e8010
Fix
remyleone f93ded1
Fix
remyleone 6a382f8
FIx
remyleone acd983c
FIx
remyleone 4f80e5a
Fix
remyleone 98d399a
Fix
remyleone 47dc2de
Fix
remyleone 8c6b3f2
Fix
remyleone 2845dd9
Fix
remyleone 494f939
Revert "Fix"
remyleone 12785a3
Fix
remyleone 91bf0d0
Fix
remyleone 6a1f43e
Fix
remyleone b607b89
Fix
remyleone fb8f719
Fix
remyleone 43f791c
Fix
remyleone 2f3c554
Fix
remyleone 9760591
Fix
remyleone e1d49d5
Fix
remyleone ae47db1
Fix
remyleone 69f1257
Fix
remyleone e87a6fe
Fix
remyleone 893bfd0
Fix
remyleone 145f07f
Fix
remyleone e154e5b
Fix
remyleone 236b97d
Fix
remyleone 479c342
Fix
remyleone 362ce3d
Fix
remyleone e6f35e8
Fix
remyleone File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
31 changes: 31 additions & 0 deletions
31
cmd/scw/testdata/test-all-usage-object-config-get-usage.stderr.golden
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| Generate a S3 tool configuration file. | ||
|
|
||
| USAGE: | ||
| scw object config get [arg=value ...] | ||
|
|
||
| EXAMPLES: | ||
| Generate a s3cmd config file for Paris region | ||
| scw object config get region=fr-par type=s3cmd | ||
|
|
||
| Generate a rclone config file for default region | ||
| scw object config get type=rclone | ||
|
|
||
| Generate a mc (minio) config file for default region | ||
| scw object config get type=mc | ||
|
|
||
| ARGS: | ||
| type Type of S3 tool you want to generate a config for (rclone | s3cmd | mc) | ||
| [name=scaleway] Name of the s3 remote you want to generate | ||
| [region] Region to target. If none is passed will use default region from the config (fr-par | nl-ams) | ||
|
|
||
| FLAGS: | ||
| -h, --help help for get | ||
|
|
||
| GLOBAL FLAGS: | ||
| -D, --debug Enable debug mode | ||
| -o, --output string Output format: json or human | ||
| -p, --profile string The config profile to use | ||
|
|
||
| SEE ALSO: | ||
| # Install a S3 tool configuration file | ||
| scw object config install |
31 changes: 31 additions & 0 deletions
31
cmd/scw/testdata/test-all-usage-object-config-install-usage.stderr.golden
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| Install a S3 tool configuration file to its default location. | ||
|
|
||
| USAGE: | ||
| scw object config install [arg=value ...] | ||
|
|
||
| EXAMPLES: | ||
| Install a s3cmd config file for Paris region | ||
| scw object config install region=fr-par type=s3cmd | ||
|
|
||
| Install a rclone config file for default region | ||
| scw object config install type=rclone | ||
|
|
||
| Install a mc (minio) config file for default region | ||
| scw object config install type=mc | ||
|
|
||
| ARGS: | ||
| type Type of S3 tool you want to generate a config for (rclone | s3cmd | mc) | ||
| [name=scaleway] Name of the s3 remote you want to generate | ||
| [region] Region to target. If none is passed will use default region from the config (fr-par | nl-ams) | ||
|
|
||
| FLAGS: | ||
| -h, --help help for install | ||
|
|
||
| GLOBAL FLAGS: | ||
| -D, --debug Enable debug mode | ||
| -o, --output string Output format: json or human | ||
| -p, --profile string The config profile to use | ||
|
|
||
| SEE ALSO: | ||
| # Generate a S3 tool configuration file | ||
| scw object config get |
18 changes: 18 additions & 0 deletions
18
cmd/scw/testdata/test-all-usage-object-config-usage.stderr.golden
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| Configuration generation for S3 tools. | ||
|
|
||
| USAGE: | ||
| scw object config <command> | ||
|
|
||
| AVAILABLE COMMANDS: | ||
| get Generate a S3 tool configuration file | ||
| install Install a S3 tool configuration file to its default location | ||
|
|
||
| FLAGS: | ||
| -h, --help help for config | ||
|
|
||
| GLOBAL FLAGS: | ||
| -D, --debug Enable debug mode | ||
| -o, --output string Output format: json or human | ||
| -p, --profile string The config profile to use | ||
|
|
||
| Use "scw object config [command] --help" for more information about a command. |
17 changes: 17 additions & 0 deletions
17
cmd/scw/testdata/test-all-usage-object-usage.stderr.golden
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| Object-storage utils | ||
|
|
||
| USAGE: | ||
| scw object <command> | ||
|
|
||
| AVAILABLE COMMANDS: | ||
| config Manage configuration files for popular S3 tools | ||
|
|
||
| FLAGS: | ||
| -h, --help help for object | ||
|
|
||
| GLOBAL FLAGS: | ||
| -D, --debug Enable debug mode | ||
| -o, --output string Output format: json or human | ||
| -p, --profile string The config profile to use | ||
|
|
||
| Use "scw object [command] --help" for more information about a command. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| package object | ||
|
|
||
| import ( | ||
| "github.com/scaleway/scaleway-cli/internal/core" | ||
| ) | ||
|
|
||
| func GetCommands() *core.Commands { | ||
| return core.NewCommands( | ||
| objectRoot(), | ||
| objectConfig(), | ||
| configGetCommand(), | ||
| configInstallCommand(), | ||
| ) | ||
| } | ||
|
|
||
| func objectRoot() *core.Command { | ||
| return &core.Command{ | ||
| Short: `Object-storage utils`, | ||
| Namespace: "object", | ||
| } | ||
| } | ||
|
|
||
| func objectConfig() *core.Command { | ||
| return &core.Command{ | ||
| Short: `Manage configuration files for popular S3 tools`, | ||
| Long: `Configuration generation for S3 tools.`, | ||
| Namespace: "object", | ||
| Resource: `config`, | ||
| } | ||
| } | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.