Documentation ¶
Index ¶
Constants ¶
View Source
const (
// NameSpace for did store.
NameSpace = "didstore"
)
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 ConnectionStore ¶
type ConnectionStore struct {
// contains filtered or unexported fields
}
ConnectionStore stores DIDs indexed by key.
func NewConnectionStore ¶
func NewConnectionStore(ctx connectionProvider) (*ConnectionStore, error)
NewConnectionStore returns a new did lookup ConnectionStore.
func (*ConnectionStore) GetDID ¶
func (c *ConnectionStore) GetDID(key string) (string, error)
GetDID gets the DID stored under the given key.
func (*ConnectionStore) SaveDID ¶
func (c *ConnectionStore) SaveDID(did string, keys ...string) error
SaveDID saves a DID, indexed using the given public keys.
func (*ConnectionStore) SaveDIDByResolving ¶
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 ¶
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 ¶
GetDIDByName retrieves did id based on name.
func (*Store) GetDIDRecords ¶
GetDIDRecords retrieves the didDoc records containing name and didID.
Click to show internal directories.
Click to hide internal directories.