projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
16392: Add trailing slash to URLs like https://example in configs.
[arvados.git]
/
sdk
/
go
/
arvados
/
config.go
diff --git
a/sdk/go/arvados/config.go
b/sdk/go/arvados/config.go
index 79e47ba5d1648a096d455bd46eb86d0cd200c8d0..69de3f05e231d29321ddbaa0b0f5f6dc1d5659e0 100644
(file)
--- a/
sdk/go/arvados/config.go
+++ b/
sdk/go/arvados/config.go
@@
-23,7
+23,8
@@
var DefaultConfigFile = func() string {
}()
type Config struct {
}()
type Config struct {
- Clusters map[string]Cluster
+ Clusters map[string]Cluster
+ AutoReloadConfig bool
}
// GetConfig returns the current system config, loading it from
}
// GetConfig returns the current system config, loading it from
@@
-66,6
+67,7
@@
type WebDAVCacheConfig struct {
MaxPermissionEntries int
MaxUUIDEntries int
}
MaxPermissionEntries int
MaxUUIDEntries int
}
+
type Cluster struct {
ClusterID string `json:"-"`
ManagementToken string
type Cluster struct {
ClusterID string `json:"-"`
ManagementToken string
@@
-136,6
+138,9
@@
type Cluster struct {
GoogleClientID string
GoogleClientSecret string
GoogleAlternateEmailAddresses bool
GoogleClientID string
GoogleClientSecret string
GoogleAlternateEmailAddresses bool
+ PAM bool
+ PAMService string
+ PAMDefaultEmailDomain string
ProviderAppID string
ProviderAppSecret string
LoginCluster string
ProviderAppID string
ProviderAppSecret string
LoginCluster string
@@
-298,6
+303,10
@@
func (su *URL) UnmarshalText(text []byte) error {
u, err := url.Parse(string(text))
if err == nil {
*su = URL(*u)
u, err := url.Parse(string(text))
if err == nil {
*su = URL(*u)
+ if su.Path == "" && su.Host != "" {
+ // http://example really means http://example/
+ su.Path = "/"
+ }
}
return err
}
}
return err
}