Documentation ¶
Index ¶
- func CreateOrUpdateSchema(entry Entry, dataset, table string) error
- func GetMissingEntries(dataset, table string) ([]int64, error)
- func Insert(entry Entry, dataset, table string) error
- func Marshal(i interface{}) ([]byte, error)
- func UpdateTableSchema(entry Entry, dataset, table string) error
- type Bucket
- type Entry
- type Hashedrekord
- type InToTo
- type Kind
- type LogSize
- type Phren
- type RekorDataHash
- type Rekord
- type RekordData
- type RekordSignature
- type Signature
- type TLog
- type Tlog
- type X509
- type X509Extension
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateOrUpdateSchema ¶
CreateOrUpdateSchema creates a new table in BigQuery. The func detects the project ID from the credentials.
func GetMissingEntries ¶
GetMissingEntries returns the missing entries from the BigQuery table. This will be used to fill the missing entries in the BigQuery table by rerunning the missing entries as cron job.
func Marshal ¶
Marshal is a UTF-8 friendly marshaller. Go's json.Marshal is not UTF-8 friendly because it replaces the valid UTF-8 and JSON characters "&". "<", ">" with the "slash u" unicode escaped forms (e.g. \u0026). It preemptively escapes for HTML friendliness. Where text may include any of these characters, json.Marshal should not be used. Playground of Go breaking a title: https://play.golang.org/p/o2hiX0c62oN
func UpdateTableSchema ¶
Types ¶
type Entry ¶
type Entry struct { IntegratedTime int `json:"integratedTime"` LogID string `json:"logID"` LogIndex int `json:"logIndex"` Kind Kind `json:"kind"` Rekord *Rekord `json:"rekord,omitempty"` HashedRekord *Hashedrekord `json:"hashedrekord,omitempty"` Intoto *InToTo `json:"intoto,omitempty"` Date time.Time `json:"date"` }
type Hashedrekord ¶
type Hashedrekord struct { Data RekordData `json:"data"` Signature RekordSignature `json:"signature"` // contains filtered or unexported fields }
type InToTo ¶
type InToTo struct { Data RekordData `json:"data"` Signature RekordSignature `json:"signature"` // contains filtered or unexported fields }
type RekorDataHash ¶
type Rekord ¶
type Rekord struct { Data RekordData `json:"data"` Signature Signature `json:"signature"` // contains filtered or unexported fields }
type RekordData ¶
type RekordData struct {
Hash RekorDataHash `json:"hash"`
}
type RekordSignature ¶
type X509 ¶
type X509 struct { Version int `json:"version,omitempty"` SerialNumber string `json:"serial_number,omitempty"` SignatureAlgorithm string `json:"signature_algorithm,omitempty"` IssuerOrganization string `json:"issuer_organization,omitempty"` IssuerCommonName string `json:"issuer_common_name,omitempty"` ValidityNotBefore time.Time `json:"validity_not_before,omitempty"` ValidityNotAfter time.Time `json:"validity_not_after,omitempty"` Extensions []X509Extension `json:"extensions,omitempty"` }