sqlc

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfirmTOTPSecretParams added in v0.5.0

type ConfirmTOTPSecretParams struct {
	UserID      pgtype.UUID
	ConfirmedAt pgtype.Timestamptz
}

type ConsumeRecoveryCodeByIDParams added in v0.5.0

type ConsumeRecoveryCodeByIDParams struct {
	ID     pgtype.UUID
	UsedAt pgtype.Timestamptz
}

type CountGroupsByOrganizationParams added in v0.7.0

type CountGroupsByOrganizationParams struct {
	OrganizationID pgtype.UUID
	DisplayName    string
	ExternalID     string
}

type CountUsersByOrganizationParams added in v0.7.0

type CountUsersByOrganizationParams struct {
	OrganizationID pgtype.UUID
	UserName       string
	ExternalID     string
	Email          string
}

type CreateMagicLinkParams

type CreateMagicLinkParams struct {
	ID        pgtype.UUID
	Email     string
	TokenHash []byte
	ExpiresAt pgtype.Timestamptz
	CreatedAt pgtype.Timestamptz
}

type CreatePasswordResetTokenParams added in v0.2.0

type CreatePasswordResetTokenParams struct {
	ID        pgtype.UUID
	UserID    pgtype.UUID
	TokenHash []byte
	ExpiresAt pgtype.Timestamptz
	CreatedAt pgtype.Timestamptz
}

type CreateSessionParams

type CreateSessionParams struct {
	ID        pgtype.UUID
	UserID    pgtype.UUID
	TokenHash []byte
	UserAgent string
	Ip        *netip.Addr
	CreatedAt pgtype.Timestamptz
	ExpiresAt pgtype.Timestamptz
}

type CreateSessionWithAuthLevelParams added in v0.5.0

type CreateSessionWithAuthLevelParams struct {
	ID        pgtype.UUID
	UserID    pgtype.UUID
	TokenHash []byte
	UserAgent string
	Ip        *netip.Addr
	CreatedAt pgtype.Timestamptz
	ExpiresAt pgtype.Timestamptz
	AuthLevel string
}

type CreateUserParams

type CreateUserParams struct {
	ID        pgtype.UUID
	Email     string
	Name      string
	AvatarUrl string
	CreatedAt pgtype.Timestamptz
	UpdatedAt pgtype.Timestamptz
}

type DBTX

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 DeleteGroupMemberParams added in v0.7.0

type DeleteGroupMemberParams struct {
	GroupID pgtype.UUID
	UserID  pgtype.UUID
}

type DeleteOrganizationMemberParams added in v0.7.0

type DeleteOrganizationMemberParams struct {
	OrganizationID pgtype.UUID
	UserID         pgtype.UUID
}

type DeleteWebAuthnCredentialParams added in v0.5.0

type DeleteWebAuthnCredentialParams struct {
	ID     pgtype.UUID
	UserID pgtype.UUID
}

type Group added in v0.7.0

type Group struct {
	ID             pgtype.UUID
	OrganizationID pgtype.UUID
	DisplayName    string
	ExternalID     *string
	CreatedAt      pgtype.Timestamptz
	UpdatedAt      pgtype.Timestamptz
}

type GroupByExternalIDInOrgParams added in v0.7.0

type GroupByExternalIDInOrgParams struct {
	OrganizationID pgtype.UUID
	ExternalID     *string
}

type GroupMember added in v0.7.0

type GroupMember struct {
	GroupID pgtype.UUID
	UserID  pgtype.UUID
}

type InsertGroupMemberParams added in v0.7.0

type InsertGroupMemberParams struct {
	GroupID pgtype.UUID
	UserID  pgtype.UUID
}

type InsertGroupParams added in v0.7.0

type InsertGroupParams struct {
	ID             pgtype.UUID
	OrganizationID pgtype.UUID
	DisplayName    string
	ExternalID     *string
	CreatedAt      pgtype.Timestamptz
}

type InsertOrganizationParams added in v0.7.0

type InsertOrganizationParams struct {
	ID        pgtype.UUID
	Name      string
	Slug      string
	CreatedAt pgtype.Timestamptz
	UpdatedAt pgtype.Timestamptz
}

