diff --git a/cmd/relayproxy/config/config.go b/cmd/relayproxy/config/config.go index c0f1c2cfcdd..491f2015cf3 100644 --- a/cmd/relayproxy/config/config.go +++ b/cmd/relayproxy/config/config.go @@ -2,15 +2,25 @@ package config import ( "fmt" + "github.com/knadh/koanf/parsers/json" + "github.com/knadh/koanf/parsers/toml" + "github.com/knadh/koanf/parsers/yaml" + "github.com/knadh/koanf/providers/confmap" + "github.com/knadh/koanf/providers/env" + "github.com/knadh/koanf/providers/file" + "github.com/knadh/koanf/providers/posflag" + "github.com/knadh/koanf/v2" "net/http" + "os" + "path/filepath" "strings" "time" "github.com/spf13/pflag" - "github.com/spf13/viper" "go.uber.org/zap" ) +var k = koanf.New(".") var DefaultRetriever = struct { Timeout time.Duration HTTPMethod string @@ -38,86 +48,95 @@ var DefaultExporter = struct { MaxEventInMemory: 100000, } -// ParseConfig is reading the configuration file -func ParseConfig(log *zap.Logger, version string) (*Config, error) { - viper.Set("version", version) - - errBindFlag := viper.BindPFlags(pflag.CommandLine) - if errBindFlag != nil { +// New is reading the configuration file +func New(flagSet *pflag.FlagSet, log *zap.Logger, version string) (*Config, error) { + k.Delete("") + + // Default values + _ = k.Load(confmap.Provider(map[string]interface{}{ + "listen": "1031", + "host": "localhost", + "fileFormat": "yaml", + "restApiTimeout": 5000, + "pollingInterval": 60000, + }, "."), nil) + + // mapping command line parameters to koanf + if errBindFlag := k.Load(posflag.Provider(flagSet, ".", k), nil); errBindFlag != nil { log.Fatal("impossible to parse flag command line", zap.Error(errBindFlag)) } // Read config file - configFile := viper.GetString("config") - if configFile != "" { - log.Info("reading config from file", zap.String("fileLocation", configFile)) - viper.SetConfigFile(configFile) + configFileLocation, errFileLocation := locateConfigFile(k.String("config")) + if errFileLocation != nil { + log.Info("not using any configuration file", zap.Error(errFileLocation)) } else { - log.Info("reading config from default directories") - viper.SetConfigName("goff-proxy") - viper.AddConfigPath("./") - viper.AddConfigPath("/goff/") - viper.AddConfigPath("/etc/opt/goff/") + ext := filepath.Ext(configFileLocation) + var parser koanf.Parser + switch strings.ToLower(ext) { + case ".toml": + parser = toml.Parser() + break + case ".json": + parser = json.Parser() + break + default: + parser = yaml.Parser() + } + + if errBindFile := k.Load(file.Provider(configFileLocation), parser); errBindFile != nil { + log.Error("error loading file", zap.Error(errBindFile)) + } } - viper.SetEnvKeyReplacer(strings.NewReplacer(`.`, `_`)) - viper.AutomaticEnv() - setViperDefault() + // Map environment variables + _ = k.Load(env.Provider("", ".", func(s string) string { + return strings.ReplaceAll(strings.ToLower(s), "_", ".") + }), nil) + + _ = k.Set("version", version) - err := viper.ReadInConfig() - if err != nil { - return nil, err - } proxyConf := &Config{} - err = viper.Unmarshal(proxyConf) - if err != nil { - return nil, err + errUnmarshal := k.Unmarshal("", &proxyConf) + if errUnmarshal != nil { + return nil, errUnmarshal } return proxyConf, nil } -// setViperDefault will set default values for the configuration -func setViperDefault() { - viper.SetDefault("listen", "1031") - viper.SetDefault("host", "localhost") - viper.SetDefault("fileFormat", "yaml") - viper.SetDefault("pollingInterval", 60000) - viper.SetDefault("restApiTimeout", 5000) -} - type Config struct { // ListenPort (optional) is the port we are using to start the proxy - ListenPort int `mapstructure:"listen"` + ListenPort int `mapstructure:"listen" koanf:"listen"` // HideBanner (optional) if true, we don't display the go-feature-flag relay proxy banner - HideBanner bool `mapstructure:"hideBanner"` + HideBanner bool `mapstructure:"hideBanner" koanf:"hidebanner"` // EnableSwagger (optional) to have access to the swagger - EnableSwagger bool `mapstructure:"enableSwagger"` + EnableSwagger bool `mapstructure:"enableSwagger" koanf:"enableswagger"` // Host should be set if you are using swagger (default is localhost) - Host string `mapstructure:"host"` + Host string `mapstructure:"host" koanf:"host"` // Debug (optional) if true, go-feature-flag relay proxy will run on debug mode, with more logs and custom responses - Debug bool `mapstructure:"debug"` + Debug bool `mapstructure:"debug" koanf:"debug"` // PollingInterval (optional) Poll every X time // The minimum possible is 1 second // Default: 60 seconds - PollingInterval int `mapstructure:"pollingInterval"` + PollingInterval int `koanf:"pollinginterval" mapstructure:"pollingInterval"` // FileFormat (optional) is the format of the file to retrieve (available YAML, TOML and JSON) // Default: YAML - FileFormat string `mapstructure:"fileFormat"` + FileFormat string `mapstructure:"fileFormat" koanf:"fileformat"` // StartWithRetrieverError (optional) If true, the relay proxy will start even if we did not get any flags from // the retriever. It will serve only default values until the retriever returns the flags. // The init method will not return any error if the flag file is unreachable. // Default: false - StartWithRetrieverError bool `mapstructure:"startWithRetrieverError"` + StartWithRetrieverError bool `mapstructure:"startWithRetrieverError" koanf:"startwithretrievererror"` // Retriever is the configuration on how to retrieve the file - Retriever *RetrieverConf `mapstructure:"retriever"` + Retriever *RetrieverConf `mapstructure:"retriever" koanf:"retriever"` // Retrievers is the exact same things than Retriever but allows to give more than 1 retriever at the time. // We are dealing with config files in order, if you have the same flag name in multiple files it will be override @@ -125,25 +144,25 @@ type Config struct { // // Note: If both Retriever and Retrievers are set, we will start by calling the Retriever and, // after we will use the order of Retrievers. - Retrievers *[]RetrieverConf `mapstructure:"retrievers"` + Retrievers *[]RetrieverConf `mapstructure:"retrievers" koanf:"retrievers"` // Exporter is the configuration on how to export data - Exporter *ExporterConf `mapstructure:"exporter"` + Exporter *ExporterConf `mapstructure:"exporter" koanf:"exporter"` // Notifiers is the configuration on where to notify a flag change - Notifiers []NotifierConf `mapstructure:"notifier"` + Notifiers []NotifierConf `mapstructure:"notifier" koanf:"notifier"` // RestAPITimeout is the timeout on the API. - RestAPITimeout int `mapstructure:"restApiTimeout"` + RestAPITimeout int `mapstructure:"restApiTimeout" koanf:"restapitimeout"` // Version is the version of the relay-proxy - Version string + Version string `mapstructure:"version" koanf:"version"` // APIKeys list of API keys that authorized to use endpoints - APIKeys []string + APIKeys []string `mapstructure:"apiKeys" koanf:"apikeys"` // StartAsAwsLambda (optional) if true the relay proxy will start ready to be launch as AWS Lambda - StartAsAwsLambda bool `mapstructure:"startAsAwsLambda"` + StartAsAwsLambda bool `mapstructure:"startAsAwsLambda" koanf:"startasawslambda"` // ---- private fields @@ -207,3 +226,35 @@ func (c *Config) IsValid() error { return nil } + +// locateConfigFile is selecting the configuration file we will use. +func locateConfigFile(inputFilePath string) (string, error) { + filename := "goff-proxy" + defaultLocations := []string{ + "./", + "/goff/", + "/etc/opt/goff/", + } + supportedExtensions := []string{ + "yaml", + "toml", + "json", + } + + if inputFilePath != "" { + if _, err := os.Stat(inputFilePath); err != nil { + return "", fmt.Errorf("impossible to find config file %s", inputFilePath) + } + return inputFilePath, nil + } + for _, location := range defaultLocations { + for _, ext := range supportedExtensions { + configFile := fmt.Sprintf("%s%s.%s", location, filename, ext) + if _, err := os.Stat(configFile); err == nil { + return configFile, nil + } + } + } + return "", fmt.Errorf( + "impossible to find config file in the default locations [%s]", strings.Join(defaultLocations, ",")) +} diff --git a/cmd/relayproxy/config/config_test.go b/cmd/relayproxy/config/config_test.go index 4317a045517..19b7efc38b3 100644 --- a/cmd/relayproxy/config/config_test.go +++ b/cmd/relayproxy/config/config_test.go @@ -1,14 +1,14 @@ package config_test import ( - "io" - "os" - "testing" - - "github.com/spf13/viper" + "fmt" + "github.com/spf13/pflag" "github.com/stretchr/testify/assert" "github.com/thomaspoignant/go-feature-flag/cmd/relayproxy/config" "go.uber.org/zap" + "io" + "os" + "testing" ) func TestParseConfig_fileFromPflag(t *testing.T) { @@ -19,7 +19,7 @@ func TestParseConfig_fileFromPflag(t *testing.T) { wantErr assert.ErrorAssertionFunc }{ { - name: "Valid file", + name: "Valid yaml file", fileLocation: "../testdata/config/valid-file.yaml", want: &config.Config{ ListenPort: 1031, @@ -44,6 +44,58 @@ func TestParseConfig_fileFromPflag(t *testing.T) { }, wantErr: assert.NoError, }, + { + name: "Valid json file", + fileLocation: "../testdata/config/valid-file.json", + want: &config.Config{ + ListenPort: 1031, + PollingInterval: 1000, + FileFormat: "yaml", + Host: "localhost", + Retriever: &config.RetrieverConf{ + Kind: "http", + URL: "https://raw.githubusercontent.com/thomaspoignant/go-feature-flag/main/examples/retriever_file/flags.yaml", + }, + Exporter: &config.ExporterConf{ + Kind: "log", + }, + StartWithRetrieverError: false, + RestAPITimeout: 5000, + Version: "1.X.X", + EnableSwagger: true, + APIKeys: []string{ + "apikey1", + "apikey2", + }, + }, + wantErr: assert.NoError, + }, + { + name: "Valid toml file", + fileLocation: "../testdata/config/valid-file.toml", + want: &config.Config{ + ListenPort: 1031, + PollingInterval: 1000, + FileFormat: "yaml", + Host: "localhost", + Retriever: &config.RetrieverConf{ + Kind: "http", + URL: "https://raw.githubusercontent.com/thomaspoignant/go-feature-flag/main/examples/retriever_file/flags.yaml", + }, + Exporter: &config.ExporterConf{ + Kind: "log", + }, + StartWithRetrieverError: false, + RestAPITimeout: 5000, + Version: "1.X.X", + EnableSwagger: true, + APIKeys: []string{ + "apikey1", + "apikey2", + }, + }, + wantErr: assert.NoError, + }, { name: "All default", fileLocation: "../testdata/config/all-default.yaml", @@ -63,31 +115,30 @@ func TestParseConfig_fileFromPflag(t *testing.T) { fileLocation: "../testdata/config/invalid-yaml.yaml", wantErr: assert.Error, }, - { - name: "File does not exists", - fileLocation: "../testdata/config/invalid-filename.yaml", - wantErr: assert.Error, - }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - viper.Set("config", tt.fileLocation) - got, err := config.ParseConfig(zap.L(), "1.X.X") + t.Setenv("version", "1.X.X") + f := pflag.NewFlagSet("config", pflag.ContinueOnError) + f.String("config", "", "Location of your config file") + _ = f.Parse([]string{fmt.Sprintf("--config=%s", tt.fileLocation)}) + + got, err := config.New(f, zap.L(), "1.X.X") if !tt.wantErr(t, err) { return } assert.Equal(t, tt.want, got, "Config not matching") - viper.Reset() }) } } func TestParseConfig_fileFromFolder(t *testing.T) { tests := []struct { - name string - want *config.Config - fileLocation string - wantErr assert.ErrorAssertionFunc + name string + want *config.Config + fileLocation string + wantErr assert.ErrorAssertionFunc + disableDefaultFileCreation bool }{ { name: "Valid file", @@ -134,18 +185,65 @@ func TestParseConfig_fileFromFolder(t *testing.T) { fileLocation: "../testdata/config/invalid-yaml.yaml", wantErr: assert.Error, }, + { + name: "Should return all default if file does not exist", + fileLocation: "../testdata/config/file-not-exist.yaml", + wantErr: assert.NoError, + want: &config.Config{ + ListenPort: 1031, + PollingInterval: 60000, + FileFormat: "yaml", + Host: "localhost", + StartWithRetrieverError: false, + RestAPITimeout: 5000, + Version: "1.X.X", + }, + }, + { + name: "Should return all default if no file in the command line", + fileLocation: "", + wantErr: assert.NoError, + want: &config.Config{ + ListenPort: 1031, + PollingInterval: 60000, + FileFormat: "yaml", + Host: "localhost", + StartWithRetrieverError: false, + RestAPITimeout: 5000, + Version: "1.X.X", + }, + }, + { + name: "Should return all default if no file and no default", + fileLocation: "", + wantErr: assert.NoError, + want: &config.Config{ + ListenPort: 1031, + PollingInterval: 60000, + FileFormat: "yaml", + Host: "localhost", + StartWithRetrieverError: false, + RestAPITimeout: 5000, + Version: "1.X.X", + }, + disableDefaultFileCreation: true, + }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { _ = os.Remove("./goff-proxy.yaml") - source, _ := os.Open(tt.fileLocation) - destination, _ := os.Create("./goff-proxy.yaml") - defer destination.Close() - defer source.Close() - defer os.Remove("./goff-proxy.yaml") - _, _ = io.Copy(destination, source) - - got, err := config.ParseConfig(zap.L(), "1.X.X") + if !tt.disableDefaultFileCreation { + source, _ := os.Open(tt.fileLocation) + destination, _ := os.Create("./goff-proxy.yaml") + defer destination.Close() + defer source.Close() + defer os.Remove("./goff-proxy.yaml") + _, _ = io.Copy(destination, source) + } + f := pflag.NewFlagSet("config", pflag.ContinueOnError) + f.String("config", "", "Location of your config file") + _ = f.Parse([]string{fmt.Sprintf("--config=%s", tt.fileLocation)}) + got, err := config.New(f, zap.L(), "1.X.X") if !tt.wantErr(t, err) { return } diff --git a/cmd/relayproxy/config/exporter.go b/cmd/relayproxy/config/exporter.go index 957085cfe97..29b79e3e0b3 100644 --- a/cmd/relayproxy/config/exporter.go +++ b/cmd/relayproxy/config/exporter.go @@ -4,19 +4,19 @@ import "fmt" // ExporterConf contains all the field to configure an exporter type ExporterConf struct { - Kind ExporterKind `mapstructure:"kind"` - OutputDir string `mapstructure:"outputDir"` - Format string `mapstructure:"format"` - Filename string `mapstructure:"filename"` - CsvTemplate string `mapstructure:"csvTemplate"` - Bucket string `mapstructure:"bucket"` - Path string `mapstructure:"path"` - EndpointURL string `mapstructure:"endpointUrl"` - Secret string `mapstructure:"secret"` - Meta map[string]string `mapstructure:"meta"` - LogFormat string `mapstructure:"logFormat"` - FlushInterval int64 `mapstructure:"flushInterval"` - MaxEventInMemory int64 `mapstructure:"maxEventInMemory"` + Kind ExporterKind `mapstructure:"kind" koanf:"kind"` + OutputDir string `mapstructure:"outputDir" koanf:"outputdir"` + Format string `mapstructure:"format" koanf:"format"` + Filename string `mapstructure:"filename" koanf:"filename"` + CsvTemplate string `mapstructure:"csvTemplate" koanf:"csvtemplate"` + Bucket string `mapstructure:"bucket" koanf:"bucket"` + Path string `mapstructure:"path" koanf:"path"` + EndpointURL string `mapstructure:"endpointUrl" koanf:"endpointurl"` + Secret string `mapstructure:"secret" koanf:"secret"` + Meta map[string]string `mapstructure:"meta" koanf:"meta"` + LogFormat string `mapstructure:"logFormat" koanf:"logformat"` + FlushInterval int64 `mapstructure:"flushInterval" koanf:"flushinterval"` + MaxEventInMemory int64 `mapstructure:"maxEventInMemory" koanf:"maxeventinmemory"` } func (c *ExporterConf) IsValid() error { diff --git a/cmd/relayproxy/config/notifier.go b/cmd/relayproxy/config/notifier.go index f8df019958a..a093a2797cf 100644 --- a/cmd/relayproxy/config/notifier.go +++ b/cmd/relayproxy/config/notifier.go @@ -3,11 +3,11 @@ package config import "fmt" type NotifierConf struct { - Kind NotifierKind `mapstruct:"notifier"` - SlackWebhookURL string `mapstruct:"slackWebhookUrl"` - EndpointURL string `mapstruct:"endpointUrl"` - Secret string `mapstruct:"secret"` - Meta map[string]string `mapstruct:"meta"` + Kind NotifierKind `mapstructure:"notifier" koanf:"notifier"` + SlackWebhookURL string `mapstructure:"slackWebhookUrl" koanf:"slackWebhookUrl"` + EndpointURL string `mapstructure:"endpointUrl" koanf:"endpointUrl"` + Secret string `mapstructure:"secret" koanf:"secret"` + Meta map[string]string `mapstructure:"meta" koanf:"meta"` } func (c *NotifierConf) IsValid() error { diff --git a/cmd/relayproxy/config/retriever.go b/cmd/relayproxy/config/retriever.go index ea2ffe515d8..4db93129782 100644 --- a/cmd/relayproxy/config/retriever.go +++ b/cmd/relayproxy/config/retriever.go @@ -4,22 +4,22 @@ import "fmt" // RetrieverConf contains all the field to configure a retriever type RetrieverConf struct { - Kind RetrieverKind `mapstructure:"kind"` - RepositorySlug string `mapstructure:"repositorySlug"` - Branch string `mapstructure:"branch"` - Path string `mapstructure:"path"` - GithubToken string `mapstructure:"githubToken"` - URL string `mapstructure:"url"` - Timeout int64 `mapstructure:"timeout"` - HTTPMethod string `mapstructure:"method"` - HTTPBody string `mapstructure:"body"` - HTTPHeaders map[string][]string `mapstructure:"headers"` - Bucket string `mapstructure:"bucket"` - Object string `mapstructure:"object"` - Item string `mapstructure:"item"` - Namespace string `mapstructure:"namespace"` - ConfigMap string `mapstructure:"configmap"` - Key string `mapstructure:"key"` + Kind RetrieverKind `mapstructure:"kind" koanf:"kind"` + RepositorySlug string `mapstructure:"repositorySlug" koanf:"repositoryslug"` + Branch string `mapstructure:"branch" koanf:"branch"` + Path string `mapstructure:"path" koanf:"path"` + GithubToken string `mapstructure:"githubToken" koanf:"githubtoken"` + URL string `mapstructure:"url" koanf:"url"` + Timeout int64 `mapstructure:"timeout" koanf:"timeout"` + HTTPMethod string `mapstructure:"method" koanf:"method"` + HTTPBody string `mapstructure:"body" koanf:"body"` + HTTPHeaders map[string][]string `mapstructure:"headers" koanf:"headers"` + Bucket string `mapstructure:"bucket" koanf:"bucket"` + Object string `mapstructure:"bucket" koanf:"bucket"` + Item string `mapstructure:"item" koanf:"item"` + Namespace string `mapstructure:"namespace" koanf:"namespace"` + ConfigMap string `mapstructure:"configmap" koanf:"configmap"` + Key string `mapstructure:"key" koanf:"key"` } // IsValid validate the configuration of the retriever diff --git a/cmd/relayproxy/main.go b/cmd/relayproxy/main.go index eda49b7d65d..cdce0cc3c0b 100644 --- a/cmd/relayproxy/main.go +++ b/cmd/relayproxy/main.go @@ -1,10 +1,10 @@ package main import ( - "flag" "fmt" - "github.com/spf13/pflag" + "os" + "github.com/thomaspoignant/go-feature-flag/cmd/relayproxy/api" "github.com/thomaspoignant/go-feature-flag/cmd/relayproxy/config" "github.com/thomaspoignant/go-feature-flag/cmd/relayproxy/docs" @@ -41,16 +41,16 @@ _____________________________________________` // @description Use configured APIKeys in yaml config as authorization keys, disabled when this yaml config is not set. func main() { // Init pFlag for config file - flag.String("config", "", "Location of your config file") - pflag.CommandLine.AddGoFlagSet(flag.CommandLine) - pflag.Parse() + f := pflag.NewFlagSet("config", pflag.ContinueOnError) + f.String("config", "", "Location of your config file") + _ = f.Parse(os.Args[1:]) // Init logger zapLog := log.InitLogger() defer func() { _ = zapLog.Sync() }() // Loading the configuration in viper - proxyConf, err := config.ParseConfig(zapLog, version) + proxyConf, err := config.New(f, zapLog, version) if err != nil { zapLog.Fatal("error while reading configuration", zap.Error(err)) } diff --git a/cmd/relayproxy/testdata/config/valid-file.json b/cmd/relayproxy/testdata/config/valid-file.json new file mode 100644 index 00000000000..975bcbb2a62 --- /dev/null +++ b/cmd/relayproxy/testdata/config/valid-file.json @@ -0,0 +1,17 @@ +{ + "listen": 1031, + "pollingInterval": 1000, + "startWithRetrieverError": false, + "retriever": { + "kind": "http", + "url": "https://raw.githubusercontent.com/thomaspoignant/go-feature-flag/main/examples/retriever_file/flags.yaml" + }, + "exporter": { + "kind": "log" + }, + "enableSwagger": true, + "apiKeys": [ + "apikey1", + "apikey2" + ] +} \ No newline at end of file diff --git a/cmd/relayproxy/testdata/config/valid-file.toml b/cmd/relayproxy/testdata/config/valid-file.toml new file mode 100644 index 00000000000..2daffc4740e --- /dev/null +++ b/cmd/relayproxy/testdata/config/valid-file.toml @@ -0,0 +1,12 @@ +listen = 1031.00 +pollingInterval = 1000.00 +startWithRetrieverError = false +enableSwagger = true +apiKeys = [ "apikey1", "apikey2" ] + +[retriever] +kind = "http" +url = "https://raw.githubusercontent.com/thomaspoignant/go-feature-flag/main/examples/retriever_file/flags.yaml" + +[exporter] +kind = "log" diff --git a/go.mod b/go.mod index d0326edc32d..bca5e887e18 100644 --- a/go.mod +++ b/go.mod @@ -15,13 +15,20 @@ require ( github.com/google/go-cmp v0.5.9 github.com/google/uuid v1.3.0 github.com/jessevdk/go-flags v1.5.0 + github.com/knadh/koanf/parsers/json v0.1.0 + github.com/knadh/koanf/parsers/toml v0.1.0 + github.com/knadh/koanf/parsers/yaml v0.1.0 + github.com/knadh/koanf/providers/confmap v0.1.0 + github.com/knadh/koanf/providers/env v0.1.0 + github.com/knadh/koanf/providers/file v0.1.0 + github.com/knadh/koanf/providers/posflag v0.1.0 + github.com/knadh/koanf/v2 v2.0.1 github.com/labstack/echo-contrib v0.14.1 github.com/labstack/echo/v4 v4.10.2 github.com/nikunjy/rules v1.2.0 github.com/prometheus/client_golang v1.15.0 github.com/r3labs/diff/v3 v3.0.1 github.com/spf13/pflag v1.0.5 - github.com/spf13/viper v1.15.0 github.com/stretchr/testify v1.8.2 github.com/swaggo/echo-swagger v1.4.0 github.com/swaggo/swag v1.8.12 @@ -73,22 +80,23 @@ require ( github.com/googleapis/gax-go/v2 v2.8.0 // indirect github.com/gorilla/handlers v1.5.1 // indirect github.com/gorilla/mux v1.8.0 // indirect - github.com/hashicorp/hcl v1.0.0 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/klauspost/compress v1.15.6 // indirect + github.com/knadh/koanf/maps v0.1.1 // indirect github.com/labstack/gommon v0.4.0 // indirect - github.com/magiconair/properties v1.8.7 // indirect github.com/mailru/easyjson v0.7.7 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.17 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect + github.com/mitchellh/copystructure v1.2.0 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect + github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect - github.com/pelletier/go-toml/v2 v2.0.6 // indirect + github.com/pelletier/go-toml v1.9.5 // indirect github.com/pierrec/lz4/v4 v4.1.8 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pkg/xattr v0.4.9 // indirect @@ -97,10 +105,6 @@ require ( github.com/prometheus/common v0.42.0 // indirect github.com/prometheus/procfs v0.9.0 // indirect github.com/sirupsen/logrus v1.9.0 // indirect - github.com/spf13/afero v1.9.3 // indirect - github.com/spf13/cast v1.5.0 // indirect - github.com/spf13/jwalterweatherman v1.1.0 // indirect - github.com/subosito/gotenv v1.4.2 // indirect github.com/swaggo/files/v2 v2.0.0 // indirect github.com/valyala/bytebufferpool v1.0.0 // indirect github.com/valyala/fasttemplate v1.2.2 // indirect @@ -123,7 +127,6 @@ require ( google.golang.org/grpc v1.54.0 // indirect google.golang.org/protobuf v1.30.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect - gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect k8s.io/klog/v2 v2.90.1 // indirect k8s.io/kube-openapi v0.0.0-20230308215209-15aac26d736a // indirect diff --git a/go.sum b/go.sum index 549cd6176ca..388adbe9c38 100644 --- a/go.sum +++ b/go.sum @@ -3,7 +3,6 @@ cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMT cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= -cloud.google.com/go v0.44.3/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= @@ -16,7 +15,6 @@ cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOY cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= -cloud.google.com/go v0.75.0/go.mod h1:VGuuCn7PG0dwsd5XPVm2Mm3wlh3EL55/79EKB6hlPTY= cloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg= cloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8= cloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0= @@ -50,7 +48,6 @@ cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0Zeo cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= -cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= cloud.google.com/go/storage v1.30.1 h1:uOdMxAs8HExqBlnLtnQyP0YkvbiDpdGShGKtx6U/oNM= cloud.google.com/go/storage v1.30.1/go.mod h1:NfxhC0UJE1aXSx7CIIbCf7y9HKT7BiccwkR7+P7gN8E= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= @@ -163,7 +160,6 @@ github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSw github.com/felixge/httpsnoop v1.0.2 h1:+nS9g82KMXccJ/wp0zyRW9ZBHFETmMGtkk+2CTTrW4o= github.com/felixge/httpsnoop v1.0.2/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/flosch/pongo2/v4 v4.0.2/go.mod h1:B5ObFANs/36VwxxlgKpdchIJHMvHB562PW+BWPhwZD8= -github.com/frankban/quicktest v1.14.3 h1:FJKSZTDHjyhriyC81FLQ0LY93eSai0ZyR/ZIkd3ZUKE= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/fsnotify/fsnotify v1.5.1/go.mod h1:T3375wBYaZdLLcVNkcVbzGHY7f1l/uK5T5Ai1i3InKU= @@ -296,7 +292,6 @@ github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hf github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= @@ -315,7 +310,6 @@ github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+ github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/googleapis/gax-go/v2 v2.8.0 h1:UBtEZqx1bjXtOQ5BVTkuYghXrr3N4V123VKJK67vJZc= github.com/googleapis/gax-go/v2 v2.8.0/go.mod h1:4orTrqY6hXxxaUL4LHIPl6lGo8vAE38/qKbhSAKP6QI= -github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gopherjs/gopherjs v0.0.0-20220221023154-0b2280d3ff96/go.mod h1:pRRIvn/QzFLrKfvEz3qUuEhtE/zLCWfreZ6J5gM2i+k= github.com/gorilla/css v1.0.0/go.mod h1:Dn721qIggHpt4+EFCcTLTU/vk5ySda2ReITrtgBl60c= @@ -342,7 +336,6 @@ github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/b github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= @@ -394,6 +387,24 @@ github.com/klauspost/compress v1.14.4/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47e github.com/klauspost/compress v1.15.0/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= github.com/klauspost/compress v1.15.6 h1:6D9PcO8QWu0JyaQ2zUMmu16T1T+zjjEpP91guRsvDfY= github.com/klauspost/compress v1.15.6/go.mod h1:PhcZ0MbTNciWF3rruxRgKxI5NkcHHrHUDtV4Yw2GlzU= +github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NIs= +github.com/knadh/koanf/maps v0.1.1/go.mod h1:npD/QZY3V6ghQDdcQzl1W4ICNVTkohC8E73eI2xW4yI= +github.com/knadh/koanf/parsers/json v0.1.0 h1:dzSZl5pf5bBcW0Acnu20Djleto19T0CfHcvZ14NJ6fU= +github.com/knadh/koanf/parsers/json v0.1.0/go.mod h1:ll2/MlXcZ2BfXD6YJcjVFzhG9P0TdJ207aIBKQhV2hY= +github.com/knadh/koanf/parsers/toml v0.1.0 h1:S2hLqS4TgWZYj4/7mI5m1CQQcWurxUz6ODgOub/6LCI= +github.com/knadh/koanf/parsers/toml v0.1.0/go.mod h1:yUprhq6eo3GbyVXFFMdbfZSo928ksS+uo0FFqNMnO18= +github.com/knadh/koanf/parsers/yaml v0.1.0 h1:ZZ8/iGfRLvKSaMEECEBPM1HQslrZADk8fP1XFUxVI5w= +github.com/knadh/koanf/parsers/yaml v0.1.0/go.mod h1:cvbUDC7AL23pImuQP0oRw/hPuccrNBS2bps8asS0CwY= +github.com/knadh/koanf/providers/confmap v0.1.0 h1:gOkxhHkemwG4LezxxN8DMOFopOPghxRVp7JbIvdvqzU= +github.com/knadh/koanf/providers/confmap v0.1.0/go.mod h1:2uLhxQzJnyHKfxG927awZC7+fyHFdQkd697K4MdLnIU= +github.com/knadh/koanf/providers/env v0.1.0 h1:LqKteXqfOWyx5Ab9VfGHmjY9BvRXi+clwyZozgVRiKg= +github.com/knadh/koanf/providers/env v0.1.0/go.mod h1:RE8K9GbACJkeEnkl8L/Qcj8p4ZyPXZIQ191HJi44ZaQ= +github.com/knadh/koanf/providers/file v0.1.0 h1:fs6U7nrV58d3CFAFh8VTde8TM262ObYf3ODrc//Lp+c= +github.com/knadh/koanf/providers/file v0.1.0/go.mod h1:rjJ/nHQl64iYCtAW2QQnF0eSmDEX/YZ/eNFj5yR6BvA= +github.com/knadh/koanf/providers/posflag v0.1.0 h1:mKJlLrKPcAP7Ootf4pBZWJ6J+4wHYujwipe7Ie3qW6U= +github.com/knadh/koanf/providers/posflag v0.1.0/go.mod h1:SYg03v/t8ISBNrMBRMlojH8OsKowbkXV7giIbBVgbz0= +github.com/knadh/koanf/v2 v2.0.1 h1:1dYGITt1I23x8cfx8ZnldtezdyaZtfAuRtIFOiRzK7g= +github.com/knadh/koanf/v2 v2.0.1/go.mod h1:ZeiIlIDXTE7w1lMT6UVcNiRAS2/rCeLn/GdLNvY1Dus= github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= @@ -417,8 +428,6 @@ github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgx github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.5/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= -github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= -github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= @@ -446,6 +455,8 @@ github.com/microcosm-cc/bluemonday v1.0.18/go.mod h1:Z0r70sCuXHig8YpBzCc5eGHAap2 github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/minio/highwayhash v1.0.2/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= +github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= +github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s= github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= @@ -456,6 +467,8 @@ github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ= +github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -496,15 +509,14 @@ github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FI github.com/pborman/getopt v0.0.0-20180729010549-6fdd0a2c7117/go.mod h1:85jBQOZwpVEaDAr341tbn15RS4fCAsIst0qp7i8ex1o= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= github.com/pelletier/go-toml v1.9.3/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= -github.com/pelletier/go-toml/v2 v2.0.6 h1:nrzqCb7j9cDFj2coyLNLaZuJTLjWjlaz6nvTvIwycIU= -github.com/pelletier/go-toml/v2 v2.0.6/go.mod h1:eumQOmlWiOPt5WriQQqoM5y18pDHwha2N+QD+EUNTek= +github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3ve8= +github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= github.com/pierrec/lz4/v4 v4.1.8 h1:ieHkV+i2BRzngO4Wd/3HGowuZStgq6QkPsD1eolNAO4= github.com/pierrec/lz4/v4 v4.1.8/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI= -github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= github.com/pkg/xattr v0.4.9 h1:5883YPCtkSd8LFbs13nXplj9g9tlrwoJRjgpgMu1/fE= github.com/pkg/xattr v0.4.9/go.mod h1:di8WF84zAKk8jzR1UBTEWh9AUlIZZ7M/JNt8e9B6ktU= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= @@ -550,24 +562,17 @@ github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2 github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= -github.com/spf13/afero v1.9.3 h1:41FoI0fD7OR7mGcKE/aOiLkGreyf8ifIOQmJANWogMk= -github.com/spf13/afero v1.9.3/go.mod h1:iUV7ddyEEZPO5gA3zD4fJt6iStLlL+Lg4m2cihcDf8Y= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cast v1.5.0 h1:rj3WzYc11XZaIZMPKmwP96zkFEnnAmV8s6XbB2aY32w= -github.com/spf13/cast v1.5.0/go.mod h1:SpXXQ5YoyJw6s3/6cMTQuxvgRl3PCJiyaX9p6b155UU= github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= github.com/spf13/cobra v1.2.1/go.mod h1:ExllRjgxM/piMAM+3tAZvg8fsklGAf3tPfi+i8t68Nk= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= -github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= github.com/spf13/viper v1.8.1/go.mod h1:o0Pch8wJ9BVSWGQMbra6iw0oQ5oktSIBaujf1rJH9Ns= -github.com/spf13/viper v1.15.0 h1:js3yy885G8xwJa6iOISGFwd+qlUo5AvyXb7CiihdtiU= -github.com/spf13/viper v1.15.0/go.mod h1:fFcTBJxvhhzSJiZy8n+PeW6t8l+KeT/uTARa0jHOQLA= github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= @@ -585,8 +590,6 @@ github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8= github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= -github.com/subosito/gotenv v1.4.2 h1:X1TuBLAMDFbaTAChgCBLu3DU3UPyELpnF2jjJ2cz/S8= -github.com/subosito/gotenv v1.4.2/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0= github.com/swaggo/echo-swagger v1.4.0 h1:RCxLKySw1SceHLqnmc41pKyiIeE+OiD7NSI7FUOBlLo= github.com/swaggo/echo-swagger v1.4.0/go.mod h1:Wh3VlwjZGZf/LH0s81tz916JokuPG7y/ZqaqnckYqoQ= github.com/swaggo/files/v2 v2.0.0 h1:hmAt8Dkynw7Ssz46F6pn8ok6YmGZqHSVLZ+HQM7i0kw= @@ -679,11 +682,9 @@ golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210314154223-e6e6c4f2bb5b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= -golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20220112180741-5e0467b6c7ce/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220214200702-86341886e292/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= @@ -764,7 +765,6 @@ golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwY golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= @@ -860,7 +860,6 @@ golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -868,7 +867,6 @@ golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210420072515-93ed5bcd2bfe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -966,7 +964,6 @@ golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4f golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= @@ -1048,9 +1045,7 @@ google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210222152913-aa3ee6e6a81c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= @@ -1111,8 +1106,6 @@ gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/ini.v1 v1.62.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/ini.v1 v1.66.4/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/ini.v1 v1.66.6/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= -gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/jcmturner/aescts.v1 v1.0.1/go.mod h1:nsR8qBOg+OucoIW+WMhB3GspUQXq9XorLnQb9XtvcOo= gopkg.in/jcmturner/dnsutils.v1 v1.0.1/go.mod h1:m3v+5svpVOhtFAP/wSz+yzh4Mc0Fg7eRhxkJMWSIz9Q= gopkg.in/jcmturner/goidentity.v3 v3.0.0/go.mod h1:oG2kH0IvSYNIu80dVAyu/yoefjq1mNfM5bm88whjWx4=