Documentation ¶
Overview ¶
base is a set of functions common to all access controllers
Index ¶
- func AddAccessController(constructor ControllerConstructor) error
- func Create(ctx context.Context, db iface.OrbitDB, controllerType string, ...) (cid.Cid, error)
- func IsSupported(controllerType string) bool
- func RemoveAccessController(controllerType string)
- func Resolve(ctx context.Context, db iface.OrbitDB, manifestAddress string, ...) (accesscontroller.Interface, error)
- type ControllerConstructor
- type CreateAccessControllerOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddAccessController ¶
func AddAccessController(constructor ControllerConstructor) error
AddAccessController Registers an access controller type using its constructor
func Create ¶
func Create(ctx context.Context, db iface.OrbitDB, controllerType string, options *CreateAccessControllerOptions) (cid.Cid, error)
Create Creates a new access controller and returns the manifest CID
func IsSupported ¶
IsSupported Checks whether an access controller type is supported
func RemoveAccessController ¶
func RemoveAccessController(controllerType string)
RemoveAccessController Unregister an access controller type
func Resolve ¶
func Resolve(ctx context.Context, db iface.OrbitDB, manifestAddress string, params accesscontroller.ManifestParams) (accesscontroller.Interface, error)
Resolve Resolves an access controller using its manifest address
Types ¶
type ControllerConstructor ¶
type ControllerConstructor func(context.Context, iface.OrbitDB, *CreateAccessControllerOptions) (accesscontroller.Interface, error)
Required prototype for custom controllers constructors
Click to show internal directories.
Click to hide internal directories.