Add social follow graph
Authored by
mfwolffe <wolffemf@dukes.jmu.edu>
- SHA
6b1f39a769984171266bbaa6f49be01699d171f9- Parents
-
d6510ce - Tree
a45086f
6b1f39a
6b1f39a769984171266bbaa6f49be01699d171f9d6510ce
a45086finternal/actions/sqlc/models.gomodified@@ -1095,6 +1095,91 @@ func (ns NullTransferStatus) Value() (driver.Value, error) { | ||
| 1095 | 1095 | return string(ns.TransferStatus), nil |
| 1096 | 1096 | } |
| 1097 | 1097 | |
| 1098 | +type TrendingKind string | |
| 1099 | + | |
| 1100 | +const ( | |
| 1101 | + TrendingKindRepos TrendingKind = "repos" | |
| 1102 | + TrendingKindUsers TrendingKind = "users" | |
| 1103 | +) | |
| 1104 | + | |
| 1105 | +func (e *TrendingKind) Scan(src interface{}) error { | |
| 1106 | + switch s := src.(type) { | |
| 1107 | + case []byte: | |
| 1108 | + *e = TrendingKind(s) | |
| 1109 | + case string: | |
| 1110 | + *e = TrendingKind(s) | |
| 1111 | + default: | |
| 1112 | + return fmt.Errorf("unsupported scan type for TrendingKind: %T", src) | |
| 1113 | + } | |
| 1114 | + return nil | |
| 1115 | +} | |
| 1116 | + | |
| 1117 | +type NullTrendingKind struct { | |
| 1118 | + TrendingKind TrendingKind | |
| 1119 | + Valid bool // Valid is true if TrendingKind is not NULL | |
| 1120 | +} | |
| 1121 | + | |
| 1122 | +// Scan implements the Scanner interface. | |
| 1123 | +func (ns *NullTrendingKind) Scan(value interface{}) error { | |
| 1124 | + if value == nil { | |
| 1125 | + ns.TrendingKind, ns.Valid = "", false | |
| 1126 | + return nil | |
| 1127 | + } | |
| 1128 | + ns.Valid = true | |
| 1129 | + return ns.TrendingKind.Scan(value) | |
| 1130 | +} | |
| 1131 | + | |
| 1132 | +// Value implements the driver Valuer interface. | |
| 1133 | +func (ns NullTrendingKind) Value() (driver.Value, error) { | |
| 1134 | + if !ns.Valid { | |
| 1135 | + return nil, nil | |
| 1136 | + } | |
| 1137 | + return string(ns.TrendingKind), nil | |
| 1138 | +} | |
| 1139 | + | |
| 1140 | +type TrendingScope string | |
| 1141 | + | |
| 1142 | +const ( | |
| 1143 | + TrendingScopeDay TrendingScope = "day" | |
| 1144 | + TrendingScopeWeek TrendingScope = "week" | |
| 1145 | + TrendingScopeMonth TrendingScope = "month" | |
| 1146 | +) | |
| 1147 | + | |
| 1148 | +func (e *TrendingScope) Scan(src interface{}) error { | |
| 1149 | + switch s := src.(type) { | |
| 1150 | + case []byte: | |
| 1151 | + *e = TrendingScope(s) | |
| 1152 | + case string: | |
| 1153 | + *e = TrendingScope(s) | |
| 1154 | + default: | |
| 1155 | + return fmt.Errorf("unsupported scan type for TrendingScope: %T", src) | |
| 1156 | + } | |
| 1157 | + return nil | |
| 1158 | +} | |
| 1159 | + | |
| 1160 | +type NullTrendingScope struct { | |
| 1161 | + TrendingScope TrendingScope | |
| 1162 | + Valid bool // Valid is true if TrendingScope is not NULL | |
| 1163 | +} | |
| 1164 | + | |
| 1165 | +// Scan implements the Scanner interface. | |
| 1166 | +func (ns *NullTrendingScope) Scan(value interface{}) error { | |
| 1167 | + if value == nil { | |
| 1168 | + ns.TrendingScope, ns.Valid = "", false | |
| 1169 | + return nil | |
| 1170 | + } | |
| 1171 | + ns.Valid = true | |
| 1172 | + return ns.TrendingScope.Scan(value) | |
| 1173 | +} | |
| 1174 | + | |
| 1175 | +// Value implements the driver Valuer interface. | |
| 1176 | +func (ns NullTrendingScope) Value() (driver.Value, error) { | |
| 1177 | + if !ns.Valid { | |
| 1178 | + return nil, nil | |
| 1179 | + } | |
| 1180 | + return string(ns.TrendingScope), nil | |
| 1181 | +} | |
| 1182 | + | |
| 1098 | 1183 | type WatchLevel string |
| 1099 | 1184 | |
| 1100 | 1185 | const ( |
@@ -1605,6 +1690,14 @@ type EmailVerification struct { | ||
| 1605 | 1690 | CreatedAt pgtype.Timestamptz |
| 1606 | 1691 | } |
| 1607 | 1692 | |
| 1693 | +type Follow struct { | |
| 1694 | + ID int64 | |
| 1695 | + FollowerUserID int64 | |
| 1696 | + FolloweeUserID pgtype.Int8 | |
| 1697 | + FolloweeOrgID pgtype.Int8 | |
| 1698 | + FollowedAt pgtype.Timestamptz | |
| 1699 | +} | |
| 1700 | + | |
| 1608 | 1701 | type Issue struct { |
| 1609 | 1702 | ID int64 |
| 1610 | 1703 | RepoID int64 |
@@ -2098,6 +2191,14 @@ type TransactionalEmailLog struct { | ||
| 2098 | 2191 | DeliveredAt pgtype.Timestamptz |
| 2099 | 2192 | } |
| 2100 | 2193 | |
| 2194 | +type TrendingSnapshot struct { | |
| 2195 | + ID int64 | |
| 2196 | + Scope TrendingScope | |
| 2197 | + Kind TrendingKind | |
| 2198 | + CapturedAt pgtype.Timestamptz | |
| 2199 | + Payload []byte | |
| 2200 | +} | |
| 2201 | + | |
| 2101 | 2202 | type User struct { |
| 2102 | 2203 | ID int64 |
| 2103 | 2204 | Username string |
internal/admin/sqlc/models.gomodified@@ -1095,6 +1095,91 @@ func (ns NullTransferStatus) Value() (driver.Value, error) { | ||
| 1095 | 1095 | return string(ns.TransferStatus), nil |
| 1096 | 1096 | } |
| 1097 | 1097 | |
| 1098 | +type TrendingKind string | |
| 1099 | + | |
| 1100 | +const ( | |
| 1101 | + TrendingKindRepos TrendingKind = "repos" | |
| 1102 | + TrendingKindUsers TrendingKind = "users" | |
| 1103 | +) | |
| 1104 | + | |
| 1105 | +func (e *TrendingKind) Scan(src interface{}) error { | |
| 1106 | + switch s := src.(type) { | |
| 1107 | + case []byte: | |
| 1108 | + *e = TrendingKind(s) | |
| 1109 | + case string: | |
| 1110 | + *e = TrendingKind(s) | |
| 1111 | + default: | |
| 1112 | + return fmt.Errorf("unsupported scan type for TrendingKind: %T", src) | |
| 1113 | + } | |
| 1114 | + return nil | |
| 1115 | +} | |
| 1116 | + | |
| 1117 | +type NullTrendingKind struct { | |
| 1118 | + TrendingKind TrendingKind | |
| 1119 | + Valid bool // Valid is true if TrendingKind is not NULL | |
| 1120 | +} | |
| 1121 | + | |
| 1122 | +// Scan implements the Scanner interface. | |
| 1123 | +func (ns *NullTrendingKind) Scan(value interface{}) error { | |
| 1124 | + if value == nil { | |
| 1125 | + ns.TrendingKind, ns.Valid = "", false | |
| 1126 | + return nil | |
| 1127 | + } | |
| 1128 | + ns.Valid = true | |
| 1129 | + return ns.TrendingKind.Scan(value) | |
| 1130 | +} | |
| 1131 | + | |
| 1132 | +// Value implements the driver Valuer interface. | |
| 1133 | +func (ns NullTrendingKind) Value() (driver.Value, error) { | |
| 1134 | + if !ns.Valid { | |
| 1135 | + return nil, nil | |
| 1136 | + } | |
| 1137 | + return string(ns.TrendingKind), nil | |
| 1138 | +} | |
| 1139 | + | |
| 1140 | +type TrendingScope string | |
| 1141 | + | |
| 1142 | +const ( | |
| 1143 | + TrendingScopeDay TrendingScope = "day" | |
| 1144 | + TrendingScopeWeek TrendingScope = "week" | |
| 1145 | + TrendingScopeMonth TrendingScope = "month" | |
| 1146 | +) | |
| 1147 | + | |
| 1148 | +func (e *TrendingScope) Scan(src interface{}) error { | |
| 1149 | + switch s := src.(type) { | |
| 1150 | + case []byte: | |
| 1151 | + *e = TrendingScope(s) | |
| 1152 | + case string: | |
| 1153 | + *e = TrendingScope(s) | |
| 1154 | + default: | |
| 1155 | + return fmt.Errorf("unsupported scan type for TrendingScope: %T", src) | |
| 1156 | + } | |
| 1157 | + return nil | |
| 1158 | +} | |
| 1159 | + | |
| 1160 | +type NullTrendingScope struct { | |
| 1161 | + TrendingScope TrendingScope | |
| 1162 | + Valid bool // Valid is true if TrendingScope is not NULL | |
| 1163 | +} | |
| 1164 | + | |
| 1165 | +// Scan implements the Scanner interface. | |
| 1166 | +func (ns *NullTrendingScope) Scan(value interface{}) error { | |
| 1167 | + if value == nil { | |
| 1168 | + ns.TrendingScope, ns.Valid = "", false | |
| 1169 | + return nil | |
| 1170 | + } | |
| 1171 | + ns.Valid = true | |
| 1172 | + return ns.TrendingScope.Scan(value) | |
| 1173 | +} | |
| 1174 | + | |
| 1175 | +// Value implements the driver Valuer interface. | |
| 1176 | +func (ns NullTrendingScope) Value() (driver.Value, error) { | |
| 1177 | + if !ns.Valid { | |
| 1178 | + return nil, nil | |
| 1179 | + } | |
| 1180 | + return string(ns.TrendingScope), nil | |
| 1181 | +} | |
| 1182 | + | |
| 1098 | 1183 | type WatchLevel string |
| 1099 | 1184 | |
| 1100 | 1185 | const ( |
@@ -1605,6 +1690,14 @@ type EmailVerification struct { | ||
| 1605 | 1690 | CreatedAt pgtype.Timestamptz |
| 1606 | 1691 | } |
| 1607 | 1692 | |
| 1693 | +type Follow struct { | |
| 1694 | + ID int64 | |
| 1695 | + FollowerUserID int64 | |
| 1696 | + FolloweeUserID pgtype.Int8 | |
| 1697 | + FolloweeOrgID pgtype.Int8 | |
| 1698 | + FollowedAt pgtype.Timestamptz | |
| 1699 | +} | |
| 1700 | + | |
| 1608 | 1701 | type Issue struct { |
| 1609 | 1702 | ID int64 |
| 1610 | 1703 | RepoID int64 |
@@ -2098,6 +2191,14 @@ type TransactionalEmailLog struct { | ||
| 2098 | 2191 | DeliveredAt pgtype.Timestamptz |
| 2099 | 2192 | } |
| 2100 | 2193 | |
| 2194 | +type TrendingSnapshot struct { | |
| 2195 | + ID int64 | |
| 2196 | + Scope TrendingScope | |
| 2197 | + Kind TrendingKind | |
| 2198 | + CapturedAt pgtype.Timestamptz | |
| 2199 | + Payload []byte | |
| 2200 | +} | |
| 2201 | + | |
| 2101 | 2202 | type User struct { |
| 2102 | 2203 | ID int64 |
| 2103 | 2204 | Username string |
internal/auth/audit/audit.gomodified@@ -69,6 +69,8 @@ const ( | ||
| 69 | 69 | ActionStarDeleted Action = "star_deleted" |
| 70 | 70 | ActionWatchSet Action = "watch_set" |
| 71 | 71 | ActionWatchUnset Action = "watch_unset" |
| 72 | + ActionFollowCreated Action = "follow_created" | |
| 73 | + ActionFollowDeleted Action = "follow_deleted" | |
| 72 | 74 | ActionRepoForked Action = "repo_forked" |
| 73 | 75 | ActionRepoForkSynced Action = "repo_fork_synced" |
| 74 | 76 | |
internal/auth/policy/sqlc/models.gomodified@@ -1095,6 +1095,91 @@ func (ns NullTransferStatus) Value() (driver.Value, error) { | ||
| 1095 | 1095 | return string(ns.TransferStatus), nil |
| 1096 | 1096 | } |
| 1097 | 1097 | |
| 1098 | +type TrendingKind string | |
| 1099 | + | |
| 1100 | +const ( | |
| 1101 | + TrendingKindRepos TrendingKind = "repos" | |
| 1102 | + TrendingKindUsers TrendingKind = "users" | |
| 1103 | +) | |
| 1104 | + | |
| 1105 | +func (e *TrendingKind) Scan(src interface{}) error { | |
| 1106 | + switch s := src.(type) { | |
| 1107 | + case []byte: | |
| 1108 | + *e = TrendingKind(s) | |
| 1109 | + case string: | |
| 1110 | + *e = TrendingKind(s) | |
| 1111 | + default: | |
| 1112 | + return fmt.Errorf("unsupported scan type for TrendingKind: %T", src) | |
| 1113 | + } | |
| 1114 | + return nil | |
| 1115 | +} | |
| 1116 | + | |
| 1117 | +type NullTrendingKind struct { | |
| 1118 | + TrendingKind TrendingKind | |
| 1119 | + Valid bool // Valid is true if TrendingKind is not NULL | |
| 1120 | +} | |
| 1121 | + | |
| 1122 | +// Scan implements the Scanner interface. | |
| 1123 | +func (ns *NullTrendingKind) Scan(value interface{}) error { | |
| 1124 | + if value == nil { | |
| 1125 | + ns.TrendingKind, ns.Valid = "", false | |
| 1126 | + return nil | |
| 1127 | + } | |
| 1128 | + ns.Valid = true | |
| 1129 | + return ns.TrendingKind.Scan(value) | |
| 1130 | +} | |
| 1131 | + | |
| 1132 | +// Value implements the driver Valuer interface. | |
| 1133 | +func (ns NullTrendingKind) Value() (driver.Value, error) { | |
| 1134 | + if !ns.Valid { | |
| 1135 | + return nil, nil | |
| 1136 | + } | |
| 1137 | + return string(ns.TrendingKind), nil | |
| 1138 | +} | |
| 1139 | + | |
| 1140 | +type TrendingScope string | |
| 1141 | + | |
| 1142 | +const ( | |
| 1143 | + TrendingScopeDay TrendingScope = "day" | |
| 1144 | + TrendingScopeWeek TrendingScope = "week" | |
| 1145 | + TrendingScopeMonth TrendingScope = "month" | |
| 1146 | +) | |
| 1147 | + | |
| 1148 | +func (e *TrendingScope) Scan(src interface{}) error { | |
| 1149 | + switch s := src.(type) { | |
| 1150 | + case []byte: | |
| 1151 | + *e = TrendingScope(s) | |
| 1152 | + case string: | |
| 1153 | + *e = TrendingScope(s) | |
| 1154 | + default: | |
| 1155 | + return fmt.Errorf("unsupported scan type for TrendingScope: %T", src) | |
| 1156 | + } | |
| 1157 | + return nil | |
| 1158 | +} | |
| 1159 | + | |
| 1160 | +type NullTrendingScope struct { | |
| 1161 | + TrendingScope TrendingScope | |
| 1162 | + Valid bool // Valid is true if TrendingScope is not NULL | |
| 1163 | +} | |
| 1164 | + | |
| 1165 | +// Scan implements the Scanner interface. | |
| 1166 | +func (ns *NullTrendingScope) Scan(value interface{}) error { | |
| 1167 | + if value == nil { | |
| 1168 | + ns.TrendingScope, ns.Valid = "", false | |
| 1169 | + return nil | |
| 1170 | + } | |
| 1171 | + ns.Valid = true | |
| 1172 | + return ns.TrendingScope.Scan(value) | |
| 1173 | +} | |
| 1174 | + | |
| 1175 | +// Value implements the driver Valuer interface. | |
| 1176 | +func (ns NullTrendingScope) Value() (driver.Value, error) { | |
| 1177 | + if !ns.Valid { | |
| 1178 | + return nil, nil | |
| 1179 | + } | |
| 1180 | + return string(ns.TrendingScope), nil | |
| 1181 | +} | |
| 1182 | + | |
| 1098 | 1183 | type WatchLevel string |
| 1099 | 1184 | |
| 1100 | 1185 | const ( |
@@ -1605,6 +1690,14 @@ type EmailVerification struct { | ||
| 1605 | 1690 | CreatedAt pgtype.Timestamptz |
| 1606 | 1691 | } |
| 1607 | 1692 | |
| 1693 | +type Follow struct { | |
| 1694 | + ID int64 | |
| 1695 | + FollowerUserID int64 | |
| 1696 | + FolloweeUserID pgtype.Int8 | |
| 1697 | + FolloweeOrgID pgtype.Int8 | |
| 1698 | + FollowedAt pgtype.Timestamptz | |
| 1699 | +} | |
| 1700 | + | |
| 1608 | 1701 | type Issue struct { |
| 1609 | 1702 | ID int64 |
| 1610 | 1703 | RepoID int64 |
@@ -2098,6 +2191,14 @@ type TransactionalEmailLog struct { | ||
| 2098 | 2191 | DeliveredAt pgtype.Timestamptz |
| 2099 | 2192 | } |
| 2100 | 2193 | |
| 2194 | +type TrendingSnapshot struct { | |
| 2195 | + ID int64 | |
| 2196 | + Scope TrendingScope | |
| 2197 | + Kind TrendingKind | |
| 2198 | + CapturedAt pgtype.Timestamptz | |
| 2199 | + Payload []byte | |
| 2200 | +} | |
| 2201 | + | |
| 2101 | 2202 | type User struct { |
| 2102 | 2203 | ID int64 |
| 2103 | 2204 | Username string |
internal/checks/sqlc/models.gomodified@@ -1095,6 +1095,91 @@ func (ns NullTransferStatus) Value() (driver.Value, error) { | ||
| 1095 | 1095 | return string(ns.TransferStatus), nil |
| 1096 | 1096 | } |
| 1097 | 1097 | |
| 1098 | +type TrendingKind string | |
| 1099 | + | |
| 1100 | +const ( | |
| 1101 | + TrendingKindRepos TrendingKind = "repos" | |
| 1102 | + TrendingKindUsers TrendingKind = "users" | |
| 1103 | +) | |
| 1104 | + | |
| 1105 | +func (e *TrendingKind) Scan(src interface{}) error { | |
| 1106 | + switch s := src.(type) { | |
| 1107 | + case []byte: | |
| 1108 | + *e = TrendingKind(s) | |
| 1109 | + case string: | |
| 1110 | + *e = TrendingKind(s) | |
| 1111 | + default: | |
| 1112 | + return fmt.Errorf("unsupported scan type for TrendingKind: %T", src) | |
| 1113 | + } | |
| 1114 | + return nil | |
| 1115 | +} | |
| 1116 | + | |
| 1117 | +type NullTrendingKind struct { | |
| 1118 | + TrendingKind TrendingKind | |
| 1119 | + Valid bool // Valid is true if TrendingKind is not NULL | |
| 1120 | +} | |
| 1121 | + | |
| 1122 | +// Scan implements the Scanner interface. | |
| 1123 | +func (ns *NullTrendingKind) Scan(value interface{}) error { | |
| 1124 | + if value == nil { | |
| 1125 | + ns.TrendingKind, ns.Valid = "", false | |
| 1126 | + return nil | |
| 1127 | + } | |
| 1128 | + ns.Valid = true | |
| 1129 | + return ns.TrendingKind.Scan(value) | |
| 1130 | +} | |
| 1131 | + | |
| 1132 | +// Value implements the driver Valuer interface. | |
| 1133 | +func (ns NullTrendingKind) Value() (driver.Value, error) { | |
| 1134 | + if !ns.Valid { | |
| 1135 | + return nil, nil | |
| 1136 | + } | |
| 1137 | + return string(ns.TrendingKind), nil | |
| 1138 | +} | |
| 1139 | + | |
| 1140 | +type TrendingScope string | |
| 1141 | + | |
| 1142 | +const ( | |
| 1143 | + TrendingScopeDay TrendingScope = "day" | |
| 1144 | + TrendingScopeWeek TrendingScope = "week" | |
| 1145 | + TrendingScopeMonth TrendingScope = "month" | |
| 1146 | +) | |
| 1147 | + | |
| 1148 | +func (e *TrendingScope) Scan(src interface{}) error { | |
| 1149 | + switch s := src.(type) { | |
| 1150 | + case []byte: | |
| 1151 | + *e = TrendingScope(s) | |
| 1152 | + case string: | |
| 1153 | + *e = TrendingScope(s) | |
| 1154 | + default: | |
| 1155 | + return fmt.Errorf("unsupported scan type for TrendingScope: %T", src) | |
| 1156 | + } | |
| 1157 | + return nil | |
| 1158 | +} | |
| 1159 | + | |
| 1160 | +type NullTrendingScope struct { | |
| 1161 | + TrendingScope TrendingScope | |
| 1162 | + Valid bool // Valid is true if TrendingScope is not NULL | |
| 1163 | +} | |
| 1164 | + | |
| 1165 | +// Scan implements the Scanner interface. | |
| 1166 | +func (ns *NullTrendingScope) Scan(value interface{}) error { | |
| 1167 | + if value == nil { | |
| 1168 | + ns.TrendingScope, ns.Valid = "", false | |
| 1169 | + return nil | |
| 1170 | + } | |
| 1171 | + ns.Valid = true | |
| 1172 | + return ns.TrendingScope.Scan(value) | |
| 1173 | +} | |
| 1174 | + | |
| 1175 | +// Value implements the driver Valuer interface. | |
| 1176 | +func (ns NullTrendingScope) Value() (driver.Value, error) { | |
| 1177 | + if !ns.Valid { | |
| 1178 | + return nil, nil | |
| 1179 | + } | |
| 1180 | + return string(ns.TrendingScope), nil | |
| 1181 | +} | |
| 1182 | + | |
| 1098 | 1183 | type WatchLevel string |
| 1099 | 1184 | |
| 1100 | 1185 | const ( |
@@ -1605,6 +1690,14 @@ type EmailVerification struct { | ||
| 1605 | 1690 | CreatedAt pgtype.Timestamptz |
| 1606 | 1691 | } |
| 1607 | 1692 | |
| 1693 | +type Follow struct { | |
| 1694 | + ID int64 | |
| 1695 | + FollowerUserID int64 | |
| 1696 | + FolloweeUserID pgtype.Int8 | |
| 1697 | + FolloweeOrgID pgtype.Int8 | |
| 1698 | + FollowedAt pgtype.Timestamptz | |
| 1699 | +} | |
| 1700 | + | |
| 1608 | 1701 | type Issue struct { |
| 1609 | 1702 | ID int64 |
| 1610 | 1703 | RepoID int64 |
@@ -2098,6 +2191,14 @@ type TransactionalEmailLog struct { | ||
| 2098 | 2191 | DeliveredAt pgtype.Timestamptz |
| 2099 | 2192 | } |
| 2100 | 2193 | |
| 2194 | +type TrendingSnapshot struct { | |
| 2195 | + ID int64 | |
| 2196 | + Scope TrendingScope | |
| 2197 | + Kind TrendingKind | |
| 2198 | + CapturedAt pgtype.Timestamptz | |
| 2199 | + Payload []byte | |
| 2200 | +} | |
| 2201 | + | |
| 2101 | 2202 | type User struct { |
| 2102 | 2203 | ID int64 |
| 2103 | 2204 | Username string |
internal/issues/sqlc/models.gomodified@@ -1095,6 +1095,91 @@ func (ns NullTransferStatus) Value() (driver.Value, error) { | ||
| 1095 | 1095 | return string(ns.TransferStatus), nil |
| 1096 | 1096 | } |
| 1097 | 1097 | |
| 1098 | +type TrendingKind string | |
| 1099 | + | |
| 1100 | +const ( | |
| 1101 | + TrendingKindRepos TrendingKind = "repos" | |
| 1102 | + TrendingKindUsers TrendingKind = "users" | |
| 1103 | +) | |
| 1104 | + | |
| 1105 | +func (e *TrendingKind) Scan(src interface{}) error { | |
| 1106 | + switch s := src.(type) { | |
| 1107 | + case []byte: | |
| 1108 | + *e = TrendingKind(s) | |
| 1109 | + case string: | |
| 1110 | + *e = TrendingKind(s) | |
| 1111 | + default: | |
| 1112 | + return fmt.Errorf("unsupported scan type for TrendingKind: %T", src) | |
| 1113 | + } | |
| 1114 | + return nil | |
| 1115 | +} | |
| 1116 | + | |
| 1117 | +type NullTrendingKind struct { | |
| 1118 | + TrendingKind TrendingKind | |
| 1119 | + Valid bool // Valid is true if TrendingKind is not NULL | |
| 1120 | +} | |
| 1121 | + | |
| 1122 | +// Scan implements the Scanner interface. | |
| 1123 | +func (ns *NullTrendingKind) Scan(value interface{}) error { | |
| 1124 | + if value == nil { | |
| 1125 | + ns.TrendingKind, ns.Valid = "", false | |
| 1126 | + return nil | |
| 1127 | + } | |
| 1128 | + ns.Valid = true | |
| 1129 | + return ns.TrendingKind.Scan(value) | |
| 1130 | +} | |
| 1131 | + | |
| 1132 | +// Value implements the driver Valuer interface. | |
| 1133 | +func (ns NullTrendingKind) Value() (driver.Value, error) { | |
| 1134 | + if !ns.Valid { | |
| 1135 | + return nil, nil | |
| 1136 | + } | |
| 1137 | + return string(ns.TrendingKind), nil | |
| 1138 | +} | |
| 1139 | + | |
| 1140 | +type TrendingScope string | |
| 1141 | + | |
| 1142 | +const ( | |
| 1143 | + TrendingScopeDay TrendingScope = "day" | |
| 1144 | + TrendingScopeWeek TrendingScope = "week" | |
| 1145 | + TrendingScopeMonth TrendingScope = "month" | |
| 1146 | +) | |
| 1147 | + | |
| 1148 | +func (e *TrendingScope) Scan(src interface{}) error { | |
| 1149 | + switch s := src.(type) { | |
| 1150 | + case []byte: | |
| 1151 | + *e = TrendingScope(s) | |
| 1152 | + case string: | |
| 1153 | + *e = TrendingScope(s) | |
| 1154 | + default: | |
| 1155 | + return fmt.Errorf("unsupported scan type for TrendingScope: %T", src) | |
| 1156 | + } | |
| 1157 | + return nil | |
| 1158 | +} | |
| 1159 | + | |
| 1160 | +type NullTrendingScope struct { | |
| 1161 | + TrendingScope TrendingScope | |
| 1162 | + Valid bool // Valid is true if TrendingScope is not NULL | |
| 1163 | +} | |
| 1164 | + | |
| 1165 | +// Scan implements the Scanner interface. | |
| 1166 | +func (ns *NullTrendingScope) Scan(value interface{}) error { | |
| 1167 | + if value == nil { | |
| 1168 | + ns.TrendingScope, ns.Valid = "", false | |
| 1169 | + return nil | |
| 1170 | + } | |
| 1171 | + ns.Valid = true | |
| 1172 | + return ns.TrendingScope.Scan(value) | |
| 1173 | +} | |
| 1174 | + | |
| 1175 | +// Value implements the driver Valuer interface. | |
| 1176 | +func (ns NullTrendingScope) Value() (driver.Value, error) { | |
| 1177 | + if !ns.Valid { | |
| 1178 | + return nil, nil | |
| 1179 | + } | |
| 1180 | + return string(ns.TrendingScope), nil | |
| 1181 | +} | |
| 1182 | + | |
| 1098 | 1183 | type WatchLevel string |
| 1099 | 1184 | |
| 1100 | 1185 | const ( |
@@ -1605,6 +1690,14 @@ type EmailVerification struct { | ||
| 1605 | 1690 | CreatedAt pgtype.Timestamptz |
| 1606 | 1691 | } |
| 1607 | 1692 | |
| 1693 | +type Follow struct { | |
| 1694 | + ID int64 | |
| 1695 | + FollowerUserID int64 | |
| 1696 | + FolloweeUserID pgtype.Int8 | |
| 1697 | + FolloweeOrgID pgtype.Int8 | |
| 1698 | + FollowedAt pgtype.Timestamptz | |
| 1699 | +} | |
| 1700 | + | |
| 1608 | 1701 | type Issue struct { |
| 1609 | 1702 | ID int64 |
| 1610 | 1703 | RepoID int64 |
@@ -2098,6 +2191,14 @@ type TransactionalEmailLog struct { | ||
| 2098 | 2191 | DeliveredAt pgtype.Timestamptz |
| 2099 | 2192 | } |
| 2100 | 2193 | |
| 2194 | +type TrendingSnapshot struct { | |
| 2195 | + ID int64 | |
| 2196 | + Scope TrendingScope | |
| 2197 | + Kind TrendingKind | |
| 2198 | + CapturedAt pgtype.Timestamptz | |
| 2199 | + Payload []byte | |
| 2200 | +} | |
| 2201 | + | |
| 2101 | 2202 | type User struct { |
| 2102 | 2203 | ID int64 |
| 2103 | 2204 | Username string |
internal/meta/sqlc/models.gomodified@@ -1095,6 +1095,91 @@ func (ns NullTransferStatus) Value() (driver.Value, error) { | ||
| 1095 | 1095 | return string(ns.TransferStatus), nil |
| 1096 | 1096 | } |
| 1097 | 1097 | |
| 1098 | +type TrendingKind string | |
| 1099 | + | |
| 1100 | +const ( | |
| 1101 | + TrendingKindRepos TrendingKind = "repos" | |
| 1102 | + TrendingKindUsers TrendingKind = "users" | |
| 1103 | +) | |
| 1104 | + | |
| 1105 | +func (e *TrendingKind) Scan(src interface{}) error { | |
| 1106 | + switch s := src.(type) { | |
| 1107 | + case []byte: | |
| 1108 | + *e = TrendingKind(s) | |
| 1109 | + case string: | |
| 1110 | + *e = TrendingKind(s) | |
| 1111 | + default: | |
| 1112 | + return fmt.Errorf("unsupported scan type for TrendingKind: %T", src) | |
| 1113 | + } | |
| 1114 | + return nil | |
| 1115 | +} | |
| 1116 | + | |
| 1117 | +type NullTrendingKind struct { | |
| 1118 | + TrendingKind TrendingKind | |
| 1119 | + Valid bool // Valid is true if TrendingKind is not NULL | |
| 1120 | +} | |
| 1121 | + | |
| 1122 | +// Scan implements the Scanner interface. | |
| 1123 | +func (ns *NullTrendingKind) Scan(value interface{}) error { | |
| 1124 | + if value == nil { | |
| 1125 | + ns.TrendingKind, ns.Valid = "", false | |
| 1126 | + return nil | |
| 1127 | + } | |
| 1128 | + ns.Valid = true | |
| 1129 | + return ns.TrendingKind.Scan(value) | |
| 1130 | +} | |
| 1131 | + | |
| 1132 | +// Value implements the driver Valuer interface. | |
| 1133 | +func (ns NullTrendingKind) Value() (driver.Value, error) { | |
| 1134 | + if !ns.Valid { | |
| 1135 | + return nil, nil | |
| 1136 | + } | |
| 1137 | + return string(ns.TrendingKind), nil | |
| 1138 | +} | |
| 1139 | + | |
| 1140 | +type TrendingScope string | |
| 1141 | + | |
| 1142 | +const ( | |
| 1143 | + TrendingScopeDay TrendingScope = "day" | |
| 1144 | + TrendingScopeWeek TrendingScope = "week" | |
| 1145 | + TrendingScopeMonth TrendingScope = "month" | |
| 1146 | +) | |
| 1147 | + | |
| 1148 | +func (e *TrendingScope) Scan(src interface{}) error { | |
| 1149 | + switch s := src.(type) { | |
| 1150 | + case []byte: | |
| 1151 | + *e = TrendingScope(s) | |
| 1152 | + case string: | |
| 1153 | + *e = TrendingScope(s) | |
| 1154 | + default: | |
| 1155 | + return fmt.Errorf("unsupported scan type for TrendingScope: %T", src) | |
| 1156 | + } | |
| 1157 | + return nil | |
| 1158 | +} | |
| 1159 | + | |
| 1160 | +type NullTrendingScope struct { | |
| 1161 | + TrendingScope TrendingScope | |
| 1162 | + Valid bool // Valid is true if TrendingScope is not NULL | |
| 1163 | +} | |
| 1164 | + | |
| 1165 | +// Scan implements the Scanner interface. | |
| 1166 | +func (ns *NullTrendingScope) Scan(value interface{}) error { | |
| 1167 | + if value == nil { | |
| 1168 | + ns.TrendingScope, ns.Valid = "", false | |
| 1169 | + return nil | |
| 1170 | + } | |
| 1171 | + ns.Valid = true | |
| 1172 | + return ns.TrendingScope.Scan(value) | |
| 1173 | +} | |
| 1174 | + | |
| 1175 | +// Value implements the driver Valuer interface. | |
| 1176 | +func (ns NullTrendingScope) Value() (driver.Value, error) { | |
| 1177 | + if !ns.Valid { | |
| 1178 | + return nil, nil | |
| 1179 | + } | |
| 1180 | + return string(ns.TrendingScope), nil | |
| 1181 | +} | |
| 1182 | + | |
| 1098 | 1183 | type WatchLevel string |
| 1099 | 1184 | |
| 1100 | 1185 | const ( |
@@ -1605,6 +1690,14 @@ type EmailVerification struct { | ||
| 1605 | 1690 | CreatedAt pgtype.Timestamptz |
| 1606 | 1691 | } |
| 1607 | 1692 | |
| 1693 | +type Follow struct { | |
| 1694 | + ID int64 | |
| 1695 | + FollowerUserID int64 | |
| 1696 | + FolloweeUserID pgtype.Int8 | |
| 1697 | + FolloweeOrgID pgtype.Int8 | |
| 1698 | + FollowedAt pgtype.Timestamptz | |
| 1699 | +} | |
| 1700 | + | |
| 1608 | 1701 | type Issue struct { |
| 1609 | 1702 | ID int64 |
| 1610 | 1703 | RepoID int64 |
@@ -2098,6 +2191,14 @@ type TransactionalEmailLog struct { | ||
| 2098 | 2191 | DeliveredAt pgtype.Timestamptz |
| 2099 | 2192 | } |
| 2100 | 2193 | |
| 2194 | +type TrendingSnapshot struct { | |
| 2195 | + ID int64 | |
| 2196 | + Scope TrendingScope | |
| 2197 | + Kind TrendingKind | |
| 2198 | + CapturedAt pgtype.Timestamptz | |
| 2199 | + Payload []byte | |
| 2200 | +} | |
| 2201 | + | |
| 2101 | 2202 | type User struct { |
| 2102 | 2203 | ID int64 |
| 2103 | 2204 | Username string |
internal/notif/sqlc/models.gomodified@@ -1095,6 +1095,91 @@ func (ns NullTransferStatus) Value() (driver.Value, error) { | ||
| 1095 | 1095 | return string(ns.TransferStatus), nil |
| 1096 | 1096 | } |
| 1097 | 1097 | |
| 1098 | +type TrendingKind string | |
| 1099 | + | |
| 1100 | +const ( | |
| 1101 | + TrendingKindRepos TrendingKind = "repos" | |
| 1102 | + TrendingKindUsers TrendingKind = "users" | |
| 1103 | +) | |
| 1104 | + | |
| 1105 | +func (e *TrendingKind) Scan(src interface{}) error { | |
| 1106 | + switch s := src.(type) { | |
| 1107 | + case []byte: | |
| 1108 | + *e = TrendingKind(s) | |
| 1109 | + case string: | |
| 1110 | + *e = TrendingKind(s) | |
| 1111 | + default: | |
| 1112 | + return fmt.Errorf("unsupported scan type for TrendingKind: %T", src) | |
| 1113 | + } | |
| 1114 | + return nil | |
| 1115 | +} | |
| 1116 | + | |
| 1117 | +type NullTrendingKind struct { | |
| 1118 | + TrendingKind TrendingKind | |
| 1119 | + Valid bool // Valid is true if TrendingKind is not NULL | |
| 1120 | +} | |
| 1121 | + | |
| 1122 | +// Scan implements the Scanner interface. | |
| 1123 | +func (ns *NullTrendingKind) Scan(value interface{}) error { | |
| 1124 | + if value == nil { | |
| 1125 | + ns.TrendingKind, ns.Valid = "", false | |
| 1126 | + return nil | |
| 1127 | + } | |
| 1128 | + ns.Valid = true | |
| 1129 | + return ns.TrendingKind.Scan(value) | |
| 1130 | +} | |
| 1131 | + | |
| 1132 | +// Value implements the driver Valuer interface. | |
| 1133 | +func (ns NullTrendingKind) Value() (driver.Value, error) { | |
| 1134 | + if !ns.Valid { | |
| 1135 | + return nil, nil | |
| 1136 | + } | |
| 1137 | + return string(ns.TrendingKind), nil | |
| 1138 | +} | |
| 1139 | + | |
| 1140 | +type TrendingScope string | |
| 1141 | + | |
| 1142 | +const ( | |
| 1143 | + TrendingScopeDay TrendingScope = "day" | |
| 1144 | + TrendingScopeWeek TrendingScope = "week" | |
| 1145 | + TrendingScopeMonth TrendingScope = "month" | |
| 1146 | +) | |
| 1147 | + | |
| 1148 | +func (e *TrendingScope) Scan(src interface{}) error { | |
| 1149 | + switch s := src.(type) { | |
| 1150 | + case []byte: | |
| 1151 | + *e = TrendingScope(s) | |
| 1152 | + case string: | |
| 1153 | + *e = TrendingScope(s) | |
| 1154 | + default: | |
| 1155 | + return fmt.Errorf("unsupported scan type for TrendingScope: %T", src) | |
| 1156 | + } | |
| 1157 | + return nil | |
| 1158 | +} | |
| 1159 | + | |
| 1160 | +type NullTrendingScope struct { | |
| 1161 | + TrendingScope TrendingScope | |
| 1162 | + Valid bool // Valid is true if TrendingScope is not NULL | |
| 1163 | +} | |
| 1164 | + | |
| 1165 | +// Scan implements the Scanner interface. | |
| 1166 | +func (ns *NullTrendingScope) Scan(value interface{}) error { | |
| 1167 | + if value == nil { | |
| 1168 | + ns.TrendingScope, ns.Valid = "", false | |
| 1169 | + return nil | |
| 1170 | + } | |
| 1171 | + ns.Valid = true | |
| 1172 | + return ns.TrendingScope.Scan(value) | |
| 1173 | +} | |
| 1174 | + | |
| 1175 | +// Value implements the driver Valuer interface. | |
| 1176 | +func (ns NullTrendingScope) Value() (driver.Value, error) { | |
| 1177 | + if !ns.Valid { | |
| 1178 | + return nil, nil | |
| 1179 | + } | |
| 1180 | + return string(ns.TrendingScope), nil | |
| 1181 | +} | |
| 1182 | + | |
| 1098 | 1183 | type WatchLevel string |
| 1099 | 1184 | |
| 1100 | 1185 | const ( |
@@ -1605,6 +1690,14 @@ type EmailVerification struct { | ||
| 1605 | 1690 | CreatedAt pgtype.Timestamptz |
| 1606 | 1691 | } |
| 1607 | 1692 | |
| 1693 | +type Follow struct { | |
| 1694 | + ID int64 | |
| 1695 | + FollowerUserID int64 | |
| 1696 | + FolloweeUserID pgtype.Int8 | |
| 1697 | + FolloweeOrgID pgtype.Int8 | |
| 1698 | + FollowedAt pgtype.Timestamptz | |
| 1699 | +} | |
| 1700 | + | |
| 1608 | 1701 | type Issue struct { |
| 1609 | 1702 | ID int64 |
| 1610 | 1703 | RepoID int64 |
@@ -2098,6 +2191,14 @@ type TransactionalEmailLog struct { | ||
| 2098 | 2191 | DeliveredAt pgtype.Timestamptz |
| 2099 | 2192 | } |
| 2100 | 2193 | |
| 2194 | +type TrendingSnapshot struct { | |
| 2195 | + ID int64 | |
| 2196 | + Scope TrendingScope | |
| 2197 | + Kind TrendingKind | |
| 2198 | + CapturedAt pgtype.Timestamptz | |
| 2199 | + Payload []byte | |
| 2200 | +} | |
| 2201 | + | |
| 2101 | 2202 | type User struct { |
| 2102 | 2203 | ID int64 |
| 2103 | 2204 | Username string |
internal/orgs/sqlc/models.gomodified@@ -1095,6 +1095,91 @@ func (ns NullTransferStatus) Value() (driver.Value, error) { | ||
| 1095 | 1095 | return string(ns.TransferStatus), nil |
| 1096 | 1096 | } |
| 1097 | 1097 | |
| 1098 | +type TrendingKind string | |
| 1099 | + | |
| 1100 | +const ( | |
| 1101 | + TrendingKindRepos TrendingKind = "repos" | |
| 1102 | + TrendingKindUsers TrendingKind = "users" | |
| 1103 | +) | |
| 1104 | + | |
| 1105 | +func (e *TrendingKind) Scan(src interface{}) error { | |
| 1106 | + switch s := src.(type) { | |
| 1107 | + case []byte: | |
| 1108 | + *e = TrendingKind(s) | |
| 1109 | + case string: | |
| 1110 | + *e = TrendingKind(s) | |
| 1111 | + default: | |
| 1112 | + return fmt.Errorf("unsupported scan type for TrendingKind: %T", src) | |
| 1113 | + } | |
| 1114 | + return nil | |
| 1115 | +} | |
| 1116 | + | |
| 1117 | +type NullTrendingKind struct { | |
| 1118 | + TrendingKind TrendingKind | |
| 1119 | + Valid bool // Valid is true if TrendingKind is not NULL | |
| 1120 | +} | |
| 1121 | + | |
| 1122 | +// Scan implements the Scanner interface. | |
| 1123 | +func (ns *NullTrendingKind) Scan(value interface{}) error { | |
| 1124 | + if value == nil { | |
| 1125 | + ns.TrendingKind, ns.Valid = "", false | |
| 1126 | + return nil | |
| 1127 | + } | |
| 1128 | + ns.Valid = true | |
| 1129 | + return ns.TrendingKind.Scan(value) | |
| 1130 | +} | |
| 1131 | + | |
| 1132 | +// Value implements the driver Valuer interface. | |
| 1133 | +func (ns NullTrendingKind) Value() (driver.Value, error) { | |
| 1134 | + if !ns.Valid { | |
| 1135 | + return nil, nil | |
| 1136 | + } | |
| 1137 | + return string(ns.TrendingKind), nil | |
| 1138 | +} | |
| 1139 | + | |
| 1140 | +type TrendingScope string | |
| 1141 | + | |
| 1142 | +const ( | |
| 1143 | + TrendingScopeDay TrendingScope = "day" | |
| 1144 | + TrendingScopeWeek TrendingScope = "week" | |
| 1145 | + TrendingScopeMonth TrendingScope = "month" | |
| 1146 | +) | |
| 1147 | + | |
| 1148 | +func (e *TrendingScope) Scan(src interface{}) error { | |
| 1149 | + switch s := src.(type) { | |
| 1150 | + case []byte: | |
| 1151 | + *e = TrendingScope(s) | |
| 1152 | + case string: | |
| 1153 | + *e = TrendingScope(s) | |
| 1154 | + default: | |
| 1155 | + return fmt.Errorf("unsupported scan type for TrendingScope: %T", src) | |
| 1156 | + } | |
| 1157 | + return nil | |
| 1158 | +} | |
| 1159 | + | |
| 1160 | +type NullTrendingScope struct { | |
| 1161 | + TrendingScope TrendingScope | |
| 1162 | + Valid bool // Valid is true if TrendingScope is not NULL | |
| 1163 | +} | |
| 1164 | + | |
| 1165 | +// Scan implements the Scanner interface. | |
| 1166 | +func (ns *NullTrendingScope) Scan(value interface{}) error { | |
| 1167 | + if value == nil { | |
| 1168 | + ns.TrendingScope, ns.Valid = "", false | |
| 1169 | + return nil | |
| 1170 | + } | |
| 1171 | + ns.Valid = true | |
| 1172 | + return ns.TrendingScope.Scan(value) | |
| 1173 | +} | |
| 1174 | + | |
| 1175 | +// Value implements the driver Valuer interface. | |
| 1176 | +func (ns NullTrendingScope) Value() (driver.Value, error) { | |
| 1177 | + if !ns.Valid { | |
| 1178 | + return nil, nil | |
| 1179 | + } | |
| 1180 | + return string(ns.TrendingScope), nil | |
| 1181 | +} | |
| 1182 | + | |
| 1098 | 1183 | type WatchLevel string |
| 1099 | 1184 | |
| 1100 | 1185 | const ( |
@@ -1605,6 +1690,14 @@ type EmailVerification struct { | ||
| 1605 | 1690 | CreatedAt pgtype.Timestamptz |
| 1606 | 1691 | } |
| 1607 | 1692 | |
| 1693 | +type Follow struct { | |
| 1694 | + ID int64 | |
| 1695 | + FollowerUserID int64 | |
| 1696 | + FolloweeUserID pgtype.Int8 | |
| 1697 | + FolloweeOrgID pgtype.Int8 | |
| 1698 | + FollowedAt pgtype.Timestamptz | |
| 1699 | +} | |
| 1700 | + | |
| 1608 | 1701 | type Issue struct { |
| 1609 | 1702 | ID int64 |
| 1610 | 1703 | RepoID int64 |
@@ -2098,6 +2191,14 @@ type TransactionalEmailLog struct { | ||
| 2098 | 2191 | DeliveredAt pgtype.Timestamptz |
| 2099 | 2192 | } |
| 2100 | 2193 | |
| 2194 | +type TrendingSnapshot struct { | |
| 2195 | + ID int64 | |
| 2196 | + Scope TrendingScope | |
| 2197 | + Kind TrendingKind | |
| 2198 | + CapturedAt pgtype.Timestamptz | |
| 2199 | + Payload []byte | |
| 2200 | +} | |
| 2201 | + | |
| 2101 | 2202 | type User struct { |
| 2102 | 2203 | ID int64 |
| 2103 | 2204 | Username string |
internal/pulls/sqlc/models.gomodified@@ -1095,6 +1095,91 @@ func (ns NullTransferStatus) Value() (driver.Value, error) { | ||
| 1095 | 1095 | return string(ns.TransferStatus), nil |
| 1096 | 1096 | } |
| 1097 | 1097 | |
| 1098 | +type TrendingKind string | |
| 1099 | + | |
| 1100 | +const ( | |
| 1101 | + TrendingKindRepos TrendingKind = "repos" | |
| 1102 | + TrendingKindUsers TrendingKind = "users" | |
| 1103 | +) | |
| 1104 | + | |
| 1105 | +func (e *TrendingKind) Scan(src interface{}) error { | |
| 1106 | + switch s := src.(type) { | |
| 1107 | + case []byte: | |
| 1108 | + *e = TrendingKind(s) | |
| 1109 | + case string: | |
| 1110 | + *e = TrendingKind(s) | |
| 1111 | + default: | |
| 1112 | + return fmt.Errorf("unsupported scan type for TrendingKind: %T", src) | |
| 1113 | + } | |
| 1114 | + return nil | |
| 1115 | +} | |
| 1116 | + | |
| 1117 | +type NullTrendingKind struct { | |
| 1118 | + TrendingKind TrendingKind | |
| 1119 | + Valid bool // Valid is true if TrendingKind is not NULL | |
| 1120 | +} | |
| 1121 | + | |
| 1122 | +// Scan implements the Scanner interface. | |
| 1123 | +func (ns *NullTrendingKind) Scan(value interface{}) error { | |
| 1124 | + if value == nil { | |
| 1125 | + ns.TrendingKind, ns.Valid = "", false | |
| 1126 | + return nil | |
| 1127 | + } | |
| 1128 | + ns.Valid = true | |
| 1129 | + return ns.TrendingKind.Scan(value) | |
| 1130 | +} | |
| 1131 | + | |
| 1132 | +// Value implements the driver Valuer interface. | |
| 1133 | +func (ns NullTrendingKind) Value() (driver.Value, error) { | |
| 1134 | + if !ns.Valid { | |
| 1135 | + return nil, nil | |
| 1136 | + } | |
| 1137 | + return string(ns.TrendingKind), nil | |
| 1138 | +} | |
| 1139 | + | |
| 1140 | +type TrendingScope string | |
| 1141 | + | |
| 1142 | +const ( | |
| 1143 | + TrendingScopeDay TrendingScope = "day" | |
| 1144 | + TrendingScopeWeek TrendingScope = "week" | |
| 1145 | + TrendingScopeMonth TrendingScope = "month" | |
| 1146 | +) | |
| 1147 | + | |
| 1148 | +func (e *TrendingScope) Scan(src interface{}) error { | |
| 1149 | + switch s := src.(type) { | |
| 1150 | + case []byte: | |
| 1151 | + *e = TrendingScope(s) | |
| 1152 | + case string: | |
| 1153 | + *e = TrendingScope(s) | |
| 1154 | + default: | |
| 1155 | + return fmt.Errorf("unsupported scan type for TrendingScope: %T", src) | |
| 1156 | + } | |
| 1157 | + return nil | |
| 1158 | +} | |
| 1159 | + | |
| 1160 | +type NullTrendingScope struct { | |
| 1161 | + TrendingScope TrendingScope | |
| 1162 | + Valid bool // Valid is true if TrendingScope is not NULL | |
| 1163 | +} | |
| 1164 | + | |
| 1165 | +// Scan implements the Scanner interface. | |
| 1166 | +func (ns *NullTrendingScope) Scan(value interface{}) error { | |
| 1167 | + if value == nil { | |
| 1168 | + ns.TrendingScope, ns.Valid = "", false | |
| 1169 | + return nil | |
| 1170 | + } | |
| 1171 | + ns.Valid = true | |
| 1172 | + return ns.TrendingScope.Scan(value) | |
| 1173 | +} | |
| 1174 | + | |
| 1175 | +// Value implements the driver Valuer interface. | |
| 1176 | +func (ns NullTrendingScope) Value() (driver.Value, error) { | |
| 1177 | + if !ns.Valid { | |
| 1178 | + return nil, nil | |
| 1179 | + } | |
| 1180 | + return string(ns.TrendingScope), nil | |
| 1181 | +} | |
| 1182 | + | |
| 1098 | 1183 | type WatchLevel string |
| 1099 | 1184 | |
| 1100 | 1185 | const ( |
@@ -1605,6 +1690,14 @@ type EmailVerification struct { | ||
| 1605 | 1690 | CreatedAt pgtype.Timestamptz |
| 1606 | 1691 | } |
| 1607 | 1692 | |
| 1693 | +type Follow struct { | |
| 1694 | + ID int64 | |
| 1695 | + FollowerUserID int64 | |
| 1696 | + FolloweeUserID pgtype.Int8 | |
| 1697 | + FolloweeOrgID pgtype.Int8 | |
| 1698 | + FollowedAt pgtype.Timestamptz | |
| 1699 | +} | |
| 1700 | + | |
| 1608 | 1701 | type Issue struct { |
| 1609 | 1702 | ID int64 |
| 1610 | 1703 | RepoID int64 |
@@ -2098,6 +2191,14 @@ type TransactionalEmailLog struct { | ||
| 2098 | 2191 | DeliveredAt pgtype.Timestamptz |
| 2099 | 2192 | } |
| 2100 | 2193 | |
| 2194 | +type TrendingSnapshot struct { | |
| 2195 | + ID int64 | |
| 2196 | + Scope TrendingScope | |
| 2197 | + Kind TrendingKind | |
| 2198 | + CapturedAt pgtype.Timestamptz | |
| 2199 | + Payload []byte | |
| 2200 | +} | |
| 2201 | + | |
| 2101 | 2202 | type User struct { |
| 2102 | 2203 | ID int64 |
| 2103 | 2204 | Username string |
internal/ratelimit/sqlc/models.gomodified@@ -1095,6 +1095,91 @@ func (ns NullTransferStatus) Value() (driver.Value, error) { | ||
| 1095 | 1095 | return string(ns.TransferStatus), nil |
| 1096 | 1096 | } |
| 1097 | 1097 | |
| 1098 | +type TrendingKind string | |
| 1099 | + | |
| 1100 | +const ( | |
| 1101 | + TrendingKindRepos TrendingKind = "repos" | |
| 1102 | + TrendingKindUsers TrendingKind = "users" | |
| 1103 | +) | |
| 1104 | + | |
| 1105 | +func (e *TrendingKind) Scan(src interface{}) error { | |
| 1106 | + switch s := src.(type) { | |
| 1107 | + case []byte: | |
| 1108 | + *e = TrendingKind(s) | |
| 1109 | + case string: | |
| 1110 | + *e = TrendingKind(s) | |
| 1111 | + default: | |
| 1112 | + return fmt.Errorf("unsupported scan type for TrendingKind: %T", src) | |
| 1113 | + } | |
| 1114 | + return nil | |
| 1115 | +} | |
| 1116 | + | |
| 1117 | +type NullTrendingKind struct { | |
| 1118 | + TrendingKind TrendingKind | |
| 1119 | + Valid bool // Valid is true if TrendingKind is not NULL | |
| 1120 | +} | |
| 1121 | + | |
| 1122 | +// Scan implements the Scanner interface. | |
| 1123 | +func (ns *NullTrendingKind) Scan(value interface{}) error { | |
| 1124 | + if value == nil { | |
| 1125 | + ns.TrendingKind, ns.Valid = "", false | |
| 1126 | + return nil | |
| 1127 | + } | |
| 1128 | + ns.Valid = true | |
| 1129 | + return ns.TrendingKind.Scan(value) | |
| 1130 | +} | |
| 1131 | + | |
| 1132 | +// Value implements the driver Valuer interface. | |
| 1133 | +func (ns NullTrendingKind) Value() (driver.Value, error) { | |
| 1134 | + if !ns.Valid { | |
| 1135 | + return nil, nil | |
| 1136 | + } | |
| 1137 | + return string(ns.TrendingKind), nil | |
| 1138 | +} | |
| 1139 | + | |
| 1140 | +type TrendingScope string | |
| 1141 | + | |
| 1142 | +const ( | |
| 1143 | + TrendingScopeDay TrendingScope = "day" | |
| 1144 | + TrendingScopeWeek TrendingScope = "week" | |
| 1145 | + TrendingScopeMonth TrendingScope = "month" | |
| 1146 | +) | |
| 1147 | + | |
| 1148 | +func (e *TrendingScope) Scan(src interface{}) error { | |
| 1149 | + switch s := src.(type) { | |
| 1150 | + case []byte: | |
| 1151 | + *e = TrendingScope(s) | |
| 1152 | + case string: | |
| 1153 | + *e = TrendingScope(s) | |
| 1154 | + default: | |
| 1155 | + return fmt.Errorf("unsupported scan type for TrendingScope: %T", src) | |
| 1156 | + } | |
| 1157 | + return nil | |
| 1158 | +} | |
| 1159 | + | |
| 1160 | +type NullTrendingScope struct { | |
| 1161 | + TrendingScope TrendingScope | |
| 1162 | + Valid bool // Valid is true if TrendingScope is not NULL | |
| 1163 | +} | |
| 1164 | + | |
| 1165 | +// Scan implements the Scanner interface. | |
| 1166 | +func (ns *NullTrendingScope) Scan(value interface{}) error { | |
| 1167 | + if value == nil { | |
| 1168 | + ns.TrendingScope, ns.Valid = "", false | |
| 1169 | + return nil | |
| 1170 | + } | |
| 1171 | + ns.Valid = true | |
| 1172 | + return ns.TrendingScope.Scan(value) | |
| 1173 | +} | |
| 1174 | + | |
| 1175 | +// Value implements the driver Valuer interface. | |
| 1176 | +func (ns NullTrendingScope) Value() (driver.Value, error) { | |
| 1177 | + if !ns.Valid { | |
| 1178 | + return nil, nil | |
| 1179 | + } | |
| 1180 | + return string(ns.TrendingScope), nil | |
| 1181 | +} | |
| 1182 | + | |
| 1098 | 1183 | type WatchLevel string |
| 1099 | 1184 | |
| 1100 | 1185 | const ( |
@@ -1605,6 +1690,14 @@ type EmailVerification struct { | ||
| 1605 | 1690 | CreatedAt pgtype.Timestamptz |
| 1606 | 1691 | } |
| 1607 | 1692 | |
| 1693 | +type Follow struct { | |
| 1694 | + ID int64 | |
| 1695 | + FollowerUserID int64 | |
| 1696 | + FolloweeUserID pgtype.Int8 | |
| 1697 | + FolloweeOrgID pgtype.Int8 | |
| 1698 | + FollowedAt pgtype.Timestamptz | |
| 1699 | +} | |
| 1700 | + | |
| 1608 | 1701 | type Issue struct { |
| 1609 | 1702 | ID int64 |
| 1610 | 1703 | RepoID int64 |
@@ -2098,6 +2191,14 @@ type TransactionalEmailLog struct { | ||
| 2098 | 2191 | DeliveredAt pgtype.Timestamptz |
| 2099 | 2192 | } |
| 2100 | 2193 | |
| 2194 | +type TrendingSnapshot struct { | |
| 2195 | + ID int64 | |
| 2196 | + Scope TrendingScope | |
| 2197 | + Kind TrendingKind | |
| 2198 | + CapturedAt pgtype.Timestamptz | |
| 2199 | + Payload []byte | |
| 2200 | +} | |
| 2201 | + | |
| 2101 | 2202 | type User struct { |
| 2102 | 2203 | ID int64 |
| 2103 | 2204 | Username string |
internal/repos/sqlc/models.gomodified@@ -1095,6 +1095,91 @@ func (ns NullTransferStatus) Value() (driver.Value, error) { | ||
| 1095 | 1095 | return string(ns.TransferStatus), nil |
| 1096 | 1096 | } |
| 1097 | 1097 | |
| 1098 | +type TrendingKind string | |
| 1099 | + | |
| 1100 | +const ( | |
| 1101 | + TrendingKindRepos TrendingKind = "repos" | |
| 1102 | + TrendingKindUsers TrendingKind = "users" | |
| 1103 | +) | |
| 1104 | + | |
| 1105 | +func (e *TrendingKind) Scan(src interface{}) error { | |
| 1106 | + switch s := src.(type) { | |
| 1107 | + case []byte: | |
| 1108 | + *e = TrendingKind(s) | |
| 1109 | + case string: | |
| 1110 | + *e = TrendingKind(s) | |
| 1111 | + default: | |
| 1112 | + return fmt.Errorf("unsupported scan type for TrendingKind: %T", src) | |
| 1113 | + } | |
| 1114 | + return nil | |
| 1115 | +} | |
| 1116 | + | |
| 1117 | +type NullTrendingKind struct { | |
| 1118 | + TrendingKind TrendingKind | |
| 1119 | + Valid bool // Valid is true if TrendingKind is not NULL | |
| 1120 | +} | |
| 1121 | + | |
| 1122 | +// Scan implements the Scanner interface. | |
| 1123 | +func (ns *NullTrendingKind) Scan(value interface{}) error { | |
| 1124 | + if value == nil { | |
| 1125 | + ns.TrendingKind, ns.Valid = "", false | |
| 1126 | + return nil | |
| 1127 | + } | |
| 1128 | + ns.Valid = true | |
| 1129 | + return ns.TrendingKind.Scan(value) | |
| 1130 | +} | |
| 1131 | + | |
| 1132 | +// Value implements the driver Valuer interface. | |
| 1133 | +func (ns NullTrendingKind) Value() (driver.Value, error) { | |
| 1134 | + if !ns.Valid { | |
| 1135 | + return nil, nil | |
| 1136 | + } | |
| 1137 | + return string(ns.TrendingKind), nil | |
| 1138 | +} | |
| 1139 | + | |
| 1140 | +type TrendingScope string | |
| 1141 | + | |
| 1142 | +const ( | |
| 1143 | + TrendingScopeDay TrendingScope = "day" | |
| 1144 | + TrendingScopeWeek TrendingScope = "week" | |
| 1145 | + TrendingScopeMonth TrendingScope = "month" | |
| 1146 | +) | |
| 1147 | + | |
| 1148 | +func (e *TrendingScope) Scan(src interface{}) error { | |
| 1149 | + switch s := src.(type) { | |
| 1150 | + case []byte: | |
| 1151 | + *e = TrendingScope(s) | |
| 1152 | + case string: | |
| 1153 | + *e = TrendingScope(s) | |
| 1154 | + default: | |
| 1155 | + return fmt.Errorf("unsupported scan type for TrendingScope: %T", src) | |
| 1156 | + } | |
| 1157 | + return nil | |
| 1158 | +} | |
| 1159 | + | |
| 1160 | +type NullTrendingScope struct { | |
| 1161 | + TrendingScope TrendingScope | |
| 1162 | + Valid bool // Valid is true if TrendingScope is not NULL | |
| 1163 | +} | |
| 1164 | + | |
| 1165 | +// Scan implements the Scanner interface. | |
| 1166 | +func (ns *NullTrendingScope) Scan(value interface{}) error { | |
| 1167 | + if value == nil { | |
| 1168 | + ns.TrendingScope, ns.Valid = "", false | |
| 1169 | + return nil | |
| 1170 | + } | |
| 1171 | + ns.Valid = true | |
| 1172 | + return ns.TrendingScope.Scan(value) | |
| 1173 | +} | |
| 1174 | + | |
| 1175 | +// Value implements the driver Valuer interface. | |
| 1176 | +func (ns NullTrendingScope) Value() (driver.Value, error) { | |
| 1177 | + if !ns.Valid { | |
| 1178 | + return nil, nil | |
| 1179 | + } | |
| 1180 | + return string(ns.TrendingScope), nil | |
| 1181 | +} | |
| 1182 | + | |
| 1098 | 1183 | type WatchLevel string |
| 1099 | 1184 | |
| 1100 | 1185 | const ( |
@@ -1605,6 +1690,14 @@ type EmailVerification struct { | ||
| 1605 | 1690 | CreatedAt pgtype.Timestamptz |
| 1606 | 1691 | } |
| 1607 | 1692 | |
| 1693 | +type Follow struct { | |
| 1694 | + ID int64 | |
| 1695 | + FollowerUserID int64 | |
| 1696 | + FolloweeUserID pgtype.Int8 | |
| 1697 | + FolloweeOrgID pgtype.Int8 | |
| 1698 | + FollowedAt pgtype.Timestamptz | |
| 1699 | +} | |
| 1700 | + | |
| 1608 | 1701 | type Issue struct { |
| 1609 | 1702 | ID int64 |
| 1610 | 1703 | RepoID int64 |
@@ -2098,6 +2191,14 @@ type TransactionalEmailLog struct { | ||
| 2098 | 2191 | DeliveredAt pgtype.Timestamptz |
| 2099 | 2192 | } |
| 2100 | 2193 | |
| 2194 | +type TrendingSnapshot struct { | |
| 2195 | + ID int64 | |
| 2196 | + Scope TrendingScope | |
| 2197 | + Kind TrendingKind | |
| 2198 | + CapturedAt pgtype.Timestamptz | |
| 2199 | + Payload []byte | |
| 2200 | +} | |
| 2201 | + | |
| 2101 | 2202 | type User struct { |
| 2102 | 2203 | ID int64 |
| 2103 | 2204 | Username string |
internal/users/sqlc/models.gomodified@@ -1095,6 +1095,91 @@ func (ns NullTransferStatus) Value() (driver.Value, error) { | ||
| 1095 | 1095 | return string(ns.TransferStatus), nil |
| 1096 | 1096 | } |
| 1097 | 1097 | |
| 1098 | +type TrendingKind string | |
| 1099 | + | |
| 1100 | +const ( | |
| 1101 | + TrendingKindRepos TrendingKind = "repos" | |
| 1102 | + TrendingKindUsers TrendingKind = "users" | |
| 1103 | +) | |
| 1104 | + | |
| 1105 | +func (e *TrendingKind) Scan(src interface{}) error { | |
| 1106 | + switch s := src.(type) { | |
| 1107 | + case []byte: | |
| 1108 | + *e = TrendingKind(s) | |
| 1109 | + case string: | |
| 1110 | + *e = TrendingKind(s) | |
| 1111 | + default: | |
| 1112 | + return fmt.Errorf("unsupported scan type for TrendingKind: %T", src) | |
| 1113 | + } | |
| 1114 | + return nil | |
| 1115 | +} | |
| 1116 | + | |
| 1117 | +type NullTrendingKind struct { | |
| 1118 | + TrendingKind TrendingKind | |
| 1119 | + Valid bool // Valid is true if TrendingKind is not NULL | |
| 1120 | +} | |
| 1121 | + | |
| 1122 | +// Scan implements the Scanner interface. | |
| 1123 | +func (ns *NullTrendingKind) Scan(value interface{}) error { | |
| 1124 | + if value == nil { | |
| 1125 | + ns.TrendingKind, ns.Valid = "", false | |
| 1126 | + return nil | |
| 1127 | + } | |
| 1128 | + ns.Valid = true | |
| 1129 | + return ns.TrendingKind.Scan(value) | |
| 1130 | +} | |
| 1131 | + | |
| 1132 | +// Value implements the driver Valuer interface. | |
| 1133 | +func (ns NullTrendingKind) Value() (driver.Value, error) { | |
| 1134 | + if !ns.Valid { | |
| 1135 | + return nil, nil | |
| 1136 | + } | |
| 1137 | + return string(ns.TrendingKind), nil | |
| 1138 | +} | |
| 1139 | + | |
| 1140 | +type TrendingScope string | |
| 1141 | + | |
| 1142 | +const ( | |
| 1143 | + TrendingScopeDay TrendingScope = "day" | |
| 1144 | + TrendingScopeWeek TrendingScope = "week" | |
| 1145 | + TrendingScopeMonth TrendingScope = "month" | |
| 1146 | +) | |
| 1147 | + | |
| 1148 | +func (e *TrendingScope) Scan(src interface{}) error { | |
| 1149 | + switch s := src.(type) { | |
| 1150 | + case []byte: | |
| 1151 | + *e = TrendingScope(s) | |
| 1152 | + case string: | |
| 1153 | + *e = TrendingScope(s) | |
| 1154 | + default: | |
| 1155 | + return fmt.Errorf("unsupported scan type for TrendingScope: %T", src) | |
| 1156 | + } | |
| 1157 | + return nil | |
| 1158 | +} | |
| 1159 | + | |
| 1160 | +type NullTrendingScope struct { | |
| 1161 | + TrendingScope TrendingScope | |
| 1162 | + Valid bool // Valid is true if TrendingScope is not NULL | |
| 1163 | +} | |
| 1164 | + | |
| 1165 | +// Scan implements the Scanner interface. | |
| 1166 | +func (ns *NullTrendingScope) Scan(value interface{}) error { | |
| 1167 | + if value == nil { | |
| 1168 | + ns.TrendingScope, ns.Valid = "", false | |
| 1169 | + return nil | |
| 1170 | + } | |
| 1171 | + ns.Valid = true | |
| 1172 | + return ns.TrendingScope.Scan(value) | |
| 1173 | +} | |
| 1174 | + | |
| 1175 | +// Value implements the driver Valuer interface. | |
| 1176 | +func (ns NullTrendingScope) Value() (driver.Value, error) { | |
| 1177 | + if !ns.Valid { | |
| 1178 | + return nil, nil | |
| 1179 | + } | |
| 1180 | + return string(ns.TrendingScope), nil | |
| 1181 | +} | |
| 1182 | + | |
| 1098 | 1183 | type WatchLevel string |
| 1099 | 1184 | |
| 1100 | 1185 | const ( |
@@ -1605,6 +1690,14 @@ type EmailVerification struct { | ||
| 1605 | 1690 | CreatedAt pgtype.Timestamptz |
| 1606 | 1691 | } |
| 1607 | 1692 | |
| 1693 | +type Follow struct { | |
| 1694 | + ID int64 | |
| 1695 | + FollowerUserID int64 | |
| 1696 | + FolloweeUserID pgtype.Int8 | |
| 1697 | + FolloweeOrgID pgtype.Int8 | |
| 1698 | + FollowedAt pgtype.Timestamptz | |
| 1699 | +} | |
| 1700 | + | |
| 1608 | 1701 | type Issue struct { |
| 1609 | 1702 | ID int64 |
| 1610 | 1703 | RepoID int64 |
@@ -2098,6 +2191,14 @@ type TransactionalEmailLog struct { | ||
| 2098 | 2191 | DeliveredAt pgtype.Timestamptz |
| 2099 | 2192 | } |
| 2100 | 2193 | |
| 2194 | +type TrendingSnapshot struct { | |
| 2195 | + ID int64 | |
| 2196 | + Scope TrendingScope | |
| 2197 | + Kind TrendingKind | |
| 2198 | + CapturedAt pgtype.Timestamptz | |
| 2199 | + Payload []byte | |
| 2200 | +} | |
| 2201 | + | |
| 2101 | 2202 | type User struct { |
| 2102 | 2203 | ID int64 |
| 2103 | 2204 | Username string |
internal/webhook/sqlc/models.gomodified@@ -1095,6 +1095,91 @@ func (ns NullTransferStatus) Value() (driver.Value, error) { | ||
| 1095 | 1095 | return string(ns.TransferStatus), nil |
| 1096 | 1096 | } |
| 1097 | 1097 | |
| 1098 | +type TrendingKind string | |
| 1099 | + | |
| 1100 | +const ( | |
| 1101 | + TrendingKindRepos TrendingKind = "repos" | |
| 1102 | + TrendingKindUsers TrendingKind = "users" | |
| 1103 | +) | |
| 1104 | + | |
| 1105 | +func (e *TrendingKind) Scan(src interface{}) error { | |
| 1106 | + switch s := src.(type) { | |
| 1107 | + case []byte: | |
| 1108 | + *e = TrendingKind(s) | |
| 1109 | + case string: | |
| 1110 | + *e = TrendingKind(s) | |
| 1111 | + default: | |
| 1112 | + return fmt.Errorf("unsupported scan type for TrendingKind: %T", src) | |
| 1113 | + } | |
| 1114 | + return nil | |
| 1115 | +} | |
| 1116 | + | |
| 1117 | +type NullTrendingKind struct { | |
| 1118 | + TrendingKind TrendingKind | |
| 1119 | + Valid bool // Valid is true if TrendingKind is not NULL | |
| 1120 | +} | |
| 1121 | + | |
| 1122 | +// Scan implements the Scanner interface. | |
| 1123 | +func (ns *NullTrendingKind) Scan(value interface{}) error { | |
| 1124 | + if value == nil { | |
| 1125 | + ns.TrendingKind, ns.Valid = "", false | |
| 1126 | + return nil | |
| 1127 | + } | |
| 1128 | + ns.Valid = true | |
| 1129 | + return ns.TrendingKind.Scan(value) | |
| 1130 | +} | |
| 1131 | + | |
| 1132 | +// Value implements the driver Valuer interface. | |
| 1133 | +func (ns NullTrendingKind) Value() (driver.Value, error) { | |
| 1134 | + if !ns.Valid { | |
| 1135 | + return nil, nil | |
| 1136 | + } | |
| 1137 | + return string(ns.TrendingKind), nil | |
| 1138 | +} | |
| 1139 | + | |
| 1140 | +type TrendingScope string | |
| 1141 | + | |
| 1142 | +const ( | |
| 1143 | + TrendingScopeDay TrendingScope = "day" | |
| 1144 | + TrendingScopeWeek TrendingScope = "week" | |
| 1145 | + TrendingScopeMonth TrendingScope = "month" | |
| 1146 | +) | |
| 1147 | + | |
| 1148 | +func (e *TrendingScope) Scan(src interface{}) error { | |
| 1149 | + switch s := src.(type) { | |
| 1150 | + case []byte: | |
| 1151 | + *e = TrendingScope(s) | |
| 1152 | + case string: | |
| 1153 | + *e = TrendingScope(s) | |
| 1154 | + default: | |
| 1155 | + return fmt.Errorf("unsupported scan type for TrendingScope: %T", src) | |
| 1156 | + } | |
| 1157 | + return nil | |
| 1158 | +} | |
| 1159 | + | |
| 1160 | +type NullTrendingScope struct { | |
| 1161 | + TrendingScope TrendingScope | |
| 1162 | + Valid bool // Valid is true if TrendingScope is not NULL | |
| 1163 | +} | |
| 1164 | + | |
| 1165 | +// Scan implements the Scanner interface. | |
| 1166 | +func (ns *NullTrendingScope) Scan(value interface{}) error { | |
| 1167 | + if value == nil { | |
| 1168 | + ns.TrendingScope, ns.Valid = "", false | |
| 1169 | + return nil | |
| 1170 | + } | |
| 1171 | + ns.Valid = true | |
| 1172 | + return ns.TrendingScope.Scan(value) | |
| 1173 | +} | |
| 1174 | + | |
| 1175 | +// Value implements the driver Valuer interface. | |
| 1176 | +func (ns NullTrendingScope) Value() (driver.Value, error) { | |
| 1177 | + if !ns.Valid { | |
| 1178 | + return nil, nil | |
| 1179 | + } | |
| 1180 | + return string(ns.TrendingScope), nil | |
| 1181 | +} | |
| 1182 | + | |
| 1098 | 1183 | type WatchLevel string |
| 1099 | 1184 | |
| 1100 | 1185 | const ( |
@@ -1605,6 +1690,14 @@ type EmailVerification struct { | ||
| 1605 | 1690 | CreatedAt pgtype.Timestamptz |
| 1606 | 1691 | } |
| 1607 | 1692 | |
| 1693 | +type Follow struct { | |
| 1694 | + ID int64 | |
| 1695 | + FollowerUserID int64 | |
| 1696 | + FolloweeUserID pgtype.Int8 | |
| 1697 | + FolloweeOrgID pgtype.Int8 | |
| 1698 | + FollowedAt pgtype.Timestamptz | |
| 1699 | +} | |
| 1700 | + | |
| 1608 | 1701 | type Issue struct { |
| 1609 | 1702 | ID int64 |
| 1610 | 1703 | RepoID int64 |
@@ -2098,6 +2191,14 @@ type TransactionalEmailLog struct { | ||
| 2098 | 2191 | DeliveredAt pgtype.Timestamptz |
| 2099 | 2192 | } |
| 2100 | 2193 | |
| 2194 | +type TrendingSnapshot struct { | |
| 2195 | + ID int64 | |
| 2196 | + Scope TrendingScope | |
| 2197 | + Kind TrendingKind | |
| 2198 | + CapturedAt pgtype.Timestamptz | |
| 2199 | + Payload []byte | |
| 2200 | +} | |
| 2201 | + | |
| 2101 | 2202 | type User struct { |
| 2102 | 2203 | ID int64 |
| 2103 | 2204 | Username string |
internal/worker/sqlc/models.gomodified@@ -1095,6 +1095,91 @@ func (ns NullTransferStatus) Value() (driver.Value, error) { | ||
| 1095 | 1095 | return string(ns.TransferStatus), nil |
| 1096 | 1096 | } |
| 1097 | 1097 | |
| 1098 | +type TrendingKind string | |
| 1099 | + | |
| 1100 | +const ( | |
| 1101 | + TrendingKindRepos TrendingKind = "repos" | |
| 1102 | + TrendingKindUsers TrendingKind = "users" | |
| 1103 | +) | |
| 1104 | + | |
| 1105 | +func (e *TrendingKind) Scan(src interface{}) error { | |
| 1106 | + switch s := src.(type) { | |
| 1107 | + case []byte: | |
| 1108 | + *e = TrendingKind(s) | |
| 1109 | + case string: | |
| 1110 | + *e = TrendingKind(s) | |
| 1111 | + default: | |
| 1112 | + return fmt.Errorf("unsupported scan type for TrendingKind: %T", src) | |
| 1113 | + } | |
| 1114 | + return nil | |
| 1115 | +} | |
| 1116 | + | |
| 1117 | +type NullTrendingKind struct { | |
| 1118 | + TrendingKind TrendingKind | |
| 1119 | + Valid bool // Valid is true if TrendingKind is not NULL | |
| 1120 | +} | |
| 1121 | + | |
| 1122 | +// Scan implements the Scanner interface. | |
| 1123 | +func (ns *NullTrendingKind) Scan(value interface{}) error { | |
| 1124 | + if value == nil { | |
| 1125 | + ns.TrendingKind, ns.Valid = "", false | |
| 1126 | + return nil | |
| 1127 | + } | |
| 1128 | + ns.Valid = true | |
| 1129 | + return ns.TrendingKind.Scan(value) | |
| 1130 | +} | |
| 1131 | + | |
| 1132 | +// Value implements the driver Valuer interface. | |
| 1133 | +func (ns NullTrendingKind) Value() (driver.Value, error) { | |
| 1134 | + if !ns.Valid { | |
| 1135 | + return nil, nil | |
| 1136 | + } | |
| 1137 | + return string(ns.TrendingKind), nil | |
| 1138 | +} | |
| 1139 | + | |
| 1140 | +type TrendingScope string | |
| 1141 | + | |
| 1142 | +const ( | |
| 1143 | + TrendingScopeDay TrendingScope = "day" | |
| 1144 | + TrendingScopeWeek TrendingScope = "week" | |
| 1145 | + TrendingScopeMonth TrendingScope = "month" | |
| 1146 | +) | |
| 1147 | + | |
| 1148 | +func (e *TrendingScope) Scan(src interface{}) error { | |
| 1149 | + switch s := src.(type) { | |
| 1150 | + case []byte: | |
| 1151 | + *e = TrendingScope(s) | |
| 1152 | + case string: | |
| 1153 | + *e = TrendingScope(s) | |
| 1154 | + default: | |
| 1155 | + return fmt.Errorf("unsupported scan type for TrendingScope: %T", src) | |
| 1156 | + } | |
| 1157 | + return nil | |
| 1158 | +} | |
| 1159 | + | |
| 1160 | +type NullTrendingScope struct { | |
| 1161 | + TrendingScope TrendingScope | |
| 1162 | + Valid bool // Valid is true if TrendingScope is not NULL | |
| 1163 | +} | |
| 1164 | + | |
| 1165 | +// Scan implements the Scanner interface. | |
| 1166 | +func (ns *NullTrendingScope) Scan(value interface{}) error { | |
| 1167 | + if value == nil { | |
| 1168 | + ns.TrendingScope, ns.Valid = "", false | |
| 1169 | + return nil | |
| 1170 | + } | |
| 1171 | + ns.Valid = true | |
| 1172 | + return ns.TrendingScope.Scan(value) | |
| 1173 | +} | |
| 1174 | + | |
| 1175 | +// Value implements the driver Valuer interface. | |
| 1176 | +func (ns NullTrendingScope) Value() (driver.Value, error) { | |
| 1177 | + if !ns.Valid { | |
| 1178 | + return nil, nil | |
| 1179 | + } | |
| 1180 | + return string(ns.TrendingScope), nil | |
| 1181 | +} | |
| 1182 | + | |
| 1098 | 1183 | type WatchLevel string |
| 1099 | 1184 | |
| 1100 | 1185 | const ( |
@@ -1605,6 +1690,14 @@ type EmailVerification struct { | ||
| 1605 | 1690 | CreatedAt pgtype.Timestamptz |
| 1606 | 1691 | } |
| 1607 | 1692 | |
| 1693 | +type Follow struct { | |
| 1694 | + ID int64 | |
| 1695 | + FollowerUserID int64 | |
| 1696 | + FolloweeUserID pgtype.Int8 | |
| 1697 | + FolloweeOrgID pgtype.Int8 | |
| 1698 | + FollowedAt pgtype.Timestamptz | |
| 1699 | +} | |
| 1700 | + | |
| 1608 | 1701 | type Issue struct { |
| 1609 | 1702 | ID int64 |
| 1610 | 1703 | RepoID int64 |
@@ -2098,6 +2191,14 @@ type TransactionalEmailLog struct { | ||
| 2098 | 2191 | DeliveredAt pgtype.Timestamptz |
| 2099 | 2192 | } |
| 2100 | 2193 | |
| 2194 | +type TrendingSnapshot struct { | |
| 2195 | + ID int64 | |
| 2196 | + Scope TrendingScope | |
| 2197 | + Kind TrendingKind | |
| 2198 | + CapturedAt pgtype.Timestamptz | |
| 2199 | + Payload []byte | |
| 2200 | +} | |
| 2201 | + | |
| 2101 | 2202 | type User struct { |
| 2102 | 2203 | ID int64 |
| 2103 | 2204 | Username string |