Add service account people kind

Signed-off-by: gearnode <bryan@frimin.fr>
This commit is contained in:
gearnode
2025-03-16 18:43:58 +01:00
parent 34ef38a0eb
commit 257ea563a9
11 changed files with 69 additions and 22 deletions

View File

@@ -0,0 +1 @@
ALTER TYPE people_kind ADD VALUE 'SERVICE_ACCOUNT';

View File

@@ -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

View File

@@ -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

View File

@@ -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",
}
)