type InsertRecoveryCodeParams added in v0.5.0

type InsertRecoveryCodeParams struct {
	ID        pgtype.UUID
	UserID    pgtype.UUID
	CodeHash  []byte
	CreatedAt pgtype.Timestamptz
}

type InsertSAMLConnectionParams added in v0.7.0

type InsertSAMLConnectionParams struct {
	ID             pgtype.UUID
	OrganizationID pgtype.UUID
	IdpEntityID    string
	IdpSsoUrl      string
	IdpX509Cert    string
	SpEntityID     string
	SpAcsUrl       string
	AttributeMap   []byte
	CreatedAt      pgtype.Timestamptz
	UpdatedAt      pgtype.Timestamptz
}

type InsertSCIMTokenParams added in v0.7.0

type InsertSCIMTokenParams struct {
	ID             pgtype.UUID
	OrganizationID pgtype.UUID
	TokenHash      []byte
	Name           string
	CreatedAt      pgtype.Timestamptz
}

type InsertWebAuthnCredentialParams added in v0.5.0

type InsertWebAuthnCredentialParams struct {
	ID           pgtype.UUID
	UserID       pgtype.UUID
	CredentialID []byte
	PublicKey    []byte
	SignCount    int64
	Transports   []string
	Aaguid       []byte
	Name         string
	CreatedAt    pgtype.Timestamptz
	LastUsedAt   pgtype.Timestamptz
}

type ListGroupsByOrganizationParams added in v0.7.0

type ListGroupsByOrganizationParams struct {
	OrganizationID pgtype.UUID
	DisplayName    string
	ExternalID     string
	OffsetN        int32
	LimitN         int32
}

type ListUsersByOrganizationParams added in v0.7.0

type ListUsersByOrganizationParams struct {
	OrganizationID pgtype.UUID
	UserName       string
	ExternalID     string
	Email          string
	OffsetN        int32
	LimitN         int32
}
type MagicLink struct {
	ID        pgtype.UUID
	Email     string
	TokenHash []byte
	ExpiresAt pgtype.Timestamptz
	UsedAt    pgtype.Timestamptz
	CreatedAt pgtype.Timestamptz
}

type OAuthAccountByProviderUserIDParams added in v0.3.0

type OAuthAccountByProviderUserIDParams struct {
	Provider       string
	ProviderUserID string
}

type OauthAccount added in v0.3.0

type OauthAccount struct {
	ID              pgtype.UUID
	UserID          pgtype.UUID
	Provider        string
	ProviderUserID  string
	AccessTokenEnc  []byte
	RefreshTokenEnc []byte
	ExpiresAt       pgtype.Timestamptz
	Scope           string
	CreatedAt       pgtype.Timestamptz
	UpdatedAt       pgtype.Timestamptz
}

type Organization added in v0.7.0

type Organization struct {
	ID        pgtype.UUID
	Name      string
	Slug      string
	CreatedAt pgtype.Timestamptz
	UpdatedAt pgtype.Timestamptz
}

type OrganizationMember added in v0.7.0

type OrganizationMember struct {
	OrganizationID pgtype.UUID
	UserID         pgtype.UUID
	Role           string
	JoinedAt       pgtype.Timestamptz
}

type OrganizationMemberRoleParams added in v0.7.0

type OrganizationMemberRoleParams struct {
	OrganizationID pgtype.UUID
	UserID         pgtype.UUID
}

type PasswordResetToken added in v0.2.0

type PasswordResetToken struct {
	ID        pgtype.UUID
	UserID    pgtype.UUID
	TokenHash []byte
	ExpiresAt pgtype.Timestamptz
	UsedAt    pgtype.Timestamptz
	CreatedAt pgtype.Timestamptz
}

type Queries

type Queries struct {
	// contains filtered or unexported fields
}

func New

func New(db DBTX) *Queries

func (*Queries) ConfirmTOTPSecret added in v0.5.0

func (q *Queries) ConfirmTOTPSecret(ctx context.Context, arg ConfirmTOTPSecretParams) (int64, error)
func (q *Queries) ConsumeMagicLink(ctx context.Context, tokenHash []byte) (MagicLink, error)

