-
-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: align allowed fields in the SCIM API
- Loading branch information
1 parent
afc1bc4
commit e96d314
Showing
19 changed files
with
574 additions
and
282 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,6 +10,7 @@ | |
"codecov", | ||
"codeql", | ||
"Debugf", | ||
"deepcopy", | ||
"displayname", | ||
"Dockerfiles", | ||
"dwenegar", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package deepcopy | ||
|
||
// SliceOfPointers creates a new slice of pointers from the given slice. | ||
// The new slice will have the same length and capacity as the given slice. | ||
// and the values will be copied. | ||
func SliceOfPointers[T any](s []*T) []*T { | ||
newSlice := make([]*T, 0, len(s)) | ||
|
||
for _, v := range s { | ||
// Create a new struct to hold the copied data | ||
newStruct := new(T) | ||
*newStruct = *v | ||
|
||
// Append the new struct to the new slice | ||
newSlice = append(newSlice, newStruct) | ||
} | ||
|
||
return newSlice | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -193,7 +193,7 @@ func TestState_GobEncode(t *testing.T) { | |
Active: true, | ||
Name: &Name{FamilyName: "user", GivenName: "1", Formatted: "user 1"}, | ||
Emails: []Email{{Value: "[email protected]", Type: "work", Primary: true}}, | ||
Addresses: []Address{{Formatted: "address 1", StreetAddress: "street 1", Locality: "locality 1", Region: "region 1", PostalCode: "postalCode 1", Country: "country 1", Primary: true}}, | ||
Addresses: []Address{{Formatted: "address 1", StreetAddress: "street 1", Locality: "locality 1", Region: "region 1", PostalCode: "postalCode 1", Country: "country 1"}}, | ||
PreferredLanguage: "en", | ||
PhoneNumbers: []PhoneNumber{{Value: "123456789", Type: "work"}}, | ||
EnterpriseData: &EnterpriseData{EmployeeNumber: "123456789", CostCenter: "123456789", Organization: "123456789", Division: "123456789", Department: "123456789"}, | ||
|
@@ -210,7 +210,7 @@ func TestState_GobEncode(t *testing.T) { | |
Active: true, | ||
Name: &Name{FamilyName: "user", GivenName: "2", Formatted: "user 2"}, | ||
Emails: []Email{{Value: "[email protected]", Type: "work", Primary: true}}, | ||
Addresses: []Address{{Formatted: "address 2", StreetAddress: "street 2", Locality: "locality 2", Region: "region 2", PostalCode: "postalCode 2", Country: "country 2", Primary: true}}, | ||
Addresses: []Address{{Formatted: "address 2", StreetAddress: "street 2", Locality: "locality 2", Region: "region 2", PostalCode: "postalCode 2", Country: "country 2"}}, | ||
PreferredLanguage: "en", | ||
PhoneNumbers: []PhoneNumber{{Value: "123456789", Type: "work"}}, | ||
EnterpriseData: &EnterpriseData{EmployeeNumber: "123456789", CostCenter: "123456789", Organization: "123456789", Division: "123456789", Department: "123456789"}, | ||
|
Oops, something went wrong.