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