// Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.31.1 package workerdb import ( "database/sql/driver" "fmt" "net/netip" "github.com/jackc/pgx/v5/pgtype" ) type RepoVisibility string const ( RepoVisibilityPublic RepoVisibility = "public" RepoVisibilityPrivate RepoVisibility = "private" ) func (e *RepoVisibility) Scan(src interface{}) error { switch s := src.(type) { case []byte: *e = RepoVisibility(s) case string: *e = RepoVisibility(s) default: return fmt.Errorf("unsupported scan type for RepoVisibility: %T", src) } return nil } type NullRepoVisibility struct { RepoVisibility RepoVisibility Valid bool // Valid is true if RepoVisibility is not NULL } // Scan implements the Scanner interface. func (ns *NullRepoVisibility) Scan(value interface{}) error { if value == nil { ns.RepoVisibility, ns.Valid = "", false return nil } ns.Valid = true return ns.RepoVisibility.Scan(value) } // Value implements the driver Valuer interface. func (ns NullRepoVisibility) Value() (driver.Value, error) { if !ns.Valid { return nil, nil } return string(ns.RepoVisibility), nil } type AuthAuditLog struct { ID int64 ActorID pgtype.Int8 Action string TargetType string TargetID pgtype.Int8 Meta []byte CreatedAt pgtype.Timestamptz } type AuthThrottle struct { ID int64 Scope string Identifier string Hits int32 WindowStartedAt pgtype.Timestamptz } type EmailVerification struct { ID int64 UserEmailID int64 TokenHash []byte ExpiresAt pgtype.Timestamptz UsedAt pgtype.Timestamptz CreatedAt pgtype.Timestamptz } type Job struct { ID int64 Kind string Payload []byte RunAt pgtype.Timestamptz Attempts int32 MaxAttempts int32 LastError pgtype.Text LockedBy pgtype.Text LockedAt pgtype.Timestamptz CompletedAt pgtype.Timestamptz FailedAt pgtype.Timestamptz CreatedAt pgtype.Timestamptz } type Meta struct { Key string Value []byte UpdatedAt pgtype.Timestamptz } type PasswordReset struct { ID int64 UserID int64 TokenHash []byte ExpiresAt pgtype.Timestamptz UsedAt pgtype.Timestamptz CreatedAt pgtype.Timestamptz } type PushEvent struct { ID int64 RepoID int64 PusherUserID pgtype.Int8 BeforeSha string AfterSha string Ref string Protocol string RequestID string ProcessedAt pgtype.Timestamptz CreatedAt pgtype.Timestamptz } type Repo struct { ID int64 OwnerUserID pgtype.Int8 OwnerOrgID pgtype.Int8 Name string Description string Visibility RepoVisibility DefaultBranch string IsArchived bool ArchivedAt pgtype.Timestamptz DeletedAt pgtype.Timestamptz DiskUsedBytes int64 ForkOfRepoID pgtype.Int8 LicenseKey pgtype.Text PrimaryLanguage pgtype.Text HasIssues bool HasPulls bool CreatedAt pgtype.Timestamptz UpdatedAt pgtype.Timestamptz DefaultBranchOid pgtype.Text } type User struct { ID int64 Username string DisplayName string PrimaryEmailID pgtype.Int8 PasswordHash string PasswordAlgo string PasswordUpdatedAt pgtype.Timestamptz EmailVerified bool LastLoginAt pgtype.Timestamptz SuspendedAt pgtype.Timestamptz SuspendedReason pgtype.Text DeletedAt pgtype.Timestamptz CreatedAt pgtype.Timestamptz UpdatedAt pgtype.Timestamptz Bio string Location string Website string Company string Pronouns string AvatarObjectKey pgtype.Text Theme string SessionEpoch int32 } type UserEmail struct { ID int64 UserID int64 Email string IsPrimary bool Verified bool VerificationTokenHash []byte VerificationSentAt pgtype.Timestamptz VerifiedAt pgtype.Timestamptz CreatedAt pgtype.Timestamptz } type UserNotificationPref struct { UserID int64 Key string Value []byte UpdatedAt pgtype.Timestamptz } type UserRecoveryCode struct { ID int64 UserID int64 CodeHash []byte UsedAt pgtype.Timestamptz GeneratedAt pgtype.Timestamptz CreatedAt pgtype.Timestamptz } type UserSshKey struct { ID int64 UserID int64 Title string FingerprintSha256 string KeyType string KeyBits int32 PublicKey string LastUsedAt pgtype.Timestamptz LastUsedIp *netip.Addr CreatedAt pgtype.Timestamptz } type UserToken struct { ID int64 UserID int64 Name string TokenHash []byte TokenPrefix string Scopes []string ExpiresAt pgtype.Timestamptz LastUsedAt pgtype.Timestamptz LastUsedIp *netip.Addr RevokedAt pgtype.Timestamptz CreatedAt pgtype.Timestamptz } type UserTotp struct { ID int64 UserID int64 SecretEncrypted []byte SecretNonce []byte ConfirmedAt pgtype.Timestamptz LastUsedCounter int64 CreatedAt pgtype.Timestamptz UpdatedAt pgtype.Timestamptz } type UsernameRedirect struct { OldUsername string UserID int64 ChangedAt pgtype.Timestamptz } type WebhookEventsPending struct { ID int64 RepoID int64 EventKind string Payload []byte CreatedAt pgtype.Timestamptz }