Documentation ¶
Index ¶
- Constants
- func State(conState jsonrpc.State) *ipfsState
- type Client
- func (c *Client) GetFile(ctx context.Context, conState jsonrpc.State, contentId string) ([]byte, error)
- func (c *Client) ListCids(ctx context.Context, conState jsonrpc.State) ([]string, error)
- func (c *Client) RemoveAllFiles(ctx context.Context, conState jsonrpc.State) error
- func (c *Client) RemoveFile(ctx context.Context, contentId string) (bool, error)
- func (c *Client) StoreFile(ctx context.Context, conState jsonrpc.State, data []byte) (string, error)
Constants ¶
View Source
const (
// IpfsID is the ID for state of a ipfs client in the connection state.
IpfsID = "ipfs"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client exposes ipfs related functionality
func (*Client) GetFile ¶
func (c *Client) GetFile(ctx context.Context, conState jsonrpc.State, contentId string) ([]byte, error)
GetFile gets a file from the ipfs client
func (*Client) RemoveAllFiles ¶
RemoveAllFiles removes all files from the ipfs client
func (*Client) RemoveFile ¶
RemoveFile removes a file from the ipfs client
Click to show internal directories.
Click to hide internal directories.