tenseleyflow/shithub / 23e1749

Browse files

S26: regenerate sqlc models for star_count/watcher_count and watch enum

Authored by mfwolffe <wolffemf@dukes.jmu.edu>
SHA
23e1749d8a3888cc5a1bc2e7c2eb8207d18e1887
Parents
0da6e59
Tree
e2f5174

6 changed files

StatusFile+-
M internal/auth/policy/sqlc/models.go 70 0
M internal/checks/sqlc/models.go 70 0
M internal/issues/sqlc/models.go 70 0
M internal/meta/sqlc/models.go 70 0
M internal/pulls/sqlc/models.go 70 0
M internal/users/sqlc/models.go 70 0
internal/auth/policy/sqlc/models.gomodified
@@ -709,6 +709,49 @@ func (ns NullTransferStatus) Value() (driver.Value, error) {
709709
 	return string(ns.TransferStatus), nil
710710
 }
711711
 
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
+
712755
 type AuthAuditLog struct {
713756
 	ID         int64
714757
 	ActorID    pgtype.Int8
@@ -774,6 +817,18 @@ type CheckSuite struct {
774817
 	UpdatedAt  pgtype.Timestamptz
775818
 }
776819
 
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
+
777832
 type EmailVerification struct {
778833
 	ID          int64
779834
 	UserEmailID int64
@@ -1026,6 +1081,8 @@ type Repo struct {
10261081
 	AllowRebaseMerge   bool
10271082
 	AllowMergeCommit   bool
10281083
 	DefaultMergeMethod PrMergeMethod
1084
+	StarCount          int64
1085
+	WatcherCount       int64
10291086
 }
10301087
 
10311088
 type RepoCollaborator struct {
@@ -1064,6 +1121,12 @@ type RepoTransferRequest struct {
10641121
 	CanceledAt      pgtype.Timestamptz
10651122
 }
10661123
 
1124
+type Star struct {
1125
+	UserID    int64
1126
+	RepoID    int64
1127
+	StarredAt pgtype.Timestamptz
1128
+}
1129
+
10671130
 type User struct {
10681131
 	ID                int64
10691132
 	Username          string
@@ -1161,6 +1224,13 @@ type UsernameRedirect struct {
11611224
 	ChangedAt   pgtype.Timestamptz
11621225
 }
11631226
 
1227
+type Watch struct {
1228
+	UserID    int64
1229
+	RepoID    int64
1230
+	Level     WatchLevel
1231
+	UpdatedAt pgtype.Timestamptz
1232
+}
1233
+
11641234
 type WebhookEventsPending struct {
11651235
 	ID        int64
11661236
 	RepoID    int64
internal/checks/sqlc/models.gomodified
@@ -709,6 +709,49 @@ func (ns NullTransferStatus) Value() (driver.Value, error) {
709709
 	return string(ns.TransferStatus), nil
710710
 }
711711
 
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
+
712755
 type AuthAuditLog struct {
713756
 	ID         int64
714757
 	ActorID    pgtype.Int8
@@ -774,6 +817,18 @@ type CheckSuite struct {
774817
 	UpdatedAt  pgtype.Timestamptz
775818
 }
776819
 
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
+
777832
 type EmailVerification struct {
778833
 	ID          int64
779834
 	UserEmailID int64
@@ -1026,6 +1081,8 @@ type Repo struct {
10261081
 	AllowRebaseMerge   bool
10271082
 	AllowMergeCommit   bool
10281083
 	DefaultMergeMethod PrMergeMethod
1084
+	StarCount          int64
1085
+	WatcherCount       int64
10291086
 }
10301087
 
10311088
 type RepoCollaborator struct {
@@ -1064,6 +1121,12 @@ type RepoTransferRequest struct {
10641121
 	CanceledAt      pgtype.Timestamptz
10651122
 }
10661123
 
1124
+type Star struct {
1125
+	UserID    int64
1126
+	RepoID    int64
1127
+	StarredAt pgtype.Timestamptz
1128
+}
1129
+
10671130
 type User struct {
10681131
 	ID                int64
10691132
 	Username          string
@@ -1161,6 +1224,13 @@ type UsernameRedirect struct {
11611224
 	ChangedAt   pgtype.Timestamptz
11621225
 }
11631226
 
1227
+type Watch struct {
1228
+	UserID    int64
1229
+	RepoID    int64
1230
+	Level     WatchLevel
1231
+	UpdatedAt pgtype.Timestamptz
1232
+}
1233
+
11641234
 type WebhookEventsPending struct {
11651235
 	ID        int64
11661236
 	RepoID    int64
internal/issues/sqlc/models.gomodified
@@ -709,6 +709,49 @@ func (ns NullTransferStatus) Value() (driver.Value, error) {
709709
 	return string(ns.TransferStatus), nil
710710
 }
711711
 
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
+
712755
 type AuthAuditLog struct {
713756
 	ID         int64
714757
 	ActorID    pgtype.Int8
@@ -774,6 +817,18 @@ type CheckSuite struct {
774817
 	UpdatedAt  pgtype.Timestamptz
775818
 }
776819
 
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
+
777832
 type EmailVerification struct {
778833
 	ID          int64
779834
 	UserEmailID int64
@@ -1026,6 +1081,8 @@ type Repo struct {
10261081
 	AllowRebaseMerge   bool
10271082
 	AllowMergeCommit   bool
10281083
 	DefaultMergeMethod PrMergeMethod
1084
+	StarCount          int64
1085
+	WatcherCount       int64
10291086
 }
10301087
 
10311088
 type RepoCollaborator struct {
@@ -1064,6 +1121,12 @@ type RepoTransferRequest struct {
10641121
 	CanceledAt      pgtype.Timestamptz
10651122
 }
10661123
 
1124
+type Star struct {
1125
+	UserID    int64
1126
+	RepoID    int64
1127
+	StarredAt pgtype.Timestamptz
1128
+}
1129
+
10671130
 type User struct {
10681131
 	ID                int64
10691132
 	Username          string
@@ -1161,6 +1224,13 @@ type UsernameRedirect struct {
11611224
 	ChangedAt   pgtype.Timestamptz
11621225
 }
11631226
 
1227
+type Watch struct {
1228
+	UserID    int64
1229
+	RepoID    int64
1230
+	Level     WatchLevel
1231
+	UpdatedAt pgtype.Timestamptz
1232
+}
1233
+
11641234
 type WebhookEventsPending struct {
11651235
 	ID        int64
11661236
 	RepoID    int64
internal/meta/sqlc/models.gomodified
@@ -709,6 +709,49 @@ func (ns NullTransferStatus) Value() (driver.Value, error) {
709709
 	return string(ns.TransferStatus), nil
710710
 }
711711
 
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
+
712755
 type AuthAuditLog struct {
713756
 	ID         int64
714757
 	ActorID    pgtype.Int8
@@ -774,6 +817,18 @@ type CheckSuite struct {
774817
 	UpdatedAt  pgtype.Timestamptz
775818
 }
776819
 
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
+
777832
 type EmailVerification struct {
778833
 	ID          int64
779834
 	UserEmailID int64
@@ -1026,6 +1081,8 @@ type Repo struct {
10261081
 	AllowRebaseMerge   bool
10271082
 	AllowMergeCommit   bool
10281083
 	DefaultMergeMethod PrMergeMethod
1084
+	StarCount          int64
1085
+	WatcherCount       int64
10291086
 }
10301087
 
10311088
 type RepoCollaborator struct {
@@ -1064,6 +1121,12 @@ type RepoTransferRequest struct {
10641121
 	CanceledAt      pgtype.Timestamptz
10651122
 }
10661123
 
1124
+type Star struct {
1125
+	UserID    int64
1126
+	RepoID    int64
1127
+	StarredAt pgtype.Timestamptz
1128
+}
1129
+
10671130
 type User struct {
10681131
 	ID                int64
10691132
 	Username          string
@@ -1161,6 +1224,13 @@ type UsernameRedirect struct {
11611224
 	ChangedAt   pgtype.Timestamptz
11621225
 }
11631226
 
1227
+type Watch struct {
1228
+	UserID    int64
1229
+	RepoID    int64
1230
+	Level     WatchLevel
1231
+	UpdatedAt pgtype.Timestamptz
1232
+}
1233
+
11641234
 type WebhookEventsPending struct {
11651235
 	ID        int64
11661236
 	RepoID    int64
internal/pulls/sqlc/models.gomodified
@@ -709,6 +709,49 @@ func (ns NullTransferStatus) Value() (driver.Value, error) {
709709
 	return string(ns.TransferStatus), nil
710710
 }
711711
 
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
+
712755
 type AuthAuditLog struct {
713756
 	ID         int64
714757
 	ActorID    pgtype.Int8
@@ -774,6 +817,18 @@ type CheckSuite struct {
774817
 	UpdatedAt  pgtype.Timestamptz
775818
 }
776819
 
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
+
777832
 type EmailVerification struct {
778833
 	ID          int64
779834
 	UserEmailID int64
@@ -1026,6 +1081,8 @@ type Repo struct {
10261081
 	AllowRebaseMerge   bool
10271082
 	AllowMergeCommit   bool
10281083
 	DefaultMergeMethod PrMergeMethod
1084
+	StarCount          int64
1085
+	WatcherCount       int64
10291086
 }
10301087
 
10311088
 type RepoCollaborator struct {
@@ -1064,6 +1121,12 @@ type RepoTransferRequest struct {
10641121
 	CanceledAt      pgtype.Timestamptz
10651122
 }
10661123
 
1124
+type Star struct {
1125
+	UserID    int64
1126
+	RepoID    int64
1127
+	StarredAt pgtype.Timestamptz
1128
+}
1129
+
10671130
 type User struct {
10681131
 	ID                int64
10691132
 	Username          string
@@ -1161,6 +1224,13 @@ type UsernameRedirect struct {
11611224
 	ChangedAt   pgtype.Timestamptz
11621225
 }
11631226
 
1227
+type Watch struct {
1228
+	UserID    int64
1229
+	RepoID    int64
1230
+	Level     WatchLevel
1231
+	UpdatedAt pgtype.Timestamptz
1232
+}
1233
+
11641234
 type WebhookEventsPending struct {
11651235
 	ID        int64
11661236
 	RepoID    int64
internal/users/sqlc/models.gomodified
@@ -709,6 +709,49 @@ func (ns NullTransferStatus) Value() (driver.Value, error) {
709709
 	return string(ns.TransferStatus), nil
710710
 }
711711
 
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
+
712755
 type AuthAuditLog struct {
713756
 	ID         int64
714757
 	ActorID    pgtype.Int8
@@ -774,6 +817,18 @@ type CheckSuite struct {
774817
 	UpdatedAt  pgtype.Timestamptz
775818
 }
776819
 
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
+
777832
 type EmailVerification struct {
778833
 	ID          int64
779834
 	UserEmailID int64
@@ -1026,6 +1081,8 @@ type Repo struct {
10261081
 	AllowRebaseMerge   bool
10271082
 	AllowMergeCommit   bool
10281083
 	DefaultMergeMethod PrMergeMethod
1084
+	StarCount          int64
1085
+	WatcherCount       int64
10291086
 }
10301087
 
10311088
 type RepoCollaborator struct {
@@ -1064,6 +1121,12 @@ type RepoTransferRequest struct {
10641121
 	CanceledAt      pgtype.Timestamptz
10651122
 }
10661123
 
1124
+type Star struct {
1125
+	UserID    int64
1126
+	RepoID    int64
1127
+	StarredAt pgtype.Timestamptz
1128
+}
1129
+
10671130
 type User struct {
10681131
 	ID                int64
10691132
 	Username          string
@@ -1161,6 +1224,13 @@ type UsernameRedirect struct {
11611224
 	ChangedAt   pgtype.Timestamptz
11621225
 }
11631226
 
1227
+type Watch struct {
1228
+	UserID    int64
1229
+	RepoID    int64
1230
+	Level     WatchLevel
1231
+	UpdatedAt pgtype.Timestamptz
1232
+}
1233
+
11641234
 type WebhookEventsPending struct {
11651235
 	ID        int64
11661236
 	RepoID    int64