2020-01-14 16:31:57 +01:00
|
|
|
package models
|
|
|
|
|
2020-01-16 12:06:03 +01:00
|
|
|
// Node defines the data we gather through the parsing. It should follow the
|
|
|
|
// Styx terminology
|
|
|
|
// (https://docs.google.com/document/d/1dIrh1Lp3KAjEMm8o2VzAmuV0Peu-jt9aAh1IHrjAroM/pub#h.xzbicbtscatx)
|
2020-01-14 16:31:57 +01:00
|
|
|
type Node struct {
|
2020-01-28 23:52:24 +01:00
|
|
|
ID string `json:"id"`
|
|
|
|
Type string `json:"type"`
|
|
|
|
Data string `json:"data"`
|
|
|
|
Created string `json:"created"`
|
|
|
|
Modified string `json:"modified"`
|
2020-01-14 16:31:57 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
// Edge defines a relation between two nodes.
|
|
|
|
type Edge struct {
|
2020-01-28 23:52:24 +01:00
|
|
|
ID string `json:"id"`
|
|
|
|
NodeOneID string `json:"nodeOneID"`
|
|
|
|
NodeTwoID string `json:"nodeTwoID"`
|
|
|
|
Timestamp string `json:"timestamp"`
|
|
|
|
Source string `json:"source"`
|
2020-01-26 17:27:20 +01:00
|
|
|
}
|
2020-01-29 10:03:52 +01:00
|
|
|
|
|
|
|
// CertStreamWrapper is a wrapper around the stream function to unmarshall the
|
|
|
|
// data receive in a Go structure.
|
|
|
|
type CertStreamWrapper struct {
|
|
|
|
ID string `json:"id"`
|
|
|
|
Type string `json:"type"`
|
|
|
|
Data CertStreamStruct `json:"data"`
|
|
|
|
Created string `json:"created"`
|
|
|
|
Modified string `json:"modified"`
|
|
|
|
}
|