model

package
v0.1.20 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 12, 2026 License: MIT Imports: 2 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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 `db:"id"`
	CreatedAt time.Time `db:"created_at"`
	UpdatedAt time.Time `db:"updated_at"`
	Email     string    `db:"email"`
}

func (AllowedEmail) TableName added in v0.1.10

func (AllowedEmail) TableName() string

type AuthProvider

type AuthProvider struct {
	ID uuid.UUID `db:"id"`

	UserID   uuid.UUID `db:"user_id"`
	Provider string    `db:"provider"`

	ProviderUserID *string `db:"provider_user_id"`
	PasswordHash   *string `db:"password_hash"`

	CreatedAt time.Time `db:"created_at"`
	UpdatedAt time.Time `db:"updated_at"`
}

func (AuthProvider) TableName

func (AuthProvider) TableName() string

type Challenge added in v0.1.12

type Challenge struct {
	ID        uuid.UUID `db:"id"`
	CreatedAt time.Time `db:"created_at"`
	UpdatedAt time.Time `db:"updated_at"`

	Purpose string `db:"purpose"`
	Email   string `db:"email"`

	ExpiresAt    time.Time  `db:"expires_at"`
	ConsumedAt   *time.Time `db:"consumed_at"`
	AttemptCount int        `db:"attempt_count"`
	MaxAttempts  int        `db:"max_attempts"`

	ResendCount int        `db:"resend_count"`
	MaxResends  int        `db:"max_resends"`
	LastSentAt  *time.Time `db:"last_sent_at"`
}

func (Challenge) TableName added in v0.1.12

func (Challenge) TableName() string

type EmailJob added in v0.1.12

type EmailJob struct {
	ID        uuid.UUID `db:"id"`
	CreatedAt time.Time `db:"created_at"`
	UpdatedAt time.Time `db:"updated_at"`

	ChallengeID  *uuid.UUID `db:"challenge_id"`
	ToEmail      string     `db:"to_email"`
	Template     string     `db:"template"`
	TemplateData []byte     `db:"template_data"`
	Status       string     `db:"status"`

	AttemptCount        int        `db:"attempt_count"`
	NextAttemptAt       time.Time  `db:"next_attempt_at"`
	ProcessingStartedAt *time.Time `db:"processing_started_at"`
	LastError           *string    `db:"last_error"`
	SentAt              *time.Time `db:"sent_at"`
}

func (EmailJob) TableName added in v0.1.12

func (EmailJob) TableName() string

type PendingEmailChange added in v0.1.15

type PendingEmailChange struct {
	ID        uuid.UUID `db:"id"`
	CreatedAt time.Time `db:"created_at"`

	ChallengeID uuid.UUID `db:"challenge_id"`
	UserID      uuid.UUID `db:"user_id"`

	OldEmail string `db:"old_email"`
	NewEmail string `db:"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 `db:"id"`
	CreatedAt time.Time `db:"created_at"`

	ChallengeID  uuid.UUID `db:"challenge_id"`
	UserID       uuid.UUID `db:"user_id"`
	PasswordHash string    `db:"password_hash"`
}

func (PendingPasswordReset) TableName added in v0.1.14

func (PendingPasswordReset) TableName() string
type PendingProviderLink struct {
	ID uuid.UUID `db:"id"`

	UserID      uuid.UUID  `db:"user_id"`
	SessionID   *uuid.UUID `db:"session_id"`
	ChallengeID *uuid.UUID `db:"challenge_id"`
	Provider    string     `db:"provider"`

	ProviderUserID        *string `db:"provider_user_id"`
	ProviderEmail         *string `db:"provider_email"`
	ProviderEmailVerified bool    `db:"provider_email_verified"`
	Purpose               string  `db:"purpose"`

	ExpiresAt  time.Time  `db:"expires_at"`
	ConsumedAt *time.Time `db:"consumed_at"`

	CreatedAt time.Time `db:"created_at"`
}

func (PendingProviderLink) TableName added in v0.1.17

func (PendingProviderLink) TableName() string

type PendingSignupAction added in v0.1.12

type PendingSignupAction struct {
	ID        uuid.UUID `db:"id"`
	CreatedAt time.Time `db:"created_at"`

	ChallengeID  uuid.UUID `db:"challenge_id"`
	Email        string    `db:"email"`
	Username     string    `db:"username"`
	PasswordHash string    `db:"password_hash"`
}

func (PendingSignupAction) TableName added in v0.1.12

func (PendingSignupAction) TableName() string

type RefreshToken

type RefreshToken struct {
	ID        uuid.UUID `db:"id"`
	CreatedAt time.Time `db:"created_at"`

	SessionID uuid.UUID `db:"session_id"`

	TokenHash string `db:"token_hash"`

	ExpiresAt  time.Time  `db:"expires_at"`
	ConsumedAt *time.Time `db:"consumed_at"`
}

func (RefreshToken) TableName

func (RefreshToken) TableName() string

type Role

type Role struct {
	ID        uuid.UUID `db:"id"`
	Name      string    `db:"name"`
	CreatedAt time.Time `db:"created_at"`
}

func (Role) TableName

func (Role) TableName() string

type Session

type Session struct {
	ID        uuid.UUID `db:"id"`
	CreatedAt time.Time `db:"created_at"`
	UpdatedAt time.Time `db:"updated_at"`

	UserID uuid.UUID `db:"user_id"`

	ExpiresAt time.Time  `db:"expires_at"`
	RevokedAt *time.Time `db:"revoked_at"`

	UserAgent string `db:"user_agent"`
}

func (Session) TableName

func (Session) TableName() string

type User

type User struct {
	ID        uuid.UUID `db:"id"`
	CreatedAt time.Time `db:"created_at"`
	UpdatedAt time.Time `db:"updated_at"`

	DisabledAt *time.Time `db:"disabled_at"`

	Username           string `db:"username"`
	UsernameNormalized string `db:"username_normalized"`
	Email              string `db:"email"`
}

func (User) TableName

func (User) TableName() string

type UserRole

type UserRole struct {
	UserID uuid.UUID `db:"user_id"`
	RoleID uuid.UUID `db:"role_id"`

	CreatedAt time.Time `db:"created_at"`
}

func (UserRole) TableName

func (UserRole) TableName() string

type VerificationCode added in v0.1.12

type VerificationCode struct {
	ID        uuid.UUID `db:"id"`
	CreatedAt time.Time `db:"created_at"`

	ChallengeID uuid.UUID `db:"challenge_id"`
	CodeHash    string    `db:"code_hash"`
	ExpiresAt   time.Time `db:"expires_at"`
}

func (VerificationCode) TableName added in v0.1.12

func (VerificationCode) TableName() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL