You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Would be great to setup a very simple interface for programmatic go-ipfs clients.
Let's use this issue to outline what the interface below should look like
package ipfs
// maybe rebind things clients will need, so they dont have to import// a ton of packages.typeKey u.KeytypeBlock blocks.BlocktypeObject mdag.Node...// Node is an IPFS NodetypeNodeinterface {
// blocksGetBlock(Key) (Block, error)
PutBlock(Key, Block) error// objectsGetObject(Key) (Object, error)
PutObject(Object) error// etc.
}
And some nice functions that can setup a node for you, given certain specific types of workflows:
// when you have a directory locallyfuncNewNodeWithConfigDir(string) (ipfs.Node, error) { ... }
// when you create your own configfuncNewNodeWithConfig(cfg config.Config) (ipfs.Node, error) { ... }
// creates new keys, memory only ds, etc...funcNewEphemeralNode() (ipfs.Node, error) { ... }
// etc.
that lets us have the same 'object' be either an http client or an embedded node. It needs some documentation work, but it's the direction I want to go with this.
I'd like to use IPFS embedded in my golang App, has the convenience API described at the top of this ticket been implemented or are there any further examples of how to access the current IPFS implementation programatically.
Activity
whyrusleeping commentedon Oct 14, 2014
Huh, dhtHell would love to have this
whyrusleeping commentedon Oct 14, 2014
ehmry, thats called the DagWriter, its in unixfs/io
whyrusleeping commentedon Oct 16, 2014
i like that
btc commentedon Jan 15, 2015
hey @ehmry would you like to submit a PR for
DAGServiceas an interface?whyrusleeping commentedon Apr 7, 2015
I think it was the distinction between mutable and immutable dag nodes. But i could be wrong
2 remaining items
whyrusleeping commentedon Jan 1, 2016
i have a common interface here: https://github.com/whyrusleeping/fallback-ipfs-shell
that lets us have the same 'object' be either an http client or an embedded node. It needs some documentation work, but it's the direction I want to go with this.
daviddias commentedon Jan 1, 2016
Let's transform this issue into a documentation effort on how to use IPFS programatically in go, using:
There is currently one example available at https://ipfs.io/ipfs/QmTkzDwWqPbnAh5YiV5VwcTLnGdwSNsNTn2aDxdXBFca7D/example#/ipfs/QmQwAP9vFjbCtKvD8RkJdCvPHqLQjZfW7Mqbbqx18zd8j7/api/service/readme.md (would be good to verify that it still follows the current API)
@RichardLitt this would fit nicely into the API documentation efforts
novocodev commentedon Jun 7, 2016
I'd like to use IPFS embedded in my golang App, has the convenience API described at the top of this ticket been implemented or are there any further examples of how to access the current IPFS implementation programatically.
whyrusleeping commentedon Dec 15, 2016
@lgierth can this be closed in favor of core api discussions?
Merge pull request ipfs#176 from zaibon/patch-1
fix: use https URI when multiaddress specifies tls (#177)