View Source MyspaceIPFS.Config (Myspace IPFS v0.2.0-alpha.1)

MyspaceIPFS.Config is where the config commands of the IPFS API reside.

Link to this section Summary

Functions

Get the entire config.

Get the value of a config key.

Apply profile to config.

Replace the config with the given JSON file.

Set the value of a config key. This command accepts a JSON object or a boolean as the value.

Show the current config.

Link to this section Functions

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

Get the entire config.

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

Get the value of a config key.

parameters

Parameters

key: The key to get the value of.

Link to this function

profile_apply(profile, opts \\ [])

View Source
@spec profile_apply(binary(), list()) ::
  {:ok, any()} | MyspaceIPFS.Api.error_response()

Apply profile to config.

parameters

Parameters

profile: The profile to apply.

options

Options

https://docs.ipfs.tech/reference/kubo/rpc/#api-v0-config-profile-apply

[
  `dry-run` - <bool>, # Dry run.
]
@spec replace(Path.t()) :: {:ok, any()} | MyspaceIPFS.Api.error_response()

Replace the config with the given JSON file.

parameters

Parameters

fspath: The path to the config file to use.

@spec set(binary(), binary()) :: {:ok, any()} | MyspaceIPFS.Api.error_response()
@spec set(binary(), boolean()) :: {:ok, any()} | MyspaceIPFS.Api.error_response()

Set the value of a config key. This command accepts a JSON object or a boolean as the value.

JSON objects must be passed as a string.

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

Show the current config.