// transform the keycloak response RoleMapping into the internal roleMapping
// so we can compare the current state (keycloak) against the desired state (terraform)
transform the keycloak response RoleMapping into the internal roleMapping
so we can compare the current state (keycloak) against the desired state (terraform)
// transform the keycloak response RoleMapping into the internal roleMapping // so we can compare the current state ( keycloak ) against the desired state ( terraform )
func intoRoleMapping(keycloakRoleMapping *keycloak.RoleMapping) *roleMapping {
	clientRoles := make(map[string][]*keycloak.Role)
	for _, clientRoleMapping := range keycloakRoleMapping.ClientMappings {
		clientRoles[clientRoleMapping.Id] = clientRoleMapping.Mappings
	}
	mapping := roleMapping{
		clientRoles: clientRoles,
		realmRoles:  keycloakRoleMapping.RealmMappings,
	}
	return &mapping
}
func intoRoleMapping ( keycloakRoleMapping * keycloak . RoleMapping ) * roleMapping { clientRoles := make ( map [ string ] [ ] * keycloak . Role ) for _ , clientRoleMapping := range keycloakRoleMapping . ClientMappings { clientRoles [ clientRoleMapping . Id ] = clientRoleMapping . Mappings } mapping := roleMapping { clientRoles : clientRoles , realmRoles : keycloakRoleMapping . RealmMappings , } return & mapping }
transform the keycloak response RoleMapping into the internal roleMapping
so we can compare the current state (keycloak) against the desired state (terraform)
transform the keycloak response RoleMapping into the internal roleMapping so we can compare the current state ( keycloak ) against the desired state ( terraform )