aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2020-12-22 17:40:55 -0800
committerChris Lu <chris.lu@gmail.com>2020-12-22 17:40:55 -0800
commitbeb3b8ddb08e4c1b897786ee7ca7b658a65a6348 (patch)
tree02c310f43d6067eb4a0645b6ab06b3a05e8801a1
parent4cf3176cbbe4a256ad401d56034676820d147d32 (diff)
downloadseaweedfs-beb3b8ddb08e4c1b897786ee7ca7b658a65a6348.tar.xz
seaweedfs-beb3b8ddb08e4c1b897786ee7ca7b658a65a6348.zip
shell: change bucket.list to s3.bucket.list, same for create and delete
-rw-r--r--weed/shell/command_s3_bucket_create.go (renamed from weed/shell/command_bucket_create.go)14
-rw-r--r--weed/shell/command_s3_bucket_delete.go (renamed from weed/shell/command_bucket_delete.go)14
-rw-r--r--weed/shell/command_s3_bucket_list.go (renamed from weed/shell/command_bucket_list.go)12
3 files changed, 20 insertions, 20 deletions
diff --git a/weed/shell/command_bucket_create.go b/weed/shell/command_s3_bucket_create.go
index 8265c7287..28cf1d945 100644
--- a/weed/shell/command_bucket_create.go
+++ b/weed/shell/command_s3_bucket_create.go
@@ -12,25 +12,25 @@ import (
)
func init() {
- Commands = append(Commands, &commandBucketCreate{})
+ Commands = append(Commands, &commandS3BucketCreate{})
}
-type commandBucketCreate struct {
+type commandS3BucketCreate struct {
}
-func (c *commandBucketCreate) Name() string {
- return "bucket.create"
+func (c *commandS3BucketCreate) Name() string {
+ return "s3.bucket.create"
}
-func (c *commandBucketCreate) Help() string {
+func (c *commandS3BucketCreate) Help() string {
return `create a bucket with a given name
Example:
- bucket.create -name <bucket_name> -replication 001
+ s3.bucket.create -name <bucket_name> -replication 001
`
}
-func (c *commandBucketCreate) Do(args []string, commandEnv *CommandEnv, writer io.Writer) (err error) {
+func (c *commandS3BucketCreate) Do(args []string, commandEnv *CommandEnv, writer io.Writer) (err error) {
bucketCommand := flag.NewFlagSet(c.Name(), flag.ContinueOnError)
bucketName := bucketCommand.String("name", "", "bucket name")
diff --git a/weed/shell/command_bucket_delete.go b/weed/shell/command_s3_bucket_delete.go
index 02790b9e2..a8d8c5c29 100644
--- a/weed/shell/command_bucket_delete.go
+++ b/weed/shell/command_s3_bucket_delete.go
@@ -9,24 +9,24 @@ import (
)
func init() {
- Commands = append(Commands, &commandBucketDelete{})
+ Commands = append(Commands, &commandS3BucketDelete{})
}
-type commandBucketDelete struct {
+type commandS3BucketDelete struct {
}
-func (c *commandBucketDelete) Name() string {
- return "bucket.delete"
+func (c *commandS3BucketDelete) Name() string {
+ return "s3.bucket.delete"
}
-func (c *commandBucketDelete) Help() string {
+func (c *commandS3BucketDelete) Help() string {
return `delete a bucket by a given name
- bucket.delete -name <bucket_name>
+ s3.bucket.delete -name <bucket_name>
`
}
-func (c *commandBucketDelete) Do(args []string, commandEnv *CommandEnv, writer io.Writer) (err error) {
+func (c *commandS3BucketDelete) Do(args []string, commandEnv *CommandEnv, writer io.Writer) (err error) {
bucketCommand := flag.NewFlagSet(c.Name(), flag.ContinueOnError)
bucketName := bucketCommand.String("name", "", "bucket name")
diff --git a/weed/shell/command_bucket_list.go b/weed/shell/command_s3_bucket_list.go
index 2e446b6b2..4acf9a866 100644
--- a/weed/shell/command_bucket_list.go
+++ b/weed/shell/command_s3_bucket_list.go
@@ -11,23 +11,23 @@ import (
)
func init() {
- Commands = append(Commands, &commandBucketList{})
+ Commands = append(Commands, &commandS3BucketList{})
}
-type commandBucketList struct {
+type commandS3BucketList struct {
}
-func (c *commandBucketList) Name() string {
- return "bucket.list"
+func (c *commandS3BucketList) Name() string {
+ return "s3.bucket.list"
}
-func (c *commandBucketList) Help() string {
+func (c *commandS3BucketList) Help() string {
return `list all buckets
`
}
-func (c *commandBucketList) Do(args []string, commandEnv *CommandEnv, writer io.Writer) (err error) {
+func (c *commandS3BucketList) Do(args []string, commandEnv *CommandEnv, writer io.Writer) (err error) {
bucketCommand := flag.NewFlagSet(c.Name(), flag.ContinueOnError)
if err = bucketCommand.Parse(args); err != nil {