Documentation ¶
Index ¶
Constants ¶
const DIDCommServiceType = "did-communication"
DIDCommServiceType default DID Communication service endpoint type
Variables ¶
var ErrNotFound = errors.New("DID not found")
ErrNotFound is returned when a DID resolver does not find the DID.
Functions ¶
This section is empty.
Types ¶
type CreateDIDOpts ¶
type CreateDIDOpts struct { ServiceType string KeyType string ServiceEndpoint string RoutingKeys []string RequestBuilder func([]byte) (io.Reader, error) }
CreateDIDOpts holds the options for creating DID
type DocOpts ¶
type DocOpts func(opts *CreateDIDOpts)
DocOpts is a create DID option
func WithRequestBuilder ¶
WithRequestBuilder allows to supply request builder which can be used to add headers to request stream to be sent to HTTP binding URL
func WithRoutingKeys ¶
WithRoutingKeys allows for setting routing keys.
func WithServiceEndpoint ¶
WithServiceEndpoint allows for setting service endpoint
func WithServiceType ¶
WithServiceType service type of DID document to be created
type ModifiedBy ¶
ModifiedBy key/signature used to update the DID Document
type Registry ¶
type Registry interface { Resolve(did string, opts ...ResolveOpts) (*did.Doc, error) Store(doc *did.Doc) error Create(method string, opts ...DocOpts) (*did.Doc, error) Close() error }
Registry vdri registry
type ResolveDIDOpts ¶
type ResolveDIDOpts struct { ResultType ResultType VersionID interface{} VersionTime string NoCache bool }
ResolveDIDOpts holds the options for did resolve
type ResolveOpts ¶
type ResolveOpts func(opts *ResolveDIDOpts)
ResolveOpts is a did resolve option
func WithNoCache ¶
func WithNoCache(noCache bool) ResolveOpts
WithNoCache the no-cache input option can be used to turn cache on or off
func WithResultType ¶
func WithResultType(resultType ResultType) ResolveOpts
WithResultType the result type input option can be used to request a certain type of result
func WithVersionID ¶
func WithVersionID(versionID interface{}) ResolveOpts
WithVersionID the version id input option can be used to request a specific version of a DID Document
func WithVersionTime ¶
func WithVersionTime(versionTime time.Time) ResolveOpts
WithVersionTime the version time input option can used to request a specific version of a DID Document
type ResultType ¶
type ResultType int
ResultType input option can be used to request a certain type of result.
const ( // DidDocumentResult Request a DID Document as output DidDocumentResult ResultType = iota // ResolutionResult Request a DID Resolution Result ResolutionResult )