| 1 | // Code generated by sqlc. DO NOT EDIT. |
| 2 | // versions: |
| 3 | // sqlc v1.31.1 |
| 4 | |
| 5 | package usersdb |
| 6 | |
| 7 | import ( |
| 8 | "database/sql/driver" |
| 9 | "fmt" |
| 10 | "net/netip" |
| 11 | |
| 12 | "github.com/jackc/pgx/v5/pgtype" |
| 13 | ) |
| 14 | |
| 15 | type CollabRole string |
| 16 | |
| 17 | const ( |
| 18 | CollabRoleRead CollabRole = "read" |
| 19 | CollabRoleTriage CollabRole = "triage" |
| 20 | CollabRoleWrite CollabRole = "write" |
| 21 | CollabRoleMaintain CollabRole = "maintain" |
| 22 | CollabRoleAdmin CollabRole = "admin" |
| 23 | ) |
| 24 | |
| 25 | func (e *CollabRole) Scan(src interface{}) error { |
| 26 | switch s := src.(type) { |
| 27 | case []byte: |
| 28 | *e = CollabRole(s) |
| 29 | case string: |
| 30 | *e = CollabRole(s) |
| 31 | default: |
| 32 | return fmt.Errorf("unsupported scan type for CollabRole: %T", src) |
| 33 | } |
| 34 | return nil |
| 35 | } |
| 36 | |
| 37 | type NullCollabRole struct { |
| 38 | CollabRole CollabRole |
| 39 | Valid bool // Valid is true if CollabRole is not NULL |
| 40 | } |
| 41 | |
| 42 | // Scan implements the Scanner interface. |
| 43 | func (ns *NullCollabRole) Scan(value interface{}) error { |
| 44 | if value == nil { |
| 45 | ns.CollabRole, ns.Valid = "", false |
| 46 | return nil |
| 47 | } |
| 48 | ns.Valid = true |
| 49 | return ns.CollabRole.Scan(value) |
| 50 | } |
| 51 | |
| 52 | // Value implements the driver Valuer interface. |
| 53 | func (ns NullCollabRole) Value() (driver.Value, error) { |
| 54 | if !ns.Valid { |
| 55 | return nil, nil |
| 56 | } |
| 57 | return string(ns.CollabRole), nil |
| 58 | } |
| 59 | |
| 60 | type IssueKind string |
| 61 | |
| 62 | const ( |
| 63 | IssueKindIssue IssueKind = "issue" |
| 64 | IssueKindPr IssueKind = "pr" |
| 65 | ) |
| 66 | |
| 67 | func (e *IssueKind) Scan(src interface{}) error { |
| 68 | switch s := src.(type) { |
| 69 | case []byte: |
| 70 | *e = IssueKind(s) |
| 71 | case string: |
| 72 | *e = IssueKind(s) |
| 73 | default: |
| 74 | return fmt.Errorf("unsupported scan type for IssueKind: %T", src) |
| 75 | } |
| 76 | return nil |
| 77 | } |
| 78 | |
| 79 | type NullIssueKind struct { |
| 80 | IssueKind IssueKind |
| 81 | Valid bool // Valid is true if IssueKind is not NULL |
| 82 | } |
| 83 | |
| 84 | // Scan implements the Scanner interface. |
| 85 | func (ns *NullIssueKind) Scan(value interface{}) error { |
| 86 | if value == nil { |
| 87 | ns.IssueKind, ns.Valid = "", false |
| 88 | return nil |
| 89 | } |
| 90 | ns.Valid = true |
| 91 | return ns.IssueKind.Scan(value) |
| 92 | } |
| 93 | |
| 94 | // Value implements the driver Valuer interface. |
| 95 | func (ns NullIssueKind) Value() (driver.Value, error) { |
| 96 | if !ns.Valid { |
| 97 | return nil, nil |
| 98 | } |
| 99 | return string(ns.IssueKind), nil |
| 100 | } |
| 101 | |
| 102 | type IssueRefSource string |
| 103 | |
| 104 | const ( |
| 105 | IssueRefSourceCommentBody IssueRefSource = "comment_body" |
| 106 | IssueRefSourceIssueBody IssueRefSource = "issue_body" |
| 107 | IssueRefSourceCommitMessage IssueRefSource = "commit_message" |
| 108 | ) |
| 109 | |
| 110 | func (e *IssueRefSource) Scan(src interface{}) error { |
| 111 | switch s := src.(type) { |
| 112 | case []byte: |
| 113 | *e = IssueRefSource(s) |
| 114 | case string: |
| 115 | *e = IssueRefSource(s) |
| 116 | default: |
| 117 | return fmt.Errorf("unsupported scan type for IssueRefSource: %T", src) |
| 118 | } |
| 119 | return nil |
| 120 | } |
| 121 | |
| 122 | type NullIssueRefSource struct { |
| 123 | IssueRefSource IssueRefSource |
| 124 | Valid bool // Valid is true if IssueRefSource is not NULL |
| 125 | } |
| 126 | |
| 127 | // Scan implements the Scanner interface. |
| 128 | func (ns *NullIssueRefSource) Scan(value interface{}) error { |
| 129 | if value == nil { |
| 130 | ns.IssueRefSource, ns.Valid = "", false |
| 131 | return nil |
| 132 | } |
| 133 | ns.Valid = true |
| 134 | return ns.IssueRefSource.Scan(value) |
| 135 | } |
| 136 | |
| 137 | // Value implements the driver Valuer interface. |
| 138 | func (ns NullIssueRefSource) Value() (driver.Value, error) { |
| 139 | if !ns.Valid { |
| 140 | return nil, nil |
| 141 | } |
| 142 | return string(ns.IssueRefSource), nil |
| 143 | } |
| 144 | |
| 145 | type IssueState string |
| 146 | |
| 147 | const ( |
| 148 | IssueStateOpen IssueState = "open" |
| 149 | IssueStateClosed IssueState = "closed" |
| 150 | ) |
| 151 | |
| 152 | func (e *IssueState) Scan(src interface{}) error { |
| 153 | switch s := src.(type) { |
| 154 | case []byte: |
| 155 | *e = IssueState(s) |
| 156 | case string: |
| 157 | *e = IssueState(s) |
| 158 | default: |
| 159 | return fmt.Errorf("unsupported scan type for IssueState: %T", src) |
| 160 | } |
| 161 | return nil |
| 162 | } |
| 163 | |
| 164 | type NullIssueState struct { |
| 165 | IssueState IssueState |
| 166 | Valid bool // Valid is true if IssueState is not NULL |
| 167 | } |
| 168 | |
| 169 | // Scan implements the Scanner interface. |
| 170 | func (ns *NullIssueState) Scan(value interface{}) error { |
| 171 | if value == nil { |
| 172 | ns.IssueState, ns.Valid = "", false |
| 173 | return nil |
| 174 | } |
| 175 | ns.Valid = true |
| 176 | return ns.IssueState.Scan(value) |
| 177 | } |
| 178 | |
| 179 | // Value implements the driver Valuer interface. |
| 180 | func (ns NullIssueState) Value() (driver.Value, error) { |
| 181 | if !ns.Valid { |
| 182 | return nil, nil |
| 183 | } |
| 184 | return string(ns.IssueState), nil |
| 185 | } |
| 186 | |
| 187 | type IssueStateReason string |
| 188 | |
| 189 | const ( |
| 190 | IssueStateReasonCompleted IssueStateReason = "completed" |
| 191 | IssueStateReasonNotPlanned IssueStateReason = "not_planned" |
| 192 | IssueStateReasonReopened IssueStateReason = "reopened" |
| 193 | IssueStateReasonDuplicate IssueStateReason = "duplicate" |
| 194 | ) |
| 195 | |
| 196 | func (e *IssueStateReason) Scan(src interface{}) error { |
| 197 | switch s := src.(type) { |
| 198 | case []byte: |
| 199 | *e = IssueStateReason(s) |
| 200 | case string: |
| 201 | *e = IssueStateReason(s) |
| 202 | default: |
| 203 | return fmt.Errorf("unsupported scan type for IssueStateReason: %T", src) |
| 204 | } |
| 205 | return nil |
| 206 | } |
| 207 | |
| 208 | type NullIssueStateReason struct { |
| 209 | IssueStateReason IssueStateReason |
| 210 | Valid bool // Valid is true if IssueStateReason is not NULL |
| 211 | } |
| 212 | |
| 213 | // Scan implements the Scanner interface. |
| 214 | func (ns *NullIssueStateReason) Scan(value interface{}) error { |
| 215 | if value == nil { |
| 216 | ns.IssueStateReason, ns.Valid = "", false |
| 217 | return nil |
| 218 | } |
| 219 | ns.Valid = true |
| 220 | return ns.IssueStateReason.Scan(value) |
| 221 | } |
| 222 | |
| 223 | // Value implements the driver Valuer interface. |
| 224 | func (ns NullIssueStateReason) Value() (driver.Value, error) { |
| 225 | if !ns.Valid { |
| 226 | return nil, nil |
| 227 | } |
| 228 | return string(ns.IssueStateReason), nil |
| 229 | } |
| 230 | |
| 231 | type MilestoneState string |
| 232 | |
| 233 | const ( |
| 234 | MilestoneStateOpen MilestoneState = "open" |
| 235 | MilestoneStateClosed MilestoneState = "closed" |
| 236 | ) |
| 237 | |
| 238 | func (e *MilestoneState) Scan(src interface{}) error { |
| 239 | switch s := src.(type) { |
| 240 | case []byte: |
| 241 | *e = MilestoneState(s) |
| 242 | case string: |
| 243 | *e = MilestoneState(s) |
| 244 | default: |
| 245 | return fmt.Errorf("unsupported scan type for MilestoneState: %T", src) |
| 246 | } |
| 247 | return nil |
| 248 | } |
| 249 | |
| 250 | type NullMilestoneState struct { |
| 251 | MilestoneState MilestoneState |
| 252 | Valid bool // Valid is true if MilestoneState is not NULL |
| 253 | } |
| 254 | |
| 255 | // Scan implements the Scanner interface. |
| 256 | func (ns *NullMilestoneState) Scan(value interface{}) error { |
| 257 | if value == nil { |
| 258 | ns.MilestoneState, ns.Valid = "", false |
| 259 | return nil |
| 260 | } |
| 261 | ns.Valid = true |
| 262 | return ns.MilestoneState.Scan(value) |
| 263 | } |
| 264 | |
| 265 | // Value implements the driver Valuer interface. |
| 266 | func (ns NullMilestoneState) Value() (driver.Value, error) { |
| 267 | if !ns.Valid { |
| 268 | return nil, nil |
| 269 | } |
| 270 | return string(ns.MilestoneState), nil |
| 271 | } |
| 272 | |
| 273 | type PrFileStatus string |
| 274 | |
| 275 | const ( |
| 276 | PrFileStatusAdded PrFileStatus = "added" |
| 277 | PrFileStatusModified PrFileStatus = "modified" |
| 278 | PrFileStatusDeleted PrFileStatus = "deleted" |
| 279 | PrFileStatusRenamed PrFileStatus = "renamed" |
| 280 | PrFileStatusCopied PrFileStatus = "copied" |
| 281 | ) |
| 282 | |
| 283 | func (e *PrFileStatus) Scan(src interface{}) error { |
| 284 | switch s := src.(type) { |
| 285 | case []byte: |
| 286 | *e = PrFileStatus(s) |
| 287 | case string: |
| 288 | *e = PrFileStatus(s) |
| 289 | default: |
| 290 | return fmt.Errorf("unsupported scan type for PrFileStatus: %T", src) |
| 291 | } |
| 292 | return nil |
| 293 | } |
| 294 | |
| 295 | type NullPrFileStatus struct { |
| 296 | PrFileStatus PrFileStatus |
| 297 | Valid bool // Valid is true if PrFileStatus is not NULL |
| 298 | } |
| 299 | |
| 300 | // Scan implements the Scanner interface. |
| 301 | func (ns *NullPrFileStatus) Scan(value interface{}) error { |
| 302 | if value == nil { |
| 303 | ns.PrFileStatus, ns.Valid = "", false |
| 304 | return nil |
| 305 | } |
| 306 | ns.Valid = true |
| 307 | return ns.PrFileStatus.Scan(value) |
| 308 | } |
| 309 | |
| 310 | // Value implements the driver Valuer interface. |
| 311 | func (ns NullPrFileStatus) Value() (driver.Value, error) { |
| 312 | if !ns.Valid { |
| 313 | return nil, nil |
| 314 | } |
| 315 | return string(ns.PrFileStatus), nil |
| 316 | } |
| 317 | |
| 318 | type PrMergeMethod string |
| 319 | |
| 320 | const ( |
| 321 | PrMergeMethodMerge PrMergeMethod = "merge" |
| 322 | PrMergeMethodSquash PrMergeMethod = "squash" |
| 323 | PrMergeMethodRebase PrMergeMethod = "rebase" |
| 324 | ) |
| 325 | |
| 326 | func (e *PrMergeMethod) Scan(src interface{}) error { |
| 327 | switch s := src.(type) { |
| 328 | case []byte: |
| 329 | *e = PrMergeMethod(s) |
| 330 | case string: |
| 331 | *e = PrMergeMethod(s) |
| 332 | default: |
| 333 | return fmt.Errorf("unsupported scan type for PrMergeMethod: %T", src) |
| 334 | } |
| 335 | return nil |
| 336 | } |
| 337 | |
| 338 | type NullPrMergeMethod struct { |
| 339 | PrMergeMethod PrMergeMethod |
| 340 | Valid bool // Valid is true if PrMergeMethod is not NULL |
| 341 | } |
| 342 | |
| 343 | // Scan implements the Scanner interface. |
| 344 | func (ns *NullPrMergeMethod) Scan(value interface{}) error { |
| 345 | if value == nil { |
| 346 | ns.PrMergeMethod, ns.Valid = "", false |
| 347 | return nil |
| 348 | } |
| 349 | ns.Valid = true |
| 350 | return ns.PrMergeMethod.Scan(value) |
| 351 | } |
| 352 | |
| 353 | // Value implements the driver Valuer interface. |
| 354 | func (ns NullPrMergeMethod) Value() (driver.Value, error) { |
| 355 | if !ns.Valid { |
| 356 | return nil, nil |
| 357 | } |
| 358 | return string(ns.PrMergeMethod), nil |
| 359 | } |
| 360 | |
| 361 | type PrMergeableState string |
| 362 | |
| 363 | const ( |
| 364 | PrMergeableStateUnknown PrMergeableState = "unknown" |
| 365 | PrMergeableStateClean PrMergeableState = "clean" |
| 366 | PrMergeableStateDirty PrMergeableState = "dirty" |
| 367 | PrMergeableStateBlocked PrMergeableState = "blocked" |
| 368 | PrMergeableStateBehind PrMergeableState = "behind" |
| 369 | ) |
| 370 | |
| 371 | func (e *PrMergeableState) Scan(src interface{}) error { |
| 372 | switch s := src.(type) { |
| 373 | case []byte: |
| 374 | *e = PrMergeableState(s) |
| 375 | case string: |
| 376 | *e = PrMergeableState(s) |
| 377 | default: |
| 378 | return fmt.Errorf("unsupported scan type for PrMergeableState: %T", src) |
| 379 | } |
| 380 | return nil |
| 381 | } |
| 382 | |
| 383 | type NullPrMergeableState struct { |
| 384 | PrMergeableState PrMergeableState |
| 385 | Valid bool // Valid is true if PrMergeableState is not NULL |
| 386 | } |
| 387 | |
| 388 | // Scan implements the Scanner interface. |
| 389 | func (ns *NullPrMergeableState) Scan(value interface{}) error { |
| 390 | if value == nil { |
| 391 | ns.PrMergeableState, ns.Valid = "", false |
| 392 | return nil |
| 393 | } |
| 394 | ns.Valid = true |
| 395 | return ns.PrMergeableState.Scan(value) |
| 396 | } |
| 397 | |
| 398 | // Value implements the driver Valuer interface. |
| 399 | func (ns NullPrMergeableState) Value() (driver.Value, error) { |
| 400 | if !ns.Valid { |
| 401 | return nil, nil |
| 402 | } |
| 403 | return string(ns.PrMergeableState), nil |
| 404 | } |
| 405 | |
| 406 | type PrReviewSide string |
| 407 | |
| 408 | const ( |
| 409 | PrReviewSideLeft PrReviewSide = "left" |
| 410 | PrReviewSideRight PrReviewSide = "right" |
| 411 | ) |
| 412 | |
| 413 | func (e *PrReviewSide) Scan(src interface{}) error { |
| 414 | switch s := src.(type) { |
| 415 | case []byte: |
| 416 | *e = PrReviewSide(s) |
| 417 | case string: |
| 418 | *e = PrReviewSide(s) |
| 419 | default: |
| 420 | return fmt.Errorf("unsupported scan type for PrReviewSide: %T", src) |
| 421 | } |
| 422 | return nil |
| 423 | } |
| 424 | |
| 425 | type NullPrReviewSide struct { |
| 426 | PrReviewSide PrReviewSide |
| 427 | Valid bool // Valid is true if PrReviewSide is not NULL |
| 428 | } |
| 429 | |
| 430 | // Scan implements the Scanner interface. |
| 431 | func (ns *NullPrReviewSide) Scan(value interface{}) error { |
| 432 | if value == nil { |
| 433 | ns.PrReviewSide, ns.Valid = "", false |
| 434 | return nil |
| 435 | } |
| 436 | ns.Valid = true |
| 437 | return ns.PrReviewSide.Scan(value) |
| 438 | } |
| 439 | |
| 440 | // Value implements the driver Valuer interface. |
| 441 | func (ns NullPrReviewSide) Value() (driver.Value, error) { |
| 442 | if !ns.Valid { |
| 443 | return nil, nil |
| 444 | } |
| 445 | return string(ns.PrReviewSide), nil |
| 446 | } |
| 447 | |
| 448 | type PrReviewState string |
| 449 | |
| 450 | const ( |
| 451 | PrReviewStateComment PrReviewState = "comment" |
| 452 | PrReviewStateApprove PrReviewState = "approve" |
| 453 | PrReviewStateRequestChanges PrReviewState = "request_changes" |
| 454 | ) |
| 455 | |
| 456 | func (e *PrReviewState) Scan(src interface{}) error { |
| 457 | switch s := src.(type) { |
| 458 | case []byte: |
| 459 | *e = PrReviewState(s) |
| 460 | case string: |
| 461 | *e = PrReviewState(s) |
| 462 | default: |
| 463 | return fmt.Errorf("unsupported scan type for PrReviewState: %T", src) |
| 464 | } |
| 465 | return nil |
| 466 | } |
| 467 | |
| 468 | type NullPrReviewState struct { |
| 469 | PrReviewState PrReviewState |
| 470 | Valid bool // Valid is true if PrReviewState is not NULL |
| 471 | } |
| 472 | |
| 473 | // Scan implements the Scanner interface. |
| 474 | func (ns *NullPrReviewState) Scan(value interface{}) error { |
| 475 | if value == nil { |
| 476 | ns.PrReviewState, ns.Valid = "", false |
| 477 | return nil |
| 478 | } |
| 479 | ns.Valid = true |
| 480 | return ns.PrReviewState.Scan(value) |
| 481 | } |
| 482 | |
| 483 | // Value implements the driver Valuer interface. |
| 484 | func (ns NullPrReviewState) Value() (driver.Value, error) { |
| 485 | if !ns.Valid { |
| 486 | return nil, nil |
| 487 | } |
| 488 | return string(ns.PrReviewState), nil |
| 489 | } |
| 490 | |
| 491 | type RepoVisibility string |
| 492 | |
| 493 | const ( |
| 494 | RepoVisibilityPublic RepoVisibility = "public" |
| 495 | RepoVisibilityPrivate RepoVisibility = "private" |
| 496 | ) |
| 497 | |
| 498 | func (e *RepoVisibility) Scan(src interface{}) error { |
| 499 | switch s := src.(type) { |
| 500 | case []byte: |
| 501 | *e = RepoVisibility(s) |
| 502 | case string: |
| 503 | *e = RepoVisibility(s) |
| 504 | default: |
| 505 | return fmt.Errorf("unsupported scan type for RepoVisibility: %T", src) |
| 506 | } |
| 507 | return nil |
| 508 | } |
| 509 | |
| 510 | type NullRepoVisibility struct { |
| 511 | RepoVisibility RepoVisibility |
| 512 | Valid bool // Valid is true if RepoVisibility is not NULL |
| 513 | } |
| 514 | |
| 515 | // Scan implements the Scanner interface. |
| 516 | func (ns *NullRepoVisibility) Scan(value interface{}) error { |
| 517 | if value == nil { |
| 518 | ns.RepoVisibility, ns.Valid = "", false |
| 519 | return nil |
| 520 | } |
| 521 | ns.Valid = true |
| 522 | return ns.RepoVisibility.Scan(value) |
| 523 | } |
| 524 | |
| 525 | // Value implements the driver Valuer interface. |
| 526 | func (ns NullRepoVisibility) Value() (driver.Value, error) { |
| 527 | if !ns.Valid { |
| 528 | return nil, nil |
| 529 | } |
| 530 | return string(ns.RepoVisibility), nil |
| 531 | } |
| 532 | |
| 533 | type TransferPrincipalKind string |
| 534 | |
| 535 | const ( |
| 536 | TransferPrincipalKindUser TransferPrincipalKind = "user" |
| 537 | TransferPrincipalKindOrg TransferPrincipalKind = "org" |
| 538 | ) |
| 539 | |
| 540 | func (e *TransferPrincipalKind) Scan(src interface{}) error { |
| 541 | switch s := src.(type) { |
| 542 | case []byte: |
| 543 | *e = TransferPrincipalKind(s) |
| 544 | case string: |
| 545 | *e = TransferPrincipalKind(s) |
| 546 | default: |
| 547 | return fmt.Errorf("unsupported scan type for TransferPrincipalKind: %T", src) |
| 548 | } |
| 549 | return nil |
| 550 | } |
| 551 | |
| 552 | type NullTransferPrincipalKind struct { |
| 553 | TransferPrincipalKind TransferPrincipalKind |
| 554 | Valid bool // Valid is true if TransferPrincipalKind is not NULL |
| 555 | } |
| 556 | |
| 557 | // Scan implements the Scanner interface. |
| 558 | func (ns *NullTransferPrincipalKind) Scan(value interface{}) error { |
| 559 | if value == nil { |
| 560 | ns.TransferPrincipalKind, ns.Valid = "", false |
| 561 | return nil |
| 562 | } |
| 563 | ns.Valid = true |
| 564 | return ns.TransferPrincipalKind.Scan(value) |
| 565 | } |
| 566 | |
| 567 | // Value implements the driver Valuer interface. |
| 568 | func (ns NullTransferPrincipalKind) Value() (driver.Value, error) { |
| 569 | if !ns.Valid { |
| 570 | return nil, nil |
| 571 | } |
| 572 | return string(ns.TransferPrincipalKind), nil |
| 573 | } |
| 574 | |
| 575 | type TransferStatus string |
| 576 | |
| 577 | const ( |
| 578 | TransferStatusPending TransferStatus = "pending" |
| 579 | TransferStatusAccepted TransferStatus = "accepted" |
| 580 | TransferStatusDeclined TransferStatus = "declined" |
| 581 | TransferStatusCanceled TransferStatus = "canceled" |
| 582 | TransferStatusExpired TransferStatus = "expired" |
| 583 | ) |
| 584 | |
| 585 | func (e *TransferStatus) Scan(src interface{}) error { |
| 586 | switch s := src.(type) { |
| 587 | case []byte: |
| 588 | *e = TransferStatus(s) |
| 589 | case string: |
| 590 | *e = TransferStatus(s) |
| 591 | default: |
| 592 | return fmt.Errorf("unsupported scan type for TransferStatus: %T", src) |
| 593 | } |
| 594 | return nil |
| 595 | } |
| 596 | |
| 597 | type NullTransferStatus struct { |
| 598 | TransferStatus TransferStatus |
| 599 | Valid bool // Valid is true if TransferStatus is not NULL |
| 600 | } |
| 601 | |
| 602 | // Scan implements the Scanner interface. |
| 603 | func (ns *NullTransferStatus) Scan(value interface{}) error { |
| 604 | if value == nil { |
| 605 | ns.TransferStatus, ns.Valid = "", false |
| 606 | return nil |
| 607 | } |
| 608 | ns.Valid = true |
| 609 | return ns.TransferStatus.Scan(value) |
| 610 | } |
| 611 | |
| 612 | // Value implements the driver Valuer interface. |
| 613 | func (ns NullTransferStatus) Value() (driver.Value, error) { |
| 614 | if !ns.Valid { |
| 615 | return nil, nil |
| 616 | } |
| 617 | return string(ns.TransferStatus), nil |
| 618 | } |
| 619 | |
| 620 | type AuthAuditLog struct { |
| 621 | ID int64 |
| 622 | ActorID pgtype.Int8 |
| 623 | Action string |
| 624 | TargetType string |
| 625 | TargetID pgtype.Int8 |
| 626 | Meta []byte |
| 627 | CreatedAt pgtype.Timestamptz |
| 628 | } |
| 629 | |
| 630 | type AuthThrottle struct { |
| 631 | ID int64 |
| 632 | Scope string |
| 633 | Identifier string |
| 634 | Hits int32 |
| 635 | WindowStartedAt pgtype.Timestamptz |
| 636 | } |
| 637 | |
| 638 | type BranchProtectionRule struct { |
| 639 | ID int64 |
| 640 | RepoID int64 |
| 641 | Pattern string |
| 642 | PreventForcePush bool |
| 643 | PreventDeletion bool |
| 644 | RequirePrForPush bool |
| 645 | AllowedPusherUserIds []int64 |
| 646 | RequireSignedCommits bool |
| 647 | StatusChecksRequired []string |
| 648 | CreatedAt pgtype.Timestamptz |
| 649 | UpdatedAt pgtype.Timestamptz |
| 650 | CreatedByUserID pgtype.Int8 |
| 651 | RequiredReviewCount int32 |
| 652 | DismissStaleReviewsOnPush bool |
| 653 | RequireCodeOwnerReview bool |
| 654 | } |
| 655 | |
| 656 | type EmailVerification struct { |
| 657 | ID int64 |
| 658 | UserEmailID int64 |
| 659 | TokenHash []byte |
| 660 | ExpiresAt pgtype.Timestamptz |
| 661 | UsedAt pgtype.Timestamptz |
| 662 | CreatedAt pgtype.Timestamptz |
| 663 | } |
| 664 | |
| 665 | type Issue struct { |
| 666 | ID int64 |
| 667 | RepoID int64 |
| 668 | Number int64 |
| 669 | Kind IssueKind |
| 670 | Title string |
| 671 | Body string |
| 672 | BodyHtmlCached pgtype.Text |
| 673 | MdPipelineVersion int32 |
| 674 | AuthorUserID pgtype.Int8 |
| 675 | State IssueState |
| 676 | StateReason NullIssueStateReason |
| 677 | Locked bool |
| 678 | LockReason pgtype.Text |
| 679 | MilestoneID pgtype.Int8 |
| 680 | CreatedAt pgtype.Timestamptz |
| 681 | UpdatedAt pgtype.Timestamptz |
| 682 | EditedAt pgtype.Timestamptz |
| 683 | ClosedAt pgtype.Timestamptz |
| 684 | ClosedByUserID pgtype.Int8 |
| 685 | } |
| 686 | |
| 687 | type IssueAssignee struct { |
| 688 | IssueID int64 |
| 689 | UserID int64 |
| 690 | AssignedAt pgtype.Timestamptz |
| 691 | AssignedByUserID pgtype.Int8 |
| 692 | } |
| 693 | |
| 694 | type IssueComment struct { |
| 695 | ID int64 |
| 696 | IssueID int64 |
| 697 | AuthorUserID pgtype.Int8 |
| 698 | Body string |
| 699 | BodyHtmlCached pgtype.Text |
| 700 | MdPipelineVersion int32 |
| 701 | CreatedAt pgtype.Timestamptz |
| 702 | UpdatedAt pgtype.Timestamptz |
| 703 | EditedAt pgtype.Timestamptz |
| 704 | } |
| 705 | |
| 706 | type IssueEvent struct { |
| 707 | ID int64 |
| 708 | IssueID int64 |
| 709 | ActorUserID pgtype.Int8 |
| 710 | Kind string |
| 711 | Meta []byte |
| 712 | RefTargetID pgtype.Int8 |
| 713 | CreatedAt pgtype.Timestamptz |
| 714 | } |
| 715 | |
| 716 | type IssueLabel struct { |
| 717 | IssueID int64 |
| 718 | LabelID int64 |
| 719 | AppliedAt pgtype.Timestamptz |
| 720 | AppliedByUserID pgtype.Int8 |
| 721 | } |
| 722 | |
| 723 | type IssueReference struct { |
| 724 | ID int64 |
| 725 | SourceIssueID pgtype.Int8 |
| 726 | TargetIssueID int64 |
| 727 | SourceKind IssueRefSource |
| 728 | SourceObjectID pgtype.Int8 |
| 729 | CreatedAt pgtype.Timestamptz |
| 730 | } |
| 731 | |
| 732 | type Job struct { |
| 733 | ID int64 |
| 734 | Kind string |
| 735 | Payload []byte |
| 736 | RunAt pgtype.Timestamptz |
| 737 | Attempts int32 |
| 738 | MaxAttempts int32 |
| 739 | LastError pgtype.Text |
| 740 | LockedBy pgtype.Text |
| 741 | LockedAt pgtype.Timestamptz |
| 742 | CompletedAt pgtype.Timestamptz |
| 743 | FailedAt pgtype.Timestamptz |
| 744 | CreatedAt pgtype.Timestamptz |
| 745 | } |
| 746 | |
| 747 | type Label struct { |
| 748 | ID int64 |
| 749 | RepoID int64 |
| 750 | Name string |
| 751 | Color string |
| 752 | Description string |
| 753 | CreatedAt pgtype.Timestamptz |
| 754 | } |
| 755 | |
| 756 | type Meta struct { |
| 757 | Key string |
| 758 | Value []byte |
| 759 | UpdatedAt pgtype.Timestamptz |
| 760 | } |
| 761 | |
| 762 | type Milestone struct { |
| 763 | ID int64 |
| 764 | RepoID int64 |
| 765 | Title string |
| 766 | Description string |
| 767 | State MilestoneState |
| 768 | DueOn pgtype.Timestamptz |
| 769 | CreatedAt pgtype.Timestamptz |
| 770 | ClosedAt pgtype.Timestamptz |
| 771 | } |
| 772 | |
| 773 | type PasswordReset struct { |
| 774 | ID int64 |
| 775 | UserID int64 |
| 776 | TokenHash []byte |
| 777 | ExpiresAt pgtype.Timestamptz |
| 778 | UsedAt pgtype.Timestamptz |
| 779 | CreatedAt pgtype.Timestamptz |
| 780 | } |
| 781 | |
| 782 | type PrReview struct { |
| 783 | ID int64 |
| 784 | PrIssueID int64 |
| 785 | AuthorUserID pgtype.Int8 |
| 786 | State PrReviewState |
| 787 | Body string |
| 788 | BodyHtmlCached pgtype.Text |
| 789 | SubmittedAt pgtype.Timestamptz |
| 790 | DismissedAt pgtype.Timestamptz |
| 791 | DismissedByUserID pgtype.Int8 |
| 792 | DismissalReason string |
| 793 | } |
| 794 | |
| 795 | type PrReviewComment struct { |
| 796 | ID int64 |
| 797 | PrIssueID int64 |
| 798 | ReviewID pgtype.Int8 |
| 799 | AuthorUserID pgtype.Int8 |
| 800 | FilePath string |
| 801 | Side PrReviewSide |
| 802 | OriginalCommitSha string |
| 803 | OriginalLine int32 |
| 804 | OriginalPosition int32 |
| 805 | CurrentPosition pgtype.Int4 |
| 806 | Body string |
| 807 | BodyHtmlCached pgtype.Text |
| 808 | InReplyToID pgtype.Int8 |
| 809 | Pending bool |
| 810 | ResolvedAt pgtype.Timestamptz |
| 811 | ResolvedByUserID pgtype.Int8 |
| 812 | CreatedAt pgtype.Timestamptz |
| 813 | UpdatedAt pgtype.Timestamptz |
| 814 | EditedAt pgtype.Timestamptz |
| 815 | } |
| 816 | |
| 817 | type PrReviewRequest struct { |
| 818 | ID int64 |
| 819 | PrIssueID int64 |
| 820 | RequestedUserID pgtype.Int8 |
| 821 | RequestedTeamID pgtype.Int8 |
| 822 | RequestedByUserID pgtype.Int8 |
| 823 | RequestedAt pgtype.Timestamptz |
| 824 | DismissedAt pgtype.Timestamptz |
| 825 | SatisfiedByReviewID pgtype.Int8 |
| 826 | } |
| 827 | |
| 828 | type PullRequest struct { |
| 829 | IssueID int64 |
| 830 | BaseRef string |
| 831 | HeadRef string |
| 832 | HeadRepoID int64 |
| 833 | BaseOid string |
| 834 | HeadOid string |
| 835 | Draft bool |
| 836 | Mergeable pgtype.Bool |
| 837 | MergeableState PrMergeableState |
| 838 | MergeCommitSha pgtype.Text |
| 839 | MergedAt pgtype.Timestamptz |
| 840 | MergedByUserID pgtype.Int8 |
| 841 | MergeMethod NullPrMergeMethod |
| 842 | BaseOidAtMerge pgtype.Text |
| 843 | HeadOidAtMerge pgtype.Text |
| 844 | LastSynchronizedAt pgtype.Timestamptz |
| 845 | } |
| 846 | |
| 847 | type PullRequestCommit struct { |
| 848 | PrID int64 |
| 849 | Sha string |
| 850 | Position int32 |
| 851 | AuthorName string |
| 852 | AuthorEmail string |
| 853 | CommitterName string |
| 854 | CommitterEmail string |
| 855 | Subject string |
| 856 | Body string |
| 857 | AuthoredAt pgtype.Timestamptz |
| 858 | CommittedAt pgtype.Timestamptz |
| 859 | } |
| 860 | |
| 861 | type PullRequestFile struct { |
| 862 | PrID int64 |
| 863 | Path string |
| 864 | Status PrFileStatus |
| 865 | OldPath pgtype.Text |
| 866 | Additions int32 |
| 867 | Deletions int32 |
| 868 | Changes int32 |
| 869 | } |
| 870 | |
| 871 | type PushEvent struct { |
| 872 | ID int64 |
| 873 | RepoID int64 |
| 874 | PusherUserID pgtype.Int8 |
| 875 | BeforeSha string |
| 876 | AfterSha string |
| 877 | Ref string |
| 878 | Protocol string |
| 879 | RequestID string |
| 880 | ProcessedAt pgtype.Timestamptz |
| 881 | CreatedAt pgtype.Timestamptz |
| 882 | } |
| 883 | |
| 884 | type Repo struct { |
| 885 | ID int64 |
| 886 | OwnerUserID pgtype.Int8 |
| 887 | OwnerOrgID pgtype.Int8 |
| 888 | Name string |
| 889 | Description string |
| 890 | Visibility RepoVisibility |
| 891 | DefaultBranch string |
| 892 | IsArchived bool |
| 893 | ArchivedAt pgtype.Timestamptz |
| 894 | DeletedAt pgtype.Timestamptz |
| 895 | DiskUsedBytes int64 |
| 896 | ForkOfRepoID pgtype.Int8 |
| 897 | LicenseKey pgtype.Text |
| 898 | PrimaryLanguage pgtype.Text |
| 899 | HasIssues bool |
| 900 | HasPulls bool |
| 901 | CreatedAt pgtype.Timestamptz |
| 902 | UpdatedAt pgtype.Timestamptz |
| 903 | DefaultBranchOid pgtype.Text |
| 904 | AllowSquashMerge bool |
| 905 | AllowRebaseMerge bool |
| 906 | AllowMergeCommit bool |
| 907 | DefaultMergeMethod PrMergeMethod |
| 908 | } |
| 909 | |
| 910 | type RepoCollaborator struct { |
| 911 | RepoID int64 |
| 912 | UserID int64 |
| 913 | Role CollabRole |
| 914 | AddedAt pgtype.Timestamptz |
| 915 | AddedByUserID pgtype.Int8 |
| 916 | } |
| 917 | |
| 918 | type RepoIssueCounter struct { |
| 919 | RepoID int64 |
| 920 | NextNumber int64 |
| 921 | } |
| 922 | |
| 923 | type RepoRedirect struct { |
| 924 | OldOwnerUserID pgtype.Int8 |
| 925 | OldOwnerOrgID pgtype.Int8 |
| 926 | OldName string |
| 927 | RepoID int64 |
| 928 | RedirectedAt pgtype.Timestamptz |
| 929 | } |
| 930 | |
| 931 | type RepoTransferRequest struct { |
| 932 | ID int64 |
| 933 | RepoID int64 |
| 934 | FromUserID int64 |
| 935 | ToPrincipalKind TransferPrincipalKind |
| 936 | ToPrincipalID int64 |
| 937 | CreatedBy int64 |
| 938 | CreatedAt pgtype.Timestamptz |
| 939 | ExpiresAt pgtype.Timestamptz |
| 940 | Status TransferStatus |
| 941 | AcceptedAt pgtype.Timestamptz |
| 942 | DeclinedAt pgtype.Timestamptz |
| 943 | CanceledAt pgtype.Timestamptz |
| 944 | } |
| 945 | |
| 946 | type User struct { |
| 947 | ID int64 |
| 948 | Username string |
| 949 | DisplayName string |
| 950 | PrimaryEmailID pgtype.Int8 |
| 951 | PasswordHash string |
| 952 | PasswordAlgo string |
| 953 | PasswordUpdatedAt pgtype.Timestamptz |
| 954 | EmailVerified bool |
| 955 | LastLoginAt pgtype.Timestamptz |
| 956 | SuspendedAt pgtype.Timestamptz |
| 957 | SuspendedReason pgtype.Text |
| 958 | DeletedAt pgtype.Timestamptz |
| 959 | CreatedAt pgtype.Timestamptz |
| 960 | UpdatedAt pgtype.Timestamptz |
| 961 | Bio string |
| 962 | Location string |
| 963 | Website string |
| 964 | Company string |
| 965 | Pronouns string |
| 966 | AvatarObjectKey pgtype.Text |
| 967 | Theme string |
| 968 | SessionEpoch int32 |
| 969 | } |
| 970 | |
| 971 | type UserEmail struct { |
| 972 | ID int64 |
| 973 | UserID int64 |
| 974 | Email string |
| 975 | IsPrimary bool |
| 976 | Verified bool |
| 977 | VerificationTokenHash []byte |
| 978 | VerificationSentAt pgtype.Timestamptz |
| 979 | VerifiedAt pgtype.Timestamptz |
| 980 | CreatedAt pgtype.Timestamptz |
| 981 | } |
| 982 | |
| 983 | type UserNotificationPref struct { |
| 984 | UserID int64 |
| 985 | Key string |
| 986 | Value []byte |
| 987 | UpdatedAt pgtype.Timestamptz |
| 988 | } |
| 989 | |
| 990 | type UserRecoveryCode struct { |
| 991 | ID int64 |
| 992 | UserID int64 |
| 993 | CodeHash []byte |
| 994 | UsedAt pgtype.Timestamptz |
| 995 | GeneratedAt pgtype.Timestamptz |
| 996 | CreatedAt pgtype.Timestamptz |
| 997 | } |
| 998 | |
| 999 | type UserSshKey struct { |
| 1000 | ID int64 |
| 1001 | UserID int64 |
| 1002 | Title string |
| 1003 | FingerprintSha256 string |
| 1004 | KeyType string |
| 1005 | KeyBits int32 |
| 1006 | PublicKey string |
| 1007 | LastUsedAt pgtype.Timestamptz |
| 1008 | LastUsedIp *netip.Addr |
| 1009 | CreatedAt pgtype.Timestamptz |
| 1010 | } |
| 1011 | |
| 1012 | type UserToken struct { |
| 1013 | ID int64 |
| 1014 | UserID int64 |
| 1015 | Name string |
| 1016 | TokenHash []byte |
| 1017 | TokenPrefix string |
| 1018 | Scopes []string |
| 1019 | ExpiresAt pgtype.Timestamptz |
| 1020 | LastUsedAt pgtype.Timestamptz |
| 1021 | LastUsedIp *netip.Addr |
| 1022 | RevokedAt pgtype.Timestamptz |
| 1023 | CreatedAt pgtype.Timestamptz |
| 1024 | } |
| 1025 | |
| 1026 | type UserTotp struct { |
| 1027 | ID int64 |
| 1028 | UserID int64 |
| 1029 | SecretEncrypted []byte |
| 1030 | SecretNonce []byte |
| 1031 | ConfirmedAt pgtype.Timestamptz |
| 1032 | LastUsedCounter int64 |
| 1033 | CreatedAt pgtype.Timestamptz |
| 1034 | UpdatedAt pgtype.Timestamptz |
| 1035 | } |
| 1036 | |
| 1037 | type UsernameRedirect struct { |
| 1038 | OldUsername string |
| 1039 | UserID int64 |
| 1040 | ChangedAt pgtype.Timestamptz |
| 1041 | } |
| 1042 | |
| 1043 | type WebhookEventsPending struct { |
| 1044 | ID int64 |
| 1045 | RepoID int64 |
| 1046 | EventKind string |
| 1047 | Payload []byte |
| 1048 | CreatedAt pgtype.Timestamptz |
| 1049 | } |
| 1050 |