Skip to content

Commit c87d760

Browse files
authored
feat(ipfs): add ipns commands (#3458)
1 parent 6e61abe commit c87d760

21 files changed

+710
-18
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
2+
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3+
You can use the `ipns key` command to list and generate more names and their respective keys.
4+
5+
USAGE:
6+
scw ipns name create [arg=value ...]
7+
8+
ARGS:
9+
[project-id] Project ID to use. If none is passed the default project ID will be used
10+
[name] Name for your records
11+
[value] Value you want to associate with your records, CID or IPNS key
12+
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw)
13+
14+
FLAGS:
15+
-h, --help help for create
16+
17+
GLOBAL FLAGS:
18+
-c, --config string The path to the config file
19+
-D, --debug Enable debug mode
20+
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
21+
-p, --profile string The config profile to use
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
2+
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3+
Delete a name by its ID.
4+
5+
USAGE:
6+
scw ipns name delete [arg=value ...]
7+
8+
ARGS:
9+
name-id Name ID you wish to delete
10+
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw)
11+
12+
FLAGS:
13+
-h, --help help for delete
14+
15+
GLOBAL FLAGS:
16+
-c, --config string The path to the config file
17+
-D, --debug Enable debug mode
18+
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
19+
-p, --profile string The config profile to use
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
2+
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3+
Export a private key by its ID.
4+
5+
USAGE:
6+
scw ipns name export-key [arg=value ...]
7+
8+
ARGS:
9+
name-id Name ID whose keys you want to export
10+
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw)
11+
12+
FLAGS:
13+
-h, --help help for export-key
14+
15+
GLOBAL FLAGS:
16+
-c, --config string The path to the config file
17+
-D, --debug Enable debug mode
18+
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
19+
-p, --profile string The config profile to use
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
2+
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3+
Retrieve information about a specific name.
4+
5+
USAGE:
6+
scw ipns name get [arg=value ...]
7+
8+
ARGS:
9+
name-id Name ID whose information you want to retrieve
10+
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw)
11+
12+
FLAGS:
13+
-h, --help help for get
14+
15+
GLOBAL FLAGS:
16+
-c, --config string The path to the config file
17+
-D, --debug Enable debug mode
18+
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
19+
-p, --profile string The config profile to use
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
2+
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3+
Import a private key.
4+
5+
USAGE:
6+
scw ipns name import-key [arg=value ...]
7+
8+
ARGS:
9+
[project-id] Project ID to use. If none is passed the default project ID will be used
10+
[name] Name for your records
11+
private-key Base64 private key
12+
[value] Value you want to associate with your records, CID or IPNS key
13+
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw)
14+
15+
FLAGS:
16+
-h, --help help for import-key
17+
18+
GLOBAL FLAGS:
19+
-c, --config string The path to the config file
20+
-D, --debug Enable debug mode
21+
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
22+
-p, --profile string The config profile to use
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
2+
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3+
Retrieve information about all names from a Project ID.
4+
5+
USAGE:
6+
scw ipns name list [arg=value ...]
7+
8+
ARGS:
9+
[project-id] Project ID
10+
[order-by] Sort the order of the returned names (created_at_asc | created_at_desc)
11+
[organization-id] Organization ID
12+
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw | all)
13+
14+
FLAGS:
15+
-h, --help help for list
16+
17+
GLOBAL FLAGS:
18+
-c, --config string The path to the config file
19+
-D, --debug Enable debug mode
20+
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
21+
-p, --profile string The config profile to use
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
2+
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3+
Update name information (CID, tag, name...).
4+
5+
USAGE:
6+
scw ipns name update [arg=value ...]
7+
8+
ARGS:
9+
name-id Name ID you wish to update
10+
[name] New name you want to associate with your record
11+
[tags.{index}] New tags you want to associate with your record
12+
[value] Value you want to associate with your records, CID or IPNS key
13+
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw)
14+
15+
FLAGS:
16+
-h, --help help for update
17+
18+
GLOBAL FLAGS:
19+
-c, --config string The path to the config file
20+
-D, --debug Enable debug mode
21+
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
22+
-p, --profile string The config profile to use
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
2+
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3+
This is the PKI namespace, where the private key is used to publish (sign) a record.
4+
5+
USAGE:
6+
scw ipns name <command>
7+
8+
AVAILABLE COMMANDS:
9+
create Create a new name
10+
delete Delete an existing name
11+
export-key Export your private key
12+
get Get information about a name
13+
import-key Import your private key
14+
list List all names by a Project ID
15+
update Update name information
16+
17+
FLAGS:
18+
-h, --help help for name
19+
20+
GLOBAL FLAGS:
21+
-c, --config string The path to the config file
22+
-D, --debug Enable debug mode
23+
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
24+
-p, --profile string The config profile to use
25+
26+
Use "scw ipns name [command] --help" for more information about a command.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
2+
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3+
IPFS Naming service API
4+
5+
USAGE:
6+
scw ipns <command>
7+
8+
AVAILABLE COMMANDS:
9+
name A name is a hash of the public key within the IPNS (InterPlanetary Name System)
10+
11+
FLAGS:
12+
-h, --help help for ipns
13+
14+
GLOBAL FLAGS:
15+
-c, --config string The path to the config file
16+
-D, --debug Enable debug mode
17+
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
18+
-p, --profile string The config profile to use
19+
20+
Use "scw ipns [command] --help" for more information about a command.

cmd/scw/testdata/test-main-usage-usage.golden

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ AVAILABLE COMMANDS:
1919
iam IAM API
2020
instance Instance API
2121
iot This API allows you to manage IoT hubs and devices
22+
ipns IPFS Naming service API
2223
k8s Kubernetes API
2324
lb This API allows you to manage your Scaleway Load Balancer services
2425
marketplace Marketplace API

0 commit comments

Comments
 (0)