did

package
v0.1.3-0...-617a0de Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const StoreName = "didconnection"

StoreName DID connection store name

Variables

View Source
var ErrNotFound = errors.New("did not found under given key")

ErrNotFound signals that the entry for the given DID and key is not present in the store.

Functions

This section is empty.

Types

type Store

type Store struct {
	// contains filtered or unexported fields
}

Store stores DIDs indexed by key

func New

func New(ctx provider) (*Store, error)

New returns a new did lookup Store

func (*Store) GetDID

func (c *Store) GetDID(key string) (string, error)

GetDID gets the DID stored under the given key

func (*Store) SaveDID

func (c *Store) SaveDID(did string, keys ...string) error

SaveDID saves a DID, indexed using the given public keys

func (*Store) SaveDIDByResolving

func (c *Store) SaveDIDByResolving(did string, keys ...string) error

SaveDIDByResolving resolves a DID using the VDR then saves the map from keys -> did

keys: fallback keys in case the DID can't be resolved

func (*Store) SaveDIDFromDoc

func (c *Store) SaveDIDFromDoc(doc *diddoc.Doc) error

SaveDIDFromDoc saves a map from a did doc's keys to the did

Jump to

Keyboard shortcuts

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