Add stub options and rename some functions
This commit is contained in:
@@ -247,7 +247,7 @@ func fourthMode(s3c *s3.Client, args *cmdArgs) error {
|
||||
return doRecursiveCp(s3c, args)
|
||||
}
|
||||
|
||||
func doFsCopy(c *cli.Context) {
|
||||
func doCopy(c *cli.Context) {
|
||||
var args *cmdArgs
|
||||
var err error
|
||||
var s3c *s3.Client
|
||||
|
||||
@@ -51,7 +51,7 @@ func printObject(date time.Time, v int64, key string) {
|
||||
info(msg)
|
||||
}
|
||||
|
||||
func doFsList(c *cli.Context) {
|
||||
func doList(c *cli.Context) {
|
||||
var items []*s3.Item
|
||||
|
||||
args, err := parseArgs(c)
|
||||
|
||||
@@ -21,7 +21,7 @@ import (
|
||||
"github.com/minio-io/mc/pkg/s3"
|
||||
)
|
||||
|
||||
func doFsMb(c *cli.Context) {
|
||||
func doMakebucket(c *cli.Context) {
|
||||
args, err := parseArgs(c)
|
||||
if err != nil {
|
||||
fatal(err.Error())
|
||||
|
||||
+11
-3
@@ -24,7 +24,7 @@ var cp = cli.Command{
|
||||
Name: "cp",
|
||||
Usage: "copy objects",
|
||||
Description: `Copies a local file or dir or object or bucket to another location locally or in S3.`,
|
||||
Action: doFsCopy,
|
||||
Action: doCopy,
|
||||
Flags: []cli.Flag{
|
||||
cli.BoolFlag{
|
||||
Name: "recursive, r",
|
||||
@@ -37,14 +37,14 @@ var ls = cli.Command{
|
||||
Name: "ls",
|
||||
Usage: "get list of objects",
|
||||
Description: `List Objects and common prefixes under a prefix or all Buckets`,
|
||||
Action: doFsList,
|
||||
Action: doList,
|
||||
}
|
||||
|
||||
var mb = cli.Command{
|
||||
Name: "mb",
|
||||
Usage: "makes a bucket",
|
||||
Description: "Creates an S3 bucket",
|
||||
Action: doFsMb,
|
||||
Action: doMakebucket,
|
||||
}
|
||||
|
||||
var config = cli.Command{
|
||||
@@ -74,6 +74,13 @@ var config = cli.Command{
|
||||
},
|
||||
}
|
||||
|
||||
var donut = cli.Command{
|
||||
Name: "donut",
|
||||
Usage: "donut admin",
|
||||
Description: "",
|
||||
Subcommands: donutOptions,
|
||||
}
|
||||
|
||||
type object struct {
|
||||
bucket string
|
||||
key string
|
||||
@@ -91,6 +98,7 @@ var options = []cli.Command{
|
||||
cp,
|
||||
ls,
|
||||
mb,
|
||||
donut,
|
||||
config,
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"github.com/codegangsta/cli"
|
||||
)
|
||||
|
||||
var format = cli.Command{
|
||||
Name: "format",
|
||||
Usage: "format disk",
|
||||
Description: "format a given disk",
|
||||
Action: doFormat,
|
||||
}
|
||||
|
||||
var heal = cli.Command{
|
||||
Name: "heal",
|
||||
Usage: "heal donut",
|
||||
Description: "",
|
||||
Action: doHeal,
|
||||
}
|
||||
|
||||
var attach = cli.Command{
|
||||
Name: "attach",
|
||||
Usage: "attach disk",
|
||||
Description: "",
|
||||
Action: doAttach,
|
||||
}
|
||||
|
||||
var detach = cli.Command{
|
||||
Name: "detach",
|
||||
Usage: "detach disk",
|
||||
Description: "",
|
||||
Action: doDetach,
|
||||
}
|
||||
|
||||
var rebalance = cli.Command{
|
||||
Name: "rebalance",
|
||||
Usage: "rebalance ",
|
||||
Description: "",
|
||||
Action: doRebalance,
|
||||
}
|
||||
|
||||
var donutOptions = []cli.Command{
|
||||
format,
|
||||
heal,
|
||||
attach,
|
||||
detach,
|
||||
rebalance,
|
||||
}
|
||||
|
||||
func doFormat(c *cli.Context) {
|
||||
}
|
||||
|
||||
func doHeal(c *cli.Context) {
|
||||
}
|
||||
|
||||
func doAttach(c *cli.Context) {
|
||||
}
|
||||
|
||||
func doDetach(c *cli.Context) {
|
||||
}
|
||||
|
||||
func doRebalance(c *cli.Context) {
|
||||
}
|
||||
Reference in New Issue
Block a user