Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DenormalizeValues ¶
Types ¶
type Database ¶
type Database interface { CreateNewSubDomain(tokenHash, domainName string) (Domain, error) GetDomain(domain string) (Domain, error) PersistRecord(domainID uint, fqdn, rType string, values []string) error Renew(domainID uint, fqdnTypePairs []model.FQDNTypePair, version string) error GetDomainRecords(domainID uint) (map[model.FQDNTypePair]Record, error) GetDomainRecordsByFQDN(fqdn string, domainID uint) ([]Record, error) DeleteRecords(records []Record) error PurgeOldDomainsAndRecords(maxDomainAgeSeconds, maxRecordAgeSeconds int64) (int64, int64, error) GetYoungRecords(maxAgeSeconds int64, fqdnTypePairs map[model.FQDNTypePair]bool) (map[model.FQDNTypePair]Record, error) }
type Record ¶
type Record struct { ID uint `gorm:"primarykey"` FQDN string `gorm:"uniqueIndex:idx_record,priority:1"` Type string `gorm:"uniqueIndex:idx_record,priority:2"` DomainID uint Domain Domain `gorm:"constraint:OnDelete:SET NULL;"` Values string `gorm:"type:text"` // Intentionally denormalized because we don't want to create a values table CreatedAt time.Time LastCheckIn time.Time }
Click to show internal directories.
Click to hide internal directories.