mirror of
https://github.com/gravitl/netmaker.git
synced 2024-11-10 17:48:25 +08:00
removed unnecessary data elements
This commit is contained in:
parent
4310711fa4
commit
f3c5800912
3 changed files with 24 additions and 24 deletions
|
@ -52,13 +52,13 @@ func CreateAccessKey(accesskey models.AccessKey, network models.Network) (models
|
|||
var accessToken models.AccessToken
|
||||
s := servercfg.GetServerConfig()
|
||||
servervals := models.ServerConfig{
|
||||
CoreDNSAddr: s.CoreDNSAddr,
|
||||
APIConnString: s.APIConnString,
|
||||
APIHost: s.APIHost,
|
||||
APIPort: s.APIPort,
|
||||
GRPCConnString: s.GRPCConnString,
|
||||
GRPCHost: s.GRPCHost,
|
||||
GRPCPort: s.GRPCPort,
|
||||
CoreDNSAddr: s.CoreDNSAddr,
|
||||
APIConnString: s.APIConnString,
|
||||
//APIHost: s.APIHost,
|
||||
//APIPort: s.APIPort,
|
||||
GRPCConnString: s.GRPCConnString,
|
||||
//GRPCHost: s.GRPCHost,
|
||||
//GRPCPort: s.GRPCPort,
|
||||
GRPCSSL: s.GRPCSSL,
|
||||
CheckinInterval: s.CheckinInterval,
|
||||
}
|
||||
|
|
|
@ -13,13 +13,13 @@ type ClientConfig struct {
|
|||
}
|
||||
|
||||
type ServerConfig struct {
|
||||
CoreDNSAddr string `json:"corednsaddr"`
|
||||
APIConnString string `json:"apiconn"`
|
||||
APIHost string `json:"apihost"`
|
||||
APIPort string `json:"apiport"`
|
||||
GRPCConnString string `json:"grpcconn"`
|
||||
GRPCHost string `json:"grpchost"`
|
||||
GRPCPort string `json:"grpcport"`
|
||||
CoreDNSAddr string `json:"corednsaddr"`
|
||||
APIConnString string `json:"apiconn"`
|
||||
//APIHost string `json:"apihost"`
|
||||
//APIPort string `json:"apiport"`
|
||||
GRPCConnString string `json:"grpcconn"`
|
||||
//GRPCHost string `json:"grpchost"`
|
||||
//GRPCPort string `json:"grpcport"`
|
||||
GRPCSSL string `json:"grpcssl"`
|
||||
CheckinInterval string `json:"checkininterval"`
|
||||
}
|
||||
|
|
|
@ -177,19 +177,19 @@ func GetCLIConfig(c *cli.Context) (ClientConfig, string, error) {
|
|||
|
||||
if accesstoken.ServerConfig.APIConnString != "" {
|
||||
cfg.Server.APIAddress = accesstoken.ServerConfig.APIConnString
|
||||
} else {
|
||||
cfg.Server.APIAddress = accesstoken.ServerConfig.APIHost
|
||||
if accesstoken.ServerConfig.APIPort != "" {
|
||||
cfg.Server.APIAddress = cfg.Server.APIAddress + ":" + accesstoken.ServerConfig.APIPort
|
||||
}
|
||||
//} else {
|
||||
// cfg.Server.APIAddress = accesstoken.ServerConfig.APIHost
|
||||
// if accesstoken.ServerConfig.APIPort != "" {
|
||||
// cfg.Server.APIAddress = cfg.Server.APIAddress + ":" + accesstoken.ServerConfig.APIPort
|
||||
// }
|
||||
}
|
||||
if accesstoken.ServerConfig.GRPCConnString != "" {
|
||||
cfg.Server.GRPCAddress = accesstoken.ServerConfig.GRPCConnString
|
||||
} else {
|
||||
cfg.Server.GRPCAddress = accesstoken.ServerConfig.GRPCHost
|
||||
if accesstoken.ServerConfig.GRPCPort != "" {
|
||||
cfg.Server.GRPCAddress = cfg.Server.GRPCAddress + ":" + accesstoken.ServerConfig.GRPCPort
|
||||
}
|
||||
//} else {
|
||||
// cfg.Server.GRPCAddress = accesstoken.ServerConfig.GRPCHost
|
||||
// if accesstoken.ServerConfig.GRPCPort != "" {
|
||||
// cfg.Server.GRPCAddress = cfg.Server.GRPCAddress + ":" + accesstoken.ServerConfig.GRPCPort
|
||||
// }
|
||||
}
|
||||
|
||||
cfg.Network = accesstoken.ClientConfig.Network
|
||||
|
|
Loading…
Reference in a new issue