Skip to content

Commit bd3eb3e

Browse files
committed
index sample command
1 parent 395bc47 commit bd3eb3e

File tree

11 files changed

+1180
-861
lines changed

11 files changed

+1180
-861
lines changed

api/api_curio.go

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ import (
55
"net/http"
66
"net/url"
77

8+
"github.com/ipfs/go-cid"
9+
"github.com/multiformats/go-multihash"
10+
811
"github.com/filecoin-project/go-address"
912
"github.com/filecoin-project/go-state-types/abi"
1013

@@ -20,11 +23,12 @@ type Curio interface {
2023
// MethodGroup: Curio
2124
//The common method group contains administration methods
2225

23-
Version(context.Context) ([]int, error) //perm:admin
24-
Shutdown(context.Context) error //perm:admin
25-
Cordon(context.Context) error //perm:admin
26-
Uncordon(context.Context) error //perm:admin
27-
Info(ctx context.Context) (*ltypes.NodeInfo, error) //perm:read
26+
Version(context.Context) ([]int, error) //perm:admin
27+
Shutdown(context.Context) error //perm:admin
28+
Cordon(context.Context) error //perm:admin
29+
Uncordon(context.Context) error //perm:admin
30+
Info(ctx context.Context) (*ltypes.NodeInfo, error) //perm:read
31+
IndexSamples(ctx context.Context, pcid cid.Cid) ([]multihash.Multihash, error) //perm:admin
2832

2933
// MethodGroup: Deal
3034
//The deal method group contains method for adding deals to sector

api/proxy_gen.go

Lines changed: 14 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/openrpc/curio.json

Lines changed: 83 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@
312312
"deprecated": false,
313313
"externalDocs": {
314314
"description": "Github remote link",
315-
"url": "https://github.com/filecoin-project/curio/blob/master/api/proxy_gen.go#L333"
315+
"url": "https://github.com/filecoin-project/curio/blob/master/api/proxy_gen.go#L337"
316316
}
317317
},
318318
{
@@ -335,7 +335,72 @@
335335
"deprecated": false,
336336
"externalDocs": {
337337
"description": "Github remote link",
338-
"url": "https://github.com/filecoin-project/curio/blob/master/api/proxy_gen.go#L344"
338+
"url": "https://github.com/filecoin-project/curio/blob/master/api/proxy_gen.go#L348"
339+
}
340+
},
341+
{
342+
"name": "Filecoin.IndexSamples",
343+
"description": "```go\nfunc (s *CurioStruct) IndexSamples(p0 context.Context, p1 cid.Cid) ([]multihash.Multihash, error) {\n\tif s.Internal.IndexSamples == nil {\n\t\treturn *new([]multihash.Multihash), ErrNotSupported\n\t}\n\treturn s.Internal.IndexSamples(p0, p1)\n}\n```",
344+
"summary": "",
345+
"paramStructure": "by-position",
346+
"params": [
347+
{
348+
"name": "p1",
349+
"description": "cid.Cid",
350+
"summary": "",
351+
"schema": {
352+
"title": "Content Identifier",
353+
"description": "Cid represents a self-describing content addressed identifier. It is formed by a Version, a Codec (which indicates a multicodec-packed content type) and a Multihash.",
354+
"examples": [
355+
{
356+
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
357+
}
358+
],
359+
"type": [
360+
"string"
361+
]
362+
},
363+
"required": true,
364+
"deprecated": false
365+
}
366+
],
367+
"result": {
368+
"name": "[]multihash.Multihash",
369+
"description": "[]multihash.Multihash",
370+
"summary": "",
371+
"schema": {
372+
"examples": [
373+
[
374+
"Bw=="
375+
]
376+
],
377+
"items": [
378+
{
379+
"items": [
380+
{
381+
"title": "number",
382+
"description": "Number is a number",
383+
"type": [
384+
"number"
385+
]
386+
}
387+
],
388+
"type": [
389+
"array"
390+
]
391+
}
392+
],
393+
"type": [
394+
"array"
395+
]
396+
},
397+
"required": true,
398+
"deprecated": false
399+
},
400+
"deprecated": false,
401+
"externalDocs": {
402+
"description": "Github remote link",
403+
"url": "https://github.com/filecoin-project/curio/blob/master/api/proxy_gen.go#L359"
339404
}
340405
},
341406
{
@@ -419,7 +484,7 @@
419484
"deprecated": false,
420485
"externalDocs": {
421486
"description": "Github remote link",
422-
"url": "https://github.com/filecoin-project/curio/blob/master/api/proxy_gen.go#L355"
487+
"url": "https://github.com/filecoin-project/curio/blob/master/api/proxy_gen.go#L370"
423488
}
424489
},
425490
{
@@ -455,7 +520,7 @@
455520
"deprecated": false,
456521
"externalDocs": {
457522
"description": "Github remote link",
458-
"url": "https://github.com/filecoin-project/curio/blob/master/api/proxy_gen.go#L366"
523+
"url": "https://github.com/filecoin-project/curio/blob/master/api/proxy_gen.go#L381"
459524
}
460525
},
461526
{
@@ -509,7 +574,7 @@
509574
"deprecated": false,
510575
"externalDocs": {
511576
"description": "Github remote link",
512-
"url": "https://github.com/filecoin-project/curio/blob/master/api/proxy_gen.go#L377"
577+
"url": "https://github.com/filecoin-project/curio/blob/master/api/proxy_gen.go#L392"
513578
}
514579
},
515580
{
@@ -532,7 +597,7 @@
532597
"deprecated": false,
533598
"externalDocs": {
534599
"description": "Github remote link",
535-
"url": "https://github.com/filecoin-project/curio/blob/master/api/proxy_gen.go#L388"
600+
"url": "https://github.com/filecoin-project/curio/blob/master/api/proxy_gen.go#L403"
536601
}
537602
},
538603
{
@@ -571,7 +636,7 @@
571636
"deprecated": false,
572637
"externalDocs": {
573638
"description": "Github remote link",
574-
"url": "https://github.com/filecoin-project/curio/blob/master/api/proxy_gen.go#L399"
639+
"url": "https://github.com/filecoin-project/curio/blob/master/api/proxy_gen.go#L414"
575640
}
576641
},
577642
{
@@ -610,7 +675,7 @@
610675
"deprecated": false,
611676
"externalDocs": {
612677
"description": "Github remote link",
613-
"url": "https://github.com/filecoin-project/curio/blob/master/api/proxy_gen.go#L410"
678+
"url": "https://github.com/filecoin-project/curio/blob/master/api/proxy_gen.go#L425"
614679
}
615680
},
616681
{
@@ -804,7 +869,7 @@
804869
"deprecated": false,
805870
"externalDocs": {
806871
"description": "Github remote link",
807-
"url": "https://github.com/filecoin-project/curio/blob/master/api/proxy_gen.go#L421"
872+
"url": "https://github.com/filecoin-project/curio/blob/master/api/proxy_gen.go#L436"
808873
}
809874
},
810875
{
@@ -865,7 +930,7 @@
865930
"deprecated": false,
866931
"externalDocs": {
867932
"description": "Github remote link",
868-
"url": "https://github.com/filecoin-project/curio/blob/master/api/proxy_gen.go#L432"
933+
"url": "https://github.com/filecoin-project/curio/blob/master/api/proxy_gen.go#L447"
869934
}
870935
},
871936
{
@@ -997,7 +1062,7 @@
9971062
"deprecated": false,
9981063
"externalDocs": {
9991064
"description": "Github remote link",
1000-
"url": "https://github.com/filecoin-project/curio/blob/master/api/proxy_gen.go#L443"
1065+
"url": "https://github.com/filecoin-project/curio/blob/master/api/proxy_gen.go#L458"
10011066
}
10021067
},
10031068
{
@@ -1131,7 +1196,7 @@
11311196
"deprecated": false,
11321197
"externalDocs": {
11331198
"description": "Github remote link",
1134-
"url": "https://github.com/filecoin-project/curio/blob/master/api/proxy_gen.go#L454"
1199+
"url": "https://github.com/filecoin-project/curio/blob/master/api/proxy_gen.go#L469"
11351200
}
11361201
},
11371202
{
@@ -1185,7 +1250,7 @@
11851250
"deprecated": false,
11861251
"externalDocs": {
11871252
"description": "Github remote link",
1188-
"url": "https://github.com/filecoin-project/curio/blob/master/api/proxy_gen.go#L465"
1253+
"url": "https://github.com/filecoin-project/curio/blob/master/api/proxy_gen.go#L480"
11891254
}
11901255
},
11911256
{
@@ -1219,7 +1284,7 @@
12191284
"deprecated": false,
12201285
"externalDocs": {
12211286
"description": "Github remote link",
1222-
"url": "https://github.com/filecoin-project/curio/blob/master/api/proxy_gen.go#L476"
1287+
"url": "https://github.com/filecoin-project/curio/blob/master/api/proxy_gen.go#L491"
12231288
}
12241289
},
12251290
{
@@ -1273,7 +1338,7 @@
12731338
"deprecated": false,
12741339
"externalDocs": {
12751340
"description": "Github remote link",
1276-
"url": "https://github.com/filecoin-project/curio/blob/master/api/proxy_gen.go#L487"
1341+
"url": "https://github.com/filecoin-project/curio/blob/master/api/proxy_gen.go#L502"
12771342
}
12781343
},
12791344
{
@@ -1350,7 +1415,7 @@
13501415
"deprecated": false,
13511416
"externalDocs": {
13521417
"description": "Github remote link",
1353-
"url": "https://github.com/filecoin-project/curio/blob/master/api/proxy_gen.go#L498"
1418+
"url": "https://github.com/filecoin-project/curio/blob/master/api/proxy_gen.go#L513"
13541419
}
13551420
},
13561421
{
@@ -1373,7 +1438,7 @@
13731438
"deprecated": false,
13741439
"externalDocs": {
13751440
"description": "Github remote link",
1376-
"url": "https://github.com/filecoin-project/curio/blob/master/api/proxy_gen.go#L509"
1441+
"url": "https://github.com/filecoin-project/curio/blob/master/api/proxy_gen.go#L524"
13771442
}
13781443
},
13791444
{
@@ -1411,7 +1476,7 @@
14111476
"deprecated": false,
14121477
"externalDocs": {
14131478
"description": "Github remote link",
1414-
"url": "https://github.com/filecoin-project/curio/blob/master/api/proxy_gen.go#L520"
1479+
"url": "https://github.com/filecoin-project/curio/blob/master/api/proxy_gen.go#L535"
14151480
}
14161481
}
14171482
]

0 commit comments

Comments
 (0)