Skip to content

Commit

Permalink
docs: Clarify meaning of url param, update in-repo CLI docs (#814)
Browse files Browse the repository at this point in the history
  • Loading branch information
orpheuslummis authored Sep 18, 2022
1 parent f294f19 commit eccd4aa
Show file tree
Hide file tree
Showing 18 changed files with 56 additions and 23 deletions.
2 changes: 1 addition & 1 deletion cli/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ func init() {

rootCmd.PersistentFlags().String(
"url", cfg.API.Address,
"URL of the target database's HTTP endpoint",
"URL of HTTP endpoint to listen on or connect to",
)
err = viper.BindPFlag("api.address", rootCmd.PersistentFlags().Lookup("url"))
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion config/configfile.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ datastore:
# size: {{ .Datastore.Memory.Size }}
api:
# Listening address of the (HTTP API) GraphQL query endpoint
# Address of the HTTP API to listen on or connect to
address: {{ .API.Address }}
net:
Expand Down
2 changes: 1 addition & 1 deletion docs/cli/defradb.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ See https://docs.source.network/BSL.txt for more information.
--logoutput string Log output path (default "stderr")
--logtrace Include stacktrace in error and fatal logs
--rootdir string Directory for data and configuration to use (default "$HOME/.defradb")
--url string URL of the target database's HTTP endpoint (default "localhost:9181")
--url string URL of HTTP endpoint to listen on or connect to (default "localhost:9181")
```

### SEE ALSO
Expand Down
3 changes: 2 additions & 1 deletion docs/cli/defradb_client.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,15 @@ Execute queries, add schema types, and run debug routines.
--logoutput string Log output path (default "stderr")
--logtrace Include stacktrace in error and fatal logs
--rootdir string Directory for data and configuration to use (default "$HOME/.defradb")
--url string URL of the target database's HTTP endpoint (default "localhost:9181")
--url string URL of HTTP endpoint to listen on or connect to (default "localhost:9181")
```

### SEE ALSO

* [defradb](defradb.md) - DefraDB Edge Database
* [defradb client blocks](defradb_client_blocks.md) - Interact with the database's blockstore
* [defradb client dump](defradb_client_dump.md) - Dump the contents of a database node-side
* [defradb client peerid](defradb_client_peerid.md) - Get the peer ID of the DefraDB node
* [defradb client ping](defradb_client_ping.md) - Ping to test connection to a node
* [defradb client query](defradb_client_query.md) - Send a DefraDB GraphQL query
* [defradb client rpc](defradb_client_rpc.md) - Interact with a DefraDB gRPC server
Expand Down
2 changes: 1 addition & 1 deletion docs/cli/defradb_client_blocks.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Interact with the database's blockstore
--logoutput string Log output path (default "stderr")
--logtrace Include stacktrace in error and fatal logs
--rootdir string Directory for data and configuration to use (default "$HOME/.defradb")
--url string URL of the target database's HTTP endpoint (default "localhost:9181")
--url string URL of HTTP endpoint to listen on or connect to (default "localhost:9181")
```

### SEE ALSO
Expand Down
2 changes: 1 addition & 1 deletion docs/cli/defradb_client_blocks_get.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ defradb client blocks get [CID] [flags]
--logoutput string Log output path (default "stderr")
--logtrace Include stacktrace in error and fatal logs
--rootdir string Directory for data and configuration to use (default "$HOME/.defradb")
--url string URL of the target database's HTTP endpoint (default "localhost:9181")
--url string URL of HTTP endpoint to listen on or connect to (default "localhost:9181")
```

### SEE ALSO
Expand Down
2 changes: 1 addition & 1 deletion docs/cli/defradb_client_dump.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ defradb client dump [flags]
--logoutput string Log output path (default "stderr")
--logtrace Include stacktrace in error and fatal logs
--rootdir string Directory for data and configuration to use (default "$HOME/.defradb")
--url string URL of the target database's HTTP endpoint (default "localhost:9181")
--url string URL of HTTP endpoint to listen on or connect to (default "localhost:9181")
```

### SEE ALSO
Expand Down
31 changes: 31 additions & 0 deletions docs/cli/defradb_client_peerid.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
## defradb client peerid

Get the peer ID of the DefraDB node

```
defradb client peerid [flags]
```

### Options

```
-h, --help help for peerid
```

### Options inherited from parent commands

```
--logformat string Log format to use. Options are csv, json (default "csv")
--logger stringArray Override logger parameters. Usage: --logger <name>,level=<level>,output=<output>,...
--loglevel string Log level to use. Options are debug, info, error, fatal (default "info")
--lognocolor Disable colored log output
--logoutput string Log output path (default "stderr")
--logtrace Include stacktrace in error and fatal logs
--rootdir string Directory for data and configuration to use (default "$HOME/.defradb")
--url string URL of HTTP endpoint to listen on or connect to (default "localhost:9181")
```

### SEE ALSO

* [defradb client](defradb_client.md) - Interact with a running DefraDB node as a client

2 changes: 1 addition & 1 deletion docs/cli/defradb_client_ping.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ defradb client ping [flags]
--logoutput string Log output path (default "stderr")
--logtrace Include stacktrace in error and fatal logs
--rootdir string Directory for data and configuration to use (default "$HOME/.defradb")
--url string URL of the target database's HTTP endpoint (default "localhost:9181")
--url string URL of HTTP endpoint to listen on or connect to (default "localhost:9181")
```

### SEE ALSO
Expand Down
2 changes: 1 addition & 1 deletion docs/cli/defradb_client_query.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ defradb client query [query] [flags]
--logoutput string Log output path (default "stderr")
--logtrace Include stacktrace in error and fatal logs
--rootdir string Directory for data and configuration to use (default "$HOME/.defradb")
--url string URL of the target database's HTTP endpoint (default "localhost:9181")
--url string URL of HTTP endpoint to listen on or connect to (default "localhost:9181")
```

### SEE ALSO
Expand Down
2 changes: 1 addition & 1 deletion docs/cli/defradb_client_rpc.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Interact with a DefraDB gRPC server.
--logoutput string Log output path (default "stderr")
--logtrace Include stacktrace in error and fatal logs
--rootdir string Directory for data and configuration to use (default "$HOME/.defradb")
--url string URL of the target database's HTTP endpoint (default "localhost:9181")
--url string URL of HTTP endpoint to listen on or connect to (default "localhost:9181")
```

### SEE ALSO
Expand Down
2 changes: 1 addition & 1 deletion docs/cli/defradb_client_rpc_addreplicator.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ defradb client rpc addreplicator <collection> <peer> [flags]
--logoutput string Log output path (default "stderr")
--logtrace Include stacktrace in error and fatal logs
--rootdir string Directory for data and configuration to use (default "$HOME/.defradb")
--url string URL of the target database's HTTP endpoint (default "localhost:9181")
--url string URL of HTTP endpoint to listen on or connect to (default "localhost:9181")
```

### SEE ALSO
Expand Down
2 changes: 1 addition & 1 deletion docs/cli/defradb_client_schema.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Make changes, updates, or look for existing schema types to a DefraDB node.
--logoutput string Log output path (default "stderr")
--logtrace Include stacktrace in error and fatal logs
--rootdir string Directory for data and configuration to use (default "$HOME/.defradb")
--url string URL of the target database's HTTP endpoint (default "localhost:9181")
--url string URL of HTTP endpoint to listen on or connect to (default "localhost:9181")
```

### SEE ALSO
Expand Down
2 changes: 1 addition & 1 deletion docs/cli/defradb_client_schema_add.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ defradb client schema add [schema] [flags]
--logoutput string Log output path (default "stderr")
--logtrace Include stacktrace in error and fatal logs
--rootdir string Directory for data and configuration to use (default "$HOME/.defradb")
--url string URL of the target database's HTTP endpoint (default "localhost:9181")
--url string URL of HTTP endpoint to listen on or connect to (default "localhost:9181")
```

### SEE ALSO
Expand Down
2 changes: 1 addition & 1 deletion docs/cli/defradb_init.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ defradb init [rootdir] [flags]
--logoutput string Log output path (default "stderr")
--logtrace Include stacktrace in error and fatal logs
--rootdir string Directory for data and configuration to use (default "$HOME/.defradb")
--url string URL of the target database's HTTP endpoint (default "localhost:9181")
--url string URL of HTTP endpoint to listen on or connect to (default "localhost:9181")
```

### SEE ALSO
Expand Down
2 changes: 1 addition & 1 deletion docs/cli/defradb_server-dump.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ defradb server-dump [flags]
--logoutput string Log output path (default "stderr")
--logtrace Include stacktrace in error and fatal logs
--rootdir string Directory for data and configuration to use (default "$HOME/.defradb")
--url string URL of the target database's HTTP endpoint (default "localhost:9181")
--url string URL of HTTP endpoint to listen on or connect to (default "localhost:9181")
```

### SEE ALSO
Expand Down
15 changes: 8 additions & 7 deletions docs/cli/defradb_start.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,13 @@ defradb start [flags]
### Options

```
-h, --help help for start
--no-p2p Disable the peer-to-peer network synchronization system
--p2paddr string Listener address for the p2p network (formatted as a libp2p MultiAddr) (default "/ip4/0.0.0.0/tcp/9171")
--peers string List of peers to connect to
--store string Specify the datastore to use (supported: badger, memory) (default "badger")
--tcpaddr string Listener address for the tcp gRPC server (formatted as a libp2p MultiAddr) (default "/ip4/0.0.0.0/tcp/9161")
-h, --help help for start
--no-p2p Disable the peer-to-peer network synchronization system
--p2paddr string Listener address for the p2p network (formatted as a libp2p MultiAddr) (default "/ip4/0.0.0.0/tcp/9171")
--peers string List of peers to connect to
--store string Specify the datastore to use (supported: badger, memory) (default "badger")
--tcpaddr string Listener address for the tcp gRPC server (formatted as a libp2p MultiAddr) (default "/ip4/0.0.0.0/tcp/9161")
--valuelogfilesize ByteSize Specify the datastore value log file size (in bytes). In memory size will be 2*valuelogfilesize (default 1GiB)
```

### Options inherited from parent commands
Expand All @@ -31,7 +32,7 @@ defradb start [flags]
--logoutput string Log output path (default "stderr")
--logtrace Include stacktrace in error and fatal logs
--rootdir string Directory for data and configuration to use (default "$HOME/.defradb")
--url string URL of the target database's HTTP endpoint (default "localhost:9181")
--url string URL of HTTP endpoint to listen on or connect to (default "localhost:9181")
```

### SEE ALSO
Expand Down
2 changes: 1 addition & 1 deletion docs/cli/defradb_version.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ defradb version [flags]
--logoutput string Log output path (default "stderr")
--logtrace Include stacktrace in error and fatal logs
--rootdir string Directory for data and configuration to use (default "$HOME/.defradb")
--url string URL of the target database's HTTP endpoint (default "localhost:9181")
--url string URL of HTTP endpoint to listen on or connect to (default "localhost:9181")
```

### SEE ALSO
Expand Down

0 comments on commit eccd4aa

Please sign in to comment.