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 package config
type Proxy struct { type Proxy struct {
Host string `json:"host" yaml:"host" toml:"host"` Host string `json:"host,omitempty" yaml:"host" toml:"host"`
Port int `json:"port" yaml:"port" toml:"port"` Port int `json:"port,omitempty" yaml:"port" toml:"port"`
UseAuth bool `default:"false" json:"useAuth" yaml:"useAuth" toml:"useAuth"` UseAuth bool `default:"false" json:"useAuth,omitempty" yaml:"useAuth" toml:"useAuth"`
User string `json:"user" yaml:"user" toml:"user"` User string `json:"user,omitempty" yaml:"user" toml:"user"`
Password string `json:"password" yaml:"password" toml:"password"` Password string `json:"password,omitempty" yaml:"password" toml:"password"`
} }

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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