Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ListOfTables = []any{ User{}, Session{}, }
Functions ¶
This section is empty.
Types ¶
type BadaasServerInfo ¶
Describe the current BADAAS instance
type BaseModel ¶
type BaseModel struct { ID uuid.UUID `gorm:"type:uuid;default:uuid_generate_v4()"` CreatedAt time.Time UpdatedAt time.Time DeletedAt gorm.DeletedAt `gorm:"index"` }
Base Model for gorm
Every model intended to be saved in the database must embed this BaseModel reference: https://gorm.io/docs/models.html#gorm-Model
type Session ¶
type Session struct { BaseModel UserID uuid.UUID `gorm:"not null"` ExpiresAt time.Time `gorm:"not null"` }
Represent a user session
func (*Session) CanBeRolled ¶
Return true if the session is expired in less than an hour
type Tabler ¶
type Tabler interface { // pluralized name TableName() string }
The interface "type" need to implement to be considered models
Click to show internal directories.
Click to hide internal directories.