This commit is contained in:
crusader 2018-04-14 17:56:30 +09:00
parent 2a945e472c
commit b1143984f2
7 changed files with 18 additions and 18 deletions

View File

@ -1,9 +1,9 @@
package config
type Proxy struct {
Host string `json:"host" yaml:"host" toml:"host"`
Port int `json:"port" yaml:"port" toml:"port"`
UseAuth bool `default:"false" json:"useAuth" yaml:"useAuth" toml:"useAuth"`
User string `json:"user" yaml:"user" toml:"user"`
Password string `json:"password" yaml:"password" toml:"password"`
Host string `json:"host,omitempty" yaml:"host" toml:"host"`
Port int `json:"port,omitempty" yaml:"port" toml:"port"`
UseAuth bool `default:"false" json:"useAuth,omitempty" yaml:"useAuth" toml:"useAuth"`
User string `json:"user,omitempty" yaml:"user" toml:"user"`
Password string `json:"password,omitempty" yaml:"password" toml:"password"`
}

View File

@ -1,7 +1,7 @@
package config
type External struct {
GRPC *GRPC `json:"grpc"`
Kafka *Kafka `json:"kafka"`
Redis *Redis `json:"redis"`
GRPC *GRPC `json:"grpc,omitempty"`
Kafka *Kafka `json:"kafka,omitempty"`
Redis *Redis `json:"redis,omitempty"`
}

View File

@ -1,6 +1,6 @@
package config
type GRPC struct {
Network string `json:"network"`
Address string `json:"address"`
Network string `json:"network,omitempty"`
Address string `json:"address,omitempty"`
}

View File

@ -1,6 +1,6 @@
package config
type Kafka struct {
Network string `json:"network"`
Address string `json:"address"`
Network string `json:"network,omitempty"`
Address string `json:"address,omitempty"`
}

View File

@ -1,6 +1,6 @@
package config
type Redis struct {
Network string `json:"network"`
Address string `json:"address"`
Network string `json:"network,omitempty"`
Address string `json:"address,omitempty"`
}

View File

@ -1,6 +1,6 @@
package config
type Account struct {
Name string `required:"true" json:"name"`
APIKey string `required:"true" json:"apiKey"`
Name string `required:"true" json:"name,omitempty"`
APIKey string `required:"true" json:"apiKey,omitempty"`
}

View File

@ -6,7 +6,7 @@ import (
)
type Central struct {
Address string `required:"address" json:"address"`
Address string `required:"true" json:"address"`
Connector *csswc.Connectors `required:"true" json:"connector"`
Proxy *config.Proxy `json:"proxy"`
Proxy *config.Proxy `json:"proxy,omitempty"`
}