Merge pull request #40 from harshavardhana/pr_out_rename_mkdir_mb

This commit is contained in:
Harshavardhana
2015-02-09 15:03:22 -08:00
7 changed files with 62 additions and 5 deletions
+1 -1
View File
@@ -38,7 +38,7 @@ USAGE:
COMMANDS:
cp
ls
mkdir
mb
sync
help, h Shows a list of commands or help for one command
+1 -1
View File
@@ -38,7 +38,7 @@ USAGE:
COMMANDS:
cp
ls
mkdir
mb
sync
help, h Shows a list of commands or help for one command
+22
View File
@@ -0,0 +1,22 @@
'use strict'
var AWS = require('aws-sdk');
var config = {
accessKeyId: "YOUR_MINIO_ACCESS_ID",
secretAccessKey: "YOUR_MINIO_SECRET_KEY",
endpoint: "localhost:9000",
region: "",
sslEnabled: false
};
AWS.config.update(config);
var s3 = new AWS.S3();
s3.listBuckets(function(err, data) {
if (err) {
console.log(err); // an error occurred
} else {
console.log(data); // successful response
}
});
+34
View File
@@ -0,0 +1,34 @@
# AWS SDK for Javascript
## Install
### In Node.js
```
npm install aws-sdk
```
### Example
```
var AWS = require('aws-sdk');
var config = {
accessKeyId: "YOUR_MINIO_ACCESS_ID",
secretAccessKey: "YOUR_MINIO_SECRET_KEY",
endpoint: "localhost:9000",
region: "",
sslEnabled: false
};
AWS.config.update(config);
var s3 = new AWS.S3();
s3.listBuckets(function(err, data) {
if (err) {
console.log(err); // an error occurred
} else {
console.log(data); // successful response
}
});
```
+1
View File
@@ -1,5 +1,6 @@
site_name: Minio Client Documentation
pages:
- ['index.md', Index]
- ['sdks/js/javascript.md', 'SDKs', 'Javascript']
- ['contributing.md', 'Contributing', 'Overview']
theme: readthedocs
+1 -1
View File
@@ -23,7 +23,7 @@ import (
"github.com/minio-io/mc/pkg/s3"
)
func doFsMkdir(c *cli.Context) {
func doFsMb(c *cli.Context) {
switch len(c.Args()) {
case 1:
if !s3.IsValidBucket(c.Args().Get(0)) {
+2 -2
View File
@@ -35,10 +35,10 @@ var Ls = cli.Command{
}
var Mb = cli.Command{
Name: "mkdir",
Name: "mb",
Usage: "",
Description: "Creates an S3 bucket",
Action: doFsMkdir,
Action: doFsMb,
}
var Sync = cli.Command{