func (*Queries) ConsumePasswordResetToken added in v0.2.0

func (q *Queries) ConsumePasswordResetToken(ctx context.Context, tokenHash []byte) (PasswordResetToken, error)

func (*Queries) ConsumeRecoveryCodeByID added in v0.5.0

func (q *Queries) ConsumeRecoveryCodeByID(ctx context.Context, arg ConsumeRecoveryCodeByIDParams) (int64, error)

func (*Queries) CountGroupsByOrganization added in v0.7.0

func (q *Queries) CountGroupsByOrganization(ctx context.Context, arg CountGroupsByOrganizationParams) (int64, error)

func (*Queries) CountUsersByOrganization added in v0.7.0

func (q *Queries) CountUsersByOrganization(ctx context.Context, arg CountUsersByOrganizationParams) (int64, error)
func (q *Queries) CreateMagicLink(ctx context.Context, arg CreateMagicLinkParams) error

func (*Queries) CreatePasswordResetToken added in v0.2.0

func (q *Queries) CreatePasswordResetToken(ctx context.Context, arg CreatePasswordResetTokenParams) error

func (*Queries) CreateSession

func (q *Queries) CreateSession(ctx context.Context, arg CreateSessionParams) (Session, error)

func (*Queries) CreateSessionWithAuthLevel added in v0.5.0

func (q *Queries) CreateSessionWithAuthLevel(ctx context.Context, arg CreateSessionWithAuthLevelParams) (Session, error)

func (*Queries) CreateUser

func (q *Queries) CreateUser(ctx context.Context, arg CreateUserParams) (User, error)

func (*Queries) DeleteAllGroupMembers added in v0.7.0

func (q *Queries) DeleteAllGroupMembers(ctx context.Context, groupID pgtype.UUID) error

func (*Queries) DeleteGroup added in v0.7.0

func (q *Queries) DeleteGroup(ctx context.Context, id pgtype.UUID) (int64, error)

func (*Queries) DeleteGroupMember added in v0.7.0

func (q *Queries) DeleteGroupMember(ctx context.Context, arg DeleteGroupMemberParams) error

func (*Queries) DeleteOrganization added in v0.7.0

func (q *Queries) DeleteOrganization(ctx context.Context, id pgtype.UUID) (int64, error)

func (*Queries) DeleteOrganizationMember added in v0.7.0

func (q *Queries) DeleteOrganizationMember(ctx context.Context, arg DeleteOrganizationMemberParams) (int64, error)

func (*Queries) DeleteRecoveryCodesByUserID added in v0.5.0

func (q *Queries) DeleteRecoveryCodesByUserID(ctx context.Context, userID pgtype.UUID) error

func (*Queries) DeleteSAMLConnection added in v0.7.0

func (q *Queries) DeleteSAMLConnection(ctx context.Context, id pgtype.UUID) (int64, error)

func (*Queries) DeleteTOTPSecret added in v0.5.0

func (q *Queries) DeleteTOTPSecret(ctx context.Context, userID pgtype.UUID) error

func (*Queries) DeleteWebAuthnCredential added in v0.5.0

func (q *Queries) DeleteWebAuthnCredential(ctx context.Context, arg DeleteWebAuthnCredentialParams) (int64, error)

func (*Queries) GroupByExternalIDInOrg added in v0.7.0

func (q *Queries) GroupByExternalIDInOrg(ctx context.Context, arg GroupByExternalIDInOrgParams) (Group, error)

func (*Queries) GroupByID added in v0.7.0

func (q *Queries) GroupByID(ctx context.Context, id pgtype.UUID) (Group, error)

func (*Queries) GroupMembersByGroupID added in v0.7.0

func (q *Queries) GroupMembersByGroupID(ctx context.Context, groupID pgtype.UUID) ([]pgtype.UUID, error)

func (*Queries) InsertGroup added in v0.7.0

func (q *Queries) InsertGroup(ctx context.Context, arg InsertGroupParams) (Group, error)

func (*Queries) InsertGroupMember added in v0.7.0

