Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AllowedEmail ¶ added in v0.1.10
type AllowedEmail struct {
ID *uuid.UUID `gorm:"type:uuid;primaryKey;colum:id;default:gen_random_uuid()"`
CreatedAt time.Time `gorm:"not null;column:created_at"`
UpdatedAt time.Time `gorm:"not null;column:updated_at"`
Email string `gorm:"type:varchar();not null;column:email"`
}
func (AllowedEmail) TableName ¶ added in v0.1.10
func (AllowedEmail) TableName() string
type AuthProvider ¶
type AuthProvider struct {
ID *uuid.UUID `gorm:"type:uuid;primaryKey;column:id;default:gen_random_uuid()"`
UserID uuid.UUID `gorm:"type:uuid;not null;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 Challenge ¶ added in v0.1.12
type Challenge 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"`
Purpose string `gorm:"type:varchar(64);not null;column:purpose"`
Email string `gorm:"type:varchar(255);not null;column:email"`
ExpiresAt time.Time `gorm:"not null;column:expires_at"`
ConsumedAt *time.Time `gorm:"column:consumed_at"`
AttemptCount int `gorm:"not null;column:attempt_count"`
MaxAttempts int `gorm:"not null;column:max_attempts"`
ResendCount int `gorm:"not null;column:resend_count"`
MaxResends int `gorm:"not null;column:max_resends"`
LastSentAt *time.Time `gorm:"column:last_sent_at"`
}
type EmailJob ¶ added in v0.1.12
type EmailJob 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"`
ChallengeID *uuid.UUID `gorm:"type:uuid;column:challenge_id"`
ToEmail string `gorm:"type:varchar(255);not null;column:to_email"`
Template string `gorm:"type:varchar(64);not null;column:template"`
TemplateData []byte `gorm:"type:jsonb;column:template_data"`
Status string `gorm:"type:varchar(32);not null;index;column:status"`
AttemptCount int `gorm:"not null;column:attempt_count"`
NextAttemptAt time.Time `gorm:"not null;column:next_attempt_at"`
ProcessingStartedAt *time.Time `gorm:"column:processing_started_at"`
LastError *string `gorm:"type:text;column:last_error"`
SentAt *time.Time `gorm:"column:sent_at"`
}
type PendingEmailChange ¶ added in v0.1.15
type PendingEmailChange struct {
ID *uuid.UUID `gorm:"type:uuid;primaryKey;column:id;default:gen_random_uuid()"`
CreatedAt time.Time `gorm:"not null;column:created_at"`
ChallengeID uuid.UUID `gorm:"type:uuid;not null;column:challenge_id"`
UserID uuid.UUID `gorm:"type:uuid;not null;column:user_id"`
OldEmail string `gorm:"type:varchar(255);not null;column:old_email"`
NewEmail string `gorm:"type:varchar(255);not null;column:new_email"`
}
func (PendingEmailChange) TableName ¶ added in v0.1.15
func (PendingEmailChange) TableName() string
type PendingPasswordReset ¶ added in v0.1.14
type PendingPasswordReset struct {
ID *uuid.UUID `gorm:"type:uuid;primaryKey;column:id;default:gen_random_uuid()"`
CreatedAt time.Time `gorm:"not null;column:created_at"`
ChallengeID uuid.UUID `gorm:"type:uuid;not null;column:challenge_id"`
UserID uuid.UUID `gorm:"type:uuid;not null;column:user_id"`
PasswordHash string `gorm:"type:varchar(255);not null;column:password_hash"`
}
func (PendingPasswordReset) TableName ¶ added in v0.1.14
func (PendingPasswordReset) TableName() string
type PendingSignupAction ¶ added in v0.1.12
type PendingSignupAction struct {
ID *uuid.UUID `gorm:"type:uuid;primaryKey;column:id;default:gen_random_uuid()"`
CreatedAt time.Time `gorm:"not null;column:created_at"`
ChallengeID uuid.UUID `gorm:"type:uuid;not null;column:challenge_id"`
Email string `gorm:"type:varchar(255);not null;column:email"`
Username string `gorm:"type:varchar(255);not null;column:username"`
PasswordHash string `gorm:"type:varchar(255);not null;column:password_hash"`
}
func (PendingSignupAction) TableName ¶ added in v0.1.12
func (PendingSignupAction) 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;column:session_id"`
TokenHash string `gorm:"type:varchar(512);not null;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;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;column:email"`
}
type UserRole ¶
type VerificationCode ¶ added in v0.1.12
type VerificationCode struct {
ID *uuid.UUID `gorm:"type:uuid;primaryKey;column:id;default:gen_random_uuid()"`
CreatedAt time.Time `gorm:"not null;column:created_at"`
ChallengeID uuid.UUID `gorm:"type:uuid;not null;column:challenge_id"`
CodeHash string `gorm:"type:varchar(255);not null;column:code_hash"`
ExpiresAt time.Time `gorm:"not null;column:expires_at"`
}
func (VerificationCode) TableName ¶ added in v0.1.12
func (VerificationCode) TableName() string
Click to show internal directories.
Click to hide internal directories.