// AppURL returns a map of app name to app base URL for all the configured
// server apps.
16714
func (c *Config) AppURL() map[string]string {
	appURL := make(map[string]string, len(c.apps))
	for _, ap := range c.apps {
		appURL[ap.ProgramName()] = ap.BackendURL()
	}
	return appURL
}
851124
func URL(key string, fallback *url.URL) *url.URL {
	return DefaultClient.URL(key, fallback)
}
45943
func (post *ProjectPost) URL() *url.URL {
	return &url.URL{
		Host: Configuration.NERDZHost,
		Path: (post.Reference().(*Project)).Name + ":" + strconv.FormatUint(post.Pid, 10),
	}
}
385193
func (r *Store) URL() string {
	if r.url == nil {
		return ""
	}
	return r.url.String()
}
415755
func (r *Request) URL() *url.URL {
	u := *r.base
	p := r.path

	if len(r.version) != 0 {
		p = path.Join(p, strings.ToLower(r.version))
	}
	if len(r.resource) != 0 {
		p = path.Join(p, r.resource)
		if len(r.instance) != 0 {
			p = path.Join(p, r.instance)
		}
	}

	u.Path = p

	query := url.Values{}
	for key, values := range r.params {
		for _, value := range values {
			query.Add(key, value)
		}
	}
	if r.timeout != 0 {
		query.Set("timeout", r.timeout.String())
	}
	u.RawQuery = query.Encode()
	return &u
}
926399
func (c *UpstreamDeleteCall) Url(url string) *UpstreamDeleteCall {
	c.urlParams_.Set("url", url)
	return c
}
384495
func (f *Request) Url(url string) *Request {
	f.url = url
	return f
}
498231
func (s *UpdateOriginEndpointOutput) SetUrl(v string) *UpdateOriginEndpointOutput {
	s.Url = &v
	return s
}
794119
func (stor *maas1Storage) URL(name string) (string, error) {
	name = stor.prefixWithPrivateNamespace(name)
	fileObj, err := stor.retrieveFileObject(name)
	if err != nil {
		return "", err
	}
	uri, err := fileObj.GetField("anon_resource_uri")
	if err != nil {
		msg := fmt.Errorf("could not get file's download URL (may be an outdated MAAS): %s", err)
		return "", msg
	}

	partialURL, err := url.Parse(uri)
	if err != nil {
		return "", err
	}
	fullURL := fileObj.URL().ResolveReference(partialURL)
	return fullURL.String(), nil
}
721928
func baseURL(serverBaseURL, listenAddr string) (string, error) {
	backendURL, err := url.Parse(serverBaseURL)
	if err != nil {
		return "", fmt.Errorf("invalid baseURL %q: %v", serverBaseURL, err)
	}
	scheme := backendURL.Scheme
	host := backendURL.Host
	if netutil.HasPort(host) {
		host = host[:strings.LastIndex(host, ":")]
	}
	port := portMap[scheme]
	if netutil.HasPort(listenAddr) {
		port = listenAddr[strings.LastIndex(listenAddr, ":")+1:]
	}
	return fmt.Sprintf("%s://%s:%s/", scheme, host, port), nil
}
164821
func (s *BaiduMessage) SetUrl(v string) *BaiduMessage {
	s.Url = &v
	return s
}
733108
func appendValuesURL(u *url.URL, values ...url.Values) *url.URL {
	merged := u.Query()

	for _, v := range values {
		for k, vv := range v {
			merged[k] = append(merged[k], vv...)
		}
	}

	u.RawQuery = merged.Encode()
	return u
}
10594
func (u *UserLDAPMapping) GetURL() string {
	if u == nil || u.URL == nil {
		return ""
	}
	return *u.URL
}
552102
func RemoteURL(host, appID string) string {
	// Strip off any trailing :port number after the host name.
	host = strings.Split(host, ":")[0]
	return fmt.Sprintf("ssh://git@%s:2222/%s.git", host, appID)
}
163288
func (p *PagesBuild) GetURL() string {
	if p == nil || p.URL == nil {
		return ""
	}
	return *p.URL
}
1135098
func (s *Stream) baseUrl() (url string) {
	url = fmt.Sprintf("%s/%s/%s", s.domainName, s.appName, s.StreamName)
	return
}
1084064
func (b *Builder) URL(urls ...*url.URL) *Builder {
	for _, u := range urls {
		b.paths = append(b.paths, &URLVisitor{
			Mapper: b.mapper,
			URL:    u,
			Schema: b.schema,
		})
	}
	return b
}