func (q *Queries) InsertGroupMember(ctx context.Context, arg InsertGroupMemberParams) error

func (*Queries) InsertOrganization added in v0.7.0

func (q *Queries) InsertOrganization(ctx context.Context, arg InsertOrganizationParams) (Organization, error)

func (*Queries) InsertRecoveryCode added in v0.5.0

func (q *Queries) InsertRecoveryCode(ctx context.Context, arg InsertRecoveryCodeParams) error

func (*Queries) InsertSAMLConnection added in v0.7.0

func (q *Queries) InsertSAMLConnection(ctx context.Context, arg InsertSAMLConnectionParams) (SamlConnection, error)

func (*Queries) InsertSCIMToken added in v0.7.0

func (q *Queries) InsertSCIMToken(ctx context.Context, arg InsertSCIMTokenParams) (ScimToken, error)

func (*Queries) InsertWebAuthnCredential added in v0.5.0

func (q *Queries) InsertWebAuthnCredential(ctx context.Context, arg InsertWebAuthnCredentialParams) (WebauthnCredential, error)

func (*Queries) ListGroupsByOrganization added in v0.7.0

func (q *Queries) ListGroupsByOrganization(ctx context.Context, arg ListGroupsByOrganizationParams) ([]Group, error)

func (*Queries) ListUsersByOrganization added in v0.7.0

func (q *Queries) ListUsersByOrganization(ctx context.Context, arg ListUsersByOrganizationParams) ([]User, error)

func (*Queries) MarkEmailVerified

func (q *Queries) MarkEmailVerified(ctx context.Context, id pgtype.UUID) error

func (*Queries) OAuthAccountByProviderUserID added in v0.3.0

func (q *Queries) OAuthAccountByProviderUserID(ctx context.Context, arg OAuthAccountByProviderUserIDParams) (OauthAccount, error)

func (*Queries) OrganizationByID added in v0.7.0

func (q *Queries) OrganizationByID(ctx context.Context, id pgtype.UUID) (Organization, error)

func (*Queries) OrganizationBySlug added in v0.7.0

func (q *Queries) OrganizationBySlug(ctx context.Context, slug string) (Organization, error)

func (*Queries) OrganizationMemberRole added in v0.7.0

func (q *Queries) OrganizationMemberRole(ctx context.Context, arg OrganizationMemberRoleParams) (string, error)

func (*Queries) OrganizationMembersByOrg added in v0.7.0

func (q *Queries) OrganizationMembersByOrg(ctx context.Context, organizationID pgtype.UUID) ([]OrganizationMember, error)

func (*Queries) OrganizationsByUser added in v0.7.0

func (q *Queries) OrganizationsByUser(ctx context.Context, userID pgtype.UUID) ([]Organization, error)

func (*Queries) RecoveryCodesByUserID added in v0.5.0

func (q *Queries) RecoveryCodesByUserID(ctx context.Context, userID pgtype.UUID) ([]TotpRecoveryCode, error)

func (*Queries) RevokeSCIMTokenByID added in v0.7.0

func (q *Queries) RevokeSCIMTokenByID(ctx context.Context, arg RevokeSCIMTokenByIDParams) (int64, error)

func (*Queries) RevokeSession

func (q *Queries) RevokeSession(ctx context.Context, id pgtype.UUID) error

func (*Queries) RevokeUserSessions

func (q *Queries) RevokeUserSessions(ctx context.Context, userID pgtype.UUID) error

func (*Queries) SAMLConnectionByID added in v0.7.0

func (q *Queries) SAMLConnectionByID(ctx context.Context, id pgtype.UUID) (SamlConnection, error)

func (*Queries) SAMLConnectionsByOrg added in v0.7.0

func (q *Queries) SAMLConnectionsByOrg(ctx context.Context, organizationID pgtype.UUID) ([]SamlConnection, error)

func (*Queries) SAMLIdentityByConnectionAndNameID added in v0.7.0

func (q *Queries) SAMLIdentityByConnectionAndNameID(ctx context.Context, arg SAMLIdentityByConnectionAndNameIDParams) (SamlIdentity, error)

