func GetAllAppMeshPaths(meshName *string, svc *appmesh.Client) []AppMeshVirtualService {
	var result []AppMeshVirtualService
	routesholder := make(map[string][]AppMeshVirtualServiceRoute)
	services := getAllAppMeshVirtualServices(meshName, svc)
	routes := getAppMeshRouteDescriptions(meshName, svc)
	for _, route := range routes {
		for _, action := range route.Spec.HttpRoute.Action.WeightedTargets {
			target := AppMeshVirtualServiceRoute{
				Router:          aws.ToString(route.VirtualRouterName),
				Path:            aws.ToString(route.Spec.HttpRoute.Match.Prefix),
				DestinationNode: aws.ToString(action.VirtualNode),
				Weight:          action.Weight,
			}
			routerName := aws.ToString(route.VirtualRouterName)
			if targets, ok := routesholder[routerName]; ok {
				routesholder[routerName] = append(targets, target)
			} else {
				values := []AppMeshVirtualServiceRoute{target}
				routesholder[routerName] = values
			}

		}
	}
	for _, service := range services {
		switch v := service.Spec.Provider.(type) {
		case *types.VirtualServiceProviderMemberVirtualRouter:
			serviceroutes := AppMeshVirtualService{
				VirtualServiceName:   aws.ToString(service.VirtualServiceName),
				VirtualServiceRoutes: routesholder[aws.ToString(v.Value.VirtualRouterName)],
			}
			result = append(result, serviceroutes)
		default:
			fmt.Println("union is nil or unknown type")
		}
	}
	return result
}
// GetAllAppMeshPaths retrieves all the connections in the mesh
GetAllAppMeshPaths retrieves all the connections in the mesh
// GetAllAppMeshPaths retrieves all the connections in the mesh
func GetAllAppMeshPaths(meshName *string, svc *appmesh.Client) []AppMeshVirtualService {
	var result []AppMeshVirtualService
	routesholder := make(map[string][]AppMeshVirtualServiceRoute)
	services := getAllAppMeshVirtualServices(meshName, svc)
	routes := getAppMeshRouteDescriptions(meshName, svc)
	for _, route := range routes {
		for _, action := range route.Spec.HttpRoute.Action.WeightedTargets {
			target := AppMeshVirtualServiceRoute{
				Router:          aws.ToString(route.VirtualRouterName),
				Path:            aws.ToString(route.Spec.HttpRoute.Match.Prefix),
				DestinationNode: aws.ToString(action.VirtualNode),
				Weight:          action.Weight,
			}
			routerName := aws.ToString(route.VirtualRouterName)
			if targets, ok := routesholder[routerName]; ok {
				routesholder[routerName] = append(targets, target)
			} else {
				values := []AppMeshVirtualServiceRoute{target}
				routesholder[routerName] = values
			}
		}
	}
	for _, service := range services {
		switch v := service.Spec.Provider.(type) {
		case *types.VirtualServiceProviderMemberVirtualRouter:
			serviceroutes := AppMeshVirtualService{
				VirtualServiceName:   aws.ToString(service.VirtualServiceName),
				VirtualServiceRoutes: routesholder[aws.ToString(v.Value.VirtualRouterName)],
			}
			result = append(result, serviceroutes)
		default:
			fmt.Println("union is nil or unknown type")
		}
	}
	return result
}
func GetAllAppMeshPaths ( meshName * string , svc * appmesh . Client ) [ ] AppMeshVirtualService { var result [ ] AppMeshVirtualService routesholder := make ( map [ string ] [ ] AppMeshVirtualServiceRoute ) services := getAllAppMeshVirtualServices ( meshName , svc ) routes := getAppMeshRouteDescriptions ( meshName , svc ) for _ , route := range routes { for _ , action := range route . Spec . HttpRoute . Action . WeightedTargets { target := AppMeshVirtualServiceRoute { Router : aws . ToString ( route . VirtualRouterName ) , Path : aws . ToString ( route . Spec . HttpRoute . Match . Prefix ) , DestinationNode : aws . ToString ( action . VirtualNode ) , Weight : action . Weight , } routerName := aws . ToString ( route . VirtualRouterName ) if targets , ok := routesholder [ routerName ] ; ok { routesholder [ routerName ] = append ( targets , target ) } else { values := [ ] AppMeshVirtualServiceRoute { target } routesholder [ routerName ] = values } } } for _ , service := range services { switch v := service . Spec . Provider . ( type ) { case * types . VirtualServiceProviderMemberVirtualRouter : serviceroutes := AppMeshVirtualService { VirtualServiceName : aws . ToString ( service . VirtualServiceName ) , VirtualServiceRoutes : routesholder [ aws . ToString ( v . Value . VirtualRouterName ) ] , } result = append ( result , serviceroutes ) default : fmt . Println ( " " ) } } return result }
GetAllAppMeshPaths retrieves all the connections in the mesh
GetAllAppMeshPaths retrieves all the connections in the mesh