Documentation ¶
Overview ¶
Package trustbloc implement trustbloc vdr
Index ¶
- Constants
- type KeyRetriever
- type OperationType
- type Option
- func EnableSignatureVerification(enable bool) Option
- func UseGenesisFile(url, domain string, genesisFile []byte) Option
- func WithAuthToken(authToken string) Option
- func WithDocumentLoader(docLoader jsonld.DocumentLoader) Option
- func WithDomain(domain string) Option
- func WithResolverURL(resolverURL string) Option
- func WithTLSConfig(tlsConfig *tls.Config) Option
- type VDR
- func (v *VDR) Accept(method string) bool
- func (v *VDR) Close() error
- func (v *VDR) Create(did *docdid.Doc, opts ...vdrapi.DIDMethodOption) (*docdid.DocResolution, error)
- func (v *VDR) Deactivate(didID string, opts ...vdrapi.DIDMethodOption) error
- func (v *VDR) Read(did string, opts ...vdrapi.DIDMethodOption) (*docdid.DocResolution, error)
- func (v *VDR) Update(didDoc *docdid.Doc, opts ...vdrapi.DIDMethodOption) error
- func (v *VDR) ValidateConsortium(consortiumDomain string) (*time.Duration, error)
Constants ¶
View Source
const ( // DIDMethod did method. DIDMethod = "trustbloc" // EndpointsOpt endpoints opt. EndpointsOpt = "endpoints" // UpdatePublicKeyOpt update public key opt. UpdatePublicKeyOpt = "updatePublicKey" // RecoveryPublicKeyOpt recovery public key opt. RecoveryPublicKeyOpt = "recoveryPublicKey" // RecoverOpt recover opt. RecoverOpt = "recover" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type KeyRetriever ¶
type KeyRetriever interface { GetNextRecoveryPublicKey(didID string) (crypto.PublicKey, error) GetNextUpdatePublicKey(didID string) (crypto.PublicKey, error) GetSigningKey(didID string, ot OperationType) (crypto.PrivateKey, error) }
KeyRetriever key retriever.
type OperationType ¶
type OperationType int
OperationType operation type.
const ( // Update operation. Update OperationType = iota // Recover operation. Recover )
type Option ¶
type Option func(opts *VDR)
Option configures the bloc vdr.
func EnableSignatureVerification ¶
EnableSignatureVerification enables signature verification.
func UseGenesisFile ¶
UseGenesisFile adds a consortium genesis file to the VDR and enables consortium config update validation.
func WithDocumentLoader ¶
func WithDocumentLoader(docLoader jsonld.DocumentLoader) Option
WithDocumentLoader sets a JSON-LD document loader.
func WithResolverURL ¶
WithResolverURL option is setting resolver url.
func WithTLSConfig ¶
WithTLSConfig option is for definition of secured HTTP transport using a tls.Config instance.
type VDR ¶
type VDR struct {
// contains filtered or unexported fields
}
VDR bloc.
func New ¶
func New(keyRetriever KeyRetriever, opts ...Option) (*VDR, error)
New creates new bloc vdru.
func (*VDR) Create ¶
func (v *VDR) Create(did *docdid.Doc, opts ...vdrapi.DIDMethodOption) (*docdid.DocResolution, error)
Create did doc. nolint: funlen,gocyclo
func (*VDR) Deactivate ¶
func (v *VDR) Deactivate(didID string, opts ...vdrapi.DIDMethodOption) error
Deactivate did doc.
func (*VDR) Read ¶
func (v *VDR) Read(did string, opts ...vdrapi.DIDMethodOption) (*docdid.DocResolution, error)
Directories ¶
Path | Synopsis |
---|---|
config
|
|
httpconfig
Package httpconfig implement httpconfig
|
Package httpconfig implement httpconfig |
memorycacheconfig
Package memorycacheconfig implement memorycacheconfig
|
Package memorycacheconfig implement memorycacheconfig |
signatureconfig
Package signatureconfig implement signatureconfig
|
Package signatureconfig implement signatureconfig |
updatevalidationconfig
Package updatevalidationconfig implement updatevalidationconfig
|
Package updatevalidationconfig implement updatevalidationconfig |
verifyingconfig
Package verifyingconfig implement verifyingconfig
|
Package verifyingconfig implement verifyingconfig |
Package didconfiguration implement didconfiguration service
|
Package didconfiguration implement didconfiguration service |
discovery
|
|
staticdiscovery
Package staticdiscovery implement staticdiscovery
|
Package staticdiscovery implement staticdiscovery |
Package endpoint implement endpoint service
|
Package endpoint implement endpoint service |
internal
|
|
mock/config
Package config implement config
|
Package config implement config |
mock/didconfiguration
Package didconfiguration implement didconfiguration
|
Package didconfiguration implement didconfiguration |
mock/discovery
Package discovery implement discovery
|
Package discovery implement discovery |
mock/endpoint
Package endpoint implement mock endpoint
|
Package endpoint implement mock endpoint |
mock/models
Package models implement models
|
Package models implement models |
mock/selection
Package discovery implement discovery
|
Package discovery implement discovery |
Package models implement models
|
Package models implement models |
selection
|
|
staticselection
Package staticselection implement staticselection
|
Package staticselection implement staticselection |
Click to show internal directories.
Click to hide internal directories.