use yaml tag instead of ocisConfig
This commit is contained in:
@@ -8,22 +8,22 @@ import (
|
||||
|
||||
// Config combines all available configuration parts.
|
||||
type Config struct {
|
||||
*shared.Commons `ocisConfig:"-" yaml:"-"`
|
||||
*shared.Commons `yaml:"-"`
|
||||
|
||||
Service Service `ocisConfig:"-" yaml:"-"`
|
||||
Service Service `yaml:"-"`
|
||||
|
||||
Log *Log `ocisConfig:"log"`
|
||||
Debug Debug `ocisConfig:"debug"`
|
||||
Log *Log `yaml:"log"`
|
||||
Debug Debug `yaml:"debug"`
|
||||
|
||||
Nats Nats `ociConfig:"nats"`
|
||||
|
||||
Context context.Context `ocisConfig:"-" yaml:"-"`
|
||||
Context context.Context `yaml:"-"`
|
||||
}
|
||||
|
||||
// Nats is the nats config
|
||||
type Nats struct {
|
||||
Host string `ocisConfig:"host" env:"NATS_NATS_HOST"`
|
||||
Port int `ocisConfig:"port" env:"NATS_NATS_PORT"`
|
||||
ClusterID string `ocisConfig:"clusterid" env:"NATS_NATS_CLUSTER_ID"`
|
||||
StoreDir string `ocisConfig:"store_dir" env:"NATS_NATS_STORE_DIR"`
|
||||
Host string `yaml:"host" env:"NATS_NATS_HOST"`
|
||||
Port int `yaml:"port" env:"NATS_NATS_PORT"`
|
||||
ClusterID string `yaml:"clusterid" env:"NATS_NATS_CLUSTER_ID"`
|
||||
StoreDir string `yaml:"store_dir" env:"NATS_NATS_STORE_DIR"`
|
||||
}
|
||||
|
||||
@@ -2,8 +2,8 @@ package config
|
||||
|
||||
// Debug defines the available debug configuration.
|
||||
type Debug struct {
|
||||
Addr string `ocisConfig:"addr" env:"NATS_DEBUG_ADDR"`
|
||||
Token string `ocisConfig:"token" env:"NATS_DEBUG_TOKEN"`
|
||||
Pprof bool `ocisConfig:"pprof" env:"NATS_DEBUG_PPROF"`
|
||||
Zpages bool `ocisConfig:"zpages" env:"NATS_DEBUG_ZPAGES"`
|
||||
Addr string `yaml:"addr" env:"NATS_DEBUG_ADDR"`
|
||||
Token string `yaml:"token" env:"NATS_DEBUG_TOKEN"`
|
||||
Pprof bool `yaml:"pprof" env:"NATS_DEBUG_PPROF"`
|
||||
Zpages bool `yaml:"zpages" env:"NATS_DEBUG_ZPAGES"`
|
||||
}
|
||||
|
||||
@@ -2,5 +2,5 @@ package config
|
||||
|
||||
// Service defines the available service configuration.
|
||||
type Service struct {
|
||||
Name string `ocisConfig:"-" yaml:"-"`
|
||||
Name string `yaml:"-"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user