Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ipfs shell API #1066

Closed
wants to merge 3 commits into from
Closed

Ipfs shell API #1066

wants to merge 3 commits into from

Conversation

whyrusleeping
Copy link
Member

This PR implements the beginnings of the ipfs remote 'shell' API. It can be used to interface with a running daemon using go code. More methods will be added as needed/requested

Example usage:

sh := shell.NewShell("localhost:5001")

fi, err := sh.Cat("QmZULkCELmmk5XNfCgTnCyFgAVxBRBXyDHGGMVoLFLiXEN")
if err != nil {
    panic(err)
}

io.Copy(os.Stdout, fi)

@whyrusleeping whyrusleeping added the status/in-progress In progress label Apr 13, 2015
@jbenet
Copy link
Member

jbenet commented Apr 13, 2015

Looking good.

Shall we define:

package ipfs
type Node interface { // could also be named Shell
   // some methods
}

// functions (like in core) that do the various things

I wonder what's better, adding methods to interfaces, or adding functions (like in the core* packages) that can be implemented in multiple packages, like shell/remote/unix or shell/direct/unix or even shell/multinode/unix or something. Not sure what's better on the user. Maybe its a time for experimentation with various API styles.

@whyrusleeping
Copy link
Member Author

I'm not sure how much i want an interface here...

@jbenet
Copy link
Member

jbenet commented Apr 13, 2015

not sure if interface or what, but i'd like to be able to have shells backed by different things (i.e. over HTTP, or in same process, etc. not sure yet what a good api is. but in any case experiment away!

@whyrusleeping
Copy link
Member Author

I think we should find people who want to build things using this, and let use-cases drive the development

@whyrusleeping whyrusleeping added backlog and removed status/in-progress In progress labels Apr 20, 2015
@whyrusleeping whyrusleeping self-assigned this Apr 20, 2015
@jbenet
Copy link
Member

jbenet commented Jun 30, 2015

will be a different package

@Kubuxu Kubuxu deleted the feat/shell branch February 27, 2017 20:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants