Documentation
¶
Index ¶
- Constants
- Variables
- type Record
- type Store
- func (s *Store) GetCredential(id string) (*verifiable.Credential, error)
- func (s *Store) GetCredentialIDByName(name string) (string, error)
- func (s *Store) GetCredentials() ([]*Record, error)
- func (s *Store) GetPresentation(id string) (*verifiable.Presentation, error)
- func (s *Store) GetPresentationIDByName(name string) (string, error)
- func (s *Store) GetPresentations() ([]*Record, error)
- func (s *Store) SaveCredential(name string, vc *verifiable.Credential) error
- func (s *Store) SavePresentation(name string, vp *verifiable.Presentation) error
Constants ¶
const (
// NameSpace for vc store
NameSpace = "verifiable"
)
Variables ¶
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 Record ¶ added in v0.1.3
type Record struct {
Name string `json:"name,omitempty"`
ID string `json:"id,omitempty"`
Context []string `json:"context,omitempty"`
Type []string `json:"type,omitempty"`
SubjectID string `json:"subjectId,omitempty"`
}
Record model containing name, ID and other fields of interest
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store stores vc
func (*Store) GetCredential ¶ added in v0.1.3
func (s *Store) GetCredential(id string) (*verifiable.Credential, error)
GetCredential retrieves a verifiable credential based on ID.
func (*Store) GetCredentialIDByName ¶ added in v0.1.3
GetCredentialIDByName retrieves verifiable credential id based on name.
func (*Store) GetCredentials ¶ added in v0.1.3
GetCredentials retrieves the verifiable credential records containing name and fields of interest.
func (*Store) GetPresentation ¶ added in v0.1.3
func (s *Store) GetPresentation(id string) (*verifiable.Presentation, error)
GetPresentation retrieves a verifiable presentation based on ID.
func (*Store) GetPresentationIDByName ¶ added in v0.1.3
GetPresentationIDByName retrieves verifiable presentation id based on name.
func (*Store) GetPresentations ¶ added in v0.1.3
GetPresentations retrieves the verifiable presenations records containing name and fields of interest.
func (*Store) SaveCredential ¶ added in v0.1.3
func (s *Store) SaveCredential(name string, vc *verifiable.Credential) error
SaveCredential saves a verifiable credential.
func (*Store) SavePresentation ¶ added in v0.1.3
func (s *Store) SavePresentation(name string, vp *verifiable.Presentation) error
SavePresentation saves a verifiable presentation.