Begin `create identity`
This commit is contained in:
parent
fb195f72e0
commit
9465c2d898
|
@ -1 +1,2 @@
|
|||
pigeon
|
||||
pigeon
|
||||
pigeon-cli
|
61
README.md
61
README.md
|
@ -2,28 +2,39 @@
|
|||
|
||||
A single executable to manage a Pigeon node.
|
||||
|
||||
- [ ] Finish [learning how Cobra works](WIP)
|
||||
- [ ] Rename all CLI usages to `VERB NOUN --ADJECTIVE`.
|
||||
- [ ] pigeon show help
|
||||
- [ ] pigeon show version
|
||||
- [ ] pigeon-cli create identity
|
||||
- [ ] pigeon-cli show identity
|
||||
- [ ] pigeon show blob
|
||||
- [ ] pigeon blob set -> Pipe
|
||||
- [ ] pigeon blob set -> Path
|
||||
- [ ] pigeon create bundle
|
||||
- [ ] pigeon ingest bundle
|
||||
- [ ] pigeon-cli draft append
|
||||
- [ ] pigeon-cli draft create
|
||||
- [ ] pigeon-cli draft show
|
||||
- [ ] pigeon-cli draft sign
|
||||
- [ ] pigeon-cli message find
|
||||
- [ ] pigeon-cli message find-all
|
||||
- [ ] pigeon-cli message last
|
||||
- [ ] pigeon-cli peer add
|
||||
- [ ] pigeon-cli peer all
|
||||
- [ ] pigeon-cli peer all-blocked
|
||||
- [ ] pigeon-cli peer block
|
||||
- [ ] pigeon-cli peer remove
|
||||
- [ ] pigeon-cli peer remove
|
||||
- [ ] pigeon-cli peer unblock
|
||||
TODO:
|
||||
|
||||
- [ ] Get a real coverage tool going.
|
||||
- [ ] Finish all the things below:
|
||||
|
||||
|Done?|Verb |Noun | Flag / arg 1 | Flag 2 |
|
||||
|-----|------------|--------|---------------|-----------|
|
||||
| |block |peer | user mhash | |
|
||||
| |create |blob | file Path | |
|
||||
| |create |blob | pipe | |
|
||||
| |create |bundle | | |
|
||||
| |create |draft | | |
|
||||
| |create |identity| | |
|
||||
| |find |message | --all | |
|
||||
| |find |message | --last | |
|
||||
| |follow |peer | user mhash | |
|
||||
| |ingest |bundle | | |
|
||||
| |show |blob | | |
|
||||
| |show |draft | | |
|
||||
| |show |identity| | |
|
||||
| |show |message | message mhash | |
|
||||
| |show |peers | | |
|
||||
| |show |peers | --blocked | |
|
||||
| |sign |draft | | |
|
||||
| |unblock |peer | user mhash | |
|
||||
| |unfollow |peer | | |
|
||||
| |update |draft | --key=? | --value=? |
|
||||
| X |help | | | |
|
||||
| X |version | | | |
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -0,0 +1,50 @@
|
|||
package cmd
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
// createCmd represents the create command
|
||||
var createCmd = &cobra.Command{
|
||||
Use: "create",
|
||||
Short: "Create various resources (identity, drafts, blob)",
|
||||
Aliases: []string{"make", "new"},
|
||||
Long: `A longer description that spans multiple lines and likely contains examples
|
||||
and usage of using your command. For example:
|
||||
|
||||
Cobra is a CLI library for Go that empowers applications.
|
||||
This application is a tool to generate the needed files
|
||||
to quickly create a Cobra application.`,
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
fmt.Println("create called")
|
||||
},
|
||||
}
|
||||
|
||||
func init() {
|
||||
rootCmd.AddCommand(createCmd)
|
||||
createCmd.AddCommand(&cobra.Command{
|
||||
Use: "identity",
|
||||
Short: "Create a new identity, I think",
|
||||
Aliases: []string{"id"},
|
||||
Long: `A longer description that spans multiple lines and likely contains examples
|
||||
and usage of using your command. For example:
|
||||
|
||||
Cobra is a CLI library for Go that empowers applications.
|
||||
This application is a tool to generate the needed files
|
||||
to quickly create a Cobra application.`,
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
fmt.Println("create called")
|
||||
},
|
||||
})
|
||||
// Here you will define your flags and configuration settings.
|
||||
|
||||
// Cobra supports Persistent Flags which will work for this command
|
||||
// and all subcommands, e.g.:
|
||||
// createCmd.PersistentFlags().String("foo", "", "A help for foo")
|
||||
|
||||
// Cobra supports local flags which will only run when this command
|
||||
// is called directly, e.g.:
|
||||
// createCmd.Flags().BoolP("toggle", "t", false, "Help message for toggle")
|
||||
}
|
|
@ -14,7 +14,7 @@ var cfgFile string
|
|||
|
||||
// rootCmd represents the base command when called without any subcommands
|
||||
var rootCmd = &cobra.Command{
|
||||
Use: "pigeon",
|
||||
Use: "pigeon-cli",
|
||||
Short: "An off-grid, serverless, peer-to-peer protocol for building software that works on poor internet connections, or entirely offline.",
|
||||
Long: `Pigeon enables offline and off-grid computer systems to exchange messages
|
||||
in a way that is delay tolerant, tamper resistant and easily transmitted
|
||||
|
|
Loading…
Reference in New Issue