mirror of
https://github.com/minio/minio.git
synced 2024-12-24 22:25:54 -05:00
Merge pull request #129 from harshavardhana/pr_out_move_wrappers_at_pkgs_minio_back_to_cmd_minio_as_their_usage_is_limited
This commit is contained in:
commit
68eb14a1f6
@ -1,4 +1,4 @@
|
|||||||
package minio
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
@ -75,7 +75,7 @@ func parseInput(c *cli.Context) (inputConfig, error) {
|
|||||||
return config, nil
|
return config, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func Getobjectdir(basename string) string {
|
func getObjectdir(basename string) string {
|
||||||
user, err := user.Current()
|
user, err := user.Current()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal(err)
|
log.Fatal(err)
|
@ -1,4 +1,4 @@
|
|||||||
package minio
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"log"
|
"log"
|
||||||
@ -6,7 +6,7 @@ import (
|
|||||||
"github.com/codegangsta/cli"
|
"github.com/codegangsta/cli"
|
||||||
)
|
)
|
||||||
|
|
||||||
func Encode(c *cli.Context) {
|
func encode(c *cli.Context) {
|
||||||
config, err := parseInput(c)
|
config, err := parseInput(c)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal(err)
|
log.Fatal(err)
|
@ -1,4 +1,4 @@
|
|||||||
package minio
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
@ -1,4 +1,4 @@
|
|||||||
package minio
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"io"
|
"io"
|
||||||
@ -8,7 +8,7 @@ import (
|
|||||||
"github.com/codegangsta/cli"
|
"github.com/codegangsta/cli"
|
||||||
)
|
)
|
||||||
|
|
||||||
func Get(c *cli.Context) {
|
func get(c *cli.Context) {
|
||||||
config, err := parseInput(c)
|
config, err := parseInput(c)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal(err)
|
log.Fatal(err)
|
1
cmd/minio/init.go
Normal file
1
cmd/minio/init.go
Normal file
@ -0,0 +1 @@
|
|||||||
|
package main
|
@ -1,4 +1,4 @@
|
|||||||
package minio
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"io"
|
"io"
|
||||||
@ -8,7 +8,7 @@ import (
|
|||||||
"github.com/codegangsta/cli"
|
"github.com/codegangsta/cli"
|
||||||
)
|
)
|
||||||
|
|
||||||
func List(c *cli.Context) {
|
func list(c *cli.Context) {
|
||||||
config, err := parseInput(c)
|
config, err := parseInput(c)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal(err)
|
log.Fatal(err)
|
@ -4,7 +4,6 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
|
|
||||||
"github.com/codegangsta/cli"
|
"github.com/codegangsta/cli"
|
||||||
"github.com/minio-io/minio/pkgs/minio"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
@ -15,16 +14,16 @@ func main() {
|
|||||||
{
|
{
|
||||||
Name: "encode",
|
Name: "encode",
|
||||||
Usage: "erasure encode a byte stream",
|
Usage: "erasure encode a byte stream",
|
||||||
Action: minio.Encode,
|
Action: encode,
|
||||||
Flags: []cli.Flag{
|
Flags: []cli.Flag{
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "root",
|
Name: "root",
|
||||||
Value: minio.Getobjectdir(".minio/erasure"),
|
Value: getObjectdir(".minio/erasure"),
|
||||||
Usage: "",
|
Usage: "",
|
||||||
},
|
},
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "staging",
|
Name: "staging",
|
||||||
Value: minio.Getobjectdir(".minio/staging"),
|
Value: getObjectdir(".minio/staging"),
|
||||||
Usage: "",
|
Usage: "",
|
||||||
},
|
},
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
@ -42,11 +41,11 @@ func main() {
|
|||||||
{
|
{
|
||||||
Name: "get",
|
Name: "get",
|
||||||
Usage: "get an object",
|
Usage: "get an object",
|
||||||
Action: minio.Get,
|
Action: get,
|
||||||
Flags: []cli.Flag{
|
Flags: []cli.Flag{
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "root",
|
Name: "root",
|
||||||
Value: minio.Getobjectdir(".minio/erasure"),
|
Value: getObjectdir(".minio/erasure"),
|
||||||
Usage: "",
|
Usage: "",
|
||||||
},
|
},
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
@ -64,11 +63,11 @@ func main() {
|
|||||||
{
|
{
|
||||||
Name: "put",
|
Name: "put",
|
||||||
Usage: "put an object",
|
Usage: "put an object",
|
||||||
Action: minio.Put,
|
Action: put,
|
||||||
Flags: []cli.Flag{
|
Flags: []cli.Flag{
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "staging",
|
Name: "staging",
|
||||||
Value: minio.Getobjectdir(".minio/staging"),
|
Value: getObjectdir(".minio/staging"),
|
||||||
Usage: "",
|
Usage: "",
|
||||||
},
|
},
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
@ -81,11 +80,11 @@ func main() {
|
|||||||
{
|
{
|
||||||
Name: "list",
|
Name: "list",
|
||||||
Usage: "list objects",
|
Usage: "list objects",
|
||||||
Action: minio.List,
|
Action: list,
|
||||||
Flags: []cli.Flag{
|
Flags: []cli.Flag{
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "root",
|
Name: "root",
|
||||||
Value: minio.Getobjectdir(".minio/erasure"),
|
Value: getObjectdir(".minio/erasure"),
|
||||||
Usage: "",
|
Usage: "",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
package minio
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"log"
|
"log"
|
||||||
@ -8,7 +8,7 @@ import (
|
|||||||
"github.com/codegangsta/cli"
|
"github.com/codegangsta/cli"
|
||||||
)
|
)
|
||||||
|
|
||||||
func Put(c *cli.Context) {
|
func put(c *cli.Context) {
|
||||||
config, err := parseInput(c)
|
config, err := parseInput(c)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal(err)
|
log.Fatal(err)
|
1
cmd/minio/verify.go
Normal file
1
cmd/minio/verify.go
Normal file
@ -0,0 +1 @@
|
|||||||
|
package main
|
@ -1 +0,0 @@
|
|||||||
package minio
|
|
@ -1 +0,0 @@
|
|||||||
package minio
|
|
Loading…
Reference in New Issue
Block a user