git-remote-ipfs-0.1.0.0: Git remote helper to store git objects on IPFS

Safe HaskellNone
LanguageHaskell2010

Network.IPFS.Git.RemoteHelper.Options

Synopsis

Documentation

data IpfsOptions' f Source #

Constructors

IpfsOptions 

Fields

  • ipfsApiUrl :: HKD f BaseUrl

    URL of the IPFS daemon API.

    Default: "http://localhost:5001"

  • ipfsMaxConns :: HKD f Int

    Maximum number of concurrent connections to the IPFS daemon. Note that this is approximate.

    Default: 30

  • ipfsMaxBlockSize :: HKD f Int

    The maximum size of an IPFS block. This is configurable as there is no unambiguous documentation on what the actual value is. It may also be subject to change in the future.

    Default: 2048000 (2MB)

Instances
Generic (IpfsOptions' f) Source # 
Instance details

Defined in Network.IPFS.Git.RemoteHelper.Options

Associated Types

type Rep (IpfsOptions' f) :: Type -> Type #

Methods

from :: IpfsOptions' f -> Rep (IpfsOptions' f) x #

to :: Rep (IpfsOptions' f) x -> IpfsOptions' f #

Semigroup (IpfsOptions' Last) Source # 
Instance details

Defined in Network.IPFS.Git.RemoteHelper.Options

Monoid (IpfsOptions' Last) Source # 
Instance details

Defined in Network.IPFS.Git.RemoteHelper.Options

Generic (IpfsOptions' f) Source # 
Instance details

Defined in Network.IPFS.Git.RemoteHelper.Options

Associated Types

type Code (IpfsOptions' f) :: [[Type]] #

type Rep (IpfsOptions' f) Source # 
Instance details

Defined in Network.IPFS.Git.RemoteHelper.Options

type Rep (IpfsOptions' f) = D1 (MetaData "IpfsOptions'" "Network.IPFS.Git.RemoteHelper.Options" "git-remote-ipfs-0.1.0.0-KPH4G9lXVVjHDGGDt1ic2M" False) (C1 (MetaCons "IpfsOptions" PrefixI True) (S1 (MetaSel (Just "ipfsApiUrl") NoSourceUnpackedness NoSourceStrictness DecidedStrict) (Rec0 (HKD f BaseUrl)) :*: (S1 (MetaSel (Just "ipfsMaxConns") NoSourceUnpackedness NoSourceStrictness DecidedStrict) (Rec0 (HKD f Int)) :*: S1 (MetaSel (Just "ipfsMaxBlockSize") NoSourceUnpackedness NoSourceStrictness DecidedStrict) (Rec0 (HKD f Int)))))
type Code (IpfsOptions' f) Source # 
Instance details

Defined in Network.IPFS.Git.RemoteHelper.Options

getIpfsOptions :: HasCallStack => Options -> IO IpfsOptions Source #

Determine the IpfsOptions.

This must happen after parseOptions in order to support per-remote settings. The GIT_DIR environment variable must be set and point to a valid git repository (when the remote helper is invoked by git, this is the current repository).

IpfsOptions are configured using git-config(2). The precedence rules specified there apply. However, $XDG_CONFIG_HOMEgitconfig and $(prefix)etcgitconfig (i.e. --system) are not yet supported.

The available configuration keys are:

  • ipfs.apiurl
  • ipfs.maxconnections
  • ipfs.maxblocksize

ipfsApiUrl may be overridden per-remote using the key remote.<remote name>.ipfsapiurl (e.g. remote.origin.ipfsapiurl). If the environment variable IPFS_API_URL, it will be used instead of any git-config settings.