Documentation
¶
Overview ¶
Package views defines the public JSON schema of inventory objects shared by the CLI (--json/--yaml) and the REST API. Internal database rows are never serialised directly.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CTObservation ¶
type CTObservation struct {
ID string `json:"id"`
Watch string `json:"watch,omitempty"`
Status string `json:"status"`
Reason string `json:"reason"`
DNSNames []string `json:"dns_names"`
Issuer string `json:"issuer"`
IssuerName string `json:"issuer_name,omitempty"`
NotBefore time.Time `json:"not_before"`
NotAfter time.Time `json:"not_after"`
CertSHA256 string `json:"cert_sha256,omitempty"`
Serial string `json:"serial,omitempty"`
Provider string `json:"provider"`
ExternalID string `json:"provider_id"`
Revoked *bool `json:"revoked,omitempty"`
KnownCert string `json:"known_certificate,omitempty"`
Acked bool `json:"acknowledged"`
FirstSeen time.Time `json:"first_seen"`
}
CTObservation describes one CT observation.
func NewCTObservation ¶
func NewCTObservation(o database.CTObservation, watch string) CTObservation
NewCTObservation converts a stored observation.
type CertSummary ¶
type CertSummary struct {
ID string `json:"id"`
Name string `json:"name,omitempty"`
CommonName string `json:"common_name"`
Subject string `json:"subject"`
Issuer string `json:"issuer"`
SANs []string `json:"sans"`
NotBefore time.Time `json:"not_before"`
NotAfter time.Time `json:"not_after"`
DaysRemaining int `json:"days_remaining"`
Status string `json:"status"`
Key string `json:"key"`
SignatureAlgorithm string `json:"signature_algorithm"`
IsCA bool `json:"is_ca"`
SelfSigned bool `json:"self_signed"`
SHA256 string `json:"sha256"`
Serial string `json:"serial"`
Tags []string `json:"tags"`
KeyID string `json:"key_id,omitempty"`
IssuerID string `json:"issuer_id,omitempty"`
CTMonitored bool `json:"ct_monitored"`
Source string `json:"source"`
Comment string `json:"comment,omitempty"`
ImportedAt time.Time `json:"imported_at"`
}
CertSummary describes a stored certificate in listings.
func Summarize ¶
func Summarize(c *database.Certificate, e Expiry) CertSummary
Summarize converts a stored certificate.
func SummarizeAll ¶
func SummarizeAll(certs []*database.Certificate, e Expiry) []CertSummary
SummarizeAll converts a list (never nil).
type Key ¶
type Key struct {
ID string `json:"id"`
Name string `json:"name,omitempty"`
Algorithm string `json:"algorithm"`
Bits int `json:"bits"`
Description string `json:"description"`
SPKISHA256 string `json:"spki_sha256"`
SSHFingerprint string `json:"ssh_fingerprint,omitempty"`
HasPrivate bool `json:"has_private_key"`
Source string `json:"source"`
Comment string `json:"comment,omitempty"`
Tags []string `json:"tags"`
ImportedAt time.Time `json:"imported_at"`
Certificates []string `json:"certificates,omitempty"`
}
Key describes a stored key; it never contains key material.
type SSHKey ¶
type SSHKey struct {
ID string `json:"id"`
Name string `json:"name,omitempty"`
Type string `json:"type"`
Bits int `json:"bits"`
Fingerprint string `json:"fingerprint_sha256"`
Comment string `json:"comment,omitempty"`
HasPrivate bool `json:"has_private_key"`
Passphrase bool `json:"passphrase_protected"`
PublicKey string `json:"public_key"`
Source string `json:"source"`
Tags []string `json:"tags"`
ImportedAt time.Time `json:"imported_at"`
}
SSHKey describes a stored SSH key; it never contains private material.
Click to show internal directories.
Click to hide internal directories.