Skip to content

Commit 46429dd

Browse files
OnsagerHealbert VALENTINremyleone
authored
feat(labs): labs commands group with ipfs command (#3381)
Co-authored-by: albert VALENTIN <[email protected]> Co-authored-by: Rémy Léone <[email protected]>
1 parent 95493b9 commit 46429dd

23 files changed

+690
-58
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
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 ipfs name
7+
8+
FLAGS:
9+
-h, --help help for name
10+
11+
GLOBAL FLAGS:
12+
-c, --config string The path to the config file
13+
-D, --debug Enable debug mode
14+
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
15+
-p, --profile string The config profile to use
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
2+
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3+
Will fetch and store the content pointed by the provided CID. The content must be available on the public IPFS network.
4+
The content (IPFS blocks) will be host by the pinning service until pin deletion.
5+
From that point, any other IPFS peer can fetch and host your content: Make sure to pin public or encrypted content.
6+
Many pin requests (from different users) can target the same CID.
7+
A pin is defined by its ID (UUID), its status (queued, pinning, pinned or failed) and target CID.
8+
9+
USAGE:
10+
scw ipfs pin create-by-cid [arg=value ...]
11+
12+
ARGS:
13+
volume-id Volume Id on which you wish to pin your content
14+
cid Cid whose content you wish to pin
15+
[origins.{index}] Node containing the content you wish to pin
16+
[name] Pin name
17+
[pin-options.required-zones.{index}]
18+
[pin-options.replication-count]
19+
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw)
20+
21+
FLAGS:
22+
-h, --help help for create-by-cid
23+
24+
GLOBAL FLAGS:
25+
-c, --config string The path to the config file
26+
-D, --debug Enable debug mode
27+
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
28+
-p, --profile string The config profile to use
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
2+
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3+
Will fetch and store the content pointed by the provided URL. The content must be available on the public IPFS network.
4+
The content (IPFS blocks) will be host by the pinning service until pin deletion.
5+
From that point, any other IPFS peer can fetch and host your content: Make sure to pin public or encrypted content.
6+
Many pin requests (from different users) can target the same CID.
7+
A pin is defined by its ID (UUID), its status (queued, pinning, pinned or failed) and target CID.
8+
9+
USAGE:
10+
scw ipfs pin create-by-url [arg=value ...]
11+
12+
ARGS:
13+
volume-id Volume Id on which you wish to pin your content
14+
url Url whose content you wish to pin
15+
[name] Pin name
16+
[pin-options.required-zones.{index}]
17+
[pin-options.replication-count]
18+
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw)
19+
20+
FLAGS:
21+
-h, --help help for create-by-url
22+
23+
GLOBAL FLAGS:
24+
-c, --config string The path to the config file
25+
-D, --debug Enable debug mode
26+
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
27+
-p, --profile string The config profile to use
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
version: 1
3+
interactions:
4+
- request:
5+
body: '{"message":"authentication is denied","method":"api_key","reason":"not_found","type":"denied_authentication"}'
6+
form: {}
7+
headers:
8+
User-Agent:
9+
- scaleway-sdk-go/v1.0.0-beta.7+dev (go1.21.1; linux; amd64) cli-e2e-test
10+
url: https://api.scaleway.com/iam/v1alpha1/api-keys/SCWXXXXXXXXXXXXXXXXX
11+
method: GET
12+
response:
13+
body: '{"message":"authentication is denied","method":"api_key","reason":"not_found","type":"denied_authentication"}'
14+
headers:
15+
Content-Length:
16+
- "109"
17+
Content-Security-Policy:
18+
- default-src 'none'; frame-ancestors 'none'
19+
Content-Type:
20+
- application/json
21+
Date:
22+
- Fri, 22 Sep 2023 12:00:05 GMT
23+
Server:
24+
- Scaleway API-Gateway
25+
Strict-Transport-Security:
26+
- max-age=63072000
27+
X-Content-Type-Options:
28+
- nosniff
29+
X-Frame-Options:
30+
- DENY
31+
X-Request-Id:
32+
- 094580b1-5e61-4598-b1c4-00d874b0f780
33+
status: 401 Unauthorized
34+
code: 401
35+
duration: ""
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+
An unpin request means that you no longer own the content.
4+
This content can therefore be removed and no longer provided on the IPFS network.
5+
6+
USAGE:
7+
scw ipfs pin delete [arg=value ...]
8+
9+
ARGS:
10+
[volume-id] Volume id
11+
pin-id Pin id you wish to remove from the volume
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 delete
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: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
version: 1
3+
interactions:
4+
- request:
5+
body: '{"message":"authentication is denied","method":"api_key","reason":"not_found","type":"denied_authentication"}'
6+
form: {}
7+
headers:
8+
User-Agent:
9+
- scaleway-sdk-go/v1.0.0-beta.7+dev (go1.21.2; linux; amd64) cli-e2e-test
10+
url: https://api.scaleway.com/iam/v1alpha1/api-keys/SCWXXXXXXXXXXXXXXXXX
11+
method: GET
12+
response:
13+
body: '{"message":"authentication is denied","method":"api_key","reason":"not_found","type":"denied_authentication"}'
14+
headers:
15+
Content-Length:
16+
- "109"
17+
Content-Security-Policy:
18+
- default-src 'none'; frame-ancestors 'none'
19+
Content-Type:
20+
- application/json
21+
Date:
22+
- Wed, 11 Oct 2023 15:35:41 GMT
23+
Server:
24+
- Scaleway API-Gateway
25+
Strict-Transport-Security:
26+
- max-age=63072000
27+
X-Content-Type-Options:
28+
- nosniff
29+
X-Frame-Options:
30+
- DENY
31+
X-Request-Id:
32+
- 51c3c629-50a5-440a-aaa2-370fc1f491a4
33+
status: 401 Unauthorized
34+
code: 401
35+
duration: ""
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+
Retrieve information about the provided **pin ID**, such as status, last modification, and CID.
4+
5+
USAGE:
6+
scw ipfs pin get [arg=value ...]
7+
8+
ARGS:
9+
[volume-id] Volume id
10+
pin-id Pin id for which you wish to obtain information
11+
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw)
12+
13+
FLAGS:
14+
-h, --help help for get
15+
16+
GLOBAL FLAGS:
17+
-c, --config string The path to the config file
18+
-D, --debug Enable debug mode
19+
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
20+
-p, --profile string The config profile to use
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
2+
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3+
Retrieve information about all pins within a volume.
4+
5+
USAGE:
6+
scw ipfs pin list [arg=value ...]
7+
8+
ARGS:
9+
volume-id Volume ID for which you wish to list the pins
10+
[project-id] Project id
11+
[order-by] Sort order of the returned Volume (created_at_asc | created_at_desc)
12+
[status] List pins by status (unknown_status | queued | pinning | failed | pinned)
13+
[organization-id] Organization id
14+
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw | all)
15+
16+
FLAGS:
17+
-h, --help help for list
18+
19+
GLOBAL FLAGS:
20+
-c, --config string The path to the config file
21+
-D, --debug Enable debug mode
22+
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
23+
-p, --profile string The config profile to use
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
2+
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3+
It is possible that many pins target the same CID, regardless of the user.
4+
5+
USAGE:
6+
scw ipfs pin <command>
7+
8+
AVAILABLE COMMANDS:
9+
create-by-cid Create a pin by CID
10+
create-by-url Create a pin by URL
11+
delete Create an unpin request
12+
get Get pin information
13+
list List all pins within a volume
14+
15+
FLAGS:
16+
-h, --help help for pin
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
23+
24+
Use "scw ipfs pin [command] --help" for more information about a command.
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+
IPFS Pinning service API.
4+
5+
USAGE:
6+
scw ipfs <command>
7+
8+
AVAILABLE COMMANDS:
9+
name A name is a hash of the public key within the IPNS (InterPlanetary Name System)
10+
pin A pin is an abstract object that holds a Content Identifier (CID). It is defined that during the lifespan of a pin, the CID (and all sub-CIDs) must be hosted by the service
11+
volume A volume is bucket of pins. It is similar to an Object Storage bucket. Volumes are useful to gather pins with similar lifespans
12+
13+
FLAGS:
14+
-h, --help help for ipfs
15+
16+
GLOBAL FLAGS:
17+
-c, --config string The path to the config file
18+
-D, --debug Enable debug mode
19+
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
20+
-p, --profile string The config profile to use
21+
22+
Use "scw ipfs [command] --help" for more information about a command.

0 commit comments

Comments
 (0)