Documentation ¶
Index ¶
- Constants
- type Batch
- type DataVaultConfiguration
- type DataVaultConfigurationMapping
- type EncryptedDocument
- type HasQuery
- type IDTypePair
- type IndexedAttribute
- type IndexedAttributeCollection
- type JSONWebEncryption
- type Query
- type Recipient
- type RecipientHeaders
- type StructuredDocument
- type VaultOperation
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 ¶ added in v0.1.5
type Batch []VaultOperation
Batch represents a batch of operations to be performed in a vault.
type DataVaultConfiguration ¶
type DataVaultConfiguration struct { Sequence uint64 `json:"sequence"` Controller string `json:"controller"` Invoker []string `json:"invoker"` Delegator []string `json:"delegator"` ReferenceID string `json:"referenceId"` KEK IDTypePair `json:"kek"` HMAC IDTypePair `json:"hmac"` }
DataVaultConfiguration represents a Data Vault Configuration.
type DataVaultConfigurationMapping ¶ added in v0.1.5
type DataVaultConfigurationMapping struct { DataVaultConfiguration DataVaultConfiguration `json:"dataVaultConfiguration"` VaultID string `json:"vaultId"` }
DataVaultConfigurationMapping represents an entry in the data vault config store that maps a DataVaultConfiguration to a vaultID
type EncryptedDocument ¶
type EncryptedDocument struct { ID string `json:"id"` Sequence uint64 `json:"sequence"` IndexedAttributeCollections []IndexedAttributeCollection `json:"indexed"` JWE json.RawMessage `json:"jwe"` }
EncryptedDocument represents an Encrypted Document.
type HasQuery ¶ added in v0.1.6
type HasQuery struct {
ReturnFullDocuments bool `json:"returnFullDocuments"`
}
HasQuery represents a simpler version of Query above that matches all documents that are tagged with the index name specified in "has", regardless of index value. ReturnFullDocuments is optional and can only be used if the "ReturnFullDocumentsOnQuery" extension is enabled.
type IDTypePair ¶
IDTypePair represents an ID+type pair.
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.
type JSONWebEncryption ¶ added in v0.1.5
type JSONWebEncryption struct { B64ProtectedHeaders string `json:"protected,omitempty"` UnprotectedHeaders map[string]interface{} `json:"unprotected,omitempty"` Recipients []Recipient `json:"recipients,omitempty"` B64SingleRecipientEncKey string `json:"encrypted_key,omitempty"` SingleRecipientHeader *RecipientHeaders `json:"header,omitempty"` B64AAD string `json:"aad,omitempty"` B64IV string `json:"iv,omitempty"` B64Ciphertext string `json:"ciphertext,omitempty"` B64Tag string `json:"tag,omitempty"` }
JSONWebEncryption represents a JWE
type Query ¶
type Query struct { ReturnFullDocuments bool `json:"returnFullDocuments"` Name string `json:"index"` Value string `json:"equals"` Has string `json:"has"` }
Query represents an incoming vault query. Two types of queries are supported: 1. "index + equals": Matches any documents that have index attributes matching both Name and Value. 2. has: Matches any documents that contain that have index attributes matching Has, regardless of the Value. It's invalid for an incoming query to mix both query formats. ReturnFullDocuments is optional and can only be used if the "ReturnFullDocumentsOnQuery" extension is enabled.
type Recipient ¶ added in v0.1.5
type Recipient struct { Header *RecipientHeaders `json:"header,omitempty"` EncryptedKey string `json:"encrypted_key,omitempty"` }
Recipient is a recipient of a JWE including the shared encryption key.
type RecipientHeaders ¶ added in v0.1.5
type RecipientHeaders struct { Alg string `json:"alg,omitempty"` APU string `json:"apu,omitempty"` IV string `json:"iv,omitempty"` Tag string `json:"tag,omitempty"` KID string `json:"kid,omitempty"` EPK json.RawMessage `json:"epk,omitempty"` SPK json.RawMessage `json:"spk,omitempty"` }
RecipientHeaders are the recipient headers.
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.
type VaultOperation ¶ added in v0.1.5
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.