Documentation
¶
Index ¶
Constants ¶
const ( // UpsertDocumentVaultOperation represents an upsert operation to be performed in a batch. UpsertDocumentVaultOperation = "upsert" // DeleteDocumentVaultOperation represents a delete operation to be performed in a batch. DeleteDocumentVaultOperation = "delete" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Batch ¶
type Batch []VaultOperation
Batch represents a batch of operations to be performed in a vault.
type EncryptedDocument ¶
type EncryptedDocument struct {
ID string `json:"id"`
Sequence int `json:"sequence"`
IndexedAttributeCollections []IndexedAttributeCollection `json:"indexed,omitempty"`
JWE json.RawMessage `json:"jwe"`
}
EncryptedDocument represents an Encrypted Document as defined in https://identity.foundation/secure-data-store/#encrypteddocument.
type IDTypePair ¶
IDTypePair represents an ID+Type pair. TODO: #2262 This is a simplified version of the actual EDV query format, which is still not finalized in the spec as of writing. See: https://github.com/decentralized-identity/secure-data-store/issues/34.
type IndexedAttribute ¶
type IndexedAttribute struct {
Name string `json:"name"`
Value string `json:"value"`
Unique bool `json:"unique"`
}
IndexedAttribute represents a single indexed attribute.
type IndexedAttributeCollection ¶
type IndexedAttributeCollection struct {
Sequence int `json:"sequence"`
HMAC IDTypePair `json:"hmac"`
IndexedAttributes []IndexedAttribute `json:"attributes"`
}
IndexedAttributeCollection represents a collection of indexed attributes, all of which share a common MAC algorithm and key. This format is based on https://identity.foundation/secure-data-store/#creating-encrypted-indexes.
type Query ¶
type Query struct {
ReturnFullDocuments bool `json:"returnFullDocuments"`
Name string `json:"index"`
Value string `json:"equals"`
}
Query represents a name+value pair that can be used to query the encrypted indices for specific data. TODO: #2262 This is a simplified version of the actual EDV query format, which is still not finalized in the spec as of writing. See: https://github.com/decentralized-identity/secure-data-store/issues/34. ReturnFullDocuments is currently non-standard and should only be used with an EDV server that supports it.
type StructuredDocument ¶
type StructuredDocument struct {
ID string `json:"id"`
Meta map[string]interface{} `json:"meta"`
Content map[string]interface{} `json:"content"`
}
StructuredDocument represents a Structured Document as defined in https://identity.foundation/secure-data-store/#structureddocument.
type VaultOperation ¶
type VaultOperation struct {
Operation string `json:"operation"` // Valid values: upsert,delete
DocumentID string `json:"id,omitempty"` // Only used if Operation=delete
EncryptedDocument EncryptedDocument `json:"document,omitempty"` // Only used if Operation=createOrUpdate
}
VaultOperation represents an upsert or delete operation to be performed in a vault. This is currently non-standard and should only be used with an EDV server that supports it.