1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-08-06 19:44:01 +08:00

plugin: create plugin API and loader, add ipld-git plugin

License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
This commit is contained in:
Jeromy
2017-07-04 11:48:59 -07:00
committed by Jakub Sztandera
parent 06c567d175
commit 7203c43b60
18 changed files with 432 additions and 22 deletions

16
plugin/ipld.go Normal file
View File

@ -0,0 +1,16 @@
package plugin
import (
"github.com/ipfs/go-ipfs/core/coredag"
node "gx/ipfs/QmYNyRZJBUYPNrLszFmrBrPJbsBh2vMsefz5gnDpB5M1P6/go-ipld-format"
)
// PluginIPLD is an interface that can be implemented to add handlers for
// for different IPLD formats
type PluginIPLD interface {
Plugin
RegisterBlockDecoders(dec node.BlockDecoder) error
RegisterInputEncParsers(iec coredag.InputEncParsers) error
}