Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
bc3b272
Move 'cql-utils -tool rpc' func to 'cql rpc' command.
laodouya Mar 21, 2019
54864de
Add askDeletePath to cql program.
Mar 22, 2019
2f5b61d
Label cql drop as current not supported. Print config filepath if ini…
Mar 22, 2019
7865ca2
Add generate command. add generate addr func.
Mar 26, 2019
0406218
Rename 'cql generate addr' to 'cql generate wallet'. And use public k…
Mar 26, 2019
a8766b4
Delete addr gen func in cql-utils cmd
Mar 26, 2019
98d4b18
Add 'cql generate public' func
Mar 26, 2019
2677712
Delete keytool func in cql-utils cmd
Mar 26, 2019
9d6e426
Add getPublic func for get existing public key
Mar 26, 2019
729d987
Move getPublic() to cql/cfg.go, remove 'cql generate nonce' type.
Mar 26, 2019
9b8147a
Add cql idminer command.
Mar 26, 2019
bfa6f04
Delete miner, nonce func in cql-utils cmd
Mar 26, 2019
49a1051
Remove cql-utils/keygen.go
Mar 26, 2019
d83b7dc
Add 'cql generate config' func.
Mar 26, 2019
6569f10
Remove cql-utils program.
Mar 26, 2019
a9de684
Update testnet test.
Mar 26, 2019
9425950
Update docs.
Mar 26, 2019
9bc50d6
client.Drop return nil anyway.
Mar 26, 2019
625e96d
Update cql rpc help info.
Mar 26, 2019
7cd6afe
Merge remote-tracking branch 'origin/develop' into feature/cql_utils_…
Mar 27, 2019
38e860b
Fix merge conflict
Mar 27, 2019
81e7a61
Rename balance command to wallet -balance.
Mar 27, 2019
c0363d5
Update testnet testcase.
Mar 27, 2019
362076b
Use strings.EqualFold for user typing check.
Mar 27, 2019
0d058c6
Fix compatibility test.
Mar 27, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 2 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -140,12 +140,6 @@ bin/cql-minerd:
-o bin/cql-minerd \
github.com/CovenantSQL/CovenantSQL/cmd/cql-minerd

bin/cql-utils:
$(GOBUILD) \
-ldflags "$(ldflags_role_client_simple_log)" \
-o bin/cql-utils \
github.com/CovenantSQL/CovenantSQL/cmd/cql-utils

bin/cql:
$(GOBUILD) \
-ldflags "$(ldflags_role_client_simple_log)" \
Expand Down Expand Up @@ -181,7 +175,7 @@ bp: bin/cqld.test bin/cqld

miner: bin/cql-minerd.test bin/cql-minerd

client: bin/cql-utils bin/cql bin/cql.test bin/cql-fuse bin/cql-mysql-adapter bin/cql-faucet
client: bin/cql bin/cql.test bin/cql-fuse bin/cql-mysql-adapter bin/cql-faucet

all: bp miner client

Expand All @@ -191,5 +185,5 @@ clean:
rm -f coverage.txt

.PHONY: status start stop logs push push_testnet clean \
bin/cqld.test bin/cqld bin/cql-minerd.test bin/cql-minerd bin/cql-utils \
bin/cqld.test bin/cqld bin/cql-minerd.test bin/cql-minerd \
bin/cql bin/cql.test bin/cql-fuse bin/cql-mysql-adapter bin/cql-faucet
12 changes: 6 additions & 6 deletions client/README-zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

```bash
$ go get github.com/CovenantSQL/CovenantSQL/client
$ go get github.com/CovenantSQL/CovenantSQL/cmd/cql-utils
$ go get github.com/CovenantSQL/CovenantSQL/cmd/cql
```

然后在你的 go 代码中 import 第一个 `client` 包。
Expand All @@ -18,14 +18,14 @@ $ go get github.com/CovenantSQL/CovenantSQL/cmd/cql-utils

### 生成默认的配置文件

