regen sqlc models for downstream packages after S30/S31 enums
- SHA
e19cf78b23dc6fd122fd4ddff3f2941b2920b3a9- Parents
-
c90b676 - Tree
4215f3f
e19cf78
e19cf78b23dc6fd122fd4ddff3f2941b2920b3a9c90b676
4215f3f| Status | File | + | - |
|---|---|---|---|
| M |
internal/auth/policy/sqlc/models.go
|
164 | 0 |
| M |
internal/checks/sqlc/models.go
|
164 | 0 |
| M |
internal/issues/sqlc/models.go
|
164 | 0 |
| M |
internal/meta/sqlc/models.go
|
164 | 0 |
| M |
internal/notif/sqlc/models.go
|
164 | 0 |
| M |
internal/orgs/sqlc/models.go
|
6 | 0 |
| M |
internal/pulls/sqlc/models.go
|
164 | 0 |
| M |
internal/social/sqlc/models.go
|
164 | 0 |
| M |
internal/users/sqlc/models.go
|
164 | 0 |
| M |
internal/worker/sqlc/models.go
|
164 | 0 |
internal/auth/policy/sqlc/models.gomodified@@ -834,6 +834,135 @@ func (ns NullRepoVisibility) Value() (driver.Value, error) { | ||
| 834 | 834 | return string(ns.RepoVisibility), nil |
| 835 | 835 | } |
| 836 | 836 | |
| 837 | +type TeamPrivacy string | |
| 838 | + | |
| 839 | +const ( | |
| 840 | + TeamPrivacyVisible TeamPrivacy = "visible" | |
| 841 | + TeamPrivacySecret TeamPrivacy = "secret" | |
| 842 | +) | |
| 843 | + | |
| 844 | +func (e *TeamPrivacy) Scan(src interface{}) error { | |
| 845 | + switch s := src.(type) { | |
| 846 | + case []byte: | |
| 847 | + *e = TeamPrivacy(s) | |
| 848 | + case string: | |
| 849 | + *e = TeamPrivacy(s) | |
| 850 | + default: | |
| 851 | + return fmt.Errorf("unsupported scan type for TeamPrivacy: %T", src) | |
| 852 | + } | |
| 853 | + return nil | |
| 854 | +} | |
| 855 | + | |
| 856 | +type NullTeamPrivacy struct { | |
| 857 | + TeamPrivacy TeamPrivacy | |
| 858 | + Valid bool // Valid is true if TeamPrivacy is not NULL | |
| 859 | +} | |
| 860 | + | |
| 861 | +// Scan implements the Scanner interface. | |
| 862 | +func (ns *NullTeamPrivacy) Scan(value interface{}) error { | |
| 863 | + if value == nil { | |
| 864 | + ns.TeamPrivacy, ns.Valid = "", false | |
| 865 | + return nil | |
| 866 | + } | |
| 867 | + ns.Valid = true | |
| 868 | + return ns.TeamPrivacy.Scan(value) | |
| 869 | +} | |
| 870 | + | |
| 871 | +// Value implements the driver Valuer interface. | |
| 872 | +func (ns NullTeamPrivacy) Value() (driver.Value, error) { | |
| 873 | + if !ns.Valid { | |
| 874 | + return nil, nil | |
| 875 | + } | |
| 876 | + return string(ns.TeamPrivacy), nil | |
| 877 | +} | |
| 878 | + | |
| 879 | +type TeamRepoRole string | |
| 880 | + | |
| 881 | +const ( | |
| 882 | + TeamRepoRoleRead TeamRepoRole = "read" | |
| 883 | + TeamRepoRoleTriage TeamRepoRole = "triage" | |
| 884 | + TeamRepoRoleWrite TeamRepoRole = "write" | |
| 885 | + TeamRepoRoleMaintain TeamRepoRole = "maintain" | |
| 886 | + TeamRepoRoleAdmin TeamRepoRole = "admin" | |
| 887 | +) | |
| 888 | + | |
| 889 | +func (e *TeamRepoRole) Scan(src interface{}) error { | |
| 890 | + switch s := src.(type) { | |
| 891 | + case []byte: | |
| 892 | + *e = TeamRepoRole(s) | |
| 893 | + case string: | |
| 894 | + *e = TeamRepoRole(s) | |
| 895 | + default: | |
| 896 | + return fmt.Errorf("unsupported scan type for TeamRepoRole: %T", src) | |
| 897 | + } | |
| 898 | + return nil | |
| 899 | +} | |
| 900 | + | |
| 901 | +type NullTeamRepoRole struct { | |
| 902 | + TeamRepoRole TeamRepoRole | |
| 903 | + Valid bool // Valid is true if TeamRepoRole is not NULL | |
| 904 | +} | |
| 905 | + | |
| 906 | +// Scan implements the Scanner interface. | |
| 907 | +func (ns *NullTeamRepoRole) Scan(value interface{}) error { | |
| 908 | + if value == nil { | |
| 909 | + ns.TeamRepoRole, ns.Valid = "", false | |
| 910 | + return nil | |
| 911 | + } | |
| 912 | + ns.Valid = true | |
| 913 | + return ns.TeamRepoRole.Scan(value) | |
| 914 | +} | |
| 915 | + | |
| 916 | +// Value implements the driver Valuer interface. | |
| 917 | +func (ns NullTeamRepoRole) Value() (driver.Value, error) { | |
| 918 | + if !ns.Valid { | |
| 919 | + return nil, nil | |
| 920 | + } | |
| 921 | + return string(ns.TeamRepoRole), nil | |
| 922 | +} | |
| 923 | + | |
| 924 | +type TeamRole string | |
| 925 | + | |
| 926 | +const ( | |
| 927 | + TeamRoleMember TeamRole = "member" | |
| 928 | + TeamRoleMaintainer TeamRole = "maintainer" | |
| 929 | +) | |
| 930 | + | |
| 931 | +func (e *TeamRole) Scan(src interface{}) error { | |
| 932 | + switch s := src.(type) { | |
| 933 | + case []byte: | |
| 934 | + *e = TeamRole(s) | |
| 935 | + case string: | |
| 936 | + *e = TeamRole(s) | |
| 937 | + default: | |
| 938 | + return fmt.Errorf("unsupported scan type for TeamRole: %T", src) | |
| 939 | + } | |
| 940 | + return nil | |
| 941 | +} | |
| 942 | + | |
| 943 | +type NullTeamRole struct { | |
| 944 | + TeamRole TeamRole | |
| 945 | + Valid bool // Valid is true if TeamRole is not NULL | |
| 946 | +} | |
| 947 | + | |
| 948 | +// Scan implements the Scanner interface. | |
| 949 | +func (ns *NullTeamRole) Scan(value interface{}) error { | |
| 950 | + if value == nil { | |
| 951 | + ns.TeamRole, ns.Valid = "", false | |
| 952 | + return nil | |
| 953 | + } | |
| 954 | + ns.Valid = true | |
| 955 | + return ns.TeamRole.Scan(value) | |
| 956 | +} | |
| 957 | + | |
| 958 | +// Value implements the driver Valuer interface. | |
| 959 | +func (ns NullTeamRole) Value() (driver.Value, error) { | |
| 960 | + if !ns.Valid { | |
| 961 | + return nil, nil | |
| 962 | + } | |
| 963 | + return string(ns.TeamRole), nil | |
| 964 | +} | |
| 965 | + | |
| 837 | 966 | type TransferPrincipalKind string |
| 838 | 967 | |
| 839 | 968 | const ( |
@@ -1435,6 +1564,12 @@ type RepoRedirect struct { | ||
| 1435 | 1564 | RedirectedAt pgtype.Timestamptz |
| 1436 | 1565 | } |
| 1437 | 1566 | |
| 1567 | +type RepoTopic struct { | |
| 1568 | + RepoID int64 | |
| 1569 | + Topic string | |
| 1570 | + CreatedAt pgtype.Timestamptz | |
| 1571 | +} | |
| 1572 | + | |
| 1438 | 1573 | type RepoTransferRequest struct { |
| 1439 | 1574 | ID int64 |
| 1440 | 1575 | RepoID int64 |
@@ -1461,6 +1596,35 @@ type Star struct { | ||
| 1461 | 1596 | StarredAt pgtype.Timestamptz |
| 1462 | 1597 | } |
| 1463 | 1598 | |
| 1599 | +type Team struct { | |
| 1600 | + ID int64 | |
| 1601 | + OrgID int64 | |
| 1602 | + Slug string | |
| 1603 | + DisplayName string | |
| 1604 | + Description string | |
| 1605 | + ParentTeamID pgtype.Int8 | |
| 1606 | + Privacy TeamPrivacy | |
| 1607 | + CreatedByUserID pgtype.Int8 | |
| 1608 | + CreatedAt pgtype.Timestamptz | |
| 1609 | + UpdatedAt pgtype.Timestamptz | |
| 1610 | +} | |
| 1611 | + | |
| 1612 | +type TeamMember struct { | |
| 1613 | + TeamID int64 | |
| 1614 | + UserID int64 | |
| 1615 | + Role TeamRole | |
| 1616 | + AddedByUserID pgtype.Int8 | |
| 1617 | + AddedAt pgtype.Timestamptz | |
| 1618 | +} | |
| 1619 | + | |
| 1620 | +type TeamRepoAccess struct { | |
| 1621 | + TeamID int64 | |
| 1622 | + RepoID int64 | |
| 1623 | + Role TeamRepoRole | |
| 1624 | + AddedByUserID pgtype.Int8 | |
| 1625 | + AddedAt pgtype.Timestamptz | |
| 1626 | +} | |
| 1627 | + | |
| 1464 | 1628 | type User struct { |
| 1465 | 1629 | ID int64 |
| 1466 | 1630 | Username string |
internal/checks/sqlc/models.gomodified@@ -834,6 +834,135 @@ func (ns NullRepoVisibility) Value() (driver.Value, error) { | ||
| 834 | 834 | return string(ns.RepoVisibility), nil |
| 835 | 835 | } |
| 836 | 836 | |
| 837 | +type TeamPrivacy string | |
| 838 | + | |
| 839 | +const ( | |
| 840 | + TeamPrivacyVisible TeamPrivacy = "visible" | |
| 841 | + TeamPrivacySecret TeamPrivacy = "secret" | |
| 842 | +) | |
| 843 | + | |
| 844 | +func (e *TeamPrivacy) Scan(src interface{}) error { | |
| 845 | + switch s := src.(type) { | |
| 846 | + case []byte: | |
| 847 | + *e = TeamPrivacy(s) | |
| 848 | + case string: | |
| 849 | + *e = TeamPrivacy(s) | |
| 850 | + default: | |
| 851 | + return fmt.Errorf("unsupported scan type for TeamPrivacy: %T", src) | |
| 852 | + } | |
| 853 | + return nil | |
| 854 | +} | |
| 855 | + | |
| 856 | +type NullTeamPrivacy struct { | |
| 857 | + TeamPrivacy TeamPrivacy | |
| 858 | + Valid bool // Valid is true if TeamPrivacy is not NULL | |
| 859 | +} | |
| 860 | + | |
| 861 | +// Scan implements the Scanner interface. | |
| 862 | +func (ns *NullTeamPrivacy) Scan(value interface{}) error { | |
| 863 | + if value == nil { | |
| 864 | + ns.TeamPrivacy, ns.Valid = "", false | |
| 865 | + return nil | |
| 866 | + } | |
| 867 | + ns.Valid = true | |
| 868 | + return ns.TeamPrivacy.Scan(value) | |
| 869 | +} | |
| 870 | + | |
| 871 | +// Value implements the driver Valuer interface. | |
| 872 | +func (ns NullTeamPrivacy) Value() (driver.Value, error) { | |
| 873 | + if !ns.Valid { | |
| 874 | + return nil, nil | |
| 875 | + } | |
| 876 | + return string(ns.TeamPrivacy), nil | |
| 877 | +} | |
| 878 | + | |
| 879 | +type TeamRepoRole string | |
| 880 | + | |
| 881 | +const ( | |
| 882 | + TeamRepoRoleRead TeamRepoRole = "read" | |
| 883 | + TeamRepoRoleTriage TeamRepoRole = "triage" | |
| 884 | + TeamRepoRoleWrite TeamRepoRole = "write" | |
| 885 | + TeamRepoRoleMaintain TeamRepoRole = "maintain" | |
| 886 | + TeamRepoRoleAdmin TeamRepoRole = "admin" | |
| 887 | +) | |
| 888 | + | |
| 889 | +func (e *TeamRepoRole) Scan(src interface{}) error { | |
| 890 | + switch s := src.(type) { | |
| 891 | + case []byte: | |
| 892 | + *e = TeamRepoRole(s) | |
| 893 | + case string: | |
| 894 | + *e = TeamRepoRole(s) | |
| 895 | + default: | |
| 896 | + return fmt.Errorf("unsupported scan type for TeamRepoRole: %T", src) | |
| 897 | + } | |
| 898 | + return nil | |
| 899 | +} | |
| 900 | + | |
| 901 | +type NullTeamRepoRole struct { | |
| 902 | + TeamRepoRole TeamRepoRole | |
| 903 | + Valid bool // Valid is true if TeamRepoRole is not NULL | |
| 904 | +} | |
| 905 | + | |
| 906 | +// Scan implements the Scanner interface. | |
| 907 | +func (ns *NullTeamRepoRole) Scan(value interface{}) error { | |
| 908 | + if value == nil { | |
| 909 | + ns.TeamRepoRole, ns.Valid = "", false | |
| 910 | + return nil | |
| 911 | + } | |
| 912 | + ns.Valid = true | |
| 913 | + return ns.TeamRepoRole.Scan(value) | |
| 914 | +} | |
| 915 | + | |
| 916 | +// Value implements the driver Valuer interface. | |
| 917 | +func (ns NullTeamRepoRole) Value() (driver.Value, error) { | |
| 918 | + if !ns.Valid { | |
| 919 | + return nil, nil | |
| 920 | + } | |
| 921 | + return string(ns.TeamRepoRole), nil | |
| 922 | +} | |
| 923 | + | |
| 924 | +type TeamRole string | |
| 925 | + | |
| 926 | +const ( | |
| 927 | + TeamRoleMember TeamRole = "member" | |
| 928 | + TeamRoleMaintainer TeamRole = "maintainer" | |
| 929 | +) | |
| 930 | + | |
| 931 | +func (e *TeamRole) Scan(src interface{}) error { | |
| 932 | + switch s := src.(type) { | |
| 933 | + case []byte: | |
| 934 | + *e = TeamRole(s) | |
| 935 | + case string: | |
| 936 | + *e = TeamRole(s) | |
| 937 | + default: | |
| 938 | + return fmt.Errorf("unsupported scan type for TeamRole: %T", src) | |
| 939 | + } | |
| 940 | + return nil | |
| 941 | +} | |
| 942 | + | |
| 943 | +type NullTeamRole struct { | |
| 944 | + TeamRole TeamRole | |
| 945 | + Valid bool // Valid is true if TeamRole is not NULL | |
| 946 | +} | |
| 947 | + | |
| 948 | +// Scan implements the Scanner interface. | |
| 949 | +func (ns *NullTeamRole) Scan(value interface{}) error { | |
| 950 | + if value == nil { | |
| 951 | + ns.TeamRole, ns.Valid = "", false | |
| 952 | + return nil | |
| 953 | + } | |
| 954 | + ns.Valid = true | |
| 955 | + return ns.TeamRole.Scan(value) | |
| 956 | +} | |
| 957 | + | |
| 958 | +// Value implements the driver Valuer interface. | |
| 959 | +func (ns NullTeamRole) Value() (driver.Value, error) { | |
| 960 | + if !ns.Valid { | |
| 961 | + return nil, nil | |
| 962 | + } | |
| 963 | + return string(ns.TeamRole), nil | |
| 964 | +} | |
| 965 | + | |
| 837 | 966 | type TransferPrincipalKind string |
| 838 | 967 | |
| 839 | 968 | const ( |
@@ -1435,6 +1564,12 @@ type RepoRedirect struct { | ||
| 1435 | 1564 | RedirectedAt pgtype.Timestamptz |
| 1436 | 1565 | } |
| 1437 | 1566 | |
| 1567 | +type RepoTopic struct { | |
| 1568 | + RepoID int64 | |
| 1569 | + Topic string | |
| 1570 | + CreatedAt pgtype.Timestamptz | |
| 1571 | +} | |
| 1572 | + | |
| 1438 | 1573 | type RepoTransferRequest struct { |
| 1439 | 1574 | ID int64 |
| 1440 | 1575 | RepoID int64 |
@@ -1461,6 +1596,35 @@ type Star struct { | ||
| 1461 | 1596 | StarredAt pgtype.Timestamptz |
| 1462 | 1597 | } |
| 1463 | 1598 | |
| 1599 | +type Team struct { | |
| 1600 | + ID int64 | |
| 1601 | + OrgID int64 | |
| 1602 | + Slug string | |
| 1603 | + DisplayName string | |
| 1604 | + Description string | |
| 1605 | + ParentTeamID pgtype.Int8 | |
| 1606 | + Privacy TeamPrivacy | |
| 1607 | + CreatedByUserID pgtype.Int8 | |
| 1608 | + CreatedAt pgtype.Timestamptz | |
| 1609 | + UpdatedAt pgtype.Timestamptz | |
| 1610 | +} | |
| 1611 | + | |
| 1612 | +type TeamMember struct { | |
| 1613 | + TeamID int64 | |
| 1614 | + UserID int64 | |
| 1615 | + Role TeamRole | |
| 1616 | + AddedByUserID pgtype.Int8 | |
| 1617 | + AddedAt pgtype.Timestamptz | |
| 1618 | +} | |
| 1619 | + | |
| 1620 | +type TeamRepoAccess struct { | |
| 1621 | + TeamID int64 | |
| 1622 | + RepoID int64 | |
| 1623 | + Role TeamRepoRole | |
| 1624 | + AddedByUserID pgtype.Int8 | |
| 1625 | + AddedAt pgtype.Timestamptz | |
| 1626 | +} | |
| 1627 | + | |
| 1464 | 1628 | type User struct { |
| 1465 | 1629 | ID int64 |
| 1466 | 1630 | Username string |
internal/issues/sqlc/models.gomodified@@ -834,6 +834,135 @@ func (ns NullRepoVisibility) Value() (driver.Value, error) { | ||
| 834 | 834 | return string(ns.RepoVisibility), nil |
| 835 | 835 | } |
| 836 | 836 | |
| 837 | +type TeamPrivacy string | |
| 838 | + | |
| 839 | +const ( | |
| 840 | + TeamPrivacyVisible TeamPrivacy = "visible" | |
| 841 | + TeamPrivacySecret TeamPrivacy = "secret" | |
| 842 | +) | |
| 843 | + | |
| 844 | +func (e *TeamPrivacy) Scan(src interface{}) error { | |
| 845 | + switch s := src.(type) { | |
| 846 | + case []byte: | |
| 847 | + *e = TeamPrivacy(s) | |
| 848 | + case string: | |
| 849 | + *e = TeamPrivacy(s) | |
| 850 | + default: | |
| 851 | + return fmt.Errorf("unsupported scan type for TeamPrivacy: %T", src) | |
| 852 | + } | |
| 853 | + return nil | |
| 854 | +} | |
| 855 | + | |
| 856 | +type NullTeamPrivacy struct { | |
| 857 | + TeamPrivacy TeamPrivacy | |
| 858 | + Valid bool // Valid is true if TeamPrivacy is not NULL | |
| 859 | +} | |
| 860 | + | |
| 861 | +// Scan implements the Scanner interface. | |
| 862 | +func (ns *NullTeamPrivacy) Scan(value interface{}) error { | |
| 863 | + if value == nil { | |
| 864 | + ns.TeamPrivacy, ns.Valid = "", false | |
| 865 | + return nil | |
| 866 | + } | |
| 867 | + ns.Valid = true | |
| 868 | + return ns.TeamPrivacy.Scan(value) | |
| 869 | +} | |
| 870 | + | |
| 871 | +// Value implements the driver Valuer interface. | |
| 872 | +func (ns NullTeamPrivacy) Value() (driver.Value, error) { | |
| 873 | + if !ns.Valid { | |
| 874 | + return nil, nil | |
| 875 | + } | |
| 876 | + return string(ns.TeamPrivacy), nil | |
| 877 | +} | |
| 878 | + | |
| 879 | +type TeamRepoRole string | |
| 880 | + | |
| 881 | +const ( | |
| 882 | + TeamRepoRoleRead TeamRepoRole = "read" | |
| 883 | + TeamRepoRoleTriage TeamRepoRole = "triage" | |
| 884 | + TeamRepoRoleWrite TeamRepoRole = "write" | |
| 885 | + TeamRepoRoleMaintain TeamRepoRole = "maintain" | |
| 886 | + TeamRepoRoleAdmin TeamRepoRole = "admin" | |
| 887 | +) | |
| 888 | + | |
| 889 | +func (e *TeamRepoRole) Scan(src interface{}) error { | |
| 890 | + switch s := src.(type) { | |
| 891 | + case []byte: | |
| 892 | + *e = TeamRepoRole(s) | |
| 893 | + case string: | |
| 894 | + *e = TeamRepoRole(s) | |
| 895 | + default: | |
| 896 | + return fmt.Errorf("unsupported scan type for TeamRepoRole: %T", src) | |
| 897 | + } | |
| 898 | + return nil | |
| 899 | +} | |
| 900 | + | |
| 901 | +type NullTeamRepoRole struct { | |
| 902 | + TeamRepoRole TeamRepoRole | |
| 903 | + Valid bool // Valid is true if TeamRepoRole is not NULL | |
| 904 | +} | |
| 905 | + | |
| 906 | +// Scan implements the Scanner interface. | |
| 907 | +func (ns *NullTeamRepoRole) Scan(value interface{}) error { | |
| 908 | + if value == nil { | |
| 909 | + ns.TeamRepoRole, ns.Valid = "", false | |
| 910 | + return nil | |
| 911 | + } | |
| 912 | + ns.Valid = true | |
| 913 | + return ns.TeamRepoRole.Scan(value) | |
| 914 | +} | |
| 915 | + | |
| 916 | +// Value implements the driver Valuer interface. | |
| 917 | +func (ns NullTeamRepoRole) Value() (driver.Value, error) { | |
| 918 | + if !ns.Valid { | |
| 919 | + return nil, nil | |
| 920 | + } | |
| 921 | + return string(ns.TeamRepoRole), nil | |
| 922 | +} | |
| 923 | + | |
| 924 | +type TeamRole string | |
| 925 | + | |
| 926 | +const ( | |
| 927 | + TeamRoleMember TeamRole = "member" | |
| 928 | + TeamRoleMaintainer TeamRole = "maintainer" | |
| 929 | +) | |
| 930 | + | |
| 931 | +func (e *TeamRole) Scan(src interface{}) error { | |
| 932 | + switch s := src.(type) { | |
| 933 | + case []byte: | |
| 934 | + *e = TeamRole(s) | |
| 935 | + case string: | |
| 936 | + *e = TeamRole(s) | |
| 937 | + default: | |
| 938 | + return fmt.Errorf("unsupported scan type for TeamRole: %T", src) | |
| 939 | + } | |
| 940 | + return nil | |
| 941 | +} | |
| 942 | + | |
| 943 | +type NullTeamRole struct { | |
| 944 | + TeamRole TeamRole | |
| 945 | + Valid bool // Valid is true if TeamRole is not NULL | |
| 946 | +} | |
| 947 | + | |
| 948 | +// Scan implements the Scanner interface. | |
| 949 | +func (ns *NullTeamRole) Scan(value interface{}) error { | |
| 950 | + if value == nil { | |
| 951 | + ns.TeamRole, ns.Valid = "", false | |
| 952 | + return nil | |
| 953 | + } | |
| 954 | + ns.Valid = true | |
| 955 | + return ns.TeamRole.Scan(value) | |
| 956 | +} | |
| 957 | + | |
| 958 | +// Value implements the driver Valuer interface. | |
| 959 | +func (ns NullTeamRole) Value() (driver.Value, error) { | |
| 960 | + if !ns.Valid { | |
| 961 | + return nil, nil | |
| 962 | + } | |
| 963 | + return string(ns.TeamRole), nil | |
| 964 | +} | |
| 965 | + | |
| 837 | 966 | type TransferPrincipalKind string |
| 838 | 967 | |
| 839 | 968 | const ( |
@@ -1435,6 +1564,12 @@ type RepoRedirect struct { | ||
| 1435 | 1564 | RedirectedAt pgtype.Timestamptz |
| 1436 | 1565 | } |
| 1437 | 1566 | |
| 1567 | +type RepoTopic struct { | |
| 1568 | + RepoID int64 | |
| 1569 | + Topic string | |
| 1570 | + CreatedAt pgtype.Timestamptz | |
| 1571 | +} | |
| 1572 | + | |
| 1438 | 1573 | type RepoTransferRequest struct { |
| 1439 | 1574 | ID int64 |
| 1440 | 1575 | RepoID int64 |
@@ -1461,6 +1596,35 @@ type Star struct { | ||
| 1461 | 1596 | StarredAt pgtype.Timestamptz |
| 1462 | 1597 | } |
| 1463 | 1598 | |
| 1599 | +type Team struct { | |
| 1600 | + ID int64 | |
| 1601 | + OrgID int64 | |
| 1602 | + Slug string | |
| 1603 | + DisplayName string | |
| 1604 | + Description string | |
| 1605 | + ParentTeamID pgtype.Int8 | |
| 1606 | + Privacy TeamPrivacy | |
| 1607 | + CreatedByUserID pgtype.Int8 | |
| 1608 | + CreatedAt pgtype.Timestamptz | |
| 1609 | + UpdatedAt pgtype.Timestamptz | |
| 1610 | +} | |
| 1611 | + | |
| 1612 | +type TeamMember struct { | |
| 1613 | + TeamID int64 | |
| 1614 | + UserID int64 | |
| 1615 | + Role TeamRole | |
| 1616 | + AddedByUserID pgtype.Int8 | |
| 1617 | + AddedAt pgtype.Timestamptz | |
| 1618 | +} | |
| 1619 | + | |
| 1620 | +type TeamRepoAccess struct { | |
| 1621 | + TeamID int64 | |
| 1622 | + RepoID int64 | |
| 1623 | + Role TeamRepoRole | |
| 1624 | + AddedByUserID pgtype.Int8 | |
| 1625 | + AddedAt pgtype.Timestamptz | |
| 1626 | +} | |
| 1627 | + | |
| 1464 | 1628 | type User struct { |
| 1465 | 1629 | ID int64 |
| 1466 | 1630 | Username string |
internal/meta/sqlc/models.gomodified@@ -834,6 +834,135 @@ func (ns NullRepoVisibility) Value() (driver.Value, error) { | ||
| 834 | 834 | return string(ns.RepoVisibility), nil |
| 835 | 835 | } |
| 836 | 836 | |
| 837 | +type TeamPrivacy string | |
| 838 | + | |
| 839 | +const ( | |
| 840 | + TeamPrivacyVisible TeamPrivacy = "visible" | |
| 841 | + TeamPrivacySecret TeamPrivacy = "secret" | |
| 842 | +) | |
| 843 | + | |
| 844 | +func (e *TeamPrivacy) Scan(src interface{}) error { | |
| 845 | + switch s := src.(type) { | |
| 846 | + case []byte: | |
| 847 | + *e = TeamPrivacy(s) | |
| 848 | + case string: | |
| 849 | + *e = TeamPrivacy(s) | |
| 850 | + default: | |
| 851 | + return fmt.Errorf("unsupported scan type for TeamPrivacy: %T", src) | |
| 852 | + } | |
| 853 | + return nil | |
| 854 | +} | |
| 855 | + | |
| 856 | +type NullTeamPrivacy struct { | |
| 857 | + TeamPrivacy TeamPrivacy | |
| 858 | + Valid bool // Valid is true if TeamPrivacy is not NULL | |
| 859 | +} | |
| 860 | + | |
| 861 | +// Scan implements the Scanner interface. | |
| 862 | +func (ns *NullTeamPrivacy) Scan(value interface{}) error { | |
| 863 | + if value == nil { | |
| 864 | + ns.TeamPrivacy, ns.Valid = "", false | |
| 865 | + return nil | |
| 866 | + } | |
| 867 | + ns.Valid = true | |
| 868 | + return ns.TeamPrivacy.Scan(value) | |
| 869 | +} | |
| 870 | + | |
| 871 | +// Value implements the driver Valuer interface. | |
| 872 | +func (ns NullTeamPrivacy) Value() (driver.Value, error) { | |
| 873 | + if !ns.Valid { | |
| 874 | + return nil, nil | |
| 875 | + } | |
| 876 | + return string(ns.TeamPrivacy), nil | |
| 877 | +} | |
| 878 | + | |
| 879 | +type TeamRepoRole string | |
| 880 | + | |
| 881 | +const ( | |
| 882 | + TeamRepoRoleRead TeamRepoRole = "read" | |
| 883 | + TeamRepoRoleTriage TeamRepoRole = "triage" | |
| 884 | + TeamRepoRoleWrite TeamRepoRole = "write" | |
| 885 | + TeamRepoRoleMaintain TeamRepoRole = "maintain" | |
| 886 | + TeamRepoRoleAdmin TeamRepoRole = "admin" | |
| 887 | +) | |
| 888 | + | |
| 889 | +func (e *TeamRepoRole) Scan(src interface{}) error { | |
| 890 | + switch s := src.(type) { | |
| 891 | + case []byte: | |
| 892 | + *e = TeamRepoRole(s) | |
| 893 | + case string: | |
| 894 | + *e = TeamRepoRole(s) | |
| 895 | + default: | |
| 896 | + return fmt.Errorf("unsupported scan type for TeamRepoRole: %T", src) | |
| 897 | + } | |
| 898 | + return nil | |
| 899 | +} | |
| 900 | + | |
| 901 | +type NullTeamRepoRole struct { | |
| 902 | + TeamRepoRole TeamRepoRole | |
| 903 | + Valid bool // Valid is true if TeamRepoRole is not NULL | |
| 904 | +} | |
| 905 | + | |
| 906 | +// Scan implements the Scanner interface. | |
| 907 | +func (ns *NullTeamRepoRole) Scan(value interface{}) error { | |
| 908 | + if value == nil { | |
| 909 | + ns.TeamRepoRole, ns.Valid = "", false | |
| 910 | + return nil | |
| 911 | + } | |
| 912 | + ns.Valid = true | |
| 913 | + return ns.TeamRepoRole.Scan(value) | |
| 914 | +} | |
| 915 | + | |
| 916 | +// Value implements the driver Valuer interface. | |
| 917 | +func (ns NullTeamRepoRole) Value() (driver.Value, error) { | |
| 918 | + if !ns.Valid { | |
| 919 | + return nil, nil | |
| 920 | + } | |
| 921 | + return string(ns.TeamRepoRole), nil | |
| 922 | +} | |
| 923 | + | |
| 924 | +type TeamRole string | |
| 925 | + | |
| 926 | +const ( | |
| 927 | + TeamRoleMember TeamRole = "member" | |
| 928 | + TeamRoleMaintainer TeamRole = "maintainer" | |
| 929 | +) | |
| 930 | + | |
| 931 | +func (e *TeamRole) Scan(src interface{}) error { | |
| 932 | + switch s := src.(type) { | |
| 933 | + case []byte: | |
| 934 | + *e = TeamRole(s) | |
| 935 | + case string: | |
| 936 | + *e = TeamRole(s) | |
| 937 | + default: | |
| 938 | + return fmt.Errorf("unsupported scan type for TeamRole: %T", src) | |
| 939 | + } | |
| 940 | + return nil | |
| 941 | +} | |
| 942 | + | |
| 943 | +type NullTeamRole struct { | |
| 944 | + TeamRole TeamRole | |
| 945 | + Valid bool // Valid is true if TeamRole is not NULL | |
| 946 | +} | |
| 947 | + | |
| 948 | +// Scan implements the Scanner interface. | |
| 949 | +func (ns *NullTeamRole) Scan(value interface{}) error { | |
| 950 | + if value == nil { | |
| 951 | + ns.TeamRole, ns.Valid = "", false | |
| 952 | + return nil | |
| 953 | + } | |
| 954 | + ns.Valid = true | |
| 955 | + return ns.TeamRole.Scan(value) | |
| 956 | +} | |
| 957 | + | |
| 958 | +// Value implements the driver Valuer interface. | |
| 959 | +func (ns NullTeamRole) Value() (driver.Value, error) { | |
| 960 | + if !ns.Valid { | |
| 961 | + return nil, nil | |
| 962 | + } | |
| 963 | + return string(ns.TeamRole), nil | |
| 964 | +} | |
| 965 | + | |
| 837 | 966 | type TransferPrincipalKind string |
| 838 | 967 | |
| 839 | 968 | const ( |
@@ -1435,6 +1564,12 @@ type RepoRedirect struct { | ||
| 1435 | 1564 | RedirectedAt pgtype.Timestamptz |
| 1436 | 1565 | } |
| 1437 | 1566 | |
| 1567 | +type RepoTopic struct { | |
| 1568 | + RepoID int64 | |
| 1569 | + Topic string | |
| 1570 | + CreatedAt pgtype.Timestamptz | |
| 1571 | +} | |
| 1572 | + | |
| 1438 | 1573 | type RepoTransferRequest struct { |
| 1439 | 1574 | ID int64 |
| 1440 | 1575 | RepoID int64 |
@@ -1461,6 +1596,35 @@ type Star struct { | ||
| 1461 | 1596 | StarredAt pgtype.Timestamptz |
| 1462 | 1597 | } |
| 1463 | 1598 | |
| 1599 | +type Team struct { | |
| 1600 | + ID int64 | |
| 1601 | + OrgID int64 | |
| 1602 | + Slug string | |
| 1603 | + DisplayName string | |
| 1604 | + Description string | |
| 1605 | + ParentTeamID pgtype.Int8 | |
| 1606 | + Privacy TeamPrivacy | |
| 1607 | + CreatedByUserID pgtype.Int8 | |
| 1608 | + CreatedAt pgtype.Timestamptz | |
| 1609 | + UpdatedAt pgtype.Timestamptz | |
| 1610 | +} | |
| 1611 | + | |
| 1612 | +type TeamMember struct { | |
| 1613 | + TeamID int64 | |
| 1614 | + UserID int64 | |
| 1615 | + Role TeamRole | |
| 1616 | + AddedByUserID pgtype.Int8 | |
| 1617 | + AddedAt pgtype.Timestamptz | |
| 1618 | +} | |
| 1619 | + | |
| 1620 | +type TeamRepoAccess struct { | |
| 1621 | + TeamID int64 | |
| 1622 | + RepoID int64 | |
| 1623 | + Role TeamRepoRole | |
| 1624 | + AddedByUserID pgtype.Int8 | |
| 1625 | + AddedAt pgtype.Timestamptz | |
| 1626 | +} | |
| 1627 | + | |
| 1464 | 1628 | type User struct { |
| 1465 | 1629 | ID int64 |
| 1466 | 1630 | Username string |
internal/notif/sqlc/models.gomodified@@ -834,6 +834,135 @@ func (ns NullRepoVisibility) Value() (driver.Value, error) { | ||
| 834 | 834 | return string(ns.RepoVisibility), nil |
| 835 | 835 | } |
| 836 | 836 | |
| 837 | +type TeamPrivacy string | |
| 838 | + | |
| 839 | +const ( | |
| 840 | + TeamPrivacyVisible TeamPrivacy = "visible" | |
| 841 | + TeamPrivacySecret TeamPrivacy = "secret" | |
| 842 | +) | |
| 843 | + | |
| 844 | +func (e *TeamPrivacy) Scan(src interface{}) error { | |
| 845 | + switch s := src.(type) { | |
| 846 | + case []byte: | |
| 847 | + *e = TeamPrivacy(s) | |
| 848 | + case string: | |
| 849 | + *e = TeamPrivacy(s) | |
| 850 | + default: | |
| 851 | + return fmt.Errorf("unsupported scan type for TeamPrivacy: %T", src) | |
| 852 | + } | |
| 853 | + return nil | |
| 854 | +} | |
| 855 | + | |
| 856 | +type NullTeamPrivacy struct { | |
| 857 | + TeamPrivacy TeamPrivacy | |
| 858 | + Valid bool // Valid is true if TeamPrivacy is not NULL | |
| 859 | +} | |
| 860 | + | |
| 861 | +// Scan implements the Scanner interface. | |
| 862 | +func (ns *NullTeamPrivacy) Scan(value interface{}) error { | |
| 863 | + if value == nil { | |
| 864 | + ns.TeamPrivacy, ns.Valid = "", false | |
| 865 | + return nil | |
| 866 | + } | |
| 867 | + ns.Valid = true | |
| 868 | + return ns.TeamPrivacy.Scan(value) | |
| 869 | +} | |
| 870 | + | |
| 871 | +// Value implements the driver Valuer interface. | |
| 872 | +func (ns NullTeamPrivacy) Value() (driver.Value, error) { | |
| 873 | + if !ns.Valid { | |
| 874 | + return nil, nil | |
| 875 | + } | |
| 876 | + return string(ns.TeamPrivacy), nil | |
| 877 | +} | |
| 878 | + | |
| 879 | +type TeamRepoRole string | |
| 880 | + | |
| 881 | +const ( | |
| 882 | + TeamRepoRoleRead TeamRepoRole = "read" | |
| 883 | + TeamRepoRoleTriage TeamRepoRole = "triage" | |
| 884 | + TeamRepoRoleWrite TeamRepoRole = "write" | |
| 885 | + TeamRepoRoleMaintain TeamRepoRole = "maintain" | |
| 886 | + TeamRepoRoleAdmin TeamRepoRole = "admin" | |
| 887 | +) | |
| 888 | + | |
| 889 | +func (e *TeamRepoRole) Scan(src interface{}) error { | |
| 890 | + switch s := src.(type) { | |
| 891 | + case []byte: | |
| 892 | + *e = TeamRepoRole(s) | |
| 893 | + case string: | |
| 894 | + *e = TeamRepoRole(s) | |
| 895 | + default: | |
| 896 | + return fmt.Errorf("unsupported scan type for TeamRepoRole: %T", src) | |
| 897 | + } | |
| 898 | + return nil | |
| 899 | +} | |
| 900 | + | |
| 901 | +type NullTeamRepoRole struct { | |
| 902 | + TeamRepoRole TeamRepoRole | |
| 903 | + Valid bool // Valid is true if TeamRepoRole is not NULL | |
| 904 | +} | |
| 905 | + | |
| 906 | +// Scan implements the Scanner interface. | |
| 907 | +func (ns *NullTeamRepoRole) Scan(value interface{}) error { | |
| 908 | + if value == nil { | |
| 909 | + ns.TeamRepoRole, ns.Valid = "", false | |
| 910 | + return nil | |
| 911 | + } | |
| 912 | + ns.Valid = true | |
| 913 | + return ns.TeamRepoRole.Scan(value) | |
| 914 | +} | |
| 915 | + | |
| 916 | +// Value implements the driver Valuer interface. | |
| 917 | +func (ns NullTeamRepoRole) Value() (driver.Value, error) { | |
| 918 | + if !ns.Valid { | |
| 919 | + return nil, nil | |
| 920 | + } | |
| 921 | + return string(ns.TeamRepoRole), nil | |
| 922 | +} | |
| 923 | + | |
| 924 | +type TeamRole string | |
| 925 | + | |
| 926 | +const ( | |
| 927 | + TeamRoleMember TeamRole = "member" | |
| 928 | + TeamRoleMaintainer TeamRole = "maintainer" | |
| 929 | +) | |
| 930 | + | |
| 931 | +func (e *TeamRole) Scan(src interface{}) error { | |
| 932 | + switch s := src.(type) { | |
| 933 | + case []byte: | |
| 934 | + *e = TeamRole(s) | |
| 935 | + case string: | |
| 936 | + *e = TeamRole(s) | |
| 937 | + default: | |
| 938 | + return fmt.Errorf("unsupported scan type for TeamRole: %T", src) | |
| 939 | + } | |
| 940 | + return nil | |
| 941 | +} | |
| 942 | + | |
| 943 | +type NullTeamRole struct { | |
| 944 | + TeamRole TeamRole | |
| 945 | + Valid bool // Valid is true if TeamRole is not NULL | |
| 946 | +} | |
| 947 | + | |
| 948 | +// Scan implements the Scanner interface. | |
| 949 | +func (ns *NullTeamRole) Scan(value interface{}) error { | |
| 950 | + if value == nil { | |
| 951 | + ns.TeamRole, ns.Valid = "", false | |
| 952 | + return nil | |
| 953 | + } | |
| 954 | + ns.Valid = true | |
| 955 | + return ns.TeamRole.Scan(value) | |
| 956 | +} | |
| 957 | + | |
| 958 | +// Value implements the driver Valuer interface. | |
| 959 | +func (ns NullTeamRole) Value() (driver.Value, error) { | |
| 960 | + if !ns.Valid { | |
| 961 | + return nil, nil | |
| 962 | + } | |
| 963 | + return string(ns.TeamRole), nil | |
| 964 | +} | |
| 965 | + | |
| 837 | 966 | type TransferPrincipalKind string |
| 838 | 967 | |
| 839 | 968 | const ( |
@@ -1435,6 +1564,12 @@ type RepoRedirect struct { | ||
| 1435 | 1564 | RedirectedAt pgtype.Timestamptz |
| 1436 | 1565 | } |
| 1437 | 1566 | |
| 1567 | +type RepoTopic struct { | |
| 1568 | + RepoID int64 | |
| 1569 | + Topic string | |
| 1570 | + CreatedAt pgtype.Timestamptz | |
| 1571 | +} | |
| 1572 | + | |
| 1438 | 1573 | type RepoTransferRequest struct { |
| 1439 | 1574 | ID int64 |
| 1440 | 1575 | RepoID int64 |
@@ -1461,6 +1596,35 @@ type Star struct { | ||
| 1461 | 1596 | StarredAt pgtype.Timestamptz |
| 1462 | 1597 | } |
| 1463 | 1598 | |
| 1599 | +type Team struct { | |
| 1600 | + ID int64 | |
| 1601 | + OrgID int64 | |
| 1602 | + Slug string | |
| 1603 | + DisplayName string | |
| 1604 | + Description string | |
| 1605 | + ParentTeamID pgtype.Int8 | |
| 1606 | + Privacy TeamPrivacy | |
| 1607 | + CreatedByUserID pgtype.Int8 | |
| 1608 | + CreatedAt pgtype.Timestamptz | |
| 1609 | + UpdatedAt pgtype.Timestamptz | |
| 1610 | +} | |
| 1611 | + | |
| 1612 | +type TeamMember struct { | |
| 1613 | + TeamID int64 | |
| 1614 | + UserID int64 | |
| 1615 | + Role TeamRole | |
| 1616 | + AddedByUserID pgtype.Int8 | |
| 1617 | + AddedAt pgtype.Timestamptz | |
| 1618 | +} | |
| 1619 | + | |
| 1620 | +type TeamRepoAccess struct { | |
| 1621 | + TeamID int64 | |
| 1622 | + RepoID int64 | |
| 1623 | + Role TeamRepoRole | |
| 1624 | + AddedByUserID pgtype.Int8 | |
| 1625 | + AddedAt pgtype.Timestamptz | |
| 1626 | +} | |
| 1627 | + | |
| 1464 | 1628 | type User struct { |
| 1465 | 1629 | ID int64 |
| 1466 | 1630 | Username string |
internal/orgs/sqlc/models.gomodified@@ -1564,6 +1564,12 @@ type RepoRedirect struct { | ||
| 1564 | 1564 | RedirectedAt pgtype.Timestamptz |
| 1565 | 1565 | } |
| 1566 | 1566 | |
| 1567 | +type RepoTopic struct { | |
| 1568 | + RepoID int64 | |
| 1569 | + Topic string | |
| 1570 | + CreatedAt pgtype.Timestamptz | |
| 1571 | +} | |
| 1572 | + | |
| 1567 | 1573 | type RepoTransferRequest struct { |
| 1568 | 1574 | ID int64 |
| 1569 | 1575 | RepoID int64 |
internal/pulls/sqlc/models.gomodified@@ -834,6 +834,135 @@ func (ns NullRepoVisibility) Value() (driver.Value, error) { | ||
| 834 | 834 | return string(ns.RepoVisibility), nil |
| 835 | 835 | } |
| 836 | 836 | |
| 837 | +type TeamPrivacy string | |
| 838 | + | |
| 839 | +const ( | |
| 840 | + TeamPrivacyVisible TeamPrivacy = "visible" | |
| 841 | + TeamPrivacySecret TeamPrivacy = "secret" | |
| 842 | +) | |
| 843 | + | |
| 844 | +func (e *TeamPrivacy) Scan(src interface{}) error { | |
| 845 | + switch s := src.(type) { | |
| 846 | + case []byte: | |
| 847 | + *e = TeamPrivacy(s) | |
| 848 | + case string: | |
| 849 | + *e = TeamPrivacy(s) | |
| 850 | + default: | |
| 851 | + return fmt.Errorf("unsupported scan type for TeamPrivacy: %T", src) | |
| 852 | + } | |
| 853 | + return nil | |
| 854 | +} | |
| 855 | + | |
| 856 | +type NullTeamPrivacy struct { | |
| 857 | + TeamPrivacy TeamPrivacy | |
| 858 | + Valid bool // Valid is true if TeamPrivacy is not NULL | |
| 859 | +} | |
| 860 | + | |
| 861 | +// Scan implements the Scanner interface. | |
| 862 | +func (ns *NullTeamPrivacy) Scan(value interface{}) error { | |
| 863 | + if value == nil { | |
| 864 | + ns.TeamPrivacy, ns.Valid = "", false | |
| 865 | + return nil | |
| 866 | + } | |
| 867 | + ns.Valid = true | |
| 868 | + return ns.TeamPrivacy.Scan(value) | |
| 869 | +} | |
| 870 | + | |
| 871 | +// Value implements the driver Valuer interface. | |
| 872 | +func (ns NullTeamPrivacy) Value() (driver.Value, error) { | |
| 873 | + if !ns.Valid { | |
| 874 | + return nil, nil | |
| 875 | + } | |
| 876 | + return string(ns.TeamPrivacy), nil | |
| 877 | +} | |
| 878 | + | |
| 879 | +type TeamRepoRole string | |
| 880 | + | |
| 881 | +const ( | |
| 882 | + TeamRepoRoleRead TeamRepoRole = "read" | |
| 883 | + TeamRepoRoleTriage TeamRepoRole = "triage" | |
| 884 | + TeamRepoRoleWrite TeamRepoRole = "write" | |
| 885 | + TeamRepoRoleMaintain TeamRepoRole = "maintain" | |
| 886 | + TeamRepoRoleAdmin TeamRepoRole = "admin" | |
| 887 | +) | |
| 888 | + | |
| 889 | +func (e *TeamRepoRole) Scan(src interface{}) error { | |
| 890 | + switch s := src.(type) { | |
| 891 | + case []byte: | |
| 892 | + *e = TeamRepoRole(s) | |
| 893 | + case string: | |
| 894 | + *e = TeamRepoRole(s) | |
| 895 | + default: | |
| 896 | + return fmt.Errorf("unsupported scan type for TeamRepoRole: %T", src) | |
| 897 | + } | |
| 898 | + return nil | |
| 899 | +} | |
| 900 | + | |
| 901 | +type NullTeamRepoRole struct { | |
| 902 | + TeamRepoRole TeamRepoRole | |
| 903 | + Valid bool // Valid is true if TeamRepoRole is not NULL | |
| 904 | +} | |
| 905 | + | |
| 906 | +// Scan implements the Scanner interface. | |
| 907 | +func (ns *NullTeamRepoRole) Scan(value interface{}) error { | |
| 908 | + if value == nil { | |
| 909 | + ns.TeamRepoRole, ns.Valid = "", false | |
| 910 | + return nil | |
| 911 | + } | |
| 912 | + ns.Valid = true | |
| 913 | + return ns.TeamRepoRole.Scan(value) | |
| 914 | +} | |
| 915 | + | |
| 916 | +// Value implements the driver Valuer interface. | |
| 917 | +func (ns NullTeamRepoRole) Value() (driver.Value, error) { | |
| 918 | + if !ns.Valid { | |
| 919 | + return nil, nil | |
| 920 | + } | |
| 921 | + return string(ns.TeamRepoRole), nil | |
| 922 | +} | |
| 923 | + | |
| 924 | +type TeamRole string | |
| 925 | + | |
| 926 | +const ( | |
| 927 | + TeamRoleMember TeamRole = "member" | |
| 928 | + TeamRoleMaintainer TeamRole = "maintainer" | |
| 929 | +) | |
| 930 | + | |
| 931 | +func (e *TeamRole) Scan(src interface{}) error { | |
| 932 | + switch s := src.(type) { | |
| 933 | + case []byte: | |
| 934 | + *e = TeamRole(s) | |
| 935 | + case string: | |
| 936 | + *e = TeamRole(s) | |
| 937 | + default: | |
| 938 | + return fmt.Errorf("unsupported scan type for TeamRole: %T", src) | |
| 939 | + } | |
| 940 | + return nil | |
| 941 | +} | |
| 942 | + | |
| 943 | +type NullTeamRole struct { | |
| 944 | + TeamRole TeamRole | |
| 945 | + Valid bool // Valid is true if TeamRole is not NULL | |
| 946 | +} | |
| 947 | + | |
| 948 | +// Scan implements the Scanner interface. | |
| 949 | +func (ns *NullTeamRole) Scan(value interface{}) error { | |
| 950 | + if value == nil { | |
| 951 | + ns.TeamRole, ns.Valid = "", false | |
| 952 | + return nil | |
| 953 | + } | |
| 954 | + ns.Valid = true | |
| 955 | + return ns.TeamRole.Scan(value) | |
| 956 | +} | |
| 957 | + | |
| 958 | +// Value implements the driver Valuer interface. | |
| 959 | +func (ns NullTeamRole) Value() (driver.Value, error) { | |
| 960 | + if !ns.Valid { | |
| 961 | + return nil, nil | |
| 962 | + } | |
| 963 | + return string(ns.TeamRole), nil | |
| 964 | +} | |
| 965 | + | |
| 837 | 966 | type TransferPrincipalKind string |
| 838 | 967 | |
| 839 | 968 | const ( |
@@ -1435,6 +1564,12 @@ type RepoRedirect struct { | ||
| 1435 | 1564 | RedirectedAt pgtype.Timestamptz |
| 1436 | 1565 | } |
| 1437 | 1566 | |
| 1567 | +type RepoTopic struct { | |
| 1568 | + RepoID int64 | |
| 1569 | + Topic string | |
| 1570 | + CreatedAt pgtype.Timestamptz | |
| 1571 | +} | |
| 1572 | + | |
| 1438 | 1573 | type RepoTransferRequest struct { |
| 1439 | 1574 | ID int64 |
| 1440 | 1575 | RepoID int64 |
@@ -1461,6 +1596,35 @@ type Star struct { | ||
| 1461 | 1596 | StarredAt pgtype.Timestamptz |
| 1462 | 1597 | } |
| 1463 | 1598 | |
| 1599 | +type Team struct { | |
| 1600 | + ID int64 | |
| 1601 | + OrgID int64 | |
| 1602 | + Slug string | |
| 1603 | + DisplayName string | |
| 1604 | + Description string | |
| 1605 | + ParentTeamID pgtype.Int8 | |
| 1606 | + Privacy TeamPrivacy | |
| 1607 | + CreatedByUserID pgtype.Int8 | |
| 1608 | + CreatedAt pgtype.Timestamptz | |
| 1609 | + UpdatedAt pgtype.Timestamptz | |
| 1610 | +} | |
| 1611 | + | |
| 1612 | +type TeamMember struct { | |
| 1613 | + TeamID int64 | |
| 1614 | + UserID int64 | |
| 1615 | + Role TeamRole | |
| 1616 | + AddedByUserID pgtype.Int8 | |
| 1617 | + AddedAt pgtype.Timestamptz | |
| 1618 | +} | |
| 1619 | + | |
| 1620 | +type TeamRepoAccess struct { | |
| 1621 | + TeamID int64 | |
| 1622 | + RepoID int64 | |
| 1623 | + Role TeamRepoRole | |
| 1624 | + AddedByUserID pgtype.Int8 | |
| 1625 | + AddedAt pgtype.Timestamptz | |
| 1626 | +} | |
| 1627 | + | |
| 1464 | 1628 | type User struct { |
| 1465 | 1629 | ID int64 |
| 1466 | 1630 | Username string |
internal/users/sqlc/models.gomodified@@ -834,6 +834,135 @@ func (ns NullRepoVisibility) Value() (driver.Value, error) { | ||
| 834 | 834 | return string(ns.RepoVisibility), nil |
| 835 | 835 | } |
| 836 | 836 | |
| 837 | +type TeamPrivacy string | |
| 838 | + | |
| 839 | +const ( | |
| 840 | + TeamPrivacyVisible TeamPrivacy = "visible" | |
| 841 | + TeamPrivacySecret TeamPrivacy = "secret" | |
| 842 | +) | |
| 843 | + | |
| 844 | +func (e *TeamPrivacy) Scan(src interface{}) error { | |
| 845 | + switch s := src.(type) { | |
| 846 | + case []byte: | |
| 847 | + *e = TeamPrivacy(s) | |
| 848 | + case string: | |
| 849 | + *e = TeamPrivacy(s) | |
| 850 | + default: | |
| 851 | + return fmt.Errorf("unsupported scan type for TeamPrivacy: %T", src) | |
| 852 | + } | |
| 853 | + return nil | |
| 854 | +} | |
| 855 | + | |
| 856 | +type NullTeamPrivacy struct { | |
| 857 | + TeamPrivacy TeamPrivacy | |
| 858 | + Valid bool // Valid is true if TeamPrivacy is not NULL | |
| 859 | +} | |
| 860 | + | |
| 861 | +// Scan implements the Scanner interface. | |
| 862 | +func (ns *NullTeamPrivacy) Scan(value interface{}) error { | |
| 863 | + if value == nil { | |
| 864 | + ns.TeamPrivacy, ns.Valid = "", false | |
| 865 | + return nil | |
| 866 | + } | |
| 867 | + ns.Valid = true | |
| 868 | + return ns.TeamPrivacy.Scan(value) | |
| 869 | +} | |
| 870 | + | |
| 871 | +// Value implements the driver Valuer interface. | |
| 872 | +func (ns NullTeamPrivacy) Value() (driver.Value, error) { | |
| 873 | + if !ns.Valid { | |
| 874 | + return nil, nil | |
| 875 | + } | |
| 876 | + return string(ns.TeamPrivacy), nil | |
| 877 | +} | |
| 878 | + | |
| 879 | +type TeamRepoRole string | |
| 880 | + | |
| 881 | +const ( | |
| 882 | + TeamRepoRoleRead TeamRepoRole = "read" | |
| 883 | + TeamRepoRoleTriage TeamRepoRole = "triage" | |
| 884 | + TeamRepoRoleWrite TeamRepoRole = "write" | |
| 885 | + TeamRepoRoleMaintain TeamRepoRole = "maintain" | |
| 886 | + TeamRepoRoleAdmin TeamRepoRole = "admin" | |
| 887 | +) | |
| 888 | + | |
| 889 | +func (e *TeamRepoRole) Scan(src interface{}) error { | |
| 890 | + switch s := src.(type) { | |
| 891 | + case []byte: | |
| 892 | + *e = TeamRepoRole(s) | |
| 893 | + case string: | |
| 894 | + *e = TeamRepoRole(s) | |
| 895 | + default: | |
| 896 | + return fmt.Errorf("unsupported scan type for TeamRepoRole: %T", src) | |
| 897 | + } | |
| 898 | + return nil | |
| 899 | +} | |
| 900 | + | |
| 901 | +type NullTeamRepoRole struct { | |
| 902 | + TeamRepoRole TeamRepoRole | |
| 903 | + Valid bool // Valid is true if TeamRepoRole is not NULL | |
| 904 | +} | |
| 905 | + | |
| 906 | +// Scan implements the Scanner interface. | |
| 907 | +func (ns *NullTeamRepoRole) Scan(value interface{}) error { | |
| 908 | + if value == nil { | |
| 909 | + ns.TeamRepoRole, ns.Valid = "", false | |
| 910 | + return nil | |
| 911 | + } | |
| 912 | + ns.Valid = true | |
| 913 | + return ns.TeamRepoRole.Scan(value) | |
| 914 | +} | |
| 915 | + | |
| 916 | +// Value implements the driver Valuer interface. | |
| 917 | +func (ns NullTeamRepoRole) Value() (driver.Value, error) { | |
| 918 | + if !ns.Valid { | |
| 919 | + return nil, nil | |
| 920 | + } | |
| 921 | + return string(ns.TeamRepoRole), nil | |
| 922 | +} | |
| 923 | + | |
| 924 | +type TeamRole string | |
| 925 | + | |
| 926 | +const ( | |
| 927 | + TeamRoleMember TeamRole = "member" | |
| 928 | + TeamRoleMaintainer TeamRole = "maintainer" | |
| 929 | +) | |
| 930 | + | |
| 931 | +func (e *TeamRole) Scan(src interface{}) error { | |
| 932 | + switch s := src.(type) { | |
| 933 | + case []byte: | |
| 934 | + *e = TeamRole(s) | |
| 935 | + case string: | |
| 936 | + *e = TeamRole(s) | |
| 937 | + default: | |
| 938 | + return fmt.Errorf("unsupported scan type for TeamRole: %T", src) | |
| 939 | + } | |
| 940 | + return nil | |
| 941 | +} | |
| 942 | + | |
| 943 | +type NullTeamRole struct { | |
| 944 | + TeamRole TeamRole | |
| 945 | + Valid bool // Valid is true if TeamRole is not NULL | |
| 946 | +} | |
| 947 | + | |
| 948 | +// Scan implements the Scanner interface. | |
| 949 | +func (ns *NullTeamRole) Scan(value interface{}) error { | |
| 950 | + if value == nil { | |
| 951 | + ns.TeamRole, ns.Valid = "", false | |
| 952 | + return nil | |
| 953 | + } | |
| 954 | + ns.Valid = true | |
| 955 | + return ns.TeamRole.Scan(value) | |
| 956 | +} | |
| 957 | + | |
| 958 | +// Value implements the driver Valuer interface. | |
| 959 | +func (ns NullTeamRole) Value() (driver.Value, error) { | |
| 960 | + if !ns.Valid { | |
| 961 | + return nil, nil | |
| 962 | + } | |
| 963 | + return string(ns.TeamRole), nil | |
| 964 | +} | |
| 965 | + | |
| 837 | 966 | type TransferPrincipalKind string |
| 838 | 967 | |
| 839 | 968 | const ( |
@@ -1435,6 +1564,12 @@ type RepoRedirect struct { | ||
| 1435 | 1564 | RedirectedAt pgtype.Timestamptz |
| 1436 | 1565 | } |
| 1437 | 1566 | |
| 1567 | +type RepoTopic struct { | |
| 1568 | + RepoID int64 | |
| 1569 | + Topic string | |
| 1570 | + CreatedAt pgtype.Timestamptz | |
| 1571 | +} | |
| 1572 | + | |
| 1438 | 1573 | type RepoTransferRequest struct { |
| 1439 | 1574 | ID int64 |
| 1440 | 1575 | RepoID int64 |
@@ -1461,6 +1596,35 @@ type Star struct { | ||
| 1461 | 1596 | StarredAt pgtype.Timestamptz |
| 1462 | 1597 | } |
| 1463 | 1598 | |
| 1599 | +type Team struct { | |
| 1600 | + ID int64 | |
| 1601 | + OrgID int64 | |
| 1602 | + Slug string | |
| 1603 | + DisplayName string | |
| 1604 | + Description string | |
| 1605 | + ParentTeamID pgtype.Int8 | |
| 1606 | + Privacy TeamPrivacy | |
| 1607 | + CreatedByUserID pgtype.Int8 | |
| 1608 | + CreatedAt pgtype.Timestamptz | |
| 1609 | + UpdatedAt pgtype.Timestamptz | |
| 1610 | +} | |
| 1611 | + | |
| 1612 | +type TeamMember struct { | |
| 1613 | + TeamID int64 | |
| 1614 | + UserID int64 | |
| 1615 | + Role TeamRole | |
| 1616 | + AddedByUserID pgtype.Int8 | |
| 1617 | + AddedAt pgtype.Timestamptz | |
| 1618 | +} | |
| 1619 | + | |
| 1620 | +type TeamRepoAccess struct { | |
| 1621 | + TeamID int64 | |
| 1622 | + RepoID int64 | |
| 1623 | + Role TeamRepoRole | |
| 1624 | + AddedByUserID pgtype.Int8 | |
| 1625 | + AddedAt pgtype.Timestamptz | |
| 1626 | +} | |
| 1627 | + | |
| 1464 | 1628 | type User struct { |
| 1465 | 1629 | ID int64 |
| 1466 | 1630 | Username string |
internal/worker/sqlc/models.gomodified@@ -834,6 +834,135 @@ func (ns NullRepoVisibility) Value() (driver.Value, error) { | ||
| 834 | 834 | return string(ns.RepoVisibility), nil |
| 835 | 835 | } |
| 836 | 836 | |
| 837 | +type TeamPrivacy string | |
| 838 | + | |
| 839 | +const ( | |
| 840 | + TeamPrivacyVisible TeamPrivacy = "visible" | |
| 841 | + TeamPrivacySecret TeamPrivacy = "secret" | |
| 842 | +) | |
| 843 | + | |
| 844 | +func (e *TeamPrivacy) Scan(src interface{}) error { | |
| 845 | + switch s := src.(type) { | |
| 846 | + case []byte: | |
| 847 | + *e = TeamPrivacy(s) | |
| 848 | + case string: | |
| 849 | + *e = TeamPrivacy(s) | |
| 850 | + default: | |
| 851 | + return fmt.Errorf("unsupported scan type for TeamPrivacy: %T", src) | |
| 852 | + } | |
| 853 | + return nil | |
| 854 | +} | |
| 855 | + | |
| 856 | +type NullTeamPrivacy struct { | |
| 857 | + TeamPrivacy TeamPrivacy | |
| 858 | + Valid bool // Valid is true if TeamPrivacy is not NULL | |
| 859 | +} | |
| 860 | + | |
| 861 | +// Scan implements the Scanner interface. | |
| 862 | +func (ns *NullTeamPrivacy) Scan(value interface{}) error { | |
| 863 | + if value == nil { | |
| 864 | + ns.TeamPrivacy, ns.Valid = "", false | |
| 865 | + return nil | |
| 866 | + } | |
| 867 | + ns.Valid = true | |
| 868 | + return ns.TeamPrivacy.Scan(value) | |
| 869 | +} | |
| 870 | + | |
| 871 | +// Value implements the driver Valuer interface. | |
| 872 | +func (ns NullTeamPrivacy) Value() (driver.Value, error) { | |
| 873 | + if !ns.Valid { | |
| 874 | + return nil, nil | |
| 875 | + } | |
| 876 | + return string(ns.TeamPrivacy), nil | |
| 877 | +} | |
| 878 | + | |
| 879 | +type TeamRepoRole string | |
| 880 | + | |
| 881 | +const ( | |
| 882 | + TeamRepoRoleRead TeamRepoRole = "read" | |
| 883 | + TeamRepoRoleTriage TeamRepoRole = "triage" | |
| 884 | + TeamRepoRoleWrite TeamRepoRole = "write" | |
| 885 | + TeamRepoRoleMaintain TeamRepoRole = "maintain" | |
| 886 | + TeamRepoRoleAdmin TeamRepoRole = "admin" | |
| 887 | +) | |
| 888 | + | |
| 889 | +func (e *TeamRepoRole) Scan(src interface{}) error { | |
| 890 | + switch s := src.(type) { | |
| 891 | + case []byte: | |
| 892 | + *e = TeamRepoRole(s) | |
| 893 | + case string: | |
| 894 | + *e = TeamRepoRole(s) | |
| 895 | + default: | |
| 896 | + return fmt.Errorf("unsupported scan type for TeamRepoRole: %T", src) | |
| 897 | + } | |
| 898 | + return nil | |
| 899 | +} | |
| 900 | + | |
| 901 | +type NullTeamRepoRole struct { | |
| 902 | + TeamRepoRole TeamRepoRole | |
| 903 | + Valid bool // Valid is true if TeamRepoRole is not NULL | |
| 904 | +} | |
| 905 | + | |
| 906 | +// Scan implements the Scanner interface. | |
| 907 | +func (ns *NullTeamRepoRole) Scan(value interface{}) error { | |
| 908 | + if value == nil { | |
| 909 | + ns.TeamRepoRole, ns.Valid = "", false | |
| 910 | + return nil | |
| 911 | + } | |
| 912 | + ns.Valid = true | |
| 913 | + return ns.TeamRepoRole.Scan(value) | |
| 914 | +} | |
| 915 | + | |
| 916 | +// Value implements the driver Valuer interface. | |
| 917 | +func (ns NullTeamRepoRole) Value() (driver.Value, error) { | |
| 918 | + if !ns.Valid { | |
| 919 | + return nil, nil | |
| 920 | + } | |
| 921 | + return string(ns.TeamRepoRole), nil | |
| 922 | +} | |
| 923 | + | |
| 924 | +type TeamRole string | |
| 925 | + | |
| 926 | +const ( | |
| 927 | + TeamRoleMember TeamRole = "member" | |
| 928 | + TeamRoleMaintainer TeamRole = "maintainer" | |
| 929 | +) | |
| 930 | + | |
| 931 | +func (e *TeamRole) Scan(src interface{}) error { | |
| 932 | + switch s := src.(type) { | |
| 933 | + case []byte: | |
| 934 | + *e = TeamRole(s) | |
| 935 | + case string: | |
| 936 | + *e = TeamRole(s) | |
| 937 | + default: | |
| 938 | + return fmt.Errorf("unsupported scan type for TeamRole: %T", src) | |
| 939 | + } | |
| 940 | + return nil | |
| 941 | +} | |
| 942 | + | |
| 943 | +type NullTeamRole struct { | |
| 944 | + TeamRole TeamRole | |
| 945 | + Valid bool // Valid is true if TeamRole is not NULL | |
| 946 | +} | |
| 947 | + | |
| 948 | +// Scan implements the Scanner interface. | |
| 949 | +func (ns *NullTeamRole) Scan(value interface{}) error { | |
| 950 | + if value == nil { | |
| 951 | + ns.TeamRole, ns.Valid = "", false | |
| 952 | + return nil | |
| 953 | + } | |
| 954 | + ns.Valid = true | |
| 955 | + return ns.TeamRole.Scan(value) | |
| 956 | +} | |
| 957 | + | |
| 958 | +// Value implements the driver Valuer interface. | |
| 959 | +func (ns NullTeamRole) Value() (driver.Value, error) { | |
| 960 | + if !ns.Valid { | |
| 961 | + return nil, nil | |
| 962 | + } | |
| 963 | + return string(ns.TeamRole), nil | |
| 964 | +} | |
| 965 | + | |
| 837 | 966 | type TransferPrincipalKind string |
| 838 | 967 | |
| 839 | 968 | const ( |
@@ -1435,6 +1564,12 @@ type RepoRedirect struct { | ||
| 1435 | 1564 | RedirectedAt pgtype.Timestamptz |
| 1436 | 1565 | } |
| 1437 | 1566 | |
| 1567 | +type RepoTopic struct { | |
| 1568 | + RepoID int64 | |
| 1569 | + Topic string | |
| 1570 | + CreatedAt pgtype.Timestamptz | |
| 1571 | +} | |
| 1572 | + | |
| 1438 | 1573 | type RepoTransferRequest struct { |
| 1439 | 1574 | ID int64 |
| 1440 | 1575 | RepoID int64 |
@@ -1461,6 +1596,35 @@ type Star struct { | ||
| 1461 | 1596 | StarredAt pgtype.Timestamptz |
| 1462 | 1597 | } |
| 1463 | 1598 | |
| 1599 | +type Team struct { | |
| 1600 | + ID int64 | |
| 1601 | + OrgID int64 | |
| 1602 | + Slug string | |
| 1603 | + DisplayName string | |
| 1604 | + Description string | |
| 1605 | + ParentTeamID pgtype.Int8 | |
| 1606 | + Privacy TeamPrivacy | |
| 1607 | + CreatedByUserID pgtype.Int8 | |
| 1608 | + CreatedAt pgtype.Timestamptz | |
| 1609 | + UpdatedAt pgtype.Timestamptz | |
| 1610 | +} | |
| 1611 | + | |
| 1612 | +type TeamMember struct { | |
| 1613 | + TeamID int64 | |
| 1614 | + UserID int64 | |
| 1615 | + Role TeamRole | |
| 1616 | + AddedByUserID pgtype.Int8 | |
| 1617 | + AddedAt pgtype.Timestamptz | |
| 1618 | +} | |
| 1619 | + | |
| 1620 | +type TeamRepoAccess struct { | |
| 1621 | + TeamID int64 | |
| 1622 | + RepoID int64 | |
| 1623 | + Role TeamRepoRole | |
| 1624 | + AddedByUserID pgtype.Int8 | |
| 1625 | + AddedAt pgtype.Timestamptz | |
| 1626 | +} | |
| 1627 | + | |
| 1464 | 1628 | type User struct { |
| 1465 | 1629 | ID int64 |
| 1466 | 1630 | Username string |