func (*Queries) SCIMTokenByHash added in v0.7.0

func (q *Queries) SCIMTokenByHash(ctx context.Context, tokenHash []byte) (ScimToken, error)

func (*Queries) SCIMTokensByOrg added in v0.7.0

func (q *Queries) SCIMTokensByOrg(ctx context.Context, organizationID pgtype.UUID) ([]ScimToken, error)

func (*Queries) SessionByTokenHash

func (q *Queries) SessionByTokenHash(ctx context.Context, tokenHash []byte) (Session, error)

func (*Queries) SetSessionActiveOrganization added in v0.7.0

func (q *Queries) SetSessionActiveOrganization(ctx context.Context, arg SetSessionActiveOrganizationParams) (int64, error)

func (*Queries) SetUserPassword added in v0.2.0

func (q *Queries) SetUserPassword(ctx context.Context, arg SetUserPasswordParams) error

func (*Queries) TOTPSecretByUserID added in v0.5.0

func (q *Queries) TOTPSecretByUserID(ctx context.Context, userID pgtype.UUID) (TotpSecret, error)

func (*Queries) TouchSAMLIdentityLastLogin added in v0.7.0

func (q *Queries) TouchSAMLIdentityLastLogin(ctx context.Context, arg TouchSAMLIdentityLastLoginParams) error

func (*Queries) TouchSCIMTokenLastUsed added in v0.7.0

func (q *Queries) TouchSCIMTokenLastUsed(ctx context.Context, arg TouchSCIMTokenLastUsedParams) error

func (*Queries) UpdateGroup added in v0.7.0

func (q *Queries) UpdateGroup(ctx context.Context, arg UpdateGroupParams) (int64, error)

func (*Queries) UpdateOrganization added in v0.7.0

func (q *Queries) UpdateOrganization(ctx context.Context, arg UpdateOrganizationParams) (int64, error)

func (*Queries) UpdateSAMLConnection added in v0.7.0

func (q *Queries) UpdateSAMLConnection(ctx context.Context, arg UpdateSAMLConnectionParams) (int64, error)

func (*Queries) UpdateSessionAuthLevel added in v0.5.0

func (q *Queries) UpdateSessionAuthLevel(ctx context.Context, arg UpdateSessionAuthLevelParams) error

func (*Queries) UpdateUserSCIM added in v0.7.0

func (q *Queries) UpdateUserSCIM(ctx context.Context, arg UpdateUserSCIMParams) (int64, error)

func (*Queries) UpdateWebAuthnSignCount added in v0.5.0

func (q *Queries) UpdateWebAuthnSignCount(ctx context.Context, arg UpdateWebAuthnSignCountParams) (int64, error)

func (*Queries) UpsertOAuthAccount added in v0.3.0

func (q *Queries) UpsertOAuthAccount(ctx context.Context, arg UpsertOAuthAccountParams) (OauthAccount, error)

func (*Queries) UpsertOrganizationMember added in v0.7.0

func (q *Queries) UpsertOrganizationMember(ctx context.Context, arg UpsertOrganizationMemberParams) error

func (*Queries) UpsertPendingTOTPSecret added in v0.5.0

func (q *Queries) UpsertPendingTOTPSecret(ctx context.Context, arg UpsertPendingTOTPSecretParams) error

func (*Queries) UpsertSAMLIdentity added in v0.7.0

func (q *Queries) UpsertSAMLIdentity(ctx context.Context, arg UpsertSAMLIdentityParams) (SamlIdentity, error)

func (*Queries) UserByEmail

func (q *Queries) UserByEmail(ctx context.Context, email string) (User, error)

func (*Queries) UserByEmailWithPassword added in v0.2.0

func (q *Queries) UserByEmailWithPassword(ctx context.Context, email string) (UserByEmailWithPasswordRow, error)

func (*Queries) UserByExternalIDInOrg added in v0.7.0

func (q *Queries) UserByExternalIDInOrg(ctx context.Context, arg UserByExternalIDInOrgParams) (User, error)

func (*Queries) UserByID

func (q *Queries) UserByID(ctx context.Context, id pgtype.UUID) (User, error)

