Documentation
¶
Index ¶
Constants ¶
const (
// NameSpace for did store
NameSpace = "didstore"
)
const StoreName = "didconnection"
StoreName DID connection store name
Variables ¶
var ErrDIDNotFound = errors.New("did not found under given key")
ErrDIDNotFound signals that the entry for the given DID and key is not present in the store.
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 ConnectionStore ¶ added in v0.1.3
type ConnectionStore struct {
// contains filtered or unexported fields
}
ConnectionStore stores DIDs indexed by key
func NewConnectionStore ¶ added in v0.1.3
func NewConnectionStore(ctx connectionProvider) (*ConnectionStore, error)
NewConnectionStore returns a new did lookup ConnectionStore
func (*ConnectionStore) GetDID ¶ added in v0.1.3
func (c *ConnectionStore) GetDID(key string) (string, error)
GetDID gets the DID stored under the given key
func (*ConnectionStore) SaveDID ¶ added in v0.1.3
func (c *ConnectionStore) SaveDID(did string, keys ...string) error
SaveDID saves a DID, indexed using the given public keys
func (*ConnectionStore) SaveDIDByResolving ¶ added in v0.1.3
func (c *ConnectionStore) 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 (*ConnectionStore) SaveDIDFromDoc ¶ added in v0.1.3
func (c *ConnectionStore) SaveDIDFromDoc(doc *diddoc.Doc) error
SaveDIDFromDoc saves a map from a did doc's keys to the did
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store stores did doc
func (*Store) GetDIDByName ¶ added in v0.1.3
GetDIDByName retrieves did id based on name.
func (*Store) GetDIDRecords ¶ added in v0.1.3
GetDIDRecords retrieves the didDoc records containing name and didID.