运行以下 `cql-utils` 命令,输入 master key(类似密码)来生成本地密钥对。等待几十秒,会在 `conf` 文件夹中,生成一个私钥文件和一个名为 `config.yaml` 的配置文件。
运行以下 `cql` 命令,输入 master key(类似密码)来生成本地密钥对。等待几十秒,会在 `~/.cql` 文件夹中,生成一个私钥文件和一个名为 `config.yaml` 的配置文件。

```bash
$ cql-utils -tool confgen -root conf
$ cql generate config
Generating key pair...
Enter master key(press Enter for default: ""):
Private key file: conf/private.key
Private key file: ~/.cql/private.key
Public key's hex: 025abec9b0072615170f4acf4a2fa1162a13864bb66bc3f140b29f6bf50ceafc75
Generated key pair.
Generating nonce...
Expand All @@ -35,7 +35,7 @@ nonce: {{1450338416 0 0 0} 26 0000002dd8bdb50ba0270642e4c4bc593c1630ef7784653f31
node id: 0000002dd8bdb50ba0270642e4c4bc593c1630ef7784653f311b3c3d6374e514
Generated nonce.
Generating config file...
Generated nonce.
Generated config.
```

有了配置文件之后,可以通过以下 go 代码来初始化 CovenantSQL 客户端:
Expand Down Expand Up @@ -100,4 +100,4 @@ dsn, err = client.Create(meta)

### 完整示例

在以下目录中有一个简单示例和复杂示例可以参考 [示例](https://github.com/CovenantSQL/CovenantSQL/tree/develop/client/_example)
在以下目录中有一个简单示例和复杂示例可以参考 [示例](https://github.com/CovenantSQL/CovenantSQL/tree/develop/client/_example)
10 changes: 5 additions & 5 deletions client/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Make sure that `$GOPATH/bin` is in your `$PATH`

```bash
$ go get github.com/CovenantSQL/CovenantSQL/client
$ go get github.com/CovenantSQL/CovenantSQL/cmd/cql-utils
$ go get github.com/CovenantSQL/CovenantSQL/cmd/cql
```

and import `client` package if you want to use it in your code.
Expand All @@ -18,14 +18,14 @@ You need to provide a config and a master key for initialization. The master key

### Generating Default Config File

Run `cql-utils` like below. Enter a master key (like a password) for generating local key pair. After that, it may take a few seconds with a private key file and config.yaml file generated in `conf` folder.
Run `cql` like below. Enter a master key (like a password) for generating local key pair. After that, it may take a few seconds with a private key file and config.yaml file generated in `~/.cql/` folder.

```bash
$ cql-utils -tool confgen -root conf
$ cql generate config
Generating key pair...
Enter master key(press Enter for default: ""):
Private key file: conf/private.key
Private key file: ~/.cql/private.key
Public key's hex: 025abec9b0072615170f4acf4a2fa1162a13864bb66bc3f140b29f6bf50ceafc75
Generated key pair.
Generating nonce...
Expand All @@ -35,7 +35,7 @@ nonce: {{1450338416 0 0 0} 26 0000002dd8bdb50ba0270642e4c4bc593c1630ef7784653f31
node id: 0000002dd8bdb50ba0270642e4c4bc593c1630ef7784653f311b3c3d6374e514
Generated nonce.
Generating config file...
Generated nonce.
Generated config.
```

After you prepare your master key and config file, CovenantSQL client can be initialized by:
Expand Down
3 changes: 3 additions & 0 deletions client/driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,9 @@ func Drop(dsn string) (txHash hash.Hash, err error) {

peerList.Delete(cfg.DatabaseID)

//TODO(laodouya) currently not supported
//err = errors.New("drop db current not support")

return
}

Expand Down
34 changes: 0 additions & 34 deletions cmd/cql-utils/README-zh.md

This file was deleted.

34 changes: 0 additions & 34 deletions cmd/cql-utils/README.md

This file was deleted.

64 changes: 0 additions & 64 deletions cmd/cql-utils/addrgen.go

This file was deleted.

100 changes: 0 additions & 100 deletions cmd/cql-utils/confgen.go

This file was deleted.

Loading