removed unnecessary data elements

This commit is contained in:
Matthew R. Kasun 2022-02-14 17:57:28 -05:00
parent 4310711fa4
commit f3c5800912
3 changed files with 24 additions and 24 deletions

View file

@ -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,
}

View file

@ -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"`
}

View file

@ -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