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:
16
plugin/ipld.go
Normal file
16
plugin/ipld.go
Normal 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
|
||||
}
|
Reference in New Issue
Block a user