use yaml tag instead of ocisConfig

This commit is contained in:
Willy Kloucek
2022-03-29 15:06:58 +02:00
parent 58b3bdf570
commit e224ce03cf
84 changed files with 851 additions and 851 deletions
+9 -9
View File
@@ -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"`
}
+4 -4
View File
@@ -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"`
}
+1 -1
View File
@@ -2,5 +2,5 @@ package config
// Service defines the available service configuration.
type Service struct {
Name string `ocisConfig:"-" yaml:"-"`
Name string `yaml:"-"`
}