Go · 75346 bytes Raw Blame History
1 // Code generated by sqlc. DO NOT EDIT.
2 // versions:
3 // sqlc v1.31.1
4
5 package issuesdb
6
7 import (
8 "database/sql/driver"
9 "fmt"
10 "net/netip"
11
12 "github.com/jackc/pgx/v5/pgtype"
13 )
14
15 type ActionsPolicyState string
16
17 const (
18 ActionsPolicyStateInherit ActionsPolicyState = "inherit"
19 ActionsPolicyStateEnabled ActionsPolicyState = "enabled"
20 ActionsPolicyStateDisabled ActionsPolicyState = "disabled"
21 )
22
23 func (e *ActionsPolicyState) Scan(src interface{}) error {
24 switch s := src.(type) {
25 case []byte:
26 *e = ActionsPolicyState(s)
27 case string:
28 *e = ActionsPolicyState(s)
29 default:
30 return fmt.Errorf("unsupported scan type for ActionsPolicyState: %T", src)
31 }
32 return nil
33 }
34
35 type NullActionsPolicyState struct {
36 ActionsPolicyState ActionsPolicyState
37 Valid bool // Valid is true if ActionsPolicyState is not NULL
38 }
39
40 // Scan implements the Scanner interface.
41 func (ns *NullActionsPolicyState) Scan(value interface{}) error {
42 if value == nil {
43 ns.ActionsPolicyState, ns.Valid = "", false
44 return nil
45 }
46 ns.Valid = true
47 return ns.ActionsPolicyState.Scan(value)
48 }
49
50 // Value implements the driver Valuer interface.
51 func (ns NullActionsPolicyState) Value() (driver.Value, error) {
52 if !ns.Valid {
53 return nil, nil
54 }
55 return string(ns.ActionsPolicyState), nil
56 }
57
58 type BillingInvoiceStatus string
59
60 const (
61 BillingInvoiceStatusDraft BillingInvoiceStatus = "draft"
62 BillingInvoiceStatusOpen BillingInvoiceStatus = "open"
63 BillingInvoiceStatusPaid BillingInvoiceStatus = "paid"
64 BillingInvoiceStatusVoid BillingInvoiceStatus = "void"
65 BillingInvoiceStatusUncollectible BillingInvoiceStatus = "uncollectible"
66 BillingInvoiceStatusRefunded BillingInvoiceStatus = "refunded"
67 )
68
69 func (e *BillingInvoiceStatus) Scan(src interface{}) error {
70 switch s := src.(type) {
71 case []byte:
72 *e = BillingInvoiceStatus(s)
73 case string:
74 *e = BillingInvoiceStatus(s)
75 default:
76 return fmt.Errorf("unsupported scan type for BillingInvoiceStatus: %T", src)
77 }
78 return nil
79 }
80
81 type NullBillingInvoiceStatus struct {
82 BillingInvoiceStatus BillingInvoiceStatus
83 Valid bool // Valid is true if BillingInvoiceStatus is not NULL
84 }
85
86 // Scan implements the Scanner interface.
87 func (ns *NullBillingInvoiceStatus) Scan(value interface{}) error {
88 if value == nil {
89 ns.BillingInvoiceStatus, ns.Valid = "", false
90 return nil
91 }
92 ns.Valid = true
93 return ns.BillingInvoiceStatus.Scan(value)
94 }
95
96 // Value implements the driver Valuer interface.
97 func (ns NullBillingInvoiceStatus) Value() (driver.Value, error) {
98 if !ns.Valid {
99 return nil, nil
100 }
101 return string(ns.BillingInvoiceStatus), nil
102 }
103
104 type BillingLockReason string
105
106 const (
107 BillingLockReasonPastDue BillingLockReason = "past_due"
108 BillingLockReasonCanceled BillingLockReason = "canceled"
109 BillingLockReasonUnpaid BillingLockReason = "unpaid"
110 BillingLockReasonManual BillingLockReason = "manual"
111 )
112
113 func (e *BillingLockReason) Scan(src interface{}) error {
114 switch s := src.(type) {
115 case []byte:
116 *e = BillingLockReason(s)
117 case string:
118 *e = BillingLockReason(s)
119 default:
120 return fmt.Errorf("unsupported scan type for BillingLockReason: %T", src)
121 }
122 return nil
123 }
124
125 type NullBillingLockReason struct {
126 BillingLockReason BillingLockReason
127 Valid bool // Valid is true if BillingLockReason is not NULL
128 }
129
130 // Scan implements the Scanner interface.
131 func (ns *NullBillingLockReason) Scan(value interface{}) error {
132 if value == nil {
133 ns.BillingLockReason, ns.Valid = "", false
134 return nil
135 }
136 ns.Valid = true
137 return ns.BillingLockReason.Scan(value)
138 }
139
140 // Value implements the driver Valuer interface.
141 func (ns NullBillingLockReason) Value() (driver.Value, error) {
142 if !ns.Valid {
143 return nil, nil
144 }
145 return string(ns.BillingLockReason), nil
146 }
147
148 type BillingProvider string
149
150 const (
151 BillingProviderStripe BillingProvider = "stripe"
152 )
153
154 func (e *BillingProvider) Scan(src interface{}) error {
155 switch s := src.(type) {
156 case []byte:
157 *e = BillingProvider(s)
158 case string:
159 *e = BillingProvider(s)
160 default:
161 return fmt.Errorf("unsupported scan type for BillingProvider: %T", src)
162 }
163 return nil
164 }
165
166 type NullBillingProvider struct {
167 BillingProvider BillingProvider
168 Valid bool // Valid is true if BillingProvider is not NULL
169 }
170
171 // Scan implements the Scanner interface.
172 func (ns *NullBillingProvider) Scan(value interface{}) error {
173 if value == nil {
174 ns.BillingProvider, ns.Valid = "", false
175 return nil
176 }
177 ns.Valid = true
178 return ns.BillingProvider.Scan(value)
179 }
180
181 // Value implements the driver Valuer interface.
182 func (ns NullBillingProvider) Value() (driver.Value, error) {
183 if !ns.Valid {
184 return nil, nil
185 }
186 return string(ns.BillingProvider), nil
187 }
188
189 type BillingSubjectKind string
190
191 const (
192 BillingSubjectKindUser BillingSubjectKind = "user"
193 BillingSubjectKindOrg BillingSubjectKind = "org"
194 )
195
196 func (e *BillingSubjectKind) Scan(src interface{}) error {
197 switch s := src.(type) {
198 case []byte:
199 *e = BillingSubjectKind(s)
200 case string:
201 *e = BillingSubjectKind(s)
202 default:
203 return fmt.Errorf("unsupported scan type for BillingSubjectKind: %T", src)
204 }
205 return nil
206 }
207
208 type NullBillingSubjectKind struct {
209 BillingSubjectKind BillingSubjectKind
210 Valid bool // Valid is true if BillingSubjectKind is not NULL
211 }
212
213 // Scan implements the Scanner interface.
214 func (ns *NullBillingSubjectKind) Scan(value interface{}) error {
215 if value == nil {
216 ns.BillingSubjectKind, ns.Valid = "", false
217 return nil
218 }
219 ns.Valid = true
220 return ns.BillingSubjectKind.Scan(value)
221 }
222
223 // Value implements the driver Valuer interface.
224 func (ns NullBillingSubjectKind) Value() (driver.Value, error) {
225 if !ns.Valid {
226 return nil, nil
227 }
228 return string(ns.BillingSubjectKind), nil
229 }
230
231 type BillingSubscriptionStatus string
232
233 const (
234 BillingSubscriptionStatusNone BillingSubscriptionStatus = "none"
235 BillingSubscriptionStatusIncomplete BillingSubscriptionStatus = "incomplete"
236 BillingSubscriptionStatusTrialing BillingSubscriptionStatus = "trialing"
237 BillingSubscriptionStatusActive BillingSubscriptionStatus = "active"
238 BillingSubscriptionStatusPastDue BillingSubscriptionStatus = "past_due"
239 BillingSubscriptionStatusCanceled BillingSubscriptionStatus = "canceled"
240 BillingSubscriptionStatusUnpaid BillingSubscriptionStatus = "unpaid"
241 BillingSubscriptionStatusPaused BillingSubscriptionStatus = "paused"
242 )
243
244 func (e *BillingSubscriptionStatus) Scan(src interface{}) error {
245 switch s := src.(type) {
246 case []byte:
247 *e = BillingSubscriptionStatus(s)
248 case string:
249 *e = BillingSubscriptionStatus(s)
250 default:
251 return fmt.Errorf("unsupported scan type for BillingSubscriptionStatus: %T", src)
252 }
253 return nil
254 }
255
256 type NullBillingSubscriptionStatus struct {
257 BillingSubscriptionStatus BillingSubscriptionStatus
258 Valid bool // Valid is true if BillingSubscriptionStatus is not NULL
259 }
260
261 // Scan implements the Scanner interface.
262 func (ns *NullBillingSubscriptionStatus) Scan(value interface{}) error {
263 if value == nil {
264 ns.BillingSubscriptionStatus, ns.Valid = "", false
265 return nil
266 }
267 ns.Valid = true
268 return ns.BillingSubscriptionStatus.Scan(value)
269 }
270
271 // Value implements the driver Valuer interface.
272 func (ns NullBillingSubscriptionStatus) Value() (driver.Value, error) {
273 if !ns.Valid {
274 return nil, nil
275 }
276 return string(ns.BillingSubscriptionStatus), nil
277 }
278
279 type CheckConclusion string
280
281 const (
282 CheckConclusionSuccess CheckConclusion = "success"
283 CheckConclusionFailure CheckConclusion = "failure"
284 CheckConclusionNeutral CheckConclusion = "neutral"
285 CheckConclusionCancelled CheckConclusion = "cancelled"
286 CheckConclusionSkipped CheckConclusion = "skipped"
287 CheckConclusionTimedOut CheckConclusion = "timed_out"
288 CheckConclusionActionRequired CheckConclusion = "action_required"
289 CheckConclusionStale CheckConclusion = "stale"
290 )
291
292 func (e *CheckConclusion) Scan(src interface{}) error {
293 switch s := src.(type) {
294 case []byte:
295 *e = CheckConclusion(s)
296 case string:
297 *e = CheckConclusion(s)
298 default:
299 return fmt.Errorf("unsupported scan type for CheckConclusion: %T", src)
300 }
301 return nil
302 }
303
304 type NullCheckConclusion struct {
305 CheckConclusion CheckConclusion
306 Valid bool // Valid is true if CheckConclusion is not NULL
307 }
308
309 // Scan implements the Scanner interface.
310 func (ns *NullCheckConclusion) Scan(value interface{}) error {
311 if value == nil {
312 ns.CheckConclusion, ns.Valid = "", false
313 return nil
314 }
315 ns.Valid = true
316 return ns.CheckConclusion.Scan(value)
317 }
318
319 // Value implements the driver Valuer interface.
320 func (ns NullCheckConclusion) Value() (driver.Value, error) {
321 if !ns.Valid {
322 return nil, nil
323 }
324 return string(ns.CheckConclusion), nil
325 }
326
327 type CheckStatus string
328
329 const (
330 CheckStatusQueued CheckStatus = "queued"
331 CheckStatusInProgress CheckStatus = "in_progress"
332 CheckStatusCompleted CheckStatus = "completed"
333 CheckStatusPending CheckStatus = "pending"
334 )
335
336 func (e *CheckStatus) Scan(src interface{}) error {
337 switch s := src.(type) {
338 case []byte:
339 *e = CheckStatus(s)
340 case string:
341 *e = CheckStatus(s)
342 default:
343 return fmt.Errorf("unsupported scan type for CheckStatus: %T", src)
344 }
345 return nil
346 }
347
348 type NullCheckStatus struct {
349 CheckStatus CheckStatus
350 Valid bool // Valid is true if CheckStatus is not NULL
351 }
352
353 // Scan implements the Scanner interface.
354 func (ns *NullCheckStatus) Scan(value interface{}) error {
355 if value == nil {
356 ns.CheckStatus, ns.Valid = "", false
357 return nil
358 }
359 ns.Valid = true
360 return ns.CheckStatus.Scan(value)
361 }
362
363 // Value implements the driver Valuer interface.
364 func (ns NullCheckStatus) Value() (driver.Value, error) {
365 if !ns.Valid {
366 return nil, nil
367 }
368 return string(ns.CheckStatus), nil
369 }
370
371 type CollabRole string
372
373 const (
374 CollabRoleRead CollabRole = "read"
375 CollabRoleTriage CollabRole = "triage"
376 CollabRoleWrite CollabRole = "write"
377 CollabRoleMaintain CollabRole = "maintain"
378 CollabRoleAdmin CollabRole = "admin"
379 )
380
381 func (e *CollabRole) Scan(src interface{}) error {
382 switch s := src.(type) {
383 case []byte:
384 *e = CollabRole(s)
385 case string:
386 *e = CollabRole(s)
387 default:
388 return fmt.Errorf("unsupported scan type for CollabRole: %T", src)
389 }
390 return nil
391 }
392
393 type NullCollabRole struct {
394 CollabRole CollabRole
395 Valid bool // Valid is true if CollabRole is not NULL
396 }
397
398 // Scan implements the Scanner interface.
399 func (ns *NullCollabRole) Scan(value interface{}) error {
400 if value == nil {
401 ns.CollabRole, ns.Valid = "", false
402 return nil
403 }
404 ns.Valid = true
405 return ns.CollabRole.Scan(value)
406 }
407
408 // Value implements the driver Valuer interface.
409 func (ns NullCollabRole) Value() (driver.Value, error) {
410 if !ns.Valid {
411 return nil, nil
412 }
413 return string(ns.CollabRole), nil
414 }
415
416 type IssueKind string
417
418 const (
419 IssueKindIssue IssueKind = "issue"
420 IssueKindPr IssueKind = "pr"
421 )
422
423 func (e *IssueKind) Scan(src interface{}) error {
424 switch s := src.(type) {
425 case []byte:
426 *e = IssueKind(s)
427 case string:
428 *e = IssueKind(s)
429 default:
430 return fmt.Errorf("unsupported scan type for IssueKind: %T", src)
431 }
432 return nil
433 }
434
435 type NullIssueKind struct {
436 IssueKind IssueKind
437 Valid bool // Valid is true if IssueKind is not NULL
438 }
439
440 // Scan implements the Scanner interface.
441 func (ns *NullIssueKind) Scan(value interface{}) error {
442 if value == nil {
443 ns.IssueKind, ns.Valid = "", false
444 return nil
445 }
446 ns.Valid = true
447 return ns.IssueKind.Scan(value)
448 }
449
450 // Value implements the driver Valuer interface.
451 func (ns NullIssueKind) Value() (driver.Value, error) {
452 if !ns.Valid {
453 return nil, nil
454 }
455 return string(ns.IssueKind), nil
456 }
457
458 type IssueRefSource string
459
460 const (
461 IssueRefSourceCommentBody IssueRefSource = "comment_body"
462 IssueRefSourceIssueBody IssueRefSource = "issue_body"
463 IssueRefSourceCommitMessage IssueRefSource = "commit_message"
464 )
465
466 func (e *IssueRefSource) Scan(src interface{}) error {
467 switch s := src.(type) {
468 case []byte:
469 *e = IssueRefSource(s)
470 case string:
471 *e = IssueRefSource(s)
472 default:
473 return fmt.Errorf("unsupported scan type for IssueRefSource: %T", src)
474 }
475 return nil
476 }
477
478 type NullIssueRefSource struct {
479 IssueRefSource IssueRefSource
480 Valid bool // Valid is true if IssueRefSource is not NULL
481 }
482
483 // Scan implements the Scanner interface.
484 func (ns *NullIssueRefSource) Scan(value interface{}) error {
485 if value == nil {
486 ns.IssueRefSource, ns.Valid = "", false
487 return nil
488 }
489 ns.Valid = true
490 return ns.IssueRefSource.Scan(value)
491 }
492
493 // Value implements the driver Valuer interface.
494 func (ns NullIssueRefSource) Value() (driver.Value, error) {
495 if !ns.Valid {
496 return nil, nil
497 }
498 return string(ns.IssueRefSource), nil
499 }
500
501 type IssueState string
502
503 const (
504 IssueStateOpen IssueState = "open"
505 IssueStateClosed IssueState = "closed"
506 )
507
508 func (e *IssueState) Scan(src interface{}) error {
509 switch s := src.(type) {
510 case []byte:
511 *e = IssueState(s)
512 case string:
513 *e = IssueState(s)
514 default:
515 return fmt.Errorf("unsupported scan type for IssueState: %T", src)
516 }
517 return nil
518 }
519
520 type NullIssueState struct {
521 IssueState IssueState
522 Valid bool // Valid is true if IssueState is not NULL
523 }
524
525 // Scan implements the Scanner interface.
526 func (ns *NullIssueState) Scan(value interface{}) error {
527 if value == nil {
528 ns.IssueState, ns.Valid = "", false
529 return nil
530 }
531 ns.Valid = true
532 return ns.IssueState.Scan(value)
533 }
534
535 // Value implements the driver Valuer interface.
536 func (ns NullIssueState) Value() (driver.Value, error) {
537 if !ns.Valid {
538 return nil, nil
539 }
540 return string(ns.IssueState), nil
541 }
542
543 type IssueStateReason string
544
545 const (
546 IssueStateReasonCompleted IssueStateReason = "completed"
547 IssueStateReasonNotPlanned IssueStateReason = "not_planned"
548 IssueStateReasonReopened IssueStateReason = "reopened"
549 IssueStateReasonDuplicate IssueStateReason = "duplicate"
550 )
551
552 func (e *IssueStateReason) Scan(src interface{}) error {
553 switch s := src.(type) {
554 case []byte:
555 *e = IssueStateReason(s)
556 case string:
557 *e = IssueStateReason(s)
558 default:
559 return fmt.Errorf("unsupported scan type for IssueStateReason: %T", src)
560 }
561 return nil
562 }
563
564 type NullIssueStateReason struct {
565 IssueStateReason IssueStateReason
566 Valid bool // Valid is true if IssueStateReason is not NULL
567 }
568
569 // Scan implements the Scanner interface.
570 func (ns *NullIssueStateReason) Scan(value interface{}) error {
571 if value == nil {
572 ns.IssueStateReason, ns.Valid = "", false
573 return nil
574 }
575 ns.Valid = true
576 return ns.IssueStateReason.Scan(value)
577 }
578
579 // Value implements the driver Valuer interface.
580 func (ns NullIssueStateReason) Value() (driver.Value, error) {
581 if !ns.Valid {
582 return nil, nil
583 }
584 return string(ns.IssueStateReason), nil
585 }
586
587 type MilestoneState string
588
589 const (
590 MilestoneStateOpen MilestoneState = "open"
591 MilestoneStateClosed MilestoneState = "closed"
592 )
593
594 func (e *MilestoneState) Scan(src interface{}) error {
595 switch s := src.(type) {
596 case []byte:
597 *e = MilestoneState(s)
598 case string:
599 *e = MilestoneState(s)
600 default:
601 return fmt.Errorf("unsupported scan type for MilestoneState: %T", src)
602 }
603 return nil
604 }
605
606 type NullMilestoneState struct {
607 MilestoneState MilestoneState
608 Valid bool // Valid is true if MilestoneState is not NULL
609 }
610
611 // Scan implements the Scanner interface.
612 func (ns *NullMilestoneState) Scan(value interface{}) error {
613 if value == nil {
614 ns.MilestoneState, ns.Valid = "", false
615 return nil
616 }
617 ns.Valid = true
618 return ns.MilestoneState.Scan(value)
619 }
620
621 // Value implements the driver Valuer interface.
622 func (ns NullMilestoneState) Value() (driver.Value, error) {
623 if !ns.Valid {
624 return nil, nil
625 }
626 return string(ns.MilestoneState), nil
627 }
628
629 type NotificationThreadKind string
630
631 const (
632 NotificationThreadKindIssue NotificationThreadKind = "issue"
633 NotificationThreadKindPr NotificationThreadKind = "pr"
634 )
635
636 func (e *NotificationThreadKind) Scan(src interface{}) error {
637 switch s := src.(type) {
638 case []byte:
639 *e = NotificationThreadKind(s)
640 case string:
641 *e = NotificationThreadKind(s)
642 default:
643 return fmt.Errorf("unsupported scan type for NotificationThreadKind: %T", src)
644 }
645 return nil
646 }
647
648 type NullNotificationThreadKind struct {
649 NotificationThreadKind NotificationThreadKind
650 Valid bool // Valid is true if NotificationThreadKind is not NULL
651 }
652
653 // Scan implements the Scanner interface.
654 func (ns *NullNotificationThreadKind) Scan(value interface{}) error {
655 if value == nil {
656 ns.NotificationThreadKind, ns.Valid = "", false
657 return nil
658 }
659 ns.Valid = true
660 return ns.NotificationThreadKind.Scan(value)
661 }
662
663 // Value implements the driver Valuer interface.
664 func (ns NullNotificationThreadKind) Value() (driver.Value, error) {
665 if !ns.Valid {
666 return nil, nil
667 }
668 return string(ns.NotificationThreadKind), nil
669 }
670
671 type OrgPlan string
672
673 const (
674 OrgPlanFree OrgPlan = "free"
675 OrgPlanTeam OrgPlan = "team"
676 OrgPlanEnterprise OrgPlan = "enterprise"
677 )
678
679 func (e *OrgPlan) Scan(src interface{}) error {
680 switch s := src.(type) {
681 case []byte:
682 *e = OrgPlan(s)
683 case string:
684 *e = OrgPlan(s)
685 default:
686 return fmt.Errorf("unsupported scan type for OrgPlan: %T", src)
687 }
688 return nil
689 }
690
691 type NullOrgPlan struct {
692 OrgPlan OrgPlan
693 Valid bool // Valid is true if OrgPlan is not NULL
694 }
695
696 // Scan implements the Scanner interface.
697 func (ns *NullOrgPlan) Scan(value interface{}) error {
698 if value == nil {
699 ns.OrgPlan, ns.Valid = "", false
700 return nil
701 }
702 ns.Valid = true
703 return ns.OrgPlan.Scan(value)
704 }
705
706 // Value implements the driver Valuer interface.
707 func (ns NullOrgPlan) Value() (driver.Value, error) {
708 if !ns.Valid {
709 return nil, nil
710 }
711 return string(ns.OrgPlan), nil
712 }
713
714 type OrgRole string
715
716 const (
717 OrgRoleOwner OrgRole = "owner"
718 OrgRoleMember OrgRole = "member"
719 )
720
721 func (e *OrgRole) Scan(src interface{}) error {
722 switch s := src.(type) {
723 case []byte:
724 *e = OrgRole(s)
725 case string:
726 *e = OrgRole(s)
727 default:
728 return fmt.Errorf("unsupported scan type for OrgRole: %T", src)
729 }
730 return nil
731 }
732
733 type NullOrgRole struct {
734 OrgRole OrgRole
735 Valid bool // Valid is true if OrgRole is not NULL
736 }
737
738 // Scan implements the Scanner interface.
739 func (ns *NullOrgRole) Scan(value interface{}) error {
740 if value == nil {
741 ns.OrgRole, ns.Valid = "", false
742 return nil
743 }
744 ns.Valid = true
745 return ns.OrgRole.Scan(value)
746 }
747
748 // Value implements the driver Valuer interface.
749 func (ns NullOrgRole) Value() (driver.Value, error) {
750 if !ns.Valid {
751 return nil, nil
752 }
753 return string(ns.OrgRole), nil
754 }
755
756 type PrFileStatus string
757
758 const (
759 PrFileStatusAdded PrFileStatus = "added"
760 PrFileStatusModified PrFileStatus = "modified"
761 PrFileStatusDeleted PrFileStatus = "deleted"
762 PrFileStatusRenamed PrFileStatus = "renamed"
763 PrFileStatusCopied PrFileStatus = "copied"
764 )
765
766 func (e *PrFileStatus) Scan(src interface{}) error {
767 switch s := src.(type) {
768 case []byte:
769 *e = PrFileStatus(s)
770 case string:
771 *e = PrFileStatus(s)
772 default:
773 return fmt.Errorf("unsupported scan type for PrFileStatus: %T", src)
774 }
775 return nil
776 }
777
778 type NullPrFileStatus struct {
779 PrFileStatus PrFileStatus
780 Valid bool // Valid is true if PrFileStatus is not NULL
781 }
782
783 // Scan implements the Scanner interface.
784 func (ns *NullPrFileStatus) Scan(value interface{}) error {
785 if value == nil {
786 ns.PrFileStatus, ns.Valid = "", false
787 return nil
788 }
789 ns.Valid = true
790 return ns.PrFileStatus.Scan(value)
791 }
792
793 // Value implements the driver Valuer interface.
794 func (ns NullPrFileStatus) Value() (driver.Value, error) {
795 if !ns.Valid {
796 return nil, nil
797 }
798 return string(ns.PrFileStatus), nil
799 }
800
801 type PrMergeMethod string
802
803 const (
804 PrMergeMethodMerge PrMergeMethod = "merge"
805 PrMergeMethodSquash PrMergeMethod = "squash"
806 PrMergeMethodRebase PrMergeMethod = "rebase"
807 )
808
809 func (e *PrMergeMethod) Scan(src interface{}) error {
810 switch s := src.(type) {
811 case []byte:
812 *e = PrMergeMethod(s)
813 case string:
814 *e = PrMergeMethod(s)
815 default:
816 return fmt.Errorf("unsupported scan type for PrMergeMethod: %T", src)
817 }
818 return nil
819 }
820
821 type NullPrMergeMethod struct {
822 PrMergeMethod PrMergeMethod
823 Valid bool // Valid is true if PrMergeMethod is not NULL
824 }
825
826 // Scan implements the Scanner interface.
827 func (ns *NullPrMergeMethod) Scan(value interface{}) error {
828 if value == nil {
829 ns.PrMergeMethod, ns.Valid = "", false
830 return nil
831 }
832 ns.Valid = true
833 return ns.PrMergeMethod.Scan(value)
834 }
835
836 // Value implements the driver Valuer interface.
837 func (ns NullPrMergeMethod) Value() (driver.Value, error) {
838 if !ns.Valid {
839 return nil, nil
840 }
841 return string(ns.PrMergeMethod), nil
842 }
843
844 type PrMergeableState string
845
846 const (
847 PrMergeableStateUnknown PrMergeableState = "unknown"
848 PrMergeableStateClean PrMergeableState = "clean"
849 PrMergeableStateDirty PrMergeableState = "dirty"
850 PrMergeableStateBlocked PrMergeableState = "blocked"
851 PrMergeableStateBehind PrMergeableState = "behind"
852 )
853
854 func (e *PrMergeableState) Scan(src interface{}) error {
855 switch s := src.(type) {
856 case []byte:
857 *e = PrMergeableState(s)
858 case string:
859 *e = PrMergeableState(s)
860 default:
861 return fmt.Errorf("unsupported scan type for PrMergeableState: %T", src)
862 }
863 return nil
864 }
865
866 type NullPrMergeableState struct {
867 PrMergeableState PrMergeableState
868 Valid bool // Valid is true if PrMergeableState is not NULL
869 }
870
871 // Scan implements the Scanner interface.
872 func (ns *NullPrMergeableState) Scan(value interface{}) error {
873 if value == nil {
874 ns.PrMergeableState, ns.Valid = "", false
875 return nil
876 }
877 ns.Valid = true
878 return ns.PrMergeableState.Scan(value)
879 }
880
881 // Value implements the driver Valuer interface.
882 func (ns NullPrMergeableState) Value() (driver.Value, error) {
883 if !ns.Valid {
884 return nil, nil
885 }
886 return string(ns.PrMergeableState), nil
887 }
888
889 type PrReviewSide string
890
891 const (
892 PrReviewSideLeft PrReviewSide = "left"
893 PrReviewSideRight PrReviewSide = "right"
894 )
895
896 func (e *PrReviewSide) Scan(src interface{}) error {
897 switch s := src.(type) {
898 case []byte:
899 *e = PrReviewSide(s)
900 case string:
901 *e = PrReviewSide(s)
902 default:
903 return fmt.Errorf("unsupported scan type for PrReviewSide: %T", src)
904 }
905 return nil
906 }
907
908 type NullPrReviewSide struct {
909 PrReviewSide PrReviewSide
910 Valid bool // Valid is true if PrReviewSide is not NULL
911 }
912
913 // Scan implements the Scanner interface.
914 func (ns *NullPrReviewSide) Scan(value interface{}) error {
915 if value == nil {
916 ns.PrReviewSide, ns.Valid = "", false
917 return nil
918 }
919 ns.Valid = true
920 return ns.PrReviewSide.Scan(value)
921 }
922
923 // Value implements the driver Valuer interface.
924 func (ns NullPrReviewSide) Value() (driver.Value, error) {
925 if !ns.Valid {
926 return nil, nil
927 }
928 return string(ns.PrReviewSide), nil
929 }
930
931 type PrReviewState string
932
933 const (
934 PrReviewStateComment PrReviewState = "comment"
935 PrReviewStateApprove PrReviewState = "approve"
936 PrReviewStateRequestChanges PrReviewState = "request_changes"
937 )
938
939 func (e *PrReviewState) Scan(src interface{}) error {
940 switch s := src.(type) {
941 case []byte:
942 *e = PrReviewState(s)
943 case string:
944 *e = PrReviewState(s)
945 default:
946 return fmt.Errorf("unsupported scan type for PrReviewState: %T", src)
947 }
948 return nil
949 }
950
951 type NullPrReviewState struct {
952 PrReviewState PrReviewState
953 Valid bool // Valid is true if PrReviewState is not NULL
954 }
955
956 // Scan implements the Scanner interface.
957 func (ns *NullPrReviewState) Scan(value interface{}) error {
958 if value == nil {
959 ns.PrReviewState, ns.Valid = "", false
960 return nil
961 }
962 ns.Valid = true
963 return ns.PrReviewState.Scan(value)
964 }
965
966 // Value implements the driver Valuer interface.
967 func (ns NullPrReviewState) Value() (driver.Value, error) {
968 if !ns.Valid {
969 return nil, nil
970 }
971 return string(ns.PrReviewState), nil
972 }
973
974 type PrincipalKind string
975
976 const (
977 PrincipalKindUser PrincipalKind = "user"
978 PrincipalKindOrg PrincipalKind = "org"
979 )
980
981 func (e *PrincipalKind) Scan(src interface{}) error {
982 switch s := src.(type) {
983 case []byte:
984 *e = PrincipalKind(s)
985 case string:
986 *e = PrincipalKind(s)
987 default:
988 return fmt.Errorf("unsupported scan type for PrincipalKind: %T", src)
989 }
990 return nil
991 }
992
993 type NullPrincipalKind struct {
994 PrincipalKind PrincipalKind
995 Valid bool // Valid is true if PrincipalKind is not NULL
996 }
997
998 // Scan implements the Scanner interface.
999 func (ns *NullPrincipalKind) Scan(value interface{}) error {
1000 if value == nil {
1001 ns.PrincipalKind, ns.Valid = "", false
1002 return nil
1003 }
1004 ns.Valid = true
1005 return ns.PrincipalKind.Scan(value)
1006 }
1007
1008 // Value implements the driver Valuer interface.
1009 func (ns NullPrincipalKind) Value() (driver.Value, error) {
1010 if !ns.Valid {
1011 return nil, nil
1012 }
1013 return string(ns.PrincipalKind), nil
1014 }
1015
1016 type RepoInitStatus string
1017
1018 const (
1019 RepoInitStatusInitialized RepoInitStatus = "initialized"
1020 RepoInitStatusInitPending RepoInitStatus = "init_pending"
1021 RepoInitStatusInitFailed RepoInitStatus = "init_failed"
1022 )
1023
1024 func (e *RepoInitStatus) Scan(src interface{}) error {
1025 switch s := src.(type) {
1026 case []byte:
1027 *e = RepoInitStatus(s)
1028 case string:
1029 *e = RepoInitStatus(s)
1030 default:
1031 return fmt.Errorf("unsupported scan type for RepoInitStatus: %T", src)
1032 }
1033 return nil
1034 }
1035
1036 type NullRepoInitStatus struct {
1037 RepoInitStatus RepoInitStatus
1038 Valid bool // Valid is true if RepoInitStatus is not NULL
1039 }
1040
1041 // Scan implements the Scanner interface.
1042 func (ns *NullRepoInitStatus) Scan(value interface{}) error {
1043 if value == nil {
1044 ns.RepoInitStatus, ns.Valid = "", false
1045 return nil
1046 }
1047 ns.Valid = true
1048 return ns.RepoInitStatus.Scan(value)
1049 }
1050
1051 // Value implements the driver Valuer interface.
1052 func (ns NullRepoInitStatus) Value() (driver.Value, error) {
1053 if !ns.Valid {
1054 return nil, nil
1055 }
1056 return string(ns.RepoInitStatus), nil
1057 }
1058
1059 type RepoVisibility string
1060
1061 const (
1062 RepoVisibilityPublic RepoVisibility = "public"
1063 RepoVisibilityPrivate RepoVisibility = "private"
1064 )
1065
1066 func (e *RepoVisibility) Scan(src interface{}) error {
1067 switch s := src.(type) {
1068 case []byte:
1069 *e = RepoVisibility(s)
1070 case string:
1071 *e = RepoVisibility(s)
1072 default:
1073 return fmt.Errorf("unsupported scan type for RepoVisibility: %T", src)
1074 }
1075 return nil
1076 }
1077
1078 type NullRepoVisibility struct {
1079 RepoVisibility RepoVisibility
1080 Valid bool // Valid is true if RepoVisibility is not NULL
1081 }
1082
1083 // Scan implements the Scanner interface.
1084 func (ns *NullRepoVisibility) Scan(value interface{}) error {
1085 if value == nil {
1086 ns.RepoVisibility, ns.Valid = "", false
1087 return nil
1088 }
1089 ns.Valid = true
1090 return ns.RepoVisibility.Scan(value)
1091 }
1092
1093 // Value implements the driver Valuer interface.
1094 func (ns NullRepoVisibility) Value() (driver.Value, error) {
1095 if !ns.Valid {
1096 return nil, nil
1097 }
1098 return string(ns.RepoVisibility), nil
1099 }
1100
1101 type TeamPrivacy string
1102
1103 const (
1104 TeamPrivacyVisible TeamPrivacy = "visible"
1105 TeamPrivacySecret TeamPrivacy = "secret"
1106 )
1107
1108 func (e *TeamPrivacy) Scan(src interface{}) error {
1109 switch s := src.(type) {
1110 case []byte:
1111 *e = TeamPrivacy(s)
1112 case string:
1113 *e = TeamPrivacy(s)
1114 default:
1115 return fmt.Errorf("unsupported scan type for TeamPrivacy: %T", src)
1116 }
1117 return nil
1118 }
1119
1120 type NullTeamPrivacy struct {
1121 TeamPrivacy TeamPrivacy
1122 Valid bool // Valid is true if TeamPrivacy is not NULL
1123 }
1124
1125 // Scan implements the Scanner interface.
1126 func (ns *NullTeamPrivacy) Scan(value interface{}) error {
1127 if value == nil {
1128 ns.TeamPrivacy, ns.Valid = "", false
1129 return nil
1130 }
1131 ns.Valid = true
1132 return ns.TeamPrivacy.Scan(value)
1133 }
1134
1135 // Value implements the driver Valuer interface.
1136 func (ns NullTeamPrivacy) Value() (driver.Value, error) {
1137 if !ns.Valid {
1138 return nil, nil
1139 }
1140 return string(ns.TeamPrivacy), nil
1141 }
1142
1143 type TeamRepoRole string
1144
1145 const (
1146 TeamRepoRoleRead TeamRepoRole = "read"
1147 TeamRepoRoleTriage TeamRepoRole = "triage"
1148 TeamRepoRoleWrite TeamRepoRole = "write"
1149 TeamRepoRoleMaintain TeamRepoRole = "maintain"
1150 TeamRepoRoleAdmin TeamRepoRole = "admin"
1151 )
1152
1153 func (e *TeamRepoRole) Scan(src interface{}) error {
1154 switch s := src.(type) {
1155 case []byte:
1156 *e = TeamRepoRole(s)
1157 case string:
1158 *e = TeamRepoRole(s)
1159 default:
1160 return fmt.Errorf("unsupported scan type for TeamRepoRole: %T", src)
1161 }
1162 return nil
1163 }
1164
1165 type NullTeamRepoRole struct {
1166 TeamRepoRole TeamRepoRole
1167 Valid bool // Valid is true if TeamRepoRole is not NULL
1168 }
1169
1170 // Scan implements the Scanner interface.
1171 func (ns *NullTeamRepoRole) Scan(value interface{}) error {
1172 if value == nil {
1173 ns.TeamRepoRole, ns.Valid = "", false
1174 return nil
1175 }
1176 ns.Valid = true
1177 return ns.TeamRepoRole.Scan(value)
1178 }
1179
1180 // Value implements the driver Valuer interface.
1181 func (ns NullTeamRepoRole) Value() (driver.Value, error) {
1182 if !ns.Valid {
1183 return nil, nil
1184 }
1185 return string(ns.TeamRepoRole), nil
1186 }
1187
1188 type TeamRole string
1189
1190 const (
1191 TeamRoleMember TeamRole = "member"
1192 TeamRoleMaintainer TeamRole = "maintainer"
1193 )
1194
1195 func (e *TeamRole) Scan(src interface{}) error {
1196 switch s := src.(type) {
1197 case []byte:
1198 *e = TeamRole(s)
1199 case string:
1200 *e = TeamRole(s)
1201 default:
1202 return fmt.Errorf("unsupported scan type for TeamRole: %T", src)
1203 }
1204 return nil
1205 }
1206
1207 type NullTeamRole struct {
1208 TeamRole TeamRole
1209 Valid bool // Valid is true if TeamRole is not NULL
1210 }
1211
1212 // Scan implements the Scanner interface.
1213 func (ns *NullTeamRole) Scan(value interface{}) error {
1214 if value == nil {
1215 ns.TeamRole, ns.Valid = "", false
1216 return nil
1217 }
1218 ns.Valid = true
1219 return ns.TeamRole.Scan(value)
1220 }
1221
1222 // Value implements the driver Valuer interface.
1223 func (ns NullTeamRole) Value() (driver.Value, error) {
1224 if !ns.Valid {
1225 return nil, nil
1226 }
1227 return string(ns.TeamRole), nil
1228 }
1229
1230 type TransactionalEmailStatus string
1231
1232 const (
1233 TransactionalEmailStatusQueued TransactionalEmailStatus = "queued"
1234 TransactionalEmailStatusSent TransactionalEmailStatus = "sent"
1235 TransactionalEmailStatusSoftBounced TransactionalEmailStatus = "soft_bounced"
1236 TransactionalEmailStatusHardBounced TransactionalEmailStatus = "hard_bounced"
1237 TransactionalEmailStatusDropped TransactionalEmailStatus = "dropped"
1238 )
1239
1240 func (e *TransactionalEmailStatus) Scan(src interface{}) error {
1241 switch s := src.(type) {
1242 case []byte:
1243 *e = TransactionalEmailStatus(s)
1244 case string:
1245 *e = TransactionalEmailStatus(s)
1246 default:
1247 return fmt.Errorf("unsupported scan type for TransactionalEmailStatus: %T", src)
1248 }
1249 return nil
1250 }
1251
1252 type NullTransactionalEmailStatus struct {
1253 TransactionalEmailStatus TransactionalEmailStatus
1254 Valid bool // Valid is true if TransactionalEmailStatus is not NULL
1255 }
1256
1257 // Scan implements the Scanner interface.
1258 func (ns *NullTransactionalEmailStatus) Scan(value interface{}) error {
1259 if value == nil {
1260 ns.TransactionalEmailStatus, ns.Valid = "", false
1261 return nil
1262 }
1263 ns.Valid = true
1264 return ns.TransactionalEmailStatus.Scan(value)
1265 }
1266
1267 // Value implements the driver Valuer interface.
1268 func (ns NullTransactionalEmailStatus) Value() (driver.Value, error) {
1269 if !ns.Valid {
1270 return nil, nil
1271 }
1272 return string(ns.TransactionalEmailStatus), nil
1273 }
1274
1275 type TransferPrincipalKind string
1276
1277 const (
1278 TransferPrincipalKindUser TransferPrincipalKind = "user"
1279 TransferPrincipalKindOrg TransferPrincipalKind = "org"
1280 )
1281
1282 func (e *TransferPrincipalKind) Scan(src interface{}) error {
1283 switch s := src.(type) {
1284 case []byte:
1285 *e = TransferPrincipalKind(s)
1286 case string:
1287 *e = TransferPrincipalKind(s)
1288 default:
1289 return fmt.Errorf("unsupported scan type for TransferPrincipalKind: %T", src)
1290 }
1291 return nil
1292 }
1293
1294 type NullTransferPrincipalKind struct {
1295 TransferPrincipalKind TransferPrincipalKind
1296 Valid bool // Valid is true if TransferPrincipalKind is not NULL
1297 }
1298
1299 // Scan implements the Scanner interface.
1300 func (ns *NullTransferPrincipalKind) Scan(value interface{}) error {
1301 if value == nil {
1302 ns.TransferPrincipalKind, ns.Valid = "", false
1303 return nil
1304 }
1305 ns.Valid = true
1306 return ns.TransferPrincipalKind.Scan(value)
1307 }
1308
1309 // Value implements the driver Valuer interface.
1310 func (ns NullTransferPrincipalKind) Value() (driver.Value, error) {
1311 if !ns.Valid {
1312 return nil, nil
1313 }
1314 return string(ns.TransferPrincipalKind), nil
1315 }
1316
1317 type TransferStatus string
1318
1319 const (
1320 TransferStatusPending TransferStatus = "pending"
1321 TransferStatusAccepted TransferStatus = "accepted"
1322 TransferStatusDeclined TransferStatus = "declined"
1323 TransferStatusCanceled TransferStatus = "canceled"
1324 TransferStatusExpired TransferStatus = "expired"
1325 )
1326
1327 func (e *TransferStatus) Scan(src interface{}) error {
1328 switch s := src.(type) {
1329 case []byte:
1330 *e = TransferStatus(s)
1331 case string:
1332 *e = TransferStatus(s)
1333 default:
1334 return fmt.Errorf("unsupported scan type for TransferStatus: %T", src)
1335 }
1336 return nil
1337 }
1338
1339 type NullTransferStatus struct {
1340 TransferStatus TransferStatus
1341 Valid bool // Valid is true if TransferStatus is not NULL
1342 }
1343
1344 // Scan implements the Scanner interface.
1345 func (ns *NullTransferStatus) Scan(value interface{}) error {
1346 if value == nil {
1347 ns.TransferStatus, ns.Valid = "", false
1348 return nil
1349 }
1350 ns.Valid = true
1351 return ns.TransferStatus.Scan(value)
1352 }
1353
1354 // Value implements the driver Valuer interface.
1355 func (ns NullTransferStatus) Value() (driver.Value, error) {
1356 if !ns.Valid {
1357 return nil, nil
1358 }
1359 return string(ns.TransferStatus), nil
1360 }
1361
1362 type TrendingKind string
1363
1364 const (
1365 TrendingKindRepos TrendingKind = "repos"
1366 TrendingKindUsers TrendingKind = "users"
1367 )
1368
1369 func (e *TrendingKind) Scan(src interface{}) error {
1370 switch s := src.(type) {
1371 case []byte:
1372 *e = TrendingKind(s)
1373 case string:
1374 *e = TrendingKind(s)
1375 default:
1376 return fmt.Errorf("unsupported scan type for TrendingKind: %T", src)
1377 }
1378 return nil
1379 }
1380
1381 type NullTrendingKind struct {
1382 TrendingKind TrendingKind
1383 Valid bool // Valid is true if TrendingKind is not NULL
1384 }
1385
1386 // Scan implements the Scanner interface.
1387 func (ns *NullTrendingKind) Scan(value interface{}) error {
1388 if value == nil {
1389 ns.TrendingKind, ns.Valid = "", false
1390 return nil
1391 }
1392 ns.Valid = true
1393 return ns.TrendingKind.Scan(value)
1394 }
1395
1396 // Value implements the driver Valuer interface.
1397 func (ns NullTrendingKind) Value() (driver.Value, error) {
1398 if !ns.Valid {
1399 return nil, nil
1400 }
1401 return string(ns.TrendingKind), nil
1402 }
1403
1404 type TrendingScope string
1405
1406 const (
1407 TrendingScopeDay TrendingScope = "day"
1408 TrendingScopeWeek TrendingScope = "week"
1409 TrendingScopeMonth TrendingScope = "month"
1410 )
1411
1412 func (e *TrendingScope) Scan(src interface{}) error {
1413 switch s := src.(type) {
1414 case []byte:
1415 *e = TrendingScope(s)
1416 case string:
1417 *e = TrendingScope(s)
1418 default:
1419 return fmt.Errorf("unsupported scan type for TrendingScope: %T", src)
1420 }
1421 return nil
1422 }
1423
1424 type NullTrendingScope struct {
1425 TrendingScope TrendingScope
1426 Valid bool // Valid is true if TrendingScope is not NULL
1427 }
1428
1429 // Scan implements the Scanner interface.
1430 func (ns *NullTrendingScope) Scan(value interface{}) error {
1431 if value == nil {
1432 ns.TrendingScope, ns.Valid = "", false
1433 return nil
1434 }
1435 ns.Valid = true
1436 return ns.TrendingScope.Scan(value)
1437 }
1438
1439 // Value implements the driver Valuer interface.
1440 func (ns NullTrendingScope) Value() (driver.Value, error) {
1441 if !ns.Valid {
1442 return nil, nil
1443 }
1444 return string(ns.TrendingScope), nil
1445 }
1446
1447 type UserPlan string
1448
1449 const (
1450 UserPlanFree UserPlan = "free"
1451 UserPlanPro UserPlan = "pro"
1452 )
1453
1454 func (e *UserPlan) Scan(src interface{}) error {
1455 switch s := src.(type) {
1456 case []byte:
1457 *e = UserPlan(s)
1458 case string:
1459 *e = UserPlan(s)
1460 default:
1461 return fmt.Errorf("unsupported scan type for UserPlan: %T", src)
1462 }
1463 return nil
1464 }
1465
1466 type NullUserPlan struct {
1467 UserPlan UserPlan
1468 Valid bool // Valid is true if UserPlan is not NULL
1469 }
1470
1471 // Scan implements the Scanner interface.
1472 func (ns *NullUserPlan) Scan(value interface{}) error {
1473 if value == nil {
1474 ns.UserPlan, ns.Valid = "", false
1475 return nil
1476 }
1477 ns.Valid = true
1478 return ns.UserPlan.Scan(value)
1479 }
1480
1481 // Value implements the driver Valuer interface.
1482 func (ns NullUserPlan) Value() (driver.Value, error) {
1483 if !ns.Valid {
1484 return nil, nil
1485 }
1486 return string(ns.UserPlan), nil
1487 }
1488
1489 type WatchLevel string
1490
1491 const (
1492 WatchLevelAll WatchLevel = "all"
1493 WatchLevelParticipating WatchLevel = "participating"
1494 WatchLevelIgnore WatchLevel = "ignore"
1495 )
1496
1497 func (e *WatchLevel) Scan(src interface{}) error {
1498 switch s := src.(type) {
1499 case []byte:
1500 *e = WatchLevel(s)
1501 case string:
1502 *e = WatchLevel(s)
1503 default:
1504 return fmt.Errorf("unsupported scan type for WatchLevel: %T", src)
1505 }
1506 return nil
1507 }
1508
1509 type NullWatchLevel struct {
1510 WatchLevel WatchLevel
1511 Valid bool // Valid is true if WatchLevel is not NULL
1512 }
1513
1514 // Scan implements the Scanner interface.
1515 func (ns *NullWatchLevel) Scan(value interface{}) error {
1516 if value == nil {
1517 ns.WatchLevel, ns.Valid = "", false
1518 return nil
1519 }
1520 ns.Valid = true
1521 return ns.WatchLevel.Scan(value)
1522 }
1523
1524 // Value implements the driver Valuer interface.
1525 func (ns NullWatchLevel) Value() (driver.Value, error) {
1526 if !ns.Valid {
1527 return nil, nil
1528 }
1529 return string(ns.WatchLevel), nil
1530 }
1531
1532 type WebhookContentType string
1533
1534 const (
1535 WebhookContentTypeJson WebhookContentType = "json"
1536 WebhookContentTypeForm WebhookContentType = "form"
1537 )
1538
1539 func (e *WebhookContentType) Scan(src interface{}) error {
1540 switch s := src.(type) {
1541 case []byte:
1542 *e = WebhookContentType(s)
1543 case string:
1544 *e = WebhookContentType(s)
1545 default:
1546 return fmt.Errorf("unsupported scan type for WebhookContentType: %T", src)
1547 }
1548 return nil
1549 }
1550
1551 type NullWebhookContentType struct {
1552 WebhookContentType WebhookContentType
1553 Valid bool // Valid is true if WebhookContentType is not NULL
1554 }
1555
1556 // Scan implements the Scanner interface.
1557 func (ns *NullWebhookContentType) Scan(value interface{}) error {
1558 if value == nil {
1559 ns.WebhookContentType, ns.Valid = "", false
1560 return nil
1561 }
1562 ns.Valid = true
1563 return ns.WebhookContentType.Scan(value)
1564 }
1565
1566 // Value implements the driver Valuer interface.
1567 func (ns NullWebhookContentType) Value() (driver.Value, error) {
1568 if !ns.Valid {
1569 return nil, nil
1570 }
1571 return string(ns.WebhookContentType), nil
1572 }
1573
1574 type WebhookDeliveryStatus string
1575
1576 const (
1577 WebhookDeliveryStatusPending WebhookDeliveryStatus = "pending"
1578 WebhookDeliveryStatusSucceeded WebhookDeliveryStatus = "succeeded"
1579 WebhookDeliveryStatusFailedRetry WebhookDeliveryStatus = "failed_retry"
1580 WebhookDeliveryStatusFailedPermanent WebhookDeliveryStatus = "failed_permanent"
1581 )
1582
1583 func (e *WebhookDeliveryStatus) Scan(src interface{}) error {
1584 switch s := src.(type) {
1585 case []byte:
1586 *e = WebhookDeliveryStatus(s)
1587 case string:
1588 *e = WebhookDeliveryStatus(s)
1589 default:
1590 return fmt.Errorf("unsupported scan type for WebhookDeliveryStatus: %T", src)
1591 }
1592 return nil
1593 }
1594
1595 type NullWebhookDeliveryStatus struct {
1596 WebhookDeliveryStatus WebhookDeliveryStatus
1597 Valid bool // Valid is true if WebhookDeliveryStatus is not NULL
1598 }
1599
1600 // Scan implements the Scanner interface.
1601 func (ns *NullWebhookDeliveryStatus) Scan(value interface{}) error {
1602 if value == nil {
1603 ns.WebhookDeliveryStatus, ns.Valid = "", false
1604 return nil
1605 }
1606 ns.Valid = true
1607 return ns.WebhookDeliveryStatus.Scan(value)
1608 }
1609
1610 // Value implements the driver Valuer interface.
1611 func (ns NullWebhookDeliveryStatus) Value() (driver.Value, error) {
1612 if !ns.Valid {
1613 return nil, nil
1614 }
1615 return string(ns.WebhookDeliveryStatus), nil
1616 }
1617
1618 type WebhookOwnerKind string
1619
1620 const (
1621 WebhookOwnerKindRepo WebhookOwnerKind = "repo"
1622 WebhookOwnerKindOrg WebhookOwnerKind = "org"
1623 )
1624
1625 func (e *WebhookOwnerKind) Scan(src interface{}) error {
1626 switch s := src.(type) {
1627 case []byte:
1628 *e = WebhookOwnerKind(s)
1629 case string:
1630 *e = WebhookOwnerKind(s)
1631 default:
1632 return fmt.Errorf("unsupported scan type for WebhookOwnerKind: %T", src)
1633 }
1634 return nil
1635 }
1636
1637 type NullWebhookOwnerKind struct {
1638 WebhookOwnerKind WebhookOwnerKind
1639 Valid bool // Valid is true if WebhookOwnerKind is not NULL
1640 }
1641
1642 // Scan implements the Scanner interface.
1643 func (ns *NullWebhookOwnerKind) Scan(value interface{}) error {
1644 if value == nil {
1645 ns.WebhookOwnerKind, ns.Valid = "", false
1646 return nil
1647 }
1648 ns.Valid = true
1649 return ns.WebhookOwnerKind.Scan(value)
1650 }
1651
1652 // Value implements the driver Valuer interface.
1653 func (ns NullWebhookOwnerKind) Value() (driver.Value, error) {
1654 if !ns.Valid {
1655 return nil, nil
1656 }
1657 return string(ns.WebhookOwnerKind), nil
1658 }
1659
1660 type WorkflowJobStatus string
1661
1662 const (
1663 WorkflowJobStatusQueued WorkflowJobStatus = "queued"
1664 WorkflowJobStatusRunning WorkflowJobStatus = "running"
1665 WorkflowJobStatusCompleted WorkflowJobStatus = "completed"
1666 WorkflowJobStatusCancelled WorkflowJobStatus = "cancelled"
1667 WorkflowJobStatusSkipped WorkflowJobStatus = "skipped"
1668 )
1669
1670 func (e *WorkflowJobStatus) Scan(src interface{}) error {
1671 switch s := src.(type) {
1672 case []byte:
1673 *e = WorkflowJobStatus(s)
1674 case string:
1675 *e = WorkflowJobStatus(s)
1676 default:
1677 return fmt.Errorf("unsupported scan type for WorkflowJobStatus: %T", src)
1678 }
1679 return nil
1680 }
1681
1682 type NullWorkflowJobStatus struct {
1683 WorkflowJobStatus WorkflowJobStatus
1684 Valid bool // Valid is true if WorkflowJobStatus is not NULL
1685 }
1686
1687 // Scan implements the Scanner interface.
1688 func (ns *NullWorkflowJobStatus) Scan(value interface{}) error {
1689 if value == nil {
1690 ns.WorkflowJobStatus, ns.Valid = "", false
1691 return nil
1692 }
1693 ns.Valid = true
1694 return ns.WorkflowJobStatus.Scan(value)
1695 }
1696
1697 // Value implements the driver Valuer interface.
1698 func (ns NullWorkflowJobStatus) Value() (driver.Value, error) {
1699 if !ns.Valid {
1700 return nil, nil
1701 }
1702 return string(ns.WorkflowJobStatus), nil
1703 }
1704
1705 type WorkflowRunEvent string
1706
1707 const (
1708 WorkflowRunEventPush WorkflowRunEvent = "push"
1709 WorkflowRunEventPullRequest WorkflowRunEvent = "pull_request"
1710 WorkflowRunEventSchedule WorkflowRunEvent = "schedule"
1711 WorkflowRunEventWorkflowDispatch WorkflowRunEvent = "workflow_dispatch"
1712 )
1713
1714 func (e *WorkflowRunEvent) Scan(src interface{}) error {
1715 switch s := src.(type) {
1716 case []byte:
1717 *e = WorkflowRunEvent(s)
1718 case string:
1719 *e = WorkflowRunEvent(s)
1720 default:
1721 return fmt.Errorf("unsupported scan type for WorkflowRunEvent: %T", src)
1722 }
1723 return nil
1724 }
1725
1726 type NullWorkflowRunEvent struct {
1727 WorkflowRunEvent WorkflowRunEvent
1728 Valid bool // Valid is true if WorkflowRunEvent is not NULL
1729 }
1730
1731 // Scan implements the Scanner interface.
1732 func (ns *NullWorkflowRunEvent) Scan(value interface{}) error {
1733 if value == nil {
1734 ns.WorkflowRunEvent, ns.Valid = "", false
1735 return nil
1736 }
1737 ns.Valid = true
1738 return ns.WorkflowRunEvent.Scan(value)
1739 }
1740
1741 // Value implements the driver Valuer interface.
1742 func (ns NullWorkflowRunEvent) Value() (driver.Value, error) {
1743 if !ns.Valid {
1744 return nil, nil
1745 }
1746 return string(ns.WorkflowRunEvent), nil
1747 }
1748
1749 type WorkflowRunStatus string
1750
1751 const (
1752 WorkflowRunStatusQueued WorkflowRunStatus = "queued"
1753 WorkflowRunStatusRunning WorkflowRunStatus = "running"
1754 WorkflowRunStatusCompleted WorkflowRunStatus = "completed"
1755 WorkflowRunStatusCancelled WorkflowRunStatus = "cancelled"
1756 )
1757
1758 func (e *WorkflowRunStatus) Scan(src interface{}) error {
1759 switch s := src.(type) {
1760 case []byte:
1761 *e = WorkflowRunStatus(s)
1762 case string:
1763 *e = WorkflowRunStatus(s)
1764 default:
1765 return fmt.Errorf("unsupported scan type for WorkflowRunStatus: %T", src)
1766 }
1767 return nil
1768 }
1769
1770 type NullWorkflowRunStatus struct {
1771 WorkflowRunStatus WorkflowRunStatus
1772 Valid bool // Valid is true if WorkflowRunStatus is not NULL
1773 }
1774
1775 // Scan implements the Scanner interface.
1776 func (ns *NullWorkflowRunStatus) Scan(value interface{}) error {
1777 if value == nil {
1778 ns.WorkflowRunStatus, ns.Valid = "", false
1779 return nil
1780 }
1781 ns.Valid = true
1782 return ns.WorkflowRunStatus.Scan(value)
1783 }
1784
1785 // Value implements the driver Valuer interface.
1786 func (ns NullWorkflowRunStatus) Value() (driver.Value, error) {
1787 if !ns.Valid {
1788 return nil, nil
1789 }
1790 return string(ns.WorkflowRunStatus), nil
1791 }
1792
1793 type WorkflowRunnerStatus string
1794
1795 const (
1796 WorkflowRunnerStatusIdle WorkflowRunnerStatus = "idle"
1797 WorkflowRunnerStatusBusy WorkflowRunnerStatus = "busy"
1798 WorkflowRunnerStatusOffline WorkflowRunnerStatus = "offline"
1799 )
1800
1801 func (e *WorkflowRunnerStatus) Scan(src interface{}) error {
1802 switch s := src.(type) {
1803 case []byte:
1804 *e = WorkflowRunnerStatus(s)
1805 case string:
1806 *e = WorkflowRunnerStatus(s)
1807 default:
1808 return fmt.Errorf("unsupported scan type for WorkflowRunnerStatus: %T", src)
1809 }
1810 return nil
1811 }
1812
1813 type NullWorkflowRunnerStatus struct {
1814 WorkflowRunnerStatus WorkflowRunnerStatus
1815 Valid bool // Valid is true if WorkflowRunnerStatus is not NULL
1816 }
1817
1818 // Scan implements the Scanner interface.
1819 func (ns *NullWorkflowRunnerStatus) Scan(value interface{}) error {
1820 if value == nil {
1821 ns.WorkflowRunnerStatus, ns.Valid = "", false
1822 return nil
1823 }
1824 ns.Valid = true
1825 return ns.WorkflowRunnerStatus.Scan(value)
1826 }
1827
1828 // Value implements the driver Valuer interface.
1829 func (ns NullWorkflowRunnerStatus) Value() (driver.Value, error) {
1830 if !ns.Valid {
1831 return nil, nil
1832 }
1833 return string(ns.WorkflowRunnerStatus), nil
1834 }
1835
1836 type WorkflowStepStatus string
1837
1838 const (
1839 WorkflowStepStatusQueued WorkflowStepStatus = "queued"
1840 WorkflowStepStatusRunning WorkflowStepStatus = "running"
1841 WorkflowStepStatusCompleted WorkflowStepStatus = "completed"
1842 WorkflowStepStatusCancelled WorkflowStepStatus = "cancelled"
1843 WorkflowStepStatusSkipped WorkflowStepStatus = "skipped"
1844 )
1845
1846 func (e *WorkflowStepStatus) Scan(src interface{}) error {
1847 switch s := src.(type) {
1848 case []byte:
1849 *e = WorkflowStepStatus(s)
1850 case string:
1851 *e = WorkflowStepStatus(s)
1852 default:
1853 return fmt.Errorf("unsupported scan type for WorkflowStepStatus: %T", src)
1854 }
1855 return nil
1856 }
1857
1858 type NullWorkflowStepStatus struct {
1859 WorkflowStepStatus WorkflowStepStatus
1860 Valid bool // Valid is true if WorkflowStepStatus is not NULL
1861 }
1862
1863 // Scan implements the Scanner interface.
1864 func (ns *NullWorkflowStepStatus) Scan(value interface{}) error {
1865 if value == nil {
1866 ns.WorkflowStepStatus, ns.Valid = "", false
1867 return nil
1868 }
1869 ns.Valid = true
1870 return ns.WorkflowStepStatus.Scan(value)
1871 }
1872
1873 // Value implements the driver Valuer interface.
1874 func (ns NullWorkflowStepStatus) Value() (driver.Value, error) {
1875 if !ns.Valid {
1876 return nil, nil
1877 }
1878 return string(ns.WorkflowStepStatus), nil
1879 }
1880
1881 type ActionsOrgPolicy struct {
1882 OrgID int64
1883 ActionsEnabled ActionsPolicyState
1884 RequirePrApproval pgtype.Bool
1885 MaxRepoQueuedRuns pgtype.Int4
1886 MaxRepoConcurrentJobs pgtype.Int4
1887 MaxOwnerConcurrentJobs pgtype.Int4
1888 ActorTriggerLimitPerHour pgtype.Int4
1889 UpdatedByUserID pgtype.Int8
1890 CreatedAt pgtype.Timestamptz
1891 UpdatedAt pgtype.Timestamptz
1892 }
1893
1894 type ActionsRepoPolicy struct {
1895 RepoID int64
1896 ActionsEnabled ActionsPolicyState
1897 RequirePrApproval pgtype.Bool
1898 MaxRepoQueuedRuns pgtype.Int4
1899 MaxRepoConcurrentJobs pgtype.Int4
1900 MaxOwnerConcurrentJobs pgtype.Int4
1901 ActorTriggerLimitPerHour pgtype.Int4
1902 UpdatedByUserID pgtype.Int8
1903 CreatedAt pgtype.Timestamptz
1904 UpdatedAt pgtype.Timestamptz
1905 }
1906
1907 type ActionsSitePolicy struct {
1908 ID bool
1909 ActionsEnabled bool
1910 RequirePrApproval bool
1911 MaxRepoQueuedRuns int32
1912 MaxRepoConcurrentJobs int32
1913 MaxOwnerConcurrentJobs int32
1914 ActorTriggerLimitPerHour int32
1915 UpdatedByUserID pgtype.Int8
1916 CreatedAt pgtype.Timestamptz
1917 UpdatedAt pgtype.Timestamptz
1918 }
1919
1920 type ActionsVariable struct {
1921 ID int64
1922 RepoID pgtype.Int8
1923 OrgID pgtype.Int8
1924 Name string
1925 Value string
1926 CreatedByUserID pgtype.Int8
1927 CreatedAt pgtype.Timestamptz
1928 UpdatedAt pgtype.Timestamptz
1929 }
1930
1931 type AuthAuditLog struct {
1932 ID int64
1933 ActorID pgtype.Int8
1934 Action string
1935 TargetType string
1936 TargetID pgtype.Int8
1937 Meta []byte
1938 CreatedAt pgtype.Timestamptz
1939 }
1940
1941 type AuthThrottle struct {
1942 ID int64
1943 Scope string
1944 Identifier string
1945 Hits int32
1946 WindowStartedAt pgtype.Timestamptz
1947 }
1948
1949 type BillingInvoice struct {
1950 ID int64
1951 OrgID pgtype.Int8
1952 Provider BillingProvider
1953 StripeInvoiceID string
1954 StripeCustomerID string
1955 StripeSubscriptionID pgtype.Text
1956 Status BillingInvoiceStatus
1957 Number string
1958 Currency string
1959 AmountDueCents int64
1960 AmountPaidCents int64
1961 AmountRemainingCents int64
1962 HostedInvoiceUrl string
1963 InvoicePdfUrl string
1964 PeriodStart pgtype.Timestamptz
1965 PeriodEnd pgtype.Timestamptz
1966 DueAt pgtype.Timestamptz
1967 PaidAt pgtype.Timestamptz
1968 VoidedAt pgtype.Timestamptz
1969 CreatedAt pgtype.Timestamptz
1970 UpdatedAt pgtype.Timestamptz
1971 SubjectKind BillingSubjectKind
1972 SubjectID int64
1973 RefundedAt pgtype.Timestamptz
1974 }
1975
1976 type BillingSeatSnapshot struct {
1977 ID int64
1978 OrgID int64
1979 Provider BillingProvider
1980 StripeSubscriptionID pgtype.Text
1981 ActiveMembers int32
1982 BillableSeats int32
1983 Source string
1984 CapturedAt pgtype.Timestamptz
1985 }
1986
1987 type BillingWebhookEvent struct {
1988 ID int64
1989 Provider BillingProvider
1990 ProviderEventID string
1991 EventType string
1992 ApiVersion string
1993 Payload []byte
1994 ReceivedAt pgtype.Timestamptz
1995 ProcessedAt pgtype.Timestamptz
1996 ProcessError string
1997 ProcessingAttempts int32
1998 SubjectKind NullBillingSubjectKind
1999 SubjectID pgtype.Int8
2000 }
2001
2002 type BranchProtectionRule struct {
2003 ID int64
2004 RepoID int64
2005 Pattern string
2006 PreventForcePush bool
2007 PreventDeletion bool
2008 RequirePrForPush bool
2009 AllowedPusherUserIds []int64
2010 RequireSignedCommits bool
2011 StatusChecksRequired []string
2012 CreatedAt pgtype.Timestamptz
2013 UpdatedAt pgtype.Timestamptz
2014 CreatedByUserID pgtype.Int8
2015 RequiredReviewCount int32
2016 DismissStaleReviewsOnPush bool
2017 RequireCodeOwnerReview bool
2018 DismissStaleStatusChecksOnPush bool
2019 }
2020
2021 type CheckRun struct {
2022 ID int64
2023 SuiteID int64
2024 RepoID int64
2025 HeadSha string
2026 Name string
2027 Status CheckStatus
2028 Conclusion NullCheckConclusion
2029 StartedAt pgtype.Timestamptz
2030 CompletedAt pgtype.Timestamptz
2031 DetailsUrl string
2032 Output []byte
2033 ExternalID pgtype.Text
2034 CreatedAt pgtype.Timestamptz
2035 UpdatedAt pgtype.Timestamptz
2036 }
2037
2038 type CheckSuite struct {
2039 ID int64
2040 RepoID int64
2041 HeadSha string
2042 AppSlug string
2043 Status CheckStatus
2044 Conclusion NullCheckConclusion
2045 CreatedAt pgtype.Timestamptz
2046 UpdatedAt pgtype.Timestamptz
2047 }
2048
2049 type CodeSearchContent struct {
2050 RepoID int64
2051 RefName string
2052 Path string
2053 ContentTsv interface{}
2054 ContentTrgm string
2055 }
2056
2057 type CodeSearchPath struct {
2058 RepoID int64
2059 RefName string
2060 Path string
2061 Tsv interface{}
2062 }
2063
2064 type CommitVerificationCache struct {
2065 RepoID int64
2066 CommitOid string
2067 Reason string
2068 Verified bool
2069 SignerUserID pgtype.Int8
2070 SignerSubkeyID pgtype.Int8
2071 Kind string
2072 SignatureArmored pgtype.Text
2073 Payload []byte
2074 VerifiedAt pgtype.Timestamptz
2075 InvalidatedAt pgtype.Timestamptz
2076 }
2077
2078 type DeviceAuthorization struct {
2079 ID int64
2080 DeviceCodeHash []byte
2081 UserCode string
2082 ClientID string
2083 Scopes []string
2084 UserID pgtype.Int8
2085 ApprovedAt pgtype.Timestamptz
2086 DeniedAt pgtype.Timestamptz
2087 IssuedTokenID pgtype.Int8
2088 IntervalSeconds int32
2089 ExpiresAt pgtype.Timestamptz
2090 LastPolledAt pgtype.Timestamptz
2091 CreatedAt pgtype.Timestamptz
2092 }
2093
2094 type DomainEvent struct {
2095 ID int64
2096 ActorUserID pgtype.Int8
2097 Kind string
2098 RepoID pgtype.Int8
2099 SourceKind string
2100 SourceID int64
2101 Public bool
2102 Payload []byte
2103 CreatedAt pgtype.Timestamptz
2104 }
2105
2106 type DomainEventsProcessed struct {
2107 Consumer string
2108 LastEventID int64
2109 UpdatedAt pgtype.Timestamptz
2110 }
2111
2112 type EmailVerification struct {
2113 ID int64
2114 UserEmailID int64
2115 TokenHash []byte
2116 ExpiresAt pgtype.Timestamptz
2117 UsedAt pgtype.Timestamptz
2118 CreatedAt pgtype.Timestamptz
2119 }
2120
2121 type Follow struct {
2122 ID int64
2123 FollowerUserID int64
2124 FolloweeUserID pgtype.Int8
2125 FolloweeOrgID pgtype.Int8
2126 FollowedAt pgtype.Timestamptz
2127 }
2128
2129 type Issue struct {
2130 ID int64
2131 RepoID int64
2132 Number int64
2133 Kind IssueKind
2134 Title string
2135 Body string
2136 BodyHtmlCached pgtype.Text
2137 MdPipelineVersion int32
2138 AuthorUserID pgtype.Int8
2139 State IssueState
2140 StateReason NullIssueStateReason
2141 Locked bool
2142 LockReason pgtype.Text
2143 MilestoneID pgtype.Int8
2144 CreatedAt pgtype.Timestamptz
2145 UpdatedAt pgtype.Timestamptz
2146 EditedAt pgtype.Timestamptz
2147 ClosedAt pgtype.Timestamptz
2148 ClosedByUserID pgtype.Int8
2149 }
2150
2151 type IssueAssignee struct {
2152 IssueID int64
2153 UserID int64
2154 AssignedAt pgtype.Timestamptz
2155 AssignedByUserID pgtype.Int8
2156 }
2157
2158 type IssueComment struct {
2159 ID int64
2160 IssueID int64
2161 AuthorUserID pgtype.Int8
2162 Body string
2163 BodyHtmlCached pgtype.Text
2164 MdPipelineVersion int32
2165 CreatedAt pgtype.Timestamptz
2166 UpdatedAt pgtype.Timestamptz
2167 EditedAt pgtype.Timestamptz
2168 }
2169
2170 type IssueEvent struct {
2171 ID int64
2172 IssueID int64
2173 ActorUserID pgtype.Int8
2174 Kind string
2175 Meta []byte
2176 RefTargetID pgtype.Int8
2177 CreatedAt pgtype.Timestamptz
2178 }
2179
2180 type IssueLabel struct {
2181 IssueID int64
2182 LabelID int64
2183 AppliedAt pgtype.Timestamptz
2184 AppliedByUserID pgtype.Int8
2185 }
2186
2187 type IssueReference struct {
2188 ID int64
2189 SourceIssueID pgtype.Int8
2190 TargetIssueID int64
2191 SourceKind IssueRefSource
2192 SourceObjectID pgtype.Int8
2193 CreatedAt pgtype.Timestamptz
2194 }
2195
2196 type IssuesSearch struct {
2197 IssueID int64
2198 RepoID int64
2199 Kind IssueKind
2200 State IssueState
2201 AuthorUserID pgtype.Int8
2202 Tsv interface{}
2203 }
2204
2205 type Job struct {
2206 ID int64
2207 Kind string
2208 Payload []byte
2209 RunAt pgtype.Timestamptz
2210 Attempts int32
2211 MaxAttempts int32
2212 LastError pgtype.Text
2213 LockedBy pgtype.Text
2214 LockedAt pgtype.Timestamptz
2215 CompletedAt pgtype.Timestamptz
2216 FailedAt pgtype.Timestamptz
2217 CreatedAt pgtype.Timestamptz
2218 }
2219
2220 type Label struct {
2221 ID int64
2222 RepoID int64
2223 Name string
2224 Color string
2225 Description string
2226 CreatedAt pgtype.Timestamptz
2227 }
2228
2229 type Meta struct {
2230 Key string
2231 Value []byte
2232 UpdatedAt pgtype.Timestamptz
2233 }
2234
2235 type Milestone struct {
2236 ID int64
2237 RepoID int64
2238 Title string
2239 Description string
2240 State MilestoneState
2241 DueOn pgtype.Timestamptz
2242 CreatedAt pgtype.Timestamptz
2243 ClosedAt pgtype.Timestamptz
2244 }
2245
2246 type Notification struct {
2247 ID int64
2248 RecipientUserID int64
2249 Kind string
2250 Reason string
2251 RepoID pgtype.Int8
2252 ThreadKind NullNotificationThreadKind
2253 ThreadID pgtype.Int8
2254 SourceEventID pgtype.Int8
2255 Unread bool
2256 LastEventAt pgtype.Timestamptz
2257 LastActorUserID pgtype.Int8
2258 Summary []byte
2259 CreatedAt pgtype.Timestamptz
2260 UpdatedAt pgtype.Timestamptz
2261 }
2262
2263 type NotificationEmailLog struct {
2264 ID int64
2265 RecipientUserID int64
2266 NotificationID pgtype.Int8
2267 ThreadKind NullNotificationThreadKind
2268 ThreadID pgtype.Int8
2269 SentAt pgtype.Timestamptz
2270 MessageID pgtype.Text
2271 }
2272
2273 type NotificationThread struct {
2274 RecipientUserID int64
2275 ThreadKind NotificationThreadKind
2276 ThreadID int64
2277 Subscribed bool
2278 Reason string
2279 UpdatedAt pgtype.Timestamptz
2280 }
2281
2282 type Org struct {
2283 ID int64
2284 Slug string
2285 DisplayName string
2286 Description string
2287 AvatarObjectKey pgtype.Text
2288 Location string
2289 Website string
2290 BillingEmail string
2291 Plan OrgPlan
2292 AllowMemberRepoCreate bool
2293 CreatedByUserID pgtype.Int8
2294 SuspendedAt pgtype.Timestamptz
2295 SuspendedReason pgtype.Text
2296 DeletedAt pgtype.Timestamptz
2297 CreatedAt pgtype.Timestamptz
2298 UpdatedAt pgtype.Timestamptz
2299 }
2300
2301 type OrgBillingState struct {
2302 OrgID int64
2303 Provider BillingProvider
2304 StripeCustomerID pgtype.Text
2305 StripeSubscriptionID pgtype.Text
2306 StripeSubscriptionItemID pgtype.Text
2307 Plan OrgPlan
2308 SubscriptionStatus BillingSubscriptionStatus
2309 BillableSeats int32
2310 SeatSnapshotAt pgtype.Timestamptz
2311 CurrentPeriodStart pgtype.Timestamptz
2312 CurrentPeriodEnd pgtype.Timestamptz
2313 CancelAtPeriodEnd bool
2314 TrialEnd pgtype.Timestamptz
2315 PastDueAt pgtype.Timestamptz
2316 CanceledAt pgtype.Timestamptz
2317 LockedAt pgtype.Timestamptz
2318 LockReason NullBillingLockReason
2319 GraceUntil pgtype.Timestamptz
2320 LastWebhookEventID string
2321 CreatedAt pgtype.Timestamptz
2322 UpdatedAt pgtype.Timestamptz
2323 LastEventAt pgtype.Timestamptz
2324 }
2325
2326 type OrgGithubImport struct {
2327 ID int64
2328 OrgID int64
2329 SourceHost string
2330 SourceOrg string
2331 RequestedByUserID pgtype.Int8
2332 Status string
2333 IncludePrivate bool
2334 TokenPresent bool
2335 TokenCiphertext []byte
2336 TokenNonce []byte
2337 TotalCount int32
2338 LastError pgtype.Text
2339 StartedAt pgtype.Timestamptz
2340 CompletedAt pgtype.Timestamptz
2341 CreatedAt pgtype.Timestamptz
2342 UpdatedAt pgtype.Timestamptz
2343 }
2344
2345 type OrgGithubImportRepo struct {
2346 ID int64
2347 ImportID int64
2348 GithubID pgtype.Int8
2349 SourceFullName string
2350 SourceName string
2351 TargetName string
2352 CloneUrl string
2353 Description string
2354 DefaultBranch string
2355 TargetVisibility RepoVisibility
2356 IsPrivate bool
2357 IsFork bool
2358 Status string
2359 RepoID pgtype.Int8
2360 LastError pgtype.Text
2361 StartedAt pgtype.Timestamptz
2362 CompletedAt pgtype.Timestamptz
2363 CreatedAt pgtype.Timestamptz
2364 UpdatedAt pgtype.Timestamptz
2365 }
2366
2367 type OrgInvitation struct {
2368 ID int64
2369 OrgID int64
2370 InvitedByUserID pgtype.Int8
2371 TargetUserID pgtype.Int8
2372 TargetEmail pgtype.Text
2373 Role OrgRole
2374 TokenHash []byte
2375 ExpiresAt pgtype.Timestamptz
2376 AcceptedAt pgtype.Timestamptz
2377 DeclinedAt pgtype.Timestamptz
2378 CanceledAt pgtype.Timestamptz
2379 CreatedAt pgtype.Timestamptz
2380 }
2381
2382 type OrgMember struct {
2383 OrgID int64
2384 UserID int64
2385 Role OrgRole
2386 InvitedByUserID pgtype.Int8
2387 JoinedAt pgtype.Timestamptz
2388 }
2389
2390 type PasswordReset struct {
2391 ID int64
2392 UserID int64
2393 TokenHash []byte
2394 ExpiresAt pgtype.Timestamptz
2395 UsedAt pgtype.Timestamptz
2396 CreatedAt pgtype.Timestamptz
2397 }
2398
2399 type PrReview struct {
2400 ID int64
2401 PrIssueID int64
2402 AuthorUserID pgtype.Int8
2403 State PrReviewState
2404 Body string
2405 BodyHtmlCached pgtype.Text
2406 SubmittedAt pgtype.Timestamptz
2407 DismissedAt pgtype.Timestamptz
2408 DismissedByUserID pgtype.Int8
2409 DismissalReason string
2410 }
2411
2412 type PrReviewComment struct {
2413 ID int64
2414 PrIssueID int64
2415 ReviewID pgtype.Int8
2416 AuthorUserID pgtype.Int8
2417 FilePath string
2418 Side PrReviewSide
2419 OriginalCommitSha string
2420 OriginalLine int32
2421 OriginalPosition int32
2422 CurrentPosition pgtype.Int4
2423 Body string
2424 BodyHtmlCached pgtype.Text
2425 InReplyToID pgtype.Int8
2426 Pending bool
2427 ResolvedAt pgtype.Timestamptz
2428 ResolvedByUserID pgtype.Int8
2429 CreatedAt pgtype.Timestamptz
2430 UpdatedAt pgtype.Timestamptz
2431 EditedAt pgtype.Timestamptz
2432 }
2433
2434 type PrReviewRequest struct {
2435 ID int64
2436 PrIssueID int64
2437 RequestedUserID pgtype.Int8
2438 RequestedTeamID pgtype.Int8
2439 RequestedByUserID pgtype.Int8
2440 RequestedAt pgtype.Timestamptz
2441 DismissedAt pgtype.Timestamptz
2442 SatisfiedByReviewID pgtype.Int8
2443 }
2444
2445 type Principal struct {
2446 Slug string
2447 Kind PrincipalKind
2448 ID int64
2449 }
2450
2451 type ProfilePin struct {
2452 SetID int64
2453 RepoID int64
2454 Position int32
2455 PinnedAt pgtype.Timestamptz
2456 }
2457
2458 type ProfilePinSet struct {
2459 ID int64
2460 OwnerUserID pgtype.Int8
2461 OwnerOrgID pgtype.Int8
2462 UpdatedAt pgtype.Timestamptz
2463 }
2464
2465 type PullRequest struct {
2466 IssueID int64
2467 BaseRef string
2468 HeadRef string
2469 HeadRepoID int64
2470 BaseOid string
2471 HeadOid string
2472 Draft bool
2473 Mergeable pgtype.Bool
2474 MergeableState PrMergeableState
2475 MergeCommitSha pgtype.Text
2476 MergedAt pgtype.Timestamptz
2477 MergedByUserID pgtype.Int8
2478 MergeMethod NullPrMergeMethod
2479 BaseOidAtMerge pgtype.Text
2480 HeadOidAtMerge pgtype.Text
2481 LastSynchronizedAt pgtype.Timestamptz
2482 }
2483
2484 type PullRequestCommit struct {
2485 PrID int64
2486 Sha string
2487 Position int32
2488 AuthorName string
2489 AuthorEmail string
2490 CommitterName string
2491 CommitterEmail string
2492 Subject string
2493 Body string
2494 AuthoredAt pgtype.Timestamptz
2495 CommittedAt pgtype.Timestamptz
2496 }
2497
2498 type PullRequestFile struct {
2499 PrID int64
2500 Path string
2501 Status PrFileStatus
2502 OldPath pgtype.Text
2503 Additions int32
2504 Deletions int32
2505 Changes int32
2506 }
2507
2508 type PushEvent struct {
2509 ID int64
2510 RepoID int64
2511 PusherUserID pgtype.Int8
2512 BeforeSha string
2513 AfterSha string
2514 Ref string
2515 Protocol string
2516 RequestID string
2517 ProcessedAt pgtype.Timestamptz
2518 CreatedAt pgtype.Timestamptz
2519 }
2520
2521 type RateLimit struct {
2522 Scope string
2523 Key string
2524 Hits int32
2525 WindowStartedAt pgtype.Timestamptz
2526 }
2527
2528 type Repo struct {
2529 ID int64
2530 OwnerUserID pgtype.Int8
2531 OwnerOrgID pgtype.Int8
2532 Name string
2533 Description string
2534 Visibility RepoVisibility
2535 DefaultBranch string
2536 IsArchived bool
2537 ArchivedAt pgtype.Timestamptz
2538 DeletedAt pgtype.Timestamptz
2539 DiskUsedBytes int64
2540 ForkOfRepoID pgtype.Int8
2541 LicenseKey pgtype.Text
2542 PrimaryLanguage pgtype.Text
2543 HasIssues bool
2544 HasPulls bool
2545 CreatedAt pgtype.Timestamptz
2546 UpdatedAt pgtype.Timestamptz
2547 DefaultBranchOid pgtype.Text
2548 AllowSquashMerge bool
2549 AllowRebaseMerge bool
2550 AllowMergeCommit bool
2551 DefaultMergeMethod PrMergeMethod
2552 StarCount int64
2553 WatcherCount int64
2554 ForkCount int64
2555 InitStatus RepoInitStatus
2556 LastIndexedOid pgtype.Text
2557 }
2558
2559 type RepoCollaborator struct {
2560 RepoID int64
2561 UserID int64
2562 Role CollabRole
2563 AddedAt pgtype.Timestamptz
2564 AddedByUserID pgtype.Int8
2565 }
2566
2567 type RepoIssueCounter struct {
2568 RepoID int64
2569 NextNumber int64
2570 }
2571
2572 type RepoRedirect struct {
2573 OldOwnerUserID pgtype.Int8
2574 OldOwnerOrgID pgtype.Int8
2575 OldName string
2576 RepoID int64
2577 RedirectedAt pgtype.Timestamptz
2578 }
2579
2580 type RepoSourceRemote struct {
2581 RepoID int64
2582 RemoteUrl string
2583 LastFetchedAt pgtype.Timestamptz
2584 LastError pgtype.Text
2585 CreatedAt pgtype.Timestamptz
2586 UpdatedAt pgtype.Timestamptz
2587 }
2588
2589 type RepoTopic struct {
2590 RepoID int64
2591 Topic string
2592 CreatedAt pgtype.Timestamptz
2593 }
2594
2595 type RepoTransferRequest struct {
2596 ID int64
2597 RepoID int64
2598 FromUserID int64
2599 ToPrincipalKind TransferPrincipalKind
2600 ToPrincipalID int64
2601 CreatedBy int64
2602 CreatedAt pgtype.Timestamptz
2603 ExpiresAt pgtype.Timestamptz
2604 Status TransferStatus
2605 AcceptedAt pgtype.Timestamptz
2606 DeclinedAt pgtype.Timestamptz
2607 CanceledAt pgtype.Timestamptz
2608 }
2609
2610 type ReposSearch struct {
2611 RepoID int64
2612 Tsv interface{}
2613 }
2614
2615 type RunnerJwtUsed struct {
2616 Jti string
2617 RunnerID int64
2618 JobID int64
2619 RunID int64
2620 RepoID int64
2621 ExpiresAt pgtype.Timestamptz
2622 UsedAt pgtype.Timestamptz
2623 }
2624
2625 type RunnerToken struct {
2626 ID int64
2627 RunnerID int64
2628 TokenHash []byte
2629 ExpiresAt pgtype.Timestamptz
2630 RevokedAt pgtype.Timestamptz
2631 CreatedAt pgtype.Timestamptz
2632 }
2633
2634 type SignupIpThrottle struct {
2635 Cidr netip.Addr
2636 Hits int32
2637 WindowStartedAt pgtype.Timestamptz
2638 }
2639
2640 type Star struct {
2641 UserID int64
2642 RepoID int64
2643 StarredAt pgtype.Timestamptz
2644 }
2645
2646 type Team struct {
2647 ID int64
2648 OrgID int64
2649 Slug string
2650 DisplayName string
2651 Description string
2652 ParentTeamID pgtype.Int8
2653 Privacy TeamPrivacy
2654 CreatedByUserID pgtype.Int8
2655 CreatedAt pgtype.Timestamptz
2656 UpdatedAt pgtype.Timestamptz
2657 }
2658
2659 type TeamMember struct {
2660 TeamID int64
2661 UserID int64
2662 Role TeamRole
2663 AddedByUserID pgtype.Int8
2664 AddedAt pgtype.Timestamptz
2665 }
2666
2667 type TeamRepoAccess struct {
2668 TeamID int64
2669 RepoID int64
2670 Role TeamRepoRole
2671 AddedByUserID pgtype.Int8
2672 AddedAt pgtype.Timestamptz
2673 }
2674
2675 type TransactionalEmailLog struct {
2676 ID int64
2677 RecipientUserID pgtype.Int8
2678 RecipientEmail string
2679 Kind string
2680 Subject string
2681 ProviderID string
2682 Status TransactionalEmailStatus
2683 ErrorSummary pgtype.Text
2684 SentAt pgtype.Timestamptz
2685 DeliveredAt pgtype.Timestamptz
2686 }
2687
2688 type TrendingSnapshot struct {
2689 ID int64
2690 Scope TrendingScope
2691 Kind TrendingKind
2692 CapturedAt pgtype.Timestamptz
2693 Payload []byte
2694 }
2695
2696 type User struct {
2697 ID int64
2698 Username string
2699 DisplayName string
2700 PrimaryEmailID pgtype.Int8
2701 PasswordHash string
2702 PasswordAlgo string
2703 PasswordUpdatedAt pgtype.Timestamptz
2704 EmailVerified bool
2705 LastLoginAt pgtype.Timestamptz
2706 SuspendedAt pgtype.Timestamptz
2707 SuspendedReason pgtype.Text
2708 DeletedAt pgtype.Timestamptz
2709 CreatedAt pgtype.Timestamptz
2710 UpdatedAt pgtype.Timestamptz
2711 Bio string
2712 Location string
2713 Website string
2714 Company string
2715 Pronouns string
2716 AvatarObjectKey pgtype.Text
2717 Theme string
2718 SessionEpoch int32
2719 IsSiteAdmin bool
2720 IncludePrivateContributions bool
2721 Plan UserPlan
2722 }
2723
2724 type UserBillingState struct {
2725 UserID int64
2726 Provider BillingProvider
2727 StripeCustomerID pgtype.Text
2728 StripeSubscriptionID pgtype.Text
2729 StripeSubscriptionItemID pgtype.Text
2730 Plan UserPlan
2731 SubscriptionStatus BillingSubscriptionStatus
2732 CurrentPeriodStart pgtype.Timestamptz
2733 CurrentPeriodEnd pgtype.Timestamptz
2734 CancelAtPeriodEnd bool
2735 TrialEnd pgtype.Timestamptz
2736 PastDueAt pgtype.Timestamptz
2737 CanceledAt pgtype.Timestamptz
2738 LockedAt pgtype.Timestamptz
2739 LockReason NullBillingLockReason
2740 GraceUntil pgtype.Timestamptz
2741 LastWebhookEventID string
2742 CreatedAt pgtype.Timestamptz
2743 UpdatedAt pgtype.Timestamptz
2744 LastEventAt pgtype.Timestamptz
2745 }
2746
2747 type UserEmail struct {
2748 ID int64
2749 UserID int64
2750 Email string
2751 IsPrimary bool
2752 Verified bool
2753 VerificationTokenHash []byte
2754 VerificationSentAt pgtype.Timestamptz
2755 VerifiedAt pgtype.Timestamptz
2756 CreatedAt pgtype.Timestamptz
2757 }
2758
2759 type UserGpgKey struct {
2760 ID int64
2761 UserID int64
2762 Name string
2763 Fingerprint string
2764 KeyID string
2765 Armored string
2766 CanSign bool
2767 CanEncryptComms bool
2768 CanEncryptStorage bool
2769 CanCertify bool
2770 CanAuthenticate bool
2771 Uids []string
2772 Subkeys []byte
2773 PrimaryAlgo string
2774 CreatedAt pgtype.Timestamptz
2775 LastUsedAt pgtype.Timestamptz
2776 RevokedAt pgtype.Timestamptz
2777 ExpiresAt pgtype.Timestamptz
2778 }
2779
2780 type UserGpgSubkey struct {
2781 ID int64
2782 GpgKeyID int64
2783 Fingerprint string
2784 KeyID string
2785 CanSign bool
2786 CanEncryptComms bool
2787 CanEncryptStorage bool
2788 CanCertify bool
2789 ExpiresAt pgtype.Timestamptz
2790 RevokedAt pgtype.Timestamptz
2791 CreatedAt pgtype.Timestamptz
2792 }
2793
2794 type UserNotificationPref struct {
2795 UserID int64
2796 Key string
2797 Value []byte
2798 UpdatedAt pgtype.Timestamptz
2799 }
2800
2801 type UserRecoveryCode struct {
2802 ID int64
2803 UserID int64
2804 CodeHash []byte
2805 UsedAt pgtype.Timestamptz
2806 GeneratedAt pgtype.Timestamptz
2807 CreatedAt pgtype.Timestamptz
2808 }
2809
2810 type UserSshKey struct {
2811 ID int64
2812 UserID int64
2813 Title string
2814 FingerprintSha256 string
2815 KeyType string
2816 KeyBits int32
2817 PublicKey string
2818 LastUsedAt pgtype.Timestamptz
2819 LastUsedIp *netip.Addr
2820 CreatedAt pgtype.Timestamptz
2821 Kind string
2822 }
2823
2824 type UserToken struct {
2825 ID int64
2826 UserID int64
2827 Name string
2828 TokenHash []byte
2829 TokenPrefix string
2830 Scopes []string
2831 ExpiresAt pgtype.Timestamptz
2832 LastUsedAt pgtype.Timestamptz
2833 LastUsedIp *netip.Addr
2834 RevokedAt pgtype.Timestamptz
2835 CreatedAt pgtype.Timestamptz
2836 }
2837
2838 type UserTotp struct {
2839 ID int64
2840 UserID int64
2841 SecretEncrypted []byte
2842 SecretNonce []byte
2843 ConfirmedAt pgtype.Timestamptz
2844 LastUsedCounter int64
2845 CreatedAt pgtype.Timestamptz
2846 UpdatedAt pgtype.Timestamptz
2847 }
2848
2849 type UsernameRedirect struct {
2850 OldUsername string
2851 UserID int64
2852 ChangedAt pgtype.Timestamptz
2853 }
2854
2855 type UsersSearch struct {
2856 UserID int64
2857 Tsv interface{}
2858 }
2859
2860 type Watch struct {
2861 UserID int64
2862 RepoID int64
2863 Level WatchLevel
2864 UpdatedAt pgtype.Timestamptz
2865 }
2866
2867 type Webhook struct {
2868 ID int64
2869 OwnerKind WebhookOwnerKind
2870 OwnerID int64
2871 Url string
2872 ContentType WebhookContentType
2873 Events []string
2874 SecretCiphertext []byte
2875 SecretNonce []byte
2876 Active bool
2877 SslVerification bool
2878 ConsecutiveFailures int32
2879 AutoDisableThreshold int32
2880 DisabledAt pgtype.Timestamptz
2881 DisabledReason pgtype.Text
2882 LastSuccessAt pgtype.Timestamptz
2883 LastFailureAt pgtype.Timestamptz
2884 CreatedByUserID pgtype.Int8
2885 CreatedAt pgtype.Timestamptz
2886 UpdatedAt pgtype.Timestamptz
2887 }
2888
2889 type WebhookDelivery struct {
2890 ID int64
2891 WebhookID int64
2892 EventKind string
2893 EventID pgtype.Int8
2894 DeliveryUuid pgtype.UUID
2895 Payload []byte
2896 RequestHeaders []byte
2897 RequestBody []byte
2898 ResponseStatus pgtype.Int4
2899 ResponseHeaders []byte
2900 ResponseBody []byte
2901 ResponseTruncated bool
2902 StartedAt pgtype.Timestamptz
2903 CompletedAt pgtype.Timestamptz
2904 Attempt int32
2905 MaxAttempts int32
2906 NextRetryAt pgtype.Timestamptz
2907 Status WebhookDeliveryStatus
2908 IdempotencyKey string
2909 ErrorSummary pgtype.Text
2910 RedeliverOf pgtype.Int8
2911 }
2912
2913 type WebhookEventsPending struct {
2914 ID int64
2915 RepoID int64
2916 EventKind string
2917 Payload []byte
2918 CreatedAt pgtype.Timestamptz
2919 }
2920
2921 type WorkflowArtifact struct {
2922 ID int64
2923 RunID int64
2924 Name string
2925 ObjectKey string
2926 ByteCount int64
2927 ExpiresAt pgtype.Timestamptz
2928 CreatedAt pgtype.Timestamptz
2929 }
2930
2931 type WorkflowCach struct {
2932 ID int64
2933 RepoID int64
2934 CacheKey string
2935 CacheVersion string
2936 GitRef string
2937 ObjectKey string
2938 SizeBytes int64
2939 LastAccessedAt pgtype.Timestamptz
2940 CreatedAt pgtype.Timestamptz
2941 }
2942
2943 type WorkflowDisabled struct {
2944 RepoID int64
2945 WorkflowFile string
2946 DisabledByUserID pgtype.Int8
2947 DisabledAt pgtype.Timestamptz
2948 }
2949
2950 type WorkflowJob struct {
2951 ID int64
2952 RunID int64
2953 JobIndex int32
2954 JobKey string
2955 JobName string
2956 RunsOn string
2957 RunnerID pgtype.Int8
2958 NeedsJobs []string
2959 IfExpr string
2960 TimeoutMinutes int32
2961 Permissions []byte
2962 JobEnv []byte
2963 Status WorkflowJobStatus
2964 Conclusion NullCheckConclusion
2965 CancelRequested bool
2966 StartedAt pgtype.Timestamptz
2967 CompletedAt pgtype.Timestamptz
2968 Version int32
2969 CreatedAt pgtype.Timestamptz
2970 UpdatedAt pgtype.Timestamptz
2971 }
2972
2973 type WorkflowJobSecretMask struct {
2974 JobID int64
2975 Ciphertext []byte
2976 Nonce []byte
2977 CreatedAt pgtype.Timestamptz
2978 }
2979
2980 type WorkflowRun struct {
2981 ID int64
2982 RepoID int64
2983 RunIndex int64
2984 WorkflowFile string
2985 WorkflowName string
2986 HeadSha string
2987 HeadRef string
2988 Event WorkflowRunEvent
2989 EventPayload []byte
2990 ActorUserID pgtype.Int8
2991 ParentRunID pgtype.Int8
2992 ConcurrencyGroup string
2993 Status WorkflowRunStatus
2994 Conclusion NullCheckConclusion
2995 Pinned bool
2996 NeedApproval bool
2997 ApprovedByUserID pgtype.Int8
2998 StartedAt pgtype.Timestamptz
2999 CompletedAt pgtype.Timestamptz
3000 Version int32
3001 CreatedAt pgtype.Timestamptz
3002 UpdatedAt pgtype.Timestamptz
3003 TriggerEventID string
3004 }
3005
3006 type WorkflowRunApproval struct {
3007 RunID int64
3008 RequestedReason string
3009 RequestedAt pgtype.Timestamptz
3010 ApprovedByUserID pgtype.Int8
3011 ApprovedAt pgtype.Timestamptz
3012 RejectedByUserID pgtype.Int8
3013 RejectedAt pgtype.Timestamptz
3014 CreatedAt pgtype.Timestamptz
3015 UpdatedAt pgtype.Timestamptz
3016 }
3017
3018 type WorkflowRunner struct {
3019 ID int64
3020 Name string
3021 Labels []string
3022 Capacity int32
3023 Status WorkflowRunnerStatus
3024 LastHeartbeatAt pgtype.Timestamptz
3025 RegisteredByUserID pgtype.Int8
3026 CreatedAt pgtype.Timestamptz
3027 UpdatedAt pgtype.Timestamptz
3028 HostName string
3029 Version string
3030 DrainingAt pgtype.Timestamptz
3031 DrainReason string
3032 RevokedAt pgtype.Timestamptz
3033 RevokedReason string
3034 }
3035
3036 type WorkflowSecret struct {
3037 ID int64
3038 RepoID pgtype.Int8
3039 OrgID pgtype.Int8
3040 Name string
3041 Ciphertext []byte
3042 Nonce []byte
3043 CreatedByUserID pgtype.Int8
3044 CreatedAt pgtype.Timestamptz
3045 UpdatedAt pgtype.Timestamptz
3046 }
3047
3048 type WorkflowStep struct {
3049 ID int64
3050 JobID int64
3051 StepIndex int32
3052 StepID string
3053 StepName string
3054 IfExpr string
3055 RunCommand string
3056 UsesAlias string
3057 WorkingDirectory string
3058 StepEnv []byte
3059 ContinueOnError bool
3060 Status WorkflowStepStatus
3061 Conclusion NullCheckConclusion
3062 LogObjectKey pgtype.Text
3063 LogByteCount int64
3064 StartedAt pgtype.Timestamptz
3065 CompletedAt pgtype.Timestamptz
3066 Version int32
3067 CreatedAt pgtype.Timestamptz
3068 UpdatedAt pgtype.Timestamptz
3069 StepWith []byte
3070 }
3071
3072 type WorkflowStepLogChunk struct {
3073 ID int64
3074 StepID int64
3075 Seq int32
3076 Chunk []byte
3077 CreatedAt pgtype.Timestamptz
3078 }
3079