{"modulePath":"github.com/threefoldtech/web3_proxy/server","version":"v0.0.0-20230905100307-0269a1e6aecb","isLatest":false,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package ipfs\n\n## Constants\n\n```go\nconst (\n\t// IpfsID is the ID for state of a ipfs client in the connection state.\n\tIpfsID = \"ipfs\"\n)\n```\n\n## Functions\n\n```go\nfunc State(conState jsonrpc.State) *ipfsState\n```\nState from a connection. If no state is present, it is initialized\n\n## Types\n\n```go\ntype Client struct {\n\t// contains filtered or unexported fields\n}\n```\nClient exposes ipfs related functionality\n\n```go\nfunc NewClient(peer *ipfslite.Peer) *Client\n```\n\n```go\nfunc (c *Client) GetFile(ctx context.Context, conState jsonrpc.State, contentId string) ([]byte, error)\n```\nGetFile gets a file from the ipfs client\n\n```go\nfunc (c *Client) ListCids(ctx context.Context, conState jsonrpc.State) ([]string, error)\n```\nListCids lists all CIDs stored in the ipfs client\n\n```go\nfunc (c *Client) RemoveAllFiles(ctx context.Context, conState jsonrpc.State) error\n```\nRemoveAllFiles removes all files from the ipfs client\n\n```go\nfunc (c *Client) RemoveFile(ctx context.Context, contentId string) (bool, error)\n```\nRemoveFile removes a file from the ipfs client\n\n```go\nfunc (c *Client) StoreFile(ctx context.Context, conState jsonrpc.State, data []byte) (string, error)\n```\nStoreFile stores a file in the ipfs client\n\n","path":"github.com/threefoldtech/web3_proxy/server/pkg/ipfs","name":"ipfs","synopsis":"","isRedistributable":true}
