Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: index sample command #432

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions api/api_curio.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ import (
"net/http"
"net/url"

"github.com/ipfs/go-cid"
"github.com/multiformats/go-multihash"

"github.com/filecoin-project/go-address"
"github.com/filecoin-project/go-state-types/abi"

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

Version(context.Context) ([]int, error) //perm:admin
Shutdown(context.Context) error //perm:admin
Cordon(context.Context) error //perm:admin
Uncordon(context.Context) error //perm:admin
Info(ctx context.Context) (*ltypes.NodeInfo, error) //perm:read
Version(context.Context) ([]int, error) //perm:admin
Shutdown(context.Context) error //perm:admin
Cordon(context.Context) error //perm:admin
Uncordon(context.Context) error //perm:admin
Info(ctx context.Context) (*ltypes.NodeInfo, error) //perm:read
IndexSamples(ctx context.Context, pcid cid.Cid) ([]multihash.Multihash, error) //perm:admin

// MethodGroup: Deal
//The deal method group contains method for adding deals to sector
Expand Down
14 changes: 14 additions & 0 deletions api/proxy_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

101 changes: 83 additions & 18 deletions build/openrpc/curio.json
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/filecoin-project/curio/blob/master/api/proxy_gen.go#L333"
"url": "https://github.com/filecoin-project/curio/blob/master/api/proxy_gen.go#L337"
}
},
{
Expand All @@ -335,7 +335,72 @@
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/filecoin-project/curio/blob/master/api/proxy_gen.go#L344"
"url": "https://github.com/filecoin-project/curio/blob/master/api/proxy_gen.go#L348"
}
},
{
"name": "Filecoin.IndexSamples",
"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```",
"summary": "",
"paramStructure": "by-position",
"params": [
{
"name": "p1",
"description": "cid.Cid",
"summary": "",
"schema": {
"title": "Content Identifier",
"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.",
"examples": [
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
}
],
"type": [
"string"
]
},
"required": true,
"deprecated": false
}
],
"result": {
"name": "[]multihash.Multihash",
"description": "[]multihash.Multihash",
"summary": "",
"schema": {
"examples": [
[
"Bw=="
]
],
"items": [
{
"items": [
{
"title": "number",
"description": "Number is a number",
"type": [
"number"
]
}
],
"type": [
"array"
]
}
],
"type": [
"array"
]
},
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/filecoin-project/curio/blob/master/api/proxy_gen.go#L359"
}
},
{
Expand Down Expand Up @@ -419,7 +484,7 @@
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/filecoin-project/curio/blob/master/api/proxy_gen.go#L355"
"url": "https://github.com/filecoin-project/curio/blob/master/api/proxy_gen.go#L370"
}
},
{
Expand Down Expand Up @@ -455,7 +520,7 @@
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/filecoin-project/curio/blob/master/api/proxy_gen.go#L366"
"url": "https://github.com/filecoin-project/curio/blob/master/api/proxy_gen.go#L381"
}
},
{
Expand Down Expand Up @@ -509,7 +574,7 @@
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/filecoin-project/curio/blob/master/api/proxy_gen.go#L377"
"url": "https://github.com/filecoin-project/curio/blob/master/api/proxy_gen.go#L392"
}
},
{
Expand All @@ -532,7 +597,7 @@
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/filecoin-project/curio/blob/master/api/proxy_gen.go#L388"
"url": "https://github.com/filecoin-project/curio/blob/master/api/proxy_gen.go#L403"
}
},
{
Expand Down Expand Up @@ -571,7 +636,7 @@
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/filecoin-project/curio/blob/master/api/proxy_gen.go#L399"
"url": "https://github.com/filecoin-project/curio/blob/master/api/proxy_gen.go#L414"
}
},
{
Expand Down Expand Up @@ -610,7 +675,7 @@
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/filecoin-project/curio/blob/master/api/proxy_gen.go#L410"
"url": "https://github.com/filecoin-project/curio/blob/master/api/proxy_gen.go#L425"
}
},
{
Expand Down Expand Up @@ -804,7 +869,7 @@
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/filecoin-project/curio/blob/master/api/proxy_gen.go#L421"
"url": "https://github.com/filecoin-project/curio/blob/master/api/proxy_gen.go#L436"
}
},
{
Expand Down Expand Up @@ -865,7 +930,7 @@
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/filecoin-project/curio/blob/master/api/proxy_gen.go#L432"
"url": "https://github.com/filecoin-project/curio/blob/master/api/proxy_gen.go#L447"
}
},
{
Expand Down Expand Up @@ -997,7 +1062,7 @@
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/filecoin-project/curio/blob/master/api/proxy_gen.go#L443"
"url": "https://github.com/filecoin-project/curio/blob/master/api/proxy_gen.go#L458"
}
},
{
Expand Down Expand Up @@ -1131,7 +1196,7 @@
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/filecoin-project/curio/blob/master/api/proxy_gen.go#L454"
"url": "https://github.com/filecoin-project/curio/blob/master/api/proxy_gen.go#L469"
}
},
{
Expand Down Expand Up @@ -1185,7 +1250,7 @@
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/filecoin-project/curio/blob/master/api/proxy_gen.go#L465"
"url": "https://github.com/filecoin-project/curio/blob/master/api/proxy_gen.go#L480"
}
},
{
Expand Down Expand Up @@ -1219,7 +1284,7 @@
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/filecoin-project/curio/blob/master/api/proxy_gen.go#L476"
"url": "https://github.com/filecoin-project/curio/blob/master/api/proxy_gen.go#L491"
}
},
{
Expand Down Expand Up @@ -1273,7 +1338,7 @@
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/filecoin-project/curio/blob/master/api/proxy_gen.go#L487"
"url": "https://github.com/filecoin-project/curio/blob/master/api/proxy_gen.go#L502"
}
},
{
Expand Down Expand Up @@ -1350,7 +1415,7 @@
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/filecoin-project/curio/blob/master/api/proxy_gen.go#L498"
"url": "https://github.com/filecoin-project/curio/blob/master/api/proxy_gen.go#L513"
}
},
{
Expand All @@ -1373,7 +1438,7 @@
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/filecoin-project/curio/blob/master/api/proxy_gen.go#L509"
"url": "https://github.com/filecoin-project/curio/blob/master/api/proxy_gen.go#L524"
}
},
{
Expand Down Expand Up @@ -1411,7 +1476,7 @@
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/filecoin-project/curio/blob/master/api/proxy_gen.go#L520"
"url": "https://github.com/filecoin-project/curio/blob/master/api/proxy_gen.go#L535"
}
}
]
Expand Down
Loading