Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthProvider ¶
type AuthProvider struct {
ID *uuid.UUID `gorm:"type:uuid;primaryKey;column:id;default:gen_random_uuid()"`
UserID string `gorm:"type:uuid;not null;index;column:user_id"`
Provider string `gorm:"type:varchar(50);not null;column:provider"`
ProviderUserID *string `gorm:"type:varchar(255);column:provider_user_id"`
PasswordHash *string `gorm:"type:varchar(255);column:password_hash"`
CreatedAt time.Time `gorm:"not null;column:created_at"`
UpdatedAt time.Time `gorm:"not null;column:updated_at"`
}
func (AuthProvider) TableName ¶
func (AuthProvider) TableName() string
type RefreshToken ¶
type RefreshToken struct {
ID *uuid.UUID `gorm:"type:uuid;primaryKey;column:id;default:gen_random_uuid()"`
CreatedAt time.Time `gorm:"not null;column:created_at"`
SessionID uuid.UUID `gorm:"type:uuid;not null;index;column:session_id"`
TokenHash string `gorm:"type:varchar(512);not null;uniqueIndex;column:token_hash"`
ExpiresAt time.Time `gorm:"not null;column:expires_at"`
ConsumedAt *time.Time `gorm:"column:consumed_at"`
}
func (RefreshToken) TableName ¶
func (RefreshToken) TableName() string
type Role ¶
type Session ¶
type Session struct {
ID *uuid.UUID `gorm:"type:uuid;primaryKey;column:id;default:gen_random_uuid()"`
CreatedAt time.Time `gorm:"not null;column:created_at"`
UpdatedAt time.Time `gorm:"not null;column:updated_at"`
UserID uuid.UUID `gorm:"type:uuid;not null;index;column:user_id"`
ExpiresAt time.Time `gorm:"not null;column:expires_at"`
RevokedAt *time.Time `gorm:"column:revoked_at"`
UserAgent string `gorm:"type:varchar(255);not null;column:user_agent"`
}
type User ¶
type User struct {
ID *uuid.UUID `gorm:"type:uuid;primaryKey;column:id;default:gen_random_uuid()"`
CreatedAt time.Time `gorm:"not null;column:created_at"`
UpdatedAt time.Time `gorm:"not null;column:updated_at"`
DisabledAt *time.Time `gorm:"column:disabled_at"`
Username string `gorm:"type:varchar(255);not null;column:username"`
UsernameNormalized string `gorm:"type:varchar(255);not null;column:username_normalized"`
Email string `gorm:"type:varchar(255);not null;uniqueIndex;column:email"`
}
Click to show internal directories.
Click to hide internal directories.