Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CertNames ¶
type CertNames struct {
ID uint `json:"id" gorm:"primarykey"`
CertificateID uint `json:"cert_id" gorm:"index:idx_cert"`
Hash string `json:"hash" gorm:"index:,unique;"`
Type string `json:"type"`
Name string `json:"name"`
}
func (*CertNames) BeforeCreate ¶ added in v0.1.5
type Certificate ¶
type Certificate struct {
ID uint `json:"id" gorm:"primarykey, TYPE:integer"`
Hash string `json:"hash" gorm:"index:,unique;"`
Fingerprint string `json:"fingerprint" gorm:"index:,unique;"`
Subject string `json:"subject"`
Issuer string `json:"issuer"`
NotBefore time.Time `json:"not_before"`
NotAfter time.Time `json:"not_after"`
ProbedAt time.Time `json:"probe_at"`
IsRootCA bool `json:"root_ca"`
IsCA bool `json:"ca"`
SelfSigned bool `json:"self_signed"`
RawData string `json:"raw_data"`
Names []*CertNames `json:"names" gorm:"constraint:OnDelete:CASCADE"`
Hosts []*Host `gorm:"many2many:hosts_certs;"`
}
Result is a github.com/helviojunior/certcrawlercertcrawler result
func (*Certificate) BeforeCreate ¶
func (c *Certificate) BeforeCreate(tx *gorm.DB) (err error)
func (Certificate) MarshalJSON ¶
func (result Certificate) MarshalJSON() ([]byte, error)
Custom Marshaller for Result
func (*Certificate) String ¶
func (cert *Certificate) String() string
func (Certificate) TableName ¶
func (Certificate) TableName() string
type FQDN ¶
type Host ¶
type Host struct {
ID uint `json:"id" gorm:"primarykey"`
Hash string `json:"hash" gorm:"index:,unique;"`
Ip string `json:"ip"`
Port uint `json:"port"`
Cloud string `json:"cloud"`
Ptr string `json:"ptr"`
Certificates []*Certificate `gorm:"many2many:hosts_certs;"`
FQDNs []*FQDN `gorm:"many2many:hosts_fqdns;"`
}
func (*Host) AddCertificate ¶
func (host *Host) AddCertificate(cert *Certificate)
func (*Host) HasCert ¶
func (host *Host) HasCert(cert *Certificate) bool
Click to show internal directories.
Click to hide internal directories.