docs: Changes necessary for comprehensive doc changes

Fixes #1385, #1384, #1381, #1367, #1363
This commit is contained in:
Harshavardhana
2015-11-17 09:14:57 -08:00
parent 2132576d49
commit cbb937139e
14 changed files with 42 additions and 26 deletions
+2 -2
View File
@@ -43,8 +43,8 @@ var accessCmd = cli.Command{
mc {{.Name}} - {{.Usage}}
USAGE:
mc {{.Name}} set PERMISSION TARGET [TARGET ...]
mc {{.Name}} get TARGET [TARGET ...]
mc {{.Name}} [FLAGS] set PERMISSION TARGET [TARGET ...]
mc {{.Name}} [FLAGS] get TARGET [TARGET ...]
PERMISSION:
Allowed permissions are: [private, readonly, public, authorized].
+1 -1
View File
@@ -47,7 +47,7 @@ var catCmd = cli.Command{
mc {{.Name}} - {{.Usage}}
USAGE:
mc {{.Name}} SOURCE [SOURCE...]
mc {{.Name}} [FLAGS] SOURCE [SOURCE...]
FLAGS:
{{range .Flags}}{{.}}
+8 -2
View File
@@ -44,10 +44,16 @@ var configAliasCmd = cli.Command{
mc config {{.Name}} - {{.Usage}}
USAGE:
mc config {{.Name}} OPERATION [ARGS...]
mc config {{.Name}} [FLAGS] OPERATION [ARGS...]
OPERATION = add | list | remove
OPERATION:
remove Remove a alias.
list List all aliases.
add Add new alias.
FLAGS:
{{range .Flags}}{{.}}
{{end}}
EXAMPLES:
1. Add aliases for Amazon S3.
$ mc config {{.Name}} add mcloud https://s3.amazonaws.com/miniocloud
+7 -1
View File
@@ -32,8 +32,14 @@ var configHostCmd = cli.Command{
USAGE:
mc config {{.Name}} OPERATION [ARGS...]
OPERATION = add | list | remove
OPERATION:
remove Remove a host.
list list all hosts.
add Add new host.
FLAGS:
{{range .Flags}}{{.}}
{{end}}
EXAMPLES:
1. Add host configuration for a URL, using default signature V4. For security reasons turn off bash history
$ set +o history
+1 -1
View File
@@ -50,7 +50,7 @@ var configCmd = cli.Command{
{{.Name}} - {{.Usage}}
USAGE:
{{.Name}} COMMAND
{{.Name}} [FLAGS] COMMAND
FLAGS:
{{range .Flags}}{{.}}
+2 -4
View File
@@ -60,14 +60,12 @@ func mainConfigVersion(ctx *cli.Context) {
// convert interface{} back to its original struct
newConf := config.Data().(*configV6)
type Version struct {
Value string `json:"value"`
}
type Version string
if globalJSONFlag {
tB, e := json.Marshal(
struct {
Version Version `json:"version"`
}{Version: Version{newConf.Version}},
}{Version: Version(newConf.Version)},
)
fatalIf(probe.NewError(e), "Unable to construct version string.")
console.Println(string(tB))
+1 -1
View File
@@ -52,7 +52,7 @@ var cpCmd = cli.Command{
mc {{.Name}} - {{.Usage}}
USAGE:
mc {{.Name}} SOURCE [SOURCE...] TARGET
mc {{.Name}} [FLAGS] SOURCE [SOURCE...] TARGET
FLAGS:
{{range .Flags}}{{.}}
+6 -3
View File
@@ -37,12 +37,15 @@ var diffCmd = cli.Command{
CustomHelpTemplate: `NAME:
mc {{.Name}} - {{.Usage}}
USAGE:
mc {{.Name}} FIRST SECOND
DESCRIPTION:
{{.Description}}
USAGE:
mc {{.Name}} [FLAGS] FIRST SECOND
FLAGS:
{{range .Flags}}{{.}}
{{end}}
EXAMPLES:
1. Compare a local folder with a folder on Amazon S3 cloud storage.
$ mc {{.Name}} ~/Photos https://s3.amazonaws.com/MyBucket/Photos
+4 -4
View File
@@ -34,7 +34,7 @@ var mcHelpTemplate = `NAME:
{{.Name}} - {{.Usage}}
USAGE:
{{.Name}} {{if .Flags}}[GLOBAL FLAGS] {{end}}command{{if .Flags}} [COMMAND FLAGS]{{end}} [ARGUMENTS...]
{{.Name}} {{if .Flags}}[FLAGS] {{end}}COMMAND{{if .Flags}} [COMMAND FLAGS]{{end}} [ARGUMENTS...]
COMMANDS:
{{range .Commands}}{{join .Names ", "}}{{ "\t" }}{{.Usage}}
@@ -141,14 +141,14 @@ func registerApp() *cli.App {
registerCmd(lsCmd) // List contents of a bucket.
registerCmd(mbCmd) // Make a bucket.
registerCmd(catCmd) // Display contents of a file.
registerCmd(rmCmd) // Remove a file or bucket
registerCmd(pipeCmd) // Write contents of stdin to a file.
registerCmd(shareCmd) // Share documents via URL.
registerCmd(cpCmd) // Copy objects and files from multiple sources to single destination.
registerCmd(mirrorCmd) // Mirror objects and files from single source to multiple destinations.
registerCmd(sessionCmd) // Manage sessions for copy and mirror.
registerCmd(shareCmd) // Share documents via URL.
registerCmd(diffCmd) // Computer differences between two files or folders.
registerCmd(rmCmd) // Remove a file or bucket
registerCmd(accessCmd) // Set access permissions.
registerCmd(sessionCmd) // Manage sessions for copy and mirror.
registerCmd(configCmd) // Configure minio client.
registerCmd(updateCmd) // Check for new software updates.
registerCmd(versionCmd) // Print version.
+1 -1
View File
@@ -43,7 +43,7 @@ var mbCmd = cli.Command{
mc {{.Name}} - {{.Usage}}
USAGE:
mc {{.Name}} TARGET [TARGET ...]
mc {{.Name}} [FLAGS] TARGET [TARGET...]
FLAGS:
{{range .Flags}}{{.}}
+1 -1
View File
@@ -41,7 +41,7 @@ var pipeCmd = cli.Command{
mc {{.Name}} - {{.Usage}}
USAGE:
mc {{.Name}} [TARGET...]
mc {{.Name}} [FLAGS] [TARGET...]
FLAGS:
{{range .Flags}}{{.}}
+6 -3
View File
@@ -45,9 +45,12 @@ var sessionCmd = cli.Command{
mc {{.Name}} - {{.Usage}}
USAGE:
mc {{.Name}} list
mc {{.Name}} resume SESSION-ID
mc {{.Name}} clear SESSION-ID
mc {{.Name}} [FLAGS] OPERATION [ARG]
OPERATION:
resume Resume a previously saved session.
clear Clear a previously saved session.
list List all previously saved sessions.
SESSION-ID:
SESSION - Session can either be $SESSION-ID or "all".
+1 -1
View File
@@ -47,7 +47,7 @@ var shareCmd = cli.Command{
{{.Name}} - {{.Usage}}
USAGE:
{{.Name}} [COMMAND]
{{.Name}} [FLAGS] COMMAND
FLAGS:
{{range .Flags}}{{.}}
+1 -1
View File
@@ -43,7 +43,7 @@ var versionCmd = cli.Command{
mc {{.Name}} - {{.Usage}}
USAGE:
mc {{.Name}}
mc {{.Name}} [FLAGS]
FLAGS:
{{range .Flags}}{{.}}