base

package
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 13, 2019 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

base is a set of functions common to all access controllers

Index

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

func IsSupported(controllerType string) bool

IsSupported Checks whether an access controller type is supported

func RemoveAccessController

func RemoveAccessController(controllerType string)

RemoveAccessController Unregister an access controller type

func Resolve

Resolve Resolves an access controller using its manifest address

Types

type ControllerConstructor

Required prototype for custom controllers constructors

type CreateAccessControllerOptions

type CreateAccessControllerOptions struct {
	Type         string
	SkipManifest bool
	Name         string
	Access       map[string][]string
	Address      string
}

CreateAccessControllerOptions Options used to create an Access Controller

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL