Add service account people kind
Signed-off-by: gearnode <bryan@frimin.fr>
This commit is contained in:
1
pkg/coredata/migrations/20250316T183600Z.sql
Normal file
1
pkg/coredata/migrations/20250316T183600Z.sql
Normal file
@@ -0,0 +1 @@
|
||||
ALTER TYPE people_kind ADD VALUE 'SERVICE_ACCOUNT';
|
||||
@@ -26,6 +26,7 @@ type (
|
||||
const (
|
||||
PeopleKindEmployee PeopleKind = iota
|
||||
PeopleKindContractor
|
||||
PeopleKindServiceAccount
|
||||
)
|
||||
|
||||
func (ps PeopleKind) MarshalText() ([]byte, error) {
|
||||
@@ -40,6 +41,8 @@ func (ps *PeopleKind) UnmarshalText(data []byte) error {
|
||||
*ps = PeopleKindEmployee
|
||||
case PeopleKindContractor.String():
|
||||
*ps = PeopleKindContractor
|
||||
case PeopleKindServiceAccount.String():
|
||||
*ps = PeopleKindServiceAccount
|
||||
default:
|
||||
return fmt.Errorf("invalid PeopleKind value: %q", val)
|
||||
}
|
||||
@@ -55,6 +58,8 @@ func (ts PeopleKind) String() string {
|
||||
val = "EMPLOYEE"
|
||||
case PeopleKindContractor:
|
||||
val = "CONTRACTOR"
|
||||
case PeopleKindServiceAccount:
|
||||
val = "SERVICE_ACCOUNT"
|
||||
}
|
||||
|
||||
return val
|
||||
|
||||
@@ -69,6 +69,10 @@ enum PeopleKind
|
||||
@goEnum(
|
||||
value: "github.com/getprobo/probo/pkg/coredata.PeopleKindContractor"
|
||||
)
|
||||
SERVICE_ACCOUNT
|
||||
@goEnum(
|
||||
value: "github.com/getprobo/probo/pkg/coredata.PeopleKindServiceAccount"
|
||||
)
|
||||
}
|
||||
|
||||
enum ControlImportance
|
||||
|
||||
@@ -2151,6 +2151,10 @@ enum PeopleKind
|
||||
@goEnum(
|
||||
value: "github.com/getprobo/probo/pkg/coredata.PeopleKindContractor"
|
||||
)
|
||||
SERVICE_ACCOUNT
|
||||
@goEnum(
|
||||
value: "github.com/getprobo/probo/pkg/coredata.PeopleKindServiceAccount"
|
||||
)
|
||||
}
|
||||
|
||||
enum ControlImportance
|
||||
@@ -19793,12 +19797,14 @@ func (ec *executionContext) marshalNPeopleKind2githubᚗcomᚋgetproboᚋprobo
|
||||
|
||||
var (
|
||||
unmarshalNPeopleKind2githubᚗcomᚋgetproboᚋproboᚋpkgᚋcoredataᚐPeopleKind = map[string]coredata.PeopleKind{
|
||||
"EMPLOYEE": coredata.PeopleKindEmployee,
|
||||
"CONTRACTOR": coredata.PeopleKindContractor,
|
||||
"EMPLOYEE": coredata.PeopleKindEmployee,
|
||||
"CONTRACTOR": coredata.PeopleKindContractor,
|
||||
"SERVICE_ACCOUNT": coredata.PeopleKindServiceAccount,
|
||||
}
|
||||
marshalNPeopleKind2githubᚗcomᚋgetproboᚋproboᚋpkgᚋcoredataᚐPeopleKind = map[coredata.PeopleKind]string{
|
||||
coredata.PeopleKindEmployee: "EMPLOYEE",
|
||||
coredata.PeopleKindContractor: "CONTRACTOR",
|
||||
coredata.PeopleKindEmployee: "EMPLOYEE",
|
||||
coredata.PeopleKindContractor: "CONTRACTOR",
|
||||
coredata.PeopleKindServiceAccount: "SERVICE_ACCOUNT",
|
||||
}
|
||||
)
|
||||
|
||||
@@ -20891,12 +20897,14 @@ func (ec *executionContext) marshalOPeopleKind2ᚖgithubᚗcomᚋgetproboᚋprob
|
||||
|
||||
var (
|
||||
unmarshalOPeopleKind2ᚖgithubᚗcomᚋgetproboᚋproboᚋpkgᚋcoredataᚐPeopleKind = map[string]coredata.PeopleKind{
|
||||
"EMPLOYEE": coredata.PeopleKindEmployee,
|
||||
"CONTRACTOR": coredata.PeopleKindContractor,
|
||||
"EMPLOYEE": coredata.PeopleKindEmployee,
|
||||
"CONTRACTOR": coredata.PeopleKindContractor,
|
||||
"SERVICE_ACCOUNT": coredata.PeopleKindServiceAccount,
|
||||
}
|
||||
marshalOPeopleKind2ᚖgithubᚗcomᚋgetproboᚋproboᚋpkgᚋcoredataᚐPeopleKind = map[coredata.PeopleKind]string{
|
||||
coredata.PeopleKindEmployee: "EMPLOYEE",
|
||||
coredata.PeopleKindContractor: "CONTRACTOR",
|
||||
coredata.PeopleKindEmployee: "EMPLOYEE",
|
||||
coredata.PeopleKindContractor: "CONTRACTOR",
|
||||
coredata.PeopleKindServiceAccount: "SERVICE_ACCOUNT",
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user