Documentation ¶
Index ¶
- type DIDDocument
- func (doc *DIDDocument) Bytes() []byte
- func (doc *DIDDocument) Context() []string
- func (doc *DIDDocument) ID() string
- func (doc DIDDocument) JSONLdObject() map[string]interface{}
- func (doc *DIDDocument) PublicKeys() []PublicKey
- func (doc *DIDDocument) Services() []Service
- func (doc *DIDDocument) String() string
- type Document
- type PublicKey
- func (pk *PublicKey) Controller() string
- func (pk *PublicKey) ID() string
- func (pk *PublicKey) PublicKeyBase58() string
- func (pk *PublicKey) PublicKeyBase64() string
- func (pk *PublicKey) PublicKeyHex() string
- func (pk *PublicKey) PublicKeyJWK() string
- func (pk *PublicKey) PublicKeyPEM() string
- func (pk *PublicKey) Type() string
- type Service
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DIDDocument ¶
type DIDDocument map[string]interface{}
DIDDocument Defines DID Document data structure used by Sidetree for basic type safety checks.
func DIDDocumentFromReader ¶
func DIDDocumentFromReader(r io.Reader) (DIDDocument, error)
DIDDocumentFromReader creates an instance of DIDDocument by reading a JSON document from Reader
func DidDocumentFromBytes ¶
func DidDocumentFromBytes(data []byte) (DIDDocument, error)
DidDocumentFromBytes creates an instance of DIDDocument by reading a JSON document from bytes
func (*DIDDocument) Bytes ¶
func (doc *DIDDocument) Bytes() []byte
Bytes returns byte representation of did document
func (*DIDDocument) Context ¶
func (doc *DIDDocument) Context() []string
Context is the context of did document
func (*DIDDocument) ID ¶
func (doc *DIDDocument) ID() string
ID is identifier for DID subject (what DID Document is about)
func (DIDDocument) JSONLdObject ¶
func (doc DIDDocument) JSONLdObject() map[string]interface{}
JSONLdObject returns map that represents JSON LD Object
func (*DIDDocument) PublicKeys ¶
func (doc *DIDDocument) PublicKeys() []PublicKey
PublicKeys are used for digital signatures, encryption and other cryptographic operations
func (*DIDDocument) Services ¶
func (doc *DIDDocument) Services() []Service
Services is an array of service endpoints
func (*DIDDocument) String ¶
func (doc *DIDDocument) String() string
String returns string representation of did document
type Document ¶
type Document map[string]interface{}
Document defines generic document data structure
func (*Document) GetStringValue ¶
GetStringValue returns string value for specified key or "" if not found or wrong type
func (Document) JSONLdObject ¶
JSONLdObject returns map that represents JSON LD Object
type PublicKey ¶
type PublicKey map[string]interface{}
PublicKey must include id and type properties, and exactly one value property
func NewPublicKey ¶
NewPublicKey creates new public key
func (*PublicKey) Controller ¶
Controller identifies the entity that controls the corresponding private key.
func (*PublicKey) PublicKeyBase58 ¶
PublicKeyBase58 is value property
func (*PublicKey) PublicKeyBase64 ¶
PublicKeyBase64 is value property
func (*PublicKey) PublicKeyHex ¶
PublicKeyHex is value property
func (*PublicKey) PublicKeyJWK ¶
PublicKeyJWK is value property
func (*PublicKey) PublicKeyPEM ¶
PublicKeyPEM is value property