Documentation ¶
Overview ¶
Package oak implement oak vdr
Index ¶
- Constants
- type KeyRetriever
- type OperationType
- type Option
- func WithAuthToken(authToken string) Option
- func WithAuthTokenProvider(p authTokenProvider) Option
- func WithDisableProofCheck(disable bool) Option
- func WithDocumentLoader(l jsonld.DocumentLoader) Option
- func WithDomain(domain string) Option
- func WithHTTPClient(httpClient *http.Client) Option
- func WithIPFSEndpoint(endpoint string) Option
- func WithTLSConfig(tlsConfig *tls.Config) Option
- func WithUnanchoredMaxLifeTime(duration time.Duration) Option
- func WithVerifyResolutionResultType(v VerifyResolutionResultType) Option
- type ResolveDIDRetry
- type SelectDomainService
- 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
- type VerifyResolutionResultType
Constants ¶
const ( // DIDMethod did method. DIDMethod = "oak" // OperationEndpointsOpt operation endpoints opt. OperationEndpointsOpt = "operationEndpoints" // ResolutionEndpointsOpt resolution endpoints opt. ResolutionEndpointsOpt = "resolutionEndpointsOpt" // UpdatePublicKeyOpt update public key opt. UpdatePublicKeyOpt = "updatePublicKey" // RecoveryPublicKeyOpt recovery public key opt. RecoveryPublicKeyOpt = "recoveryPublicKey" // RecoverOpt recover opt. RecoverOpt = "recover" // AnchorOriginOpt anchor origin opt this option is not mandatory. AnchorOriginOpt = "anchorOrigin" // CheckDIDAnchored check did is anchored. CheckDIDAnchored = "checkDIDAnchored" // CheckDIDUpdated check did is updated. CheckDIDUpdated = "checkDIDUpdated" // TracingCtxOpt tracing opt. TracingCtxOpt = "tracingCtxOpt" // VersionIDOpt version id opt this option is not mandatory. VersionIDOpt = httpbinding.VersionIDOpt // VersionTimeOpt version time opt this option is not mandatory. VersionTimeOpt = httpbinding.VersionTimeOpt )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type KeyRetriever ¶
type KeyRetriever interface { GetNextRecoveryPublicKey(didID, commitment string) (crypto.PublicKey, error) GetNextUpdatePublicKey(didID, commitment string) (crypto.PublicKey, error) GetSigner(didID string, ot OperationType, commitment string) (api.Signer, 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 WithAuthTokenProvider ¶
func WithAuthTokenProvider(p authTokenProvider) Option
WithAuthTokenProvider add auth token provider.
func WithDisableProofCheck ¶
WithDisableProofCheck disable proof check.
func WithDocumentLoader ¶
func WithDocumentLoader(l jsonld.DocumentLoader) Option
WithDocumentLoader overrides the default JSONLD document loader used when processing JSONLD DID Documents.
func WithDomain ¶
WithDomain option is setting domain. to set multiple domains call this option multiple times.
func WithHTTPClient ¶
WithHTTPClient option is for custom http client.
func WithIPFSEndpoint ¶
WithIPFSEndpoint overrides the global ipfs endpoint.
func WithTLSConfig ¶
WithTLSConfig option is for definition of secured HTTP transport using a tls.Config instance.
func WithUnanchoredMaxLifeTime ¶
WithUnanchoredMaxLifeTime option is max time for unanchored to be trusted .
func WithVerifyResolutionResultType ¶
func WithVerifyResolutionResultType(v VerifyResolutionResultType) Option
WithVerifyResolutionResultType option is set verify resolution result type.
type ResolveDIDRetry ¶
ResolveDIDRetry resolve did retry.
type SelectDomainService ¶
SelectDomainService select domain service.
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 oak VDR.
func (*VDR) Create ¶
func (v *VDR) Create(did *docdid.Doc, opts ...vdrapi.DIDMethodOption) (*docdid.DocResolution, error)
Create did doc. nolint: gocyclo,funlen
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)
Read oak DID. nolint: funlen,gocyclo,gocognit
type VerifyResolutionResultType ¶
type VerifyResolutionResultType int
VerifyResolutionResultType verify resolution result type.
const ( // All will verify document if it has unpublished or published operations. All VerifyResolutionResultType = iota // Unpublished will verify document only if it has unpublished operations. Unpublished // None will not verify document. None )
Directories ¶
Path | Synopsis |
---|---|
internal
|
|
ldcontext
Package ldcontext implement ld context
|
Package ldcontext implement ld context |
Package lb implement load balancer
|
Package lb implement load balancer |
Package tracing implement trace
|
Package tracing implement trace |
util
|
|
concurrent/rollingcounter
Package rollingcounter implement rolling counter
|
Package rollingcounter implement rolling counter |