Documentation ¶
Index ¶
- Variables
- func GetFileHash(r io.Reader) (string, error)
- func NewDagService() *mapBasedDag
- type AddItemResult
- type Client
- type LinkNodesInput
- type LinkNodesResult
- type SpaceIpfsClient
- func (s *SpaceIpfsClient) AddItem(ctx context.Context, item io.Reader) AddItemResult
- func (s *SpaceIpfsClient) AddItems(ctx context.Context, items []io.Reader) []AddItemResult
- func (s *SpaceIpfsClient) LinkNodes(ctx context.Context, nodes []LinkNodesInput) (*LinkNodesResult, error)
- func (s *SpaceIpfsClient) PullItem(ctx context.Context, cid cid.Cid) (io.ReadCloser, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrNotFound = errors.New("not found")
)
Functions ¶
func NewDagService ¶
func NewDagService() *mapBasedDag
Types ¶
type AddItemResult ¶ added in v0.0.10
type Client ¶ added in v0.0.10
type Client interface { AddItems(ctx context.Context, items []io.Reader) []AddItemResult AddItem(ctx context.Context, item io.Reader) AddItemResult // Links each of the nodes in the input under the same parent LinkNodes(ctx context.Context, nodes []LinkNodesInput) (*LinkNodesResult, error) PullItem(ctx context.Context, cid cid.Cid) (io.ReadCloser, error) }
type LinkNodesInput ¶ added in v0.0.10
type LinkNodesResult ¶ added in v0.0.10
type SpaceIpfsClient ¶ added in v0.0.10
type SpaceIpfsClient struct {
// contains filtered or unexported fields
}
func NewSpaceIpfsClient ¶ added in v0.0.10
func NewSpaceIpfsClient(cfg config.Config) (*SpaceIpfsClient, error)
func (*SpaceIpfsClient) AddItem ¶ added in v0.0.10
func (s *SpaceIpfsClient) AddItem(ctx context.Context, item io.Reader) AddItemResult
func (*SpaceIpfsClient) AddItems ¶ added in v0.0.10
func (s *SpaceIpfsClient) AddItems(ctx context.Context, items []io.Reader) []AddItemResult
func (*SpaceIpfsClient) LinkNodes ¶ added in v0.0.10
func (s *SpaceIpfsClient) LinkNodes(ctx context.Context, nodes []LinkNodesInput) (*LinkNodesResult, error)
func (*SpaceIpfsClient) PullItem ¶ added in v0.0.10
func (s *SpaceIpfsClient) PullItem(ctx context.Context, cid cid.Cid) (io.ReadCloser, error)
Click to show internal directories.
Click to hide internal directories.