Documentation ¶
Overview ¶
Package dochandler performs document operation processing and document resolution.
the supplied create request is used directly to generate and return a resolved document. In this case the supplied create request is subject to the same validation as in a create operation.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DocumentHandler ¶
type DocumentHandler struct {
// contains filtered or unexported fields
}
DocumentHandler implements document handler.
func New ¶
func New(namespace string, opts ...Option) (*DocumentHandler, error)
New creates a new document handler with the context.
func (*DocumentHandler) Namespace ¶
func (r *DocumentHandler) Namespace() string
Namespace returns the namespace of the document handler.
func (*DocumentHandler) ProcessOperation ¶
func (r *DocumentHandler) ProcessOperation(operationBuffer []byte) (*document.ResolutionResult, error)
ProcessOperation validates create operation and returns resolution result of that create operation. Only create operation is supported.
func (*DocumentHandler) ResolveDocument ¶
func (r *DocumentHandler) ResolveDocument(longFormDID string, _ ...document.ResolutionOption) (*document.ResolutionResult, error)
ResolveDocument resolves long form DID format.
Long Form DID format: did:METHOD:<did-suffix>:Base64url(JCS({suffix-data-object, delta-object}))
The <suffix-data-object> and <delta-object> are used to generate and return resolved DID Document. In this case the supplied delta and suffix objects are subject to the same validation as during processing create operation.
type Option ¶
type Option func(opts *DocumentHandler)
Option is an option for document handler.
func WithCurrentProtocolVersion ¶
WithCurrentProtocolVersion sets optional current protocol versions. Defaults to the latest in the protocol versions list.
func WithProtocolVersions ¶
WithProtocolVersions sets optional client protocol versions.
Directories ¶
Path | Synopsis |
---|---|
protocol
|
|
protocolversion
|
|
clientregistry/mocks
Code generated by counterfeiter.
|
Code generated by counterfeiter. |