mirror of
https://github.com/zitadel/zitadel.git
synced 2025-12-26 16:26:26 +00:00
# Which Problems Are Solved This PR adds API definition and backend implementation for GroupService to manage user groups. # How the Problems Are Solved * API definition to create, update, retrieve, and delete groups is added * Command-side implementation to create, update, and delete user groups as part of the GroupV2 API is added # Additional Changes N/A # Additional Context - Related to #10089, #9702 (parent ticket) - User contribution: https://github.com/zitadel/zitadel/pull/9428/files - Additional functionalities to list/search user groups, add permissions, manage users in groups, group scopes will be added in subsequent PRs. - Also needs documentation, which will be added once the entire feature is available --------- Co-authored-by: Livio Spring <livio.a@gmail.com>
98 lines
1.5 KiB
Go
98 lines
1.5 KiB
Go
package integration
|
|
|
|
import "github.com/brianvoe/gofakeit/v6"
|
|
|
|
// company private function to add a random string to the gofakeit.Company function
|
|
func company() string {
|
|
return gofakeit.Company() + "-" + RandString(5)
|
|
}
|
|
|
|
func OrganizationName() string {
|
|
return company()
|
|
}
|
|
|
|
func Email() string {
|
|
return RandString(5) + gofakeit.Email()
|
|
}
|
|
|
|
func Phone() string {
|
|
return "+41" + gofakeit.Phone()
|
|
}
|
|
|
|
func FirstName() string {
|
|
return gofakeit.FirstName()
|
|
}
|
|
|
|
func LastName() string {
|
|
return gofakeit.LastName()
|
|
}
|
|
|
|
func Username() string {
|
|
return gofakeit.Username() + RandString(5)
|
|
}
|
|
|
|
func Language() string {
|
|
return gofakeit.LanguageBCP()
|
|
}
|
|
|
|
func UserSchemaName() string {
|
|
return gofakeit.Name() + RandString(5)
|
|
}
|
|
|
|
// appName private function to add a random string to the gofakeit.AppName function
|
|
func appName() string {
|
|
return gofakeit.AppName() + "-" + RandString(5)
|
|
}
|
|
|
|
func TargetName() string {
|
|
return appName()
|
|
}
|
|
|
|
func ApplicationName() string {
|
|
return appName()
|
|
}
|
|
|
|
func ProjectName() string {
|
|
return appName()
|
|
}
|
|
|
|
func IDPName() string {
|
|
return appName()
|
|
}
|
|
|
|
func RoleKey() string {
|
|
return appName()
|
|
}
|
|
|
|
func RoleDisplayName() string {
|
|
return appName()
|
|
}
|
|
|
|
func DomainName() string {
|
|
return RandString(5) + gofakeit.DomainName()
|
|
}
|
|
|
|
func URL() string {
|
|
return gofakeit.URL()
|
|
}
|
|
|
|
func RelayState() string {
|
|
return ID()
|
|
}
|
|
|
|
func ID() string {
|
|
return RandString(20)
|
|
}
|
|
|
|
func Slogan() string {
|
|
return gofakeit.Slogan()
|
|
}
|
|
|
|
func Number() int {
|
|
return gofakeit.Number(0, 1_000_000)
|
|
}
|
|
|
|
func GroupName() string {
|
|
return "group_" + appName()
|
|
}
|