Documentation ¶
Overview ¶
Package models defines all the database models for the application
Index ¶
Constants ¶
View Source
const ( // TokenUserActivation is a constant used to identify tokens used for user activation TokenUserActivation string = "user_activation" // TokenPasswordReset is a constant used to identify tokens used for password resets TokenPasswordReset string = "password_reset" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Nameserver ¶
type Nameserver struct { gorm.Model Host string `gorm:"uniqueIndex,size:512"` Domains []Domain `gorm:"many2many:domain_nameservers;"` NameserverAggregates []NameserverAggregate }
type NameserverAggregate ¶
type Parse ¶
type Parse struct { gorm.Model ContentHash string `gorm:"type:text"` ScreenshotHash string `gorm:"type:text"` BlurredScreenshotHash string `gorm:"type:text"` // There is a lot of porn and other weird stuff out there, so I have opted to blur the screenshots. It is enough to give an idea of what the site was in the past. Size float64 // in Mb LoadTime float64 // in Seconds Error *string Requested time.Time Events []ParseEvent DomainID uint Domain Domain }
type ParseEvent ¶
type Session ¶
Session holds information about user sessions and when they expire
func (Session) HasExpired ¶
HasExpired is a helper function that checks if the current time is after the session expire datetime
type Token ¶
type Token struct { gorm.Model Value string Type string ModelID int ModelType string ExpiresAt time.Time }
Token holds tokens typically used for user activation and password resets
func (Token) HasExpired ¶
HasExpired is a helper function that checks if the current time is after the token expiration time
Click to show internal directories.
Click to hide internal directories.