Documentation
¶
Index ¶
- Constants
- type Config
- type DIDUpdateInfo
- type DidDocumentMetadata
- type DidResolutionMetadata
- type Identity
- type Ion
- type IonConfig
- type PatchJson
- type RelaxedDoc
- type ResolveDIDResponse
- type Service
- type VDR
- func (v *VDR) Accept(method string) bool
- func (v *VDR) Close() error
- func (v *VDR) Create(didDoc *did.Doc, opts ...vdrapi.DIDMethodOption) (*did.DocResolution, error)
- func (v *VDR) Deactivate(did string, opts ...vdrapi.DIDMethodOption) error
- func (v *VDR) Read(didStr string, opts ...vdrapi.DIDMethodOption) (*did.DocResolution, error)
- func (v *VDR) Update(doc *did.Doc, opts ...vdrapi.DIDMethodOption) error
- type VerificationMethod
Constants ¶
View Source
const ( // StoreNamespace store name space for DID Store. StoreNamespace = "peer" // DefaultServiceType default service type. DefaultServiceType = "defaultServiceType" // DefaultServiceEndpoint default service endpoint. DefaultServiceEndpoint = "defaultServiceEndpoint" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DIDUpdateInfo ¶
type DidDocumentMetadata ¶
type DidResolutionMetadata ¶
type DidResolutionMetadata struct {
Pattern string `json:"pattern"`
DriverURL string `json:"driverUrl"`
Duration int `json:"duration"`
Did struct {
DidString string `json:"didString"`
MethodSpecificID string `json:"methodSpecificId"`
Method string `json:"method"`
} `json:"did"`
ContentType string `json:"contentType"`
ConvertedFrom string `json:"convertedFrom"`
ConvertedTo string `json:"convertedTo"`
}
type Identity ¶
type Identity interface {
ResolveDID(did string) (*did.Doc, string, error)
UpdateDID(documentPatch string) (*DIDUpdateInfo, error)
CreateDID(didType string, serviceEndpoints []Service) (*DIDUpdateInfo, error)
DeleteDID(did string) error
BackupDID(did string) (*DIDUpdateInfo, error)
RecoverDID(*DIDUpdateInfo) error
ImportDID(document, longFormDID string) error
ListDIDs() ([]*did.Doc, error)
GetLastUserDID() (*did.Doc, string, error)
GetUserDIDs() ([]did.Doc, error)
SignWithDID(did string, msg []byte) (string, error)
VerifyFromDID(didStr string, msg string) ([]byte, error)
}
type Ion ¶
type IonConfig ¶
type IonConfig struct {
IonUrl string
Db state.DBManager
KeyManager key.KeyManager
}
type PatchJson ¶
type PatchJson struct {
IetfJsonPatch []jsonpatch_create.JsonPatchOperation `json:"ietf-json-patch"`
}
type RelaxedDoc ¶
type RelaxedDoc struct {
Context string `json:"@context"`
DidDocument struct {
Context []string `json:"@context"`
ID string `json:"id"`
VerificationMethod interface{} `json:"verificationMethod"`
Service interface{} `json:"service"`
Authentication interface{} `json:"authentication"`
KeyAgreement interface{} `json:"keyAgreement"`
AssertionMethod interface{} `json:"assertionMethod"`
} `json:"didDocument"`
DidResolutionMetadata interface{} `json:"didResolutionMetadata"`
DidDocumentMetadata interface{} `json:"didDocumentMetadata"`
}
type ResolveDIDResponse ¶
type ResolveDIDResponse struct {
ResolutionMetadata *DidResolutionMetadata `json:"didResolutionMetadata"`
Document *did.Doc `json:"didDocument"`
DocumentMetadata *DidDocumentMetadata `json:"didDocumentMetadata"`
}
type VDR ¶
type VDR struct {
// contains filtered or unexported fields
}
VDR is a overridden implementation of the Peer DID Storage API used to implement things not yet implemented by the library (ie, updates).
func (*VDR) Create ¶
func (v *VDR) Create(didDoc *did.Doc, opts ...vdrapi.DIDMethodOption) (*did.DocResolution, error)
func (*VDR) Deactivate ¶
func (v *VDR) Deactivate(did string, opts ...vdrapi.DIDMethodOption) error
func (*VDR) Read ¶
func (v *VDR) Read(didStr string, opts ...vdrapi.DIDMethodOption) (*did.DocResolution, error)
Directories
¶
| Path | Synopsis |
|---|---|
|
mock
Package mock is a generated GoMock package.
|
Package mock is a generated GoMock package. |
|
Package mock is a generated GoMock package.
|
Package mock is a generated GoMock package. |
|
mock
Package mock is a generated GoMock package.
|
Package mock is a generated GoMock package. |
Click to show internal directories.
Click to hide internal directories.