| 69 | } |
| 70 | |
| 71 | func queryStringForRouteSearch(host, guid, path string, port int) string { |
| 72 | args := []string{ |
| 73 | fmt.Sprintf("host:%s", host), |
| 74 | fmt.Sprintf("domain_guid:%s", guid), |
| 75 | } |
| 76 | |
| 77 | if path != "" { |
| 78 | args = append(args, fmt.Sprintf("path:%s", normalizedPath(path))) |
| 79 | } |
| 80 | |
| 81 | if port != 0 { |
| 82 | args = append(args, fmt.Sprintf("port:%d", port)) |
| 83 | } |
| 84 | |
| 85 | return strings.Join(args, ";") |
| 86 | } |
| 87 | |
| 88 | func (repo CloudControllerRouteRepository) Find(host string, domain models.DomainFields, path string, port int) (models.Route, error) { |
| 89 | var route models.Route |