Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
小七de尾巴
Abc-imp
提交
05b88500
A
Abc-imp
项目概览
小七de尾巴
/
Abc-imp
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
A
Abc-imp
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
未验证
提交
05b88500
编写于
7月 04, 2017
作者:
A
Avi Aryan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
standardized import params #38
上级
0a9e3ce3
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
6 addition
and
6 deletion
+6
-6
cmd/abc/appbase_import.go
cmd/abc/appbase_import.go
+4
-4
docs/appbase/import.md
docs/appbase/import.md
+2
-2
未找到文件。
cmd/abc/appbase_import.go
浏览文件 @
05b88500
...
...
@@ -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
(
"s
ource
"
,
"http://user:pass@host:port/db"
,
"url of source database"
)
srcType
:=
flagset
.
String
(
"
src.
type"
,
"postgres"
,
"type of source database"
)
srcURL
:=
flagset
.
String
(
"s
rc.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
...
...
docs/appbase/
I
mport.md
→
docs/appbase/
i
mport.md
浏览文件 @
05b88500
...
...
@@ -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.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录