-func getIdsFromDescription(description publishapi.ServiceAPIDescription) []string {
- allIds := []string{}
- if description.AefProfiles != nil {
- for _, aefProfile := range *description.AefProfiles {
- allIds = append(allIds, aefProfile.AefId)
- }
- }
- return allIds
-}
-
-func checkNewDescriptions(newDescriptions []publishapi.ServiceAPIDescription, registeredAefIds []string) bool {
- registered := true
- for _, newApi := range newDescriptions {
- if !checkProfiles(newApi.AefProfiles, registeredAefIds) {
- registered = false
- break
- }
- }
- return registered
-}
-
-func checkProfiles(newProfiles *[]publishapi.AefProfile, registeredAefIds []string) bool {
- allRegistered := true
- if newProfiles != nil {
- for _, profile := range *newProfiles {
- if !slices.Contains(registeredAefIds, profile.AefId) {
- allRegistered = false
- break
- }
- }
- }
- return allRegistered
-}
-