sqldb

package
v0.0.0-...-a1a22e4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 21, 2017 License: MPL-2.0 Imports: 15 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RecombineURLForDB

func RecombineURLForDB(dbConnect string) (string, error)

Taken from Boulder

Types

type CensysEntry

type CensysEntry struct {
	CertID    uint64    `db:"certID"`    // Internal Cert Identifier (FK to Certificate)
	EntryTime time.Time `db:"entryTime"` // Date when this certificate was imported from Censys.io
}

type CertToFQDN

type CertToFQDN struct {
	NameID uint64 `db:"nameID"` // Internal Name Identifier
	CertID uint64 `db:"certID"` // Internal Cert Identifier
}

type CertToRegisteredDomain

type CertToRegisteredDomain struct {
	RegDomID uint64 `db:"regdomID"` // Internal Registerd Domain Identifier
	CertID   uint64 `db:"certID"`   // Internal Cert Identifier
}

type Certificate

type Certificate struct {
	CertID    uint64    `db:"certID, primarykey, autoincrement"` // Internal Cert Identifier
	Serial    string    `db:"serial"`                            // The serial number of this cert
	IssuerID  int       `db:"issuerID"`                          // The Issuer of this cert
	Subject   string    `db:"subject"`                           // The Subject field of this cert
	NotBefore time.Time `db:"notBefore"`                         // Date before which this cert should be considered invalid
	NotAfter  time.Time `db:"notAfter"`                          // Date after which this cert should be considered invalid
}

type CertificateLog

type CertificateLog struct {
	LogID         int       `db:"logID, primarykey, autoincrement"` // Log Identifier (FK to CertificateLog)
	URL           string    `db:"url"`                              // URL to the log
	MaxEntry      uint64    `db:"maxEntry"`                         // The most recent entryID logged
	LastEntryTime time.Time `db:"lastEntryTime"`                    // Date when we completed the last update
}

type CertificateLogEntry

type CertificateLogEntry struct {
	CertID    uint64    `db:"certID"`    // Internal Cert Identifier (FK to Certificate)
	LogID     int       `db:"logID"`     // Log Identifier (FK to CertificateLog)
	EntryID   uint64    `db:"entryId"`   // Entry Identifier within the log
	EntryTime time.Time `db:"entryTime"` // Date when this certificate was added to the log
}

type EntriesDatabase

type EntriesDatabase struct {
	DbMap               *gorp.DbMap
	SQLDebug            bool
	Verbose             bool
	FullCerts           *utils.FolderDatabase
	IssuerCNFilter      []string
	KnownIssuers        map[string]int
	IssuersLock         sync.RWMutex
	EarliestDateFilter  time.Time
	CorrelateLogEntries bool
	LogExpiredEntries   bool
}

func (*EntriesDatabase) GetLogState

func (edb *EntriesDatabase) GetLogState(url string) (*CertificateLog, error)

func (*EntriesDatabase) InitTables

func (edb *EntriesDatabase) InitTables() error

func (*EntriesDatabase) InsertCTEntry

func (edb *EntriesDatabase) InsertCTEntry(entry *ct.LogEntry, logID int) error

func (*EntriesDatabase) InsertCensysEntry

func (edb *EntriesDatabase) InsertCensysEntry(entry *censysdata.CensysEntry) error

func (*EntriesDatabase) InsertOrUpdatePageloadIsTLS

func (edb *EntriesDatabase) InsertOrUpdatePageloadIsTLS(datestamp time.Time, isTLS int, count int) error

func (*EntriesDatabase) InsertResolvedName

func (edb *EntriesDatabase) InsertResolvedName(nameId uint64, address string) error

func (*EntriesDatabase) InsertResolvedPlace

func (edb *EntriesDatabase) InsertResolvedPlace(nameId uint64, city string, country string, continent string) error

func (*EntriesDatabase) SaveLogState

func (edb *EntriesDatabase) SaveLogState(certLogObj *CertificateLog) error

func (*EntriesDatabase) UnqueueFromNetscan

func (edb *EntriesDatabase) UnqueueFromNetscan(nameId uint64) error

type FQDN

type FQDN struct {
	NameID uint64 `db:"nameID, primarykey, autoincrement"` // Internal Name Identifier
	Name   string `db:"name"`                              // identifier
}

type FirefoxPageloadIsTLS

type FirefoxPageloadIsTLS struct {
	Datestamp      time.Time `db:"datestamp, primarykey"` // Date when this resolution was performed
	CountTLS       int       `db:"countTLS"`              // Number of TLS pageloads
	CountPageloads int       `db:"countPageloads"`        // Number of total pageloads
	TimeAdded      time.Time `db:"timeAdded"`             // Date when this resolution was performed
}

type Issuer

type Issuer struct {
	IssuerID       int    `db:"issuerID, primarykey, autoincrement"` // Internal Issuer ID
	CommonName     string `db:"commonName"`                          // Issuer CN
	AuthorityKeyId string `db:"authorityKeyID"`                      // Authority Key ID
}

type NetscanQueue

type NetscanQueue struct {
	NameID    uint64    `db:"nameID, primarykey"` // Internal Name Identifier (FK to Subject Name)
	TimeAdded time.Time `db:"time"`               // Date when this resolution was performed
}

type RegisteredDomain

type RegisteredDomain struct {
	RegDomID uint64 `db:"regdomID"` // Internal Registerd Domain Identifier
	ETLD     string `db:"etld"`     // effective top-level domain
	Label    string `db:"label"`    // first label
	Domain   string `db:"domain"`   // eTLD+first label
}

type ResolvedName

type ResolvedName struct {
	NameID  uint64    `db:"nameID"` // Internal Name Identifier (FK to Subject Name)
	Time    time.Time `db:"time"`   // Date when this resolution was performed
	Address string    `db:"ipaddr"` // IP address resolved at this name
}

type ResolvedPlace

type ResolvedPlace struct {
	NameID    uint64    `db:"nameID"`    // Internal Name Identifier (FK to Subject Name)
	Time      time.Time `db:"time"`      // Date when this resolution was performed
	City      string    `db:"city"`      // Geo: City name
	Country   string    `db:"country"`   // Geo: Country ISO code
	Continent string    `db:"continent"` // Geo: Continent name
}

type UnexpiredCertificate

type UnexpiredCertificate struct {
	CertID    uint64 `db:"certID"`    // Internal Cert Identifier
	IssuerID  int    `db:"issuerID"`  // Internal Issuer ID
	NotBefore string `db:"notBefore"` // Date before which this cert should be considered invalid
	NotAfter  string `db:"notAfter"`  // Date after which this cert should be considered invalid
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL