sqlc
go
import "github.com/prescriptoo/prescriptoo-api/services/identity/internal/postgres/sqlc"Index
- type AuthAuditLog
- type AuthEmailRequestLimit
- type AuthEmailVerification
- type AuthLoginAttempt
- type AuthLoginLimit
- type AuthPasswordReset
- type AuthRefreshToken
- type AuthSession
- type AuthUser
- type CreateUserParams
- type CreateUserRow
- type DBTX
- type GetUserByEmailRow
- type GetUserByIDRow
- type Querier
- type Queries
- func New(db DBTX) *Queries
- func (q *Queries) CreateUser(ctx context.Context, arg CreateUserParams) (CreateUserRow, error)
- func (q *Queries) GetUserByEmail(ctx context.Context, lower string) (GetUserByEmailRow, error)
- func (q *Queries) GetUserByID(ctx context.Context, dollar_1 uuid.UUID) (GetUserByIDRow, error)
- func (q *Queries) UpdateLastLogin(ctx context.Context, dollar_1 uuid.UUID) error
- func (q *Queries) WithTx(tx pgx.Tx) *Queries
type AuthAuditLog
go
type AuthAuditLog struct {
ID uuid.UUID
UserID pgtype.UUID
Action string
ResourceType pgtype.Text
ResourceID pgtype.Text
Metadata []byte
IpAddress *netip.Addr
UserAgent pgtype.Text
CreatedAt time.Time
}type AuthEmailRequestLimit
go
type AuthEmailRequestLimit struct {
EmailHash string
Purpose string
Attempts int32
WindowStartedAt time.Time
}type AuthEmailVerification
go
type AuthEmailVerification struct {
ID uuid.UUID
UserID uuid.UUID
Email string
TokenHash string
ExpiresAt time.Time
VerifiedAt pgtype.Timestamptz
CreatedAt time.Time
}type AuthLoginAttempt
go
type AuthLoginAttempt struct {
ID uuid.UUID
Email string
IpAddress netip.Addr
UserAgent pgtype.Text
Success bool
FailureReason pgtype.Text
CreatedAt time.Time
}type AuthLoginLimit
go
type AuthLoginLimit struct {
EmailHash string
Attempts int32
WindowStartedAt time.Time
}type AuthPasswordReset
go
type AuthPasswordReset struct {
ID uuid.UUID
UserID uuid.UUID
Email string
TokenHash string
ExpiresAt time.Time
UsedAt pgtype.Timestamptz
CreatedAt time.Time
}type AuthRefreshToken
go
type AuthRefreshToken struct {
TokenHash string
SessionID uuid.UUID
}type AuthSession
go
type AuthSession struct {
ID uuid.UUID
UserID uuid.UUID
RefreshTokenHash string
DeviceName pgtype.Text
DeviceType pgtype.Text
IpAddress *netip.Addr
UserAgent pgtype.Text
ExpiresAt time.Time
LastActiveAt time.Time
RevokedAt pgtype.Timestamptz
CreatedAt time.Time
}type AuthUser
go
type AuthUser struct {
ID uuid.UUID
Email string
PasswordHash string
Name string
Phone pgtype.Text
AvatarUrl pgtype.Text
EmailVerifiedAt pgtype.Timestamptz
Status string
LastLoginAt pgtype.Timestamptz
CreatedAt time.Time
UpdatedAt time.Time
}type CreateUserParams
go
type CreateUserParams struct {
Email string
PasswordHash string
Name string
Phone pgtype.Text
AvatarUrl pgtype.Text
Status string
}type CreateUserRow
go
type CreateUserRow struct {
ID uuid.UUID
Email string
PasswordHash string
Name string
Phone pgtype.Text
AvatarUrl pgtype.Text
Status string
EmailVerifiedAt pgtype.Timestamptz
CreatedAt time.Time
UpdatedAt time.Time
}type DBTX
go
type DBTX interface {
Exec(context.Context, string, ...interface{}) (pgconn.CommandTag, error)
Query(context.Context, string, ...interface{}) (pgx.Rows, error)
QueryRow(context.Context, string, ...interface{}) pgx.Row
}type GetUserByEmailRow
go
type GetUserByEmailRow struct {
ID uuid.UUID
Email string
PasswordHash string
Name string
Phone pgtype.Text
AvatarUrl pgtype.Text
Status string
EmailVerifiedAt pgtype.Timestamptz
CreatedAt time.Time
UpdatedAt time.Time
}type GetUserByIDRow
go
type GetUserByIDRow struct {
ID uuid.UUID
Email string
PasswordHash string
Name string
Phone pgtype.Text
AvatarUrl pgtype.Text
Status string
EmailVerifiedAt pgtype.Timestamptz
CreatedAt time.Time
UpdatedAt time.Time
}type Querier
go
type Querier interface {
CreateUser(ctx context.Context, arg CreateUserParams) (CreateUserRow, error)
GetUserByEmail(ctx context.Context, lower string) (GetUserByEmailRow, error)
GetUserByID(ctx context.Context, dollar_1 uuid.UUID) (GetUserByIDRow, error)
UpdateLastLogin(ctx context.Context, dollar_1 uuid.UUID) error
}type Queries
go
type Queries struct {
// contains filtered or unexported fields
}func New
go
func New(db DBTX) *Queriesfunc (*Queries) CreateUser
go
func (q *Queries) CreateUser(ctx context.Context, arg CreateUserParams) (CreateUserRow, error)func (*Queries) GetUserByEmail
go
func (q *Queries) GetUserByEmail(ctx context.Context, lower string) (GetUserByEmailRow, error)func (*Queries) GetUserByID
go
func (q *Queries) GetUserByID(ctx context.Context, dollar_1 uuid.UUID) (GetUserByIDRow, error)func (*Queries) UpdateLastLogin
go
func (q *Queries) UpdateLastLogin(ctx context.Context, dollar_1 uuid.UUID) errorfunc (*Queries) WithTx
go
func (q *Queries) WithTx(tx pgx.Tx) *QueriesGenerated by gomarkdoc