chore: move the go code into a subfolder

This commit is contained in:
Florian Forster
2025-08-05 15:20:32 -07:00
parent 4ad22ba456
commit cd2921de26
2978 changed files with 373 additions and 300 deletions

View File

@@ -0,0 +1,37 @@
package user
import "github.com/zitadel/zitadel/internal/domain"
type UserType = isUser_Type
func (s UserState) ToDomain() domain.UserState {
switch s {
case UserState_USER_STATE_UNSPECIFIED:
return domain.UserStateUnspecified
case UserState_USER_STATE_ACTIVE:
return domain.UserStateActive
case UserState_USER_STATE_INACTIVE:
return domain.UserStateInactive
case UserState_USER_STATE_DELETED:
return domain.UserStateDeleted
case UserState_USER_STATE_LOCKED:
return domain.UserStateLocked
case UserState_USER_STATE_INITIAL:
return domain.UserStateInitial
default:
return domain.UserStateUnspecified
}
}
func (t Type) ToDomain() domain.UserType {
switch t {
case Type_TYPE_UNSPECIFIED:
return domain.UserTypeUnspecified
case Type_TYPE_HUMAN:
return domain.UserTypeHuman
case Type_TYPE_MACHINE:
return domain.UserTypeMachine
default:
return domain.UserTypeUnspecified
}
}