Module: AccessControllers

Provides a system for managing access controllers. Supported access controllers can be added and removed from the access controller list, and can load the associated module if they are supported.

Source:

Namespaces

AccessControllers-IPFS
AccessControllers-OrbitDB

Methods

(static) IPFSAccessController(options) → {module:AccessControllers.AccessControllers-IPFS}

Defines an IPFS access controller.

Parameters:
Name Type Attributes Description
options Object

Various options for configuring the IPFSAccessController.

params.write Array <optional>

An array of identity ids who can write to the database.

params.storage module:Storage <optional>

An instance of a compatible storage.

Source:
Returns:

An IPFSAccessController function.

Type
module:AccessControllers.AccessControllers-IPFS

(static) OrbitDBAccessController(options) → {module:AccessControllers.AccessControllers-OrbitDB}

Defines an OrbitDB access controller.

Parameters:
Name Type Attributes Description
options Object

Various options for configuring the IPFSAccessController.

params.write Array <optional>

An array of ids of identities who can write to the database.

Source:
Returns:

An IPFSAccessController function.

Type
module:AccessControllers.AccessControllers-OrbitDB

(static) useAccessController(accessController)

Adds an access controller module to the list of supported access controller.

Parameters:
Name Type Description
accessController AccessController

A compatible access controller module.

Source:
Throws:
  • AccessController does not contain required field 'type'.

  • AccessController '$' already added.

    Type
    accessController.type