Skip to content

Commit

Permalink
update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
TATAUFO committed Mar 15, 2023
1 parent 90209d9 commit 9c78589
Show file tree
Hide file tree
Showing 6 changed files with 49 additions and 16 deletions.
56 changes: 44 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,26 +27,58 @@ PDU是基于点对点的方式构建社交网络服务,系统中所有信息
## Usage

```
Parallel Digital Universe
A decentralized social networking service
Website: https://pdu.pub
Run node daemon
Usage:
pdu [command]
pdu run [loop interval] [flags]
Flags:
-h, --help help for run
--interval int time interval between consecutive processing on node (default 5)
Global Flags:
--fbKeyPath string path of firebase json key (default "udb/fb/test-firebase-adminsdk.json")
--fbProjectID string project ID (default "pdupub-a2bdd")
--projectPath string project root path (default "./")
```

```
Operations on node
Usage:
pdu node [command]
Available Commands:
ck Create keystores
completion Generate the autocompletion script for the specified shell
help Help about any command
send Send sampel msg to node
start Start run node
test Test some methods
backup Backup processed quantums to local
exe Do process quantum once on node
hide Hide processed Quantum in node
judge Judge Individual & Community on your own node
truncate Clear up all data on firebase collections
Flags:
-h, --help help for pdu
-h, --help help for node
Global Flags:
--fbKeyPath string path of firebase json key (default "udb/fb/test-firebase-adminsdk.json")
--fbProjectID string project ID (default "pdupub-a2bdd")
--projectPath string project root path (default "./")
Use "pdu [command] --help" for more information about a command.
Use "pdu node [command] --help" for more information about a command.
```

```
Create and Broadcast Message (For test your own node)
Usage:
pdu msg [flags]
Flags:
-h, --help help for msg
Global Flags:
--fbKeyPath string path of firebase json key (default "udb/fb/test-firebase-adminsdk.json")
--fbProjectID string project ID (default "pdupub-a2bdd")
--projectPath string project root path (default "./")
```


Expand Down
2 changes: 1 addition & 1 deletion cmd/pdu/key.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ var (
func KeyCmd() *cobra.Command {
cmd := &cobra.Command{
Use: "key [keystore_path]",
Short: "Operations on keystores",
Short: "Create keystores (For test)",
Args: cobra.ExactArgs(1),
RunE: func(_ *cobra.Command, args []string) error {
pass, salt, err := getPassAndSalt()
Expand Down
2 changes: 1 addition & 1 deletion cmd/pdu/msg.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ import (
func MsgCmd() *cobra.Command {
cmd := &cobra.Command{
Use: "msg",
Short: "Operations on message",
Short: "Create and Broadcast Message (For test your own node)",
Args: cobra.RangeArgs(0, 1),
RunE: func(_ *cobra.Command, args []string) (err error) {
var currentDID *identity.DID
Expand Down
2 changes: 1 addition & 1 deletion cmd/pdu/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func NodeCmd() *cobra.Command {

cmd := &cobra.Command{
Use: "node",
Short: "Perform some actions on the node",
Short: "Operations on node",
}
cmd.Flags().StringVar(&firebaseKeyPath, "fbKeyPath", params.TestFirebaseAdminSDKPath, "path of firebase json key")
cmd.Flags().StringVar(&firebaseProjectID, "fbProjectID", params.TestFirebaseProjectID, "project ID")
Expand Down
2 changes: 1 addition & 1 deletion cmd/pdu/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ func RunCmd() *cobra.Command {

cmd := &cobra.Command{
Use: "run [loop interval]",
Short: "Start to run node daemon",
Short: "Run node daemon",
Args: cobra.NoArgs,
RunE: func(_ *cobra.Command, args []string) error {

Expand Down
1 change: 1 addition & 0 deletions udb/fb/universe.go
Original file line number Diff line number Diff line change
Expand Up @@ -616,6 +616,7 @@ func (fbu *FBUniverse) HideProcessedQuantum(sig core.Sig) error {
}

// GetQuantums is not belong to interface of core/universe
// this function can be used to backup data by node owner or download data from node by user
func (fbu *FBUniverse) GetQuantums(limit int, skip int, desc bool) ([]*core.Quantum, error) {
var qs []*core.Quantum
quantumQuery := fbu.quantumC.Query.Where("seq", ">", 0)
Expand Down

0 comments on commit 9c78589

Please sign in to comment.