config: add depenv.MonitorDomain() and config.ManageURL() methods
This commit is contained in:
@@ -11,7 +11,7 @@ import (
|
||||
"go.ntppool.org/common/logger"
|
||||
)
|
||||
|
||||
//go:generate accessory -type Config
|
||||
//go:generate go tool github.com/masaushi/accessory -type Config
|
||||
|
||||
type Config struct {
|
||||
deploymentMode string `accessor:"getter"`
|
||||
@@ -50,6 +50,10 @@ func (c *Config) WebURL(path string, query *url.Values) string {
|
||||
return baseURL(c.webHostname, c.webTLS, path, query)
|
||||
}
|
||||
|
||||
func (c *Config) ManageURL(path string, query *url.Values) string {
|
||||
return baseURL(c.manageHostname, c.webTLS, path, query)
|
||||
}
|
||||
|
||||
func baseURL(host string, tls bool, path string, query *url.Values) string {
|
||||
uri := url.URL{}
|
||||
uri.Host = host
|
||||
|
Reference in New Issue
Block a user