View Source MyspaceIPFS.Repo (Myspace IPFS v0.2.0-alpha.2)

MyspaceIPFS.Repo is where the repo commands of the IPFS API reside.

Link to this section Summary

Functions

Perform a garbage collection sweep on the repo.

List all local repo blocks.

Apply any outstanding repo migrations.

Get stats for the currently used repo.

Verify all blocks in repo are not corrupted.

Show repo version.

Link to this section Functions

@spec gc(list()) :: {:ok, any()} | MyspaceIPFS.Api.error_response()

Perform a garbage collection sweep on the repo.

options

Options

https://docs.ipfs.io/reference/http/api/#api-v0-repo-gc stream_errors - <bool>, # Stream errors during GC. quiet <bool>, # Write minimal output. silent <bool>, # Write no output.

@spec ls() :: {:ok, any()} | MyspaceIPFS.Api.error_response()

List all local repo blocks.

@spec migrate(list()) :: {:ok, any()} | MyspaceIPFS.Api.error_response()

Apply any outstanding repo migrations.

options

Options

https://docs.ipfs.io/reference/http/api/#api-v0-repo-migrate allow-downgrade - <bool>, # Allow downgrading repo version.

@spec stat(list()) :: {:ok, any()} | MyspaceIPFS.Api.error_response()

Get stats for the currently used repo.

options

Options

https://docs.ipfs.io/reference/http/api/#api-v0-repo-stat human - <bool>, # Output human-readable numbers. size-only - <bool>, # Only output the RepoSize.

@spec verify() :: {:ok, any()} | MyspaceIPFS.Api.error_response()

Verify all blocks in repo are not corrupted.

@spec version(list()) :: {:ok, any()} | MyspaceIPFS.Api.error_response()

Show repo version.

options

Options

https://docs.ipfs.io/reference/http/api/#api-v0-repo-version quiet - <bool>, # Write minimal output.