Skip to content

Commit

Permalink
docs: capitalization & colon usage in doc strings
Browse files Browse the repository at this point in the history
  • Loading branch information
dtbuchholz committed Dec 18, 2023
1 parent 27b6ffc commit aeb589a
Showing 1 changed file with 30 additions and 30 deletions.
60 changes: 30 additions & 30 deletions cmd/vaults/commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,43 +45,43 @@ func newVaultCreateCommand() *cli.Command {
Usage: "Create a new vault",
ArgsUsage: "<vault_name>",
Description: "Create a vault for a given account's address as either database streaming " +
"or file uploading. Optionally, also set a cache duration for the data.\n\nExample:\n\n" +
"or file uploading. Optionally, also set a cache duration for the data.\n\nEXAMPLE:\n\n" +
"vaults create --account 0x1234abcd --cache 10 my.vault",
Flags: []cli.Flag{
&cli.StringFlag{
Name: "account",
Aliases: []string{"a"},
Category: "REQUIRED",
Category: "REQUIRED:",
Usage: "Ethereum wallet address",
Destination: &address,
Required: true,
},
&cli.StringFlag{
Name: "provider",
Aliases: []string{"p"},
Category: "OPTIONAL",
Category: "OPTIONAL:",
Usage: "The provider's address and port (e.g., localhost:8080)",
DefaultText: DefaultProviderHost,
Destination: &provider,
Value: DefaultProviderHost,
},
&cli.Int64Flag{
Name: "cache",
Category: "OPTIONAL",
Category: "OPTIONAL:",
Usage: "Time duration (in minutes) that the data will be available in the cache",
DefaultText: "0",
Destination: &cache,
Value: 0,
},
&cli.StringFlag{
Name: "dburi",
Category: "OPTIONAL",
Category: "OPTIONAL:",
Usage: "PostgreSQL connection string (e.g., postgresql://postgres:[PASSWORD]@[HOST]:[PORT]/postgres)",
Destination: &dburi,
},
&cli.Int64Flag{
Name: "window-size",
Category: "OPTIONAL",
Category: "OPTIONAL:",
Usage: "Number of seconds for which WAL updates are buffered before being sent to the provider",
DefaultText: fmt.Sprintf("%d", DefaultWindowSize),
Destination: &winSize,
Expand Down Expand Up @@ -169,13 +169,13 @@ func newStreamCommand() *cli.Command {
ArgsUsage: "<vault_name>",
Description: "The daemon will continuously stream database changes " +
"(except deletions) to the vault, as long as the daemon is actively running.\n\n" +
"Example:\n\nvaults stream --vault my.vault --private-key 0x1234abcd",
"EXAMPLE:\n\nvaults stream --vault my.vault --private-key 0x1234abcd",

Flags: []cli.Flag{
&cli.StringFlag{
Name: "private-key",
Aliases: []string{"k"},
Category: "REQUIRED",
Category: "REQUIRED:",
Usage: "Ethereum wallet private key",
Destination: &privateKey,
Required: true,
Expand Down Expand Up @@ -275,28 +275,28 @@ func newWriteCommand() *cli.Command {
Usage: "Write a Parquet file",
ArgsUsage: "<file_path>",
Description: "A Parquet file can be pushed directly to the vault, as an " +
"alternative to continuous Postgres data streaming.\n\nExample:\n\n" +
"alternative to continuous Postgres data streaming.\n\nEXAMPLE:\n\n" +
"vaults write --vault my.vault --private-key 0x1234abcd /path/to/file.parquet",
Flags: []cli.Flag{
&cli.StringFlag{
Name: "private-key",
Aliases: []string{"k"},
Category: "REQUIRED",
Category: "REQUIRED:",
Usage: "Ethereum wallet private key",
Destination: &privateKey,
Required: true,
},
&cli.StringFlag{
Name: "vault",
Aliases: []string{"v"},
Category: "REQUIRED",
Category: "REQUIRED:",
Usage: "Vault name",
Destination: &vaultName,
Required: true,
},
&cli.StringFlag{
Name: "timestamp",
Category: "OPTIONAL",
Category: "OPTIONAL:",
Usage: "The time the file was created",
DefaultText: "current epoch in UTC",
Destination: &timestamp,
Expand Down Expand Up @@ -375,29 +375,29 @@ func newListCommand() *cli.Command {
Usage: "List vaults of a given account",
Description: "Listing vaults will show all vaults that have been created by " +
"the provided account's address and logged as either line " +
"delimited text or a json array.\n\nExample:\n\n" +
"delimited text or a json array.\n\nEXAMPLE:\n\n" +
"vaults list --account 0x1234abcd --format json",
Flags: []cli.Flag{
&cli.StringFlag{
Name: "account",
Aliases: []string{"a"},
Category: "REQUIRED",
Category: "REQUIRED:",
Usage: "Ethereum wallet address",
Destination: &address,
Required: true,
},
&cli.StringFlag{
Name: "provider",
Aliases: []string{"p"},
Category: "OPTIONAL",
Category: "OPTIONAL:",
Usage: "The provider's address and port (e.g., localhost:8080)",
DefaultText: DefaultProviderHost,
Destination: &provider,
Value: DefaultProviderHost,
},
&cli.StringFlag{
Name: "format",
Category: "OPTIONAL",
Category: "OPTIONAL:",
Usage: "The output format (text or json)",
DefaultText: "text",
Destination: &format,
Expand Down Expand Up @@ -445,73 +445,73 @@ func newListEventsCommand() *cli.Command {
UsageText: "vaults events [command options]",
Description: "Vault events can be filtered by date ranges (unix, ISO 8601 " +
"date, or ISO 8601 date & time), returning the event metadata and " +
"corresponding CID.\n\nExample:\n\nvaults events --vault my.vault \\\n" +
"corresponding CID.\n\nEXAMPLE:\n\nvaults events --vault my.vault \\\n" +
"--limit 10 --offset 3 \\\n--after 2023-09-01 --before 2023-12-01 \\\n" +
"--format json",
Flags: []cli.Flag{
&cli.StringFlag{
Name: "vault",
Aliases: []string{"v"},
Category: "REQUIRED",
Category: "REQUIRED:",
Usage: "Vault name",
Destination: &vault,
Required: true,
},
&cli.StringFlag{
Name: "provider",
Aliases: []string{"p"},
Category: "OPTIONAL",
Category: "OPTIONAL:",
Usage: "The provider's address and port (e.g., localhost:8080)",
DefaultText: DefaultProviderHost,
Destination: &provider,
Value: DefaultProviderHost,
},
&cli.IntFlag{
Name: "limit",
Category: "OPTIONAL",
Category: "OPTIONAL:",
Usage: "The number of deals to fetch",
DefaultText: "10",
Destination: &limit,
Value: 10,
},
&cli.IntFlag{
Name: "latest",
Category: "OPTIONAL",
Category: "OPTIONAL:",
Usage: "The latest N deals to fetch",
Destination: &latest,
},
&cli.IntFlag{
Name: "offset",
Category: "OPTIONAL",
Category: "OPTIONAL:",
Usage: "The epoch to start from",
DefaultText: "0",
Destination: &offset,
Value: 0,
},
&cli.StringFlag{
Name: "before",
Category: "OPTIONAL",
Category: "OPTIONAL:",
Usage: "Filter deals created before this timestamp",
Destination: &before,
Value: "",
},
&cli.StringFlag{
Name: "after",
Category: "OPTIONAL",
Category: "OPTIONAL:",
Usage: "Filter deals created after this timestamp",
Destination: &after,
Value: "",
},
&cli.StringFlag{
Name: "at",
Category: "OPTIONAL",
Category: "OPTIONAL:",
Usage: "Filter deals created at this timestamp",
Destination: &at,
Value: "",
},
&cli.StringFlag{
Name: "format",
Category: "OPTIONAL",
Category: "OPTIONAL:",
Usage: "The output format (table or json)",
DefaultText: "table",
Destination: &format,
Expand Down Expand Up @@ -603,13 +603,13 @@ func newRetrieveCommand() *cli.Command {
Usage: "Retrieve an event by CID",
ArgsUsage: "<event_cid>",
Description: "Retrieving an event will download the event's CAR file into the " +
"current directory, a provided directory path, or to stdout.\n\nExample:\n\n" +
"current directory, a provided directory path, or to stdout.\n\nEXAMPLE:\n\n" +
"vaults retrieve --output /path/to/dir bafy...",
Flags: []cli.Flag{
&cli.StringFlag{
Name: "output",
Aliases: []string{"o"},
Category: "OPTIONAL",
Category: "OPTIONAL:",
Usage: "Output directory path, or '-' for stdout",
DefaultText: "current directory",
Destination: &output,
Expand Down Expand Up @@ -711,7 +711,7 @@ func newWalletCommand() *cli.Command {
Usage: "Creates a new account",
UsageText: "vaults account create <file_path>",
Description: "Create an Ethereum-style wallet (secp256k1 key pair) at a " +
"provided file path.\n\nExample:\n\nvaults account create /path/to/file",
"provided file path.\n\nEXAMPLE:\n\nvaults account create /path/to/file",
Action: func(cCtx *cli.Context) error {
filename := cCtx.Args().Get(0)
if filename == "" {
Expand Down Expand Up @@ -741,7 +741,7 @@ func newWalletCommand() *cli.Command {
UsageText: "vaults account address <file_path>",
Description: "The result of the `vaults account create` command will write a " +
"private key to a file, and this lets you retrieve that value for " +
"use in other commands.\n\nExample:\n\nvaults account address /path/to/file",
"use in other commands.\n\nEXAMPLE:\n\nvaults account address /path/to/file",
Action: func(cCtx *cli.Context) error {
filename := cCtx.Args().Get(0)
if filename == "" {
Expand Down

0 comments on commit aeb589a

Please sign in to comment.