engine

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CredentialEngine

type CredentialEngine interface {
	Accept(format string) bool
	CreateSchema(issuer *datastore.DID, s *datastore.Schema) (string, error)
	RegisterSchema(registrant *datastore.DID, s *datastore.Schema) error
	CreateCredentialOffer(issuer *datastore.DID, subjectDID string, s *datastore.Schema, value []byte) (string, *decorator.AttachmentData, error)
	IssueCredential(issuerDID *datastore.DID, s *datastore.Schema, offerID string,
		requestAttachment decorator.AttachmentData, values map[string]interface{}) (*decorator.AttachmentData, error)
	GetSchemaForProposal(proposal []byte) (string, error)
}

type CredentialRegistry

type CredentialRegistry interface {
	CreateSchema(s *datastore.Schema) (string, error)
	RegisterSchema(registrant *datastore.DID, s *datastore.Schema) error
	CreateCredentialOffer(issuer *datastore.DID, subjectDID string, s *datastore.Schema, value []byte) (string, *decorator.AttachmentData, error)
	IssueCredential(issuer *datastore.DID, s *datastore.Schema, offerID string,
		requestAttachment decorator.AttachmentData, values map[string]interface{}) (*decorator.AttachmentData, error)
	GetSchemaForProposal(format string, data []byte) (string, error)
}

type Option

type Option func(opts *Registry)

func WithEngine

func WithEngine(e CredentialEngine) Option

WithEngine adds did method implementation for store.

type Registry

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

func New

func New(prov provider, opts ...Option) *Registry

func (*Registry) CreateCredentialOffer

func (r *Registry) CreateCredentialOffer(issuer *datastore.DID, subjectDID string, s *datastore.Schema, value []byte) (string, *decorator.AttachmentData, error)

func (*Registry) CreateSchema

func (r *Registry) CreateSchema(s *datastore.Schema) (string, error)

func (*Registry) GetSchemaForProposal

func (r *Registry) GetSchemaForProposal(format string, data []byte) (string, error)

func (*Registry) IssueCredential

func (r *Registry) IssueCredential(issuer *datastore.DID, s *datastore.Schema, offerID string, requestAttachment decorator.AttachmentData,
	values map[string]interface{}) (*decorator.AttachmentData, error)

func (*Registry) RegisterSchema

func (r *Registry) RegisterSchema(registrant *datastore.DID, s *datastore.Schema) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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