未验证 提交 05b88500 编写于 作者: A Avi Aryan

standardized import params #38

上级 0a9e3ce3
......@@ -14,7 +14,7 @@ import (
)
const importInfo string = `
abc import --type {DBType} --source {URI} [-t|--tail] [Uri|AppID|Appname]
abc import --src.type {DBType} --src.uri {URI} [-t|--tail] [Uri|AppID|Appname]
`
// runImport runs the import command
......@@ -24,10 +24,10 @@ func runImport(args []string) error {
// custom flags
tail := flagset.BoolP("tail", "t", false, "allow tail feature")
srcType := flagset.String("type", "postgres", "type of source database")
srcURL := flagset.String("source", "http://user:pass@host:port/db", "url of source database")
srcType := flagset.String("src.type", "postgres", "type of source database")
srcURL := flagset.String("src.uri", "http://user:pass@host:port/db", "url of source database")
typeName := flagset.String("typename", "mytype", "[csv] typeName to use")
replicationSlot := flagset.String("replication_slot", "standby_replication_slot",
replicationSlot := flagset.String("replication-slot", "standby_replication_slot",
"[postgres] replication slot to use")
timeout := flagset.String("timeout", "10s", "source timeout")
var destURL string
......
......@@ -19,9 +19,9 @@ Note that you only need to set the parameters that are required for the source d
### Examples
```sh
./abc import --log.level=info --type=csv --typename=csvTypeName --source="file.csv" "https://USER:PASS@scalr.api.appbase.io/APPNAME"
./abc import --log.level=info --src.type=csv --typename=csvTypeName --src.uri="file.csv" "https://USER:PASS@scalr.api.appbase.io/APPNAME"
```
```sh
./abc import --log.level=info --type=postgres -t --replication_slot="standby_replication_slot" --source="postgresql://USER:PASS@HOST:PORT/DBNAME" "https://USER:PASS@scalr.api.appbase.io/APPNAME"
./abc import --log.level=info --src.type=postgres -t --replication-slot="standby_replication_slot" --src.uri="postgresql://USER:PASS@HOST:PORT/DBNAME" "https://USER:PASS@scalr.api.appbase.io/APPNAME"
```
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册