Documentation
¶
Index ¶
Constants ¶
Variables ¶
This section is empty.
Functions ¶
func NewULID ¶
func NewULID() ulid.ULID
NewULID is a convenience function for generating ULIDs where necessary. It is based on the example showing the "quick" method for initializing the algorithm's entropy parameter. https://github.com/oklog/ulid/blob/c6bb9e1d94a82e71dfd7ff279aa6cea7c52779bb/cmd/ulid/main.go#L67 As described on that page, quick means "when generating, use non-crypto-grade entropy".
Types ¶
type Annotation ¶
type Annotation struct { Key string `json:"_key,omitempty"` // Key uniquely identifies the document in the database DataRef string `json:"dataRef,omitempty"` // DataRef points to the key of the data being annotated Hash contracts.HashType `json:"hash,omitempty"` // Hash identifies which algorithm was used to construct the hash Host string `json:"host,omitempty"` // Host is the hostname of the node making the annotation Tag string `json:"tag,omitempty"` // Tag is the hash of the source artifact tag that emitted data being annotated Layer contracts.LayerType `json:"layer,omitempty"` Kind string `json:"type,omitempty"` // Kind indicates what kind of annotation this is. Defined as string to allow for annotation types outside of the Alvarium Go SDK Signature string `json:"signature,omitempty"` // Signature contains the signature of the party making the annotation IsSatisfied bool `json:"isSatisfied"` // IsSatisfied indicates whether the criteria defining the annotation were fulfilled Timestamp time.Time `json:"timestamp,omitempty"` // Timestamp indicates when the annotation was created }
Annotation represents a document in the "annotation" vertex collection
func NewAnnotation ¶
func NewAnnotation(a contracts.Annotation) Annotation
NewAnnotation will map an Alvarium SDK annotation into an Annotation document
type Data ¶
type Data struct { Key string `json:"_key,omitempty"` // Key uniquely identifies the document in the database Timestamp time.Time `json:"timestamp,omitempty"` // Timestamp indicates when the document was created }
Data represents a document in the "data" vertex collection
type Score ¶
type Score struct { Key ulid.ULID `json:"_key,omitempty"` // Key uniquely identifies the document in the database DataRef string `json:"dataRef,omitempty"` // DataRef points to the key of the data being annotated Passed int `json:"score"` // Passed indicates how many of the annotations for a given dataRef were Satisfied Count int `json:"count"` // Count indicates the total number of annotations applicable to a dataRef Policy string `json:"policy,omitempty"` // Policy will indicate some version of the policy used to calculate confidence Confidence float64 `json:"confidence"` // Confidence is the percentage of trust in the dataRef Timestamp time.Time `json:"timestamp,omitempty"` // Timestamp indicates when the score was calculated Tag []string `json:"tag,omitempty"` Layer contracts.LayerType `json:"layer,omitempty"` }
Score represents a document in the "score" vertex collection
Click to show internal directories.
Click to hide internal directories.