mirror of
https://github.com/ipfs/kubo.git
synced 2025-06-24 14:08:13 +08:00
Add readonly api to gateway
Based on https://github.com/ipfs/go-ipfs/pull/1389 License: MIT Signed-off-by: rht <rhtbot@gmail.com>
This commit is contained in:
@ -109,9 +109,39 @@ var rootSubcommands = map[string]*cmds.Command{
|
||||
"version": VersionCmd,
|
||||
"bitswap": BitswapCmd,
|
||||
}
|
||||
var rootROSubcommands = map[string]*cmds.Command{
|
||||
"block": &cmds.Command{
|
||||
Subcommands: map[string]*cmds.Command{
|
||||
"stat": blockStatCmd,
|
||||
"get": blockGetCmd,
|
||||
},
|
||||
},
|
||||
"cat": CatCmd,
|
||||
"commands": CommandsDaemonCmd,
|
||||
"ls": LsCmd,
|
||||
"name": &cmds.Command{
|
||||
Subcommands: map[string]*cmds.Command{
|
||||
"resolve": IpnsCmd,
|
||||
},
|
||||
},
|
||||
"object": &cmds.Command{
|
||||
Subcommands: map[string]*cmds.Command{
|
||||
"data": objectDataCmd,
|
||||
"links": objectLinksCmd,
|
||||
"get": objectGetCmd,
|
||||
"stat": objectStatCmd,
|
||||
},
|
||||
},
|
||||
"refs": RefsCmd,
|
||||
//"resolve": ResolveCmd,
|
||||
}
|
||||
|
||||
var RootRO = &cmds.Command{}
|
||||
|
||||
func init() {
|
||||
*RootRO = *Root
|
||||
Root.Subcommands = rootSubcommands
|
||||
RootRO.Subcommands = rootROSubcommands
|
||||
}
|
||||
|
||||
type MessageOutput struct {
|
||||
|
Reference in New Issue
Block a user