Documentation ¶
Index ¶
- func Initialize(c *nodeconfig.Config) (nodeconfig.IPFSNode, error)
- type LocalIpfs
- func (n *LocalIpfs) Add(file []byte) (string, error)
- func (n *LocalIpfs) AddPath(path string) (string, error)
- func (n *LocalIpfs) Close() error
- func (n *LocalIpfs) Connect(peers ...string) error
- func (n *LocalIpfs) CoreAPI() icore.CoreAPI
- func (n *LocalIpfs) Get(cidStr string) ([]byte, error)
- func (n *LocalIpfs) GetPath(cidStr string) (map[string]files.Node, error)
- func (r *LocalIpfs) LoadDocsStore(username string, docsOpts *iface.CreateDocumentDBOptions) (iface.DocumentStore, error)
- func (r *LocalIpfs) LoadEventLogStore(username string) (iface.EventLogStore, error)
- func (r *LocalIpfs) LoadKeyValueStore(username string) (iface.KeyValueStore, error)
- func (n *LocalIpfs) MultiAddrs() string
- func (n *LocalIpfs) Peer() *types.PeerInfo
- func (n *LocalIpfs) PeerID() peer.ID
- type TopicMessageHandler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Initialize ¶
func Initialize(c *nodeconfig.Config) (nodeconfig.IPFSNode, error)
Initialize creates a new local IPFS node
Types ¶
type LocalIpfs ¶
type LocalIpfs struct {
// contains filtered or unexported fields
}
`LocalIpfs` is a struct that contains a `CoreAPI` and a `IpfsNode` and a `WalletShare` and a `NodeCallback` and a `Context` and a `[]string` and a `Peer_Type` and a `string`. @property - `icore.CoreAPI` is the interface that the node will use to communicate with the LocalIpfs daemon. @property node - The LocalIpfs node @property {string} repoPath - The path to the LocalIpfs repository. @property walletShare - This is the wallet share object that is used to share the wallet with other nodes. @property callback - This is a callback function that will be called when the node is ready. @property ctx - The context of the node. @property {[]string} bootstrappers - The list of bootstrap nodes to connect to. @property peerType - The type of peer, which can be either a bootstrap node or a normal node. @property {string} rendezvous - The rendezvous string is a unique identifier for the swarm. It is used to find other peers in the swarm.
func (*LocalIpfs) LoadDocsStore ¶
func (r *LocalIpfs) LoadDocsStore(username string, docsOpts *iface.CreateDocumentDBOptions) (iface.DocumentStore, error)
GetDocsStore creates or loads a document database from given name
func (*LocalIpfs) LoadEventLogStore ¶
func (r *LocalIpfs) LoadEventLogStore(username string) (iface.EventLogStore, error)
GetEventLogStore creates or loads an event log database from given name
func (*LocalIpfs) LoadKeyValueStore ¶
func (r *LocalIpfs) LoadKeyValueStore(username string) (iface.KeyValueStore, error)
GetKeyValueStore creates or loads a key value database from given name
func (*LocalIpfs) MultiAddrs ¶
MultiAddr returns the node's multiaddress as a string
type TopicMessageHandler ¶
type TopicMessageHandler func(topic string, msg icore.PubSubMessage) error
TopicMessageHandler is a function that handles a message received on a topic