mirror of
https://github.com/hanzo-fi/stack.git
synced 2026-10-30 20:34:43 +00:00
16 lines
322 B
Go
16 lines
322 B
Go
package gateways
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
"github.com/formancehq/operator/api/formance.com/v1beta1"
|
|
)
|
|
|
|
func URL(gateway *v1beta1.Gateway) string {
|
|
if gateway.Spec.Ingress != nil {
|
|
return fmt.Sprintf("%s://%s", gateway.Spec.Ingress.Scheme, gateway.Spec.Ingress.Host)
|
|
} else {
|
|
return fmt.Sprintf("http://gateway:8080")
|
|
}
|
|
}
|