func (*Queries) WebAuthnCredentialByCredentialID added in v0.5.0

func (q *Queries) WebAuthnCredentialByCredentialID(ctx context.Context, credentialID []byte) (WebauthnCredential, error)

func (*Queries) WebAuthnCredentialsByUserID added in v0.5.0

func (q *Queries) WebAuthnCredentialsByUserID(ctx context.Context, userID pgtype.UUID) ([]WebauthnCredential, error)

func (*Queries) WithTx

func (q *Queries) WithTx(tx pgx.Tx) *Queries

type RevokeSCIMTokenByIDParams added in v0.7.0

type RevokeSCIMTokenByIDParams struct {
	ID        pgtype.UUID
	RevokedAt pgtype.Timestamptz
}

type SAMLIdentityByConnectionAndNameIDParams added in v0.7.0

type SAMLIdentityByConnectionAndNameIDParams struct {
	ConnectionID pgtype.UUID
	NameID       string
}

type SamlConnection added in v0.7.0

type SamlConnection struct {
	ID             pgtype.UUID
	OrganizationID pgtype.UUID
	IdpEntityID    string
	IdpSsoUrl      string
	IdpX509Cert    string
	SpEntityID     string
	SpAcsUrl       string
	AttributeMap   []byte
	CreatedAt      pgtype.Timestamptz
	UpdatedAt      pgtype.Timestamptz
}

type SamlIdentity added in v0.7.0

type SamlIdentity struct {
	ID           pgtype.UUID
	ConnectionID pgtype.UUID
	UserID       pgtype.UUID
	NameID       string
	NameIDFormat string
	LastLoginAt  pgtype.Timestamptz
	CreatedAt    pgtype.Timestamptz
}

type ScimToken added in v0.7.0

type ScimToken struct {
	ID             pgtype.UUID
	OrganizationID pgtype.UUID
	TokenHash      []byte
	Name           string
	CreatedAt      pgtype.Timestamptz
	LastUsedAt     pgtype.Timestamptz
	RevokedAt      pgtype.Timestamptz
}

type Session

type Session struct {
	ID        pgtype.UUID
	UserID    pgtype.UUID
	TokenHash []byte
	UserAgent string
	Ip        *netip.Addr
	CreatedAt pgtype.Timestamptz
	ExpiresAt pgtype.Timestamptz
	RevokedAt pgtype.Timestamptz
	AuthLevel string
	// v0.7. Pgx Scan target; the column is nullable (ON DELETE SET NULL on
	// organizations). Existing queries that do not SELECT this column leave
	// the field as zero-value pgtype.UUID{Valid:false}.
	ActiveOrganizationID pgtype.UUID
}

type SetSessionActiveOrganizationParams added in v0.7.0

type SetSessionActiveOrganizationParams struct {
	ID                   pgtype.UUID
	ActiveOrganizationID pgtype.UUID
}

type SetUserPasswordParams added in v0.2.0

type SetUserPasswordParams struct {
	ID           pgtype.UUID
	PasswordHash *string
}

type TotpRecoveryCode added in v0.5.0

type TotpRecoveryCode struct {
	ID        pgtype.UUID
	UserID    pgtype.UUID
	CodeHash  []byte
	UsedAt    pgtype.Timestamptz
	CreatedAt pgtype.Timestamptz
}

type TotpSecret added in v0.5.0

type TotpSecret struct {
	UserID      pgtype.UUID
	SecretEnc   []byte
	ConfirmedAt pgtype.Timestamptz
	CreatedAt   pgtype.Timestamptz
	UpdatedAt   pgtype.Timestamptz
}

type TouchSAMLIdentityLastLoginParams added in v0.7.0

type TouchSAMLIdentityLastLoginParams struct {
	ID          pgtype.UUID
	LastLoginAt pgtype.Timestamptz
}

type TouchSCIMTokenLastUsedParams added in v0.7.0

type TouchSCIMTokenLastUsedParams struct {
	ID         pgtype.UUID
	LastUsedAt pgtype.Timestamptz
}

type UpdateGroupParams added in v0.7.0

type UpdateGroupParams struct {
	ID          pgtype.UUID
	DisplayName string
	ExternalID  *string
}

type UpdateOrganizationParams added in v0.7.0

type UpdateOrganizationParams struct {
	ID   pgtype.UUID
	Name string
	Slug string
}

type UpdateSAMLConnectionParams added in v0.7.0

type UpdateSAMLConnectionParams struct {
	ID           pgtype.UUID
	IdpEntityID  string
	IdpSsoUrl    string
	IdpX509Cert  string
	SpEntityID   string
	SpAcsUrl     string
	AttributeMap []byte
}

type UpdateSessionAuthLevelParams added in v0.5.0

type UpdateSessionAuthLevelParams struct {
	ID        pgtype.UUID
	AuthLevel string
}

type UpdateUserSCIMParams added in v0.7.0

type UpdateUserSCIMParams struct {
	ID          pgtype.UUID
	Email       string
	Name        string
	AvatarUrl   string
	ExternalID  string
	GivenName   string
	FamilyName  string
	DisplayName string
}

type UpdateWebAuthnSignCountParams added in v0.5.0

type UpdateWebAuthnSignCountParams struct {
	CredentialID []byte
	SignCount    int64
	LastUsedAt   pgtype.Timestamptz
}

type UpsertOAuthAccountParams added in v0.3.0

type UpsertOAuthAccountParams struct {
	ID              pgtype.UUID
	UserID          pgtype.UUID
	Provider        string
	ProviderUserID  string
	AccessTokenEnc  []byte
	RefreshTokenEnc []byte
	ExpiresAt       pgtype.Timestamptz
	Scope           string
	CreatedAt       pgtype.Timestamptz
	UpdatedAt       pgtype.Timestamptz
}

type UpsertOrganizationMemberParams added in v0.7.0

type UpsertOrganizationMemberParams struct {
	OrganizationID pgtype.UUID
	UserID         pgtype.UUID
	Role           string
	JoinedAt       pgtype.Timestamptz
}

type UpsertPendingTOTPSecretParams added in v0.5.0

type UpsertPendingTOTPSecretParams struct {
	UserID    pgtype.UUID
	SecretEnc []byte
	CreatedAt pgtype.Timestamptz
}

type UpsertSAMLIdentityParams added in v0.7.0

type UpsertSAMLIdentityParams struct {
	ID           pgtype.UUID
	ConnectionID pgtype.UUID
	UserID       pgtype.UUID
	NameID       string
	NameIDFormat string
	CreatedAt    pgtype.Timestamptz
}

type User

type User struct {
	ID              pgtype.UUID
	Email           string
	EmailVerifiedAt pgtype.Timestamptz
	Name            string
	AvatarUrl       string
	CreatedAt       pgtype.Timestamptz
	UpdatedAt       pgtype.Timestamptz
	PasswordHash    *string
	// v0.7 SCIM columns. Added with NOT NULL DEFAULT ” in migration 0008,
	// so existing reads keep returning empty strings for non-SCIM users.
	ExternalID  string
	GivenName   string
	FamilyName  string
	DisplayName string
}

type UserByEmailWithPasswordRow added in v0.2.0

type UserByEmailWithPasswordRow struct {
	ID              pgtype.UUID
	Email           string
	EmailVerifiedAt pgtype.Timestamptz
	Name            string
	AvatarUrl       string
	CreatedAt       pgtype.Timestamptz
	UpdatedAt       pgtype.Timestamptz
	PasswordHash    string
}

type UserByExternalIDInOrgParams added in v0.7.0

type UserByExternalIDInOrgParams struct {
	OrganizationID pgtype.UUID
	ExternalID     string
}

type WebauthnCredential added in v0.5.0

type WebauthnCredential struct {
	ID           pgtype.UUID
	UserID       pgtype.UUID
	CredentialID []byte
	PublicKey    []byte
	SignCount    int64
	Transports   []string
	Aaguid       []byte
	Name         string
	CreatedAt    pgtype.Timestamptz
	LastUsedAt   pgtype.Timestamptz
}

Jump to

Keyboard shortcuts

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