MCPcopy Create free account
hub / github.com/nhost/nhost / URL

Function URL

cli/dockercompose/url.go:8–21  ·  view source on GitHub ↗
(host, service string, port uint, useTLS bool)

Source from the content-addressed store, hash-verified

6)
7
8func URL(host, service string, port uint, useTLS bool) string {
9 if useTLS && port == 443 {
10 return fmt.Sprintf("https://%s.%s.local.nhost.run", host, service)
11 } else if !useTLS && port == 80 {
12 return fmt.Sprintf("http://%s.%s.local.nhost.run", host, service)
13 }
14
15 protocol := schemeHTTP
16 if useTLS {
17 protocol = schemeHTTPS
18 }
19
20 return fmt.Sprintf("%s://%s.%s.local.nhost.run:%d", protocol, host, service, port)
21}
22
23// WebsocketURL returns the ws(s):// variant of URL(host, service, port, useTLS).
24func WebsocketURL(host, service string, port uint, useTLS bool) string {

Callers 11

upFunction · 0.92
printInfoFunction · 0.92
printCloudInfoFunction · 0.92
graphqlFunction · 0.85
consoleFunction · 0.85
storageFunction · 0.85
authFunction · 0.85
dashboardFunction · 0.85
functionsFunction · 0.85
constellationFunction · 0.85
WebsocketURLFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected