mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-12 00:47:33 +00:00
new pkg structure (#1150)
* fix: split command query side * fix: split command query side * fix: members in correct pkg structure * fix: label policy in correct pkg structure * fix: structure * fix: structure of login policy * fix: identityprovider structure * fix: org iam policy structure * fix: password age policy structure * fix: password complexity policy structure * fix: password lockout policy structure * fix: idp structure * fix: user events structure * fix: user write model * fix: profile email changed command * fix: address changed command * fix: user states * fix: user * fix: org structure and add human * begin iam setup command side * setup * step2 * step2 * fix: add user * step2 * isvalid * fix: folder structure v2 business Co-authored-by: Fabiennne <fabienne.gerschwiler@gmail.com>
This commit is contained in:
16
internal/v2/domain/factors.go
Normal file
16
internal/v2/domain/factors.go
Normal file
@@ -0,0 +1,16 @@
|
||||
package domain
|
||||
|
||||
type SecondFactorType int32
|
||||
|
||||
const (
|
||||
SecondFactorTypeUnspecified SecondFactorType = iota
|
||||
SecondFactorTypeOTP
|
||||
SecondFactorTypeU2F
|
||||
)
|
||||
|
||||
type MultiFactorType int32
|
||||
|
||||
const (
|
||||
MultiFactorTypeUnspecified MultiFactorType = iota
|
||||
MultiFactorTypeU2FWithPIN
|
||||
)
|
16
internal/v2/domain/human.go
Normal file
16
internal/v2/domain/human.go
Normal file
@@ -0,0 +1,16 @@
|
||||
package domain
|
||||
|
||||
type Gender int32
|
||||
|
||||
const (
|
||||
GenderUnspecified Gender = iota
|
||||
GenderFemale
|
||||
GenderMale
|
||||
GenderDiverse
|
||||
|
||||
genderCount
|
||||
)
|
||||
|
||||
func (f Gender) Valid() bool {
|
||||
return f >= 0 && f < genderCount
|
||||
}
|
42
internal/v2/domain/idp_config.go
Normal file
42
internal/v2/domain/idp_config.go
Normal file
@@ -0,0 +1,42 @@
|
||||
package domain
|
||||
|
||||
type IDPConfigType int32
|
||||
|
||||
const (
|
||||
IDPConfigTypeOIDC IDPConfigType = iota
|
||||
IDPConfigTypeSAML
|
||||
|
||||
//count is for validation
|
||||
idpConfigTypeCount
|
||||
)
|
||||
|
||||
func (f IDPConfigType) Valid() bool {
|
||||
return f >= 0 && f < idpConfigTypeCount
|
||||
}
|
||||
|
||||
type IDPConfigState int32
|
||||
|
||||
const (
|
||||
IDPConfigStateUnspecified IDPConfigState = iota
|
||||
IDPConfigStateActive
|
||||
IDPConfigStateInactive
|
||||
IDPConfigStateRemoved
|
||||
|
||||
idpConfigStateCount
|
||||
)
|
||||
|
||||
func (f IDPConfigState) Valid() bool {
|
||||
return f >= 0 && f < idpConfigStateCount
|
||||
}
|
||||
|
||||
type IDPConfigStylingType int32
|
||||
|
||||
const (
|
||||
IDPConfigStylingTypeGoogle IDPConfigStylingType = iota + 1
|
||||
|
||||
idpConfigStylingTypeCount
|
||||
)
|
||||
|
||||
func (f IDPConfigStylingType) Valid() bool {
|
||||
return f >= 0 && f < idpConfigStylingTypeCount
|
||||
}
|
14
internal/v2/domain/machine_key.go
Normal file
14
internal/v2/domain/machine_key.go
Normal file
@@ -0,0 +1,14 @@
|
||||
package domain
|
||||
|
||||
type MachineKeyType int32
|
||||
|
||||
const (
|
||||
MachineKeyTypeNONE = iota
|
||||
MachineKeyTypeJSON
|
||||
|
||||
keyCount
|
||||
)
|
||||
|
||||
func (f MachineKeyType) Valid() bool {
|
||||
return f >= 0 && f < keyCount
|
||||
}
|
15
internal/v2/domain/mfa.go
Normal file
15
internal/v2/domain/mfa.go
Normal file
@@ -0,0 +1,15 @@
|
||||
package domain
|
||||
|
||||
type MFAState int32
|
||||
|
||||
const (
|
||||
MFAStateUnspecified MFAState = iota
|
||||
MFAStateNotReady
|
||||
MFAStateReady
|
||||
|
||||
stateCount
|
||||
)
|
||||
|
||||
func (f MFAState) Valid() bool {
|
||||
return f >= 0 && f < stateCount
|
||||
}
|
14
internal/v2/domain/notification.go
Normal file
14
internal/v2/domain/notification.go
Normal file
@@ -0,0 +1,14 @@
|
||||
package domain
|
||||
|
||||
type NotificationType int32
|
||||
|
||||
const (
|
||||
NotificationTypeEmail NotificationType = iota
|
||||
NotificationTypeSms
|
||||
|
||||
notificationCount
|
||||
)
|
||||
|
||||
func (f NotificationType) Valid() bool {
|
||||
return f >= 0 && f < notificationCount
|
||||
}
|
14
internal/v2/domain/oidc_mapping_field.go
Normal file
14
internal/v2/domain/oidc_mapping_field.go
Normal file
@@ -0,0 +1,14 @@
|
||||
package domain
|
||||
|
||||
type OIDCMappingField int32
|
||||
|
||||
const (
|
||||
OIDCMappingFieldPreferredLoginName OIDCMappingField = iota + 1
|
||||
OIDCMappingFieldEmail
|
||||
// count is for validation purposes
|
||||
oidcMappingFieldCount
|
||||
)
|
||||
|
||||
func (f OIDCMappingField) Valid() bool {
|
||||
return f > 0 && f < oidcMappingFieldCount
|
||||
}
|
14
internal/v2/domain/policy_login.go
Normal file
14
internal/v2/domain/policy_login.go
Normal file
@@ -0,0 +1,14 @@
|
||||
package domain
|
||||
|
||||
type PasswordlessType int32
|
||||
|
||||
const (
|
||||
PasswordlessTypeNotAllowed PasswordlessType = iota
|
||||
PasswordlessTypeAllowed
|
||||
|
||||
passwordlessCount
|
||||
)
|
||||
|
||||
func (f PasswordlessType) Valid() bool {
|
||||
return f >= 0 && f < passwordlessCount
|
||||
}
|
14
internal/v2/domain/provider.go
Normal file
14
internal/v2/domain/provider.go
Normal file
@@ -0,0 +1,14 @@
|
||||
package domain
|
||||
|
||||
type IdentityProviderType int8
|
||||
|
||||
const (
|
||||
IdentityProviderTypeSystem IdentityProviderType = iota
|
||||
IdentityProviderTypeOrg
|
||||
|
||||
identityProviderCount
|
||||
)
|
||||
|
||||
func (f IdentityProviderType) Valid() bool {
|
||||
return f >= 0 && f < identityProviderCount
|
||||
}
|
16
internal/v2/domain/step.go
Normal file
16
internal/v2/domain/step.go
Normal file
@@ -0,0 +1,16 @@
|
||||
package domain
|
||||
|
||||
type Step int
|
||||
|
||||
const (
|
||||
Step1 Step = iota + 1
|
||||
Step2
|
||||
Step3
|
||||
Step4
|
||||
Step5
|
||||
Step6
|
||||
Step7
|
||||
Step8
|
||||
//StepCount marks the the length of possible steps (StepCount-1 == last possible step)
|
||||
StepCount
|
||||
)
|
19
internal/v2/domain/user.go
Normal file
19
internal/v2/domain/user.go
Normal file
@@ -0,0 +1,19 @@
|
||||
package domain
|
||||
|
||||
type UserState int32
|
||||
|
||||
const (
|
||||
UserStateUnspecified UserState = iota
|
||||
UserStateActive
|
||||
UserStateInactive
|
||||
UserStateDeleted
|
||||
UserStateLocked
|
||||
UserStateSuspend
|
||||
UserStateInitial
|
||||
|
||||
userStateCount
|
||||
)
|
||||
|
||||
func (f UserState) Valid() bool {
|
||||
return f >= 0 && f < userStateCount
|
||||
}
|
Reference in New Issue
Block a user