From bb5c6a6860b5e699b919a7f553d4bd1e7c56f0fd Mon Sep 17 00:00:00 2001 From: nabbar Date: Tue, 8 Aug 2023 13:47:36 +0200 Subject: [PATCH] Package request: - options: fix validator tag for struct, following bump dependencies --- request/options.go | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/request/options.go b/request/options.go index 5410f6f6..e4efd7fa 100644 --- a/request/options.go +++ b/request/options.go @@ -54,15 +54,15 @@ type OptionsToken struct { } type OptionsAuth struct { - Basic OptionsCredentials `json:"basic" yaml:"basic" toml:"basic" mapstructure:"basic" validate:"required,dive"` - Bearer OptionsToken `json:"bearer" yaml:"bearer" toml:"bearer" mapstructure:"bearer" validate:"required,dive"` + Basic OptionsCredentials `json:"basic" yaml:"basic" toml:"basic" mapstructure:"basic" validate:"dive"` + Bearer OptionsToken `json:"bearer" yaml:"bearer" toml:"bearer" mapstructure:"bearer" validate:"dive"` } type OptionsHealth struct { Enable bool `json:"enable" yaml:"enable" toml:"enable" mapstructure:"enable"` Endpoint string `json:"endpoint" yaml:"endpoint" toml:"endpoint" mapstructure:"endpoint" validate:"url"` - Auth OptionsAuth `json:"auth" yaml:"auth" toml:"auth" mapstructure:"auth" validate:"required,dive"` - Result OptionsHealthResult `json:"result" yaml:"result" toml:"result" mapstructure:"result" validate:"required,dive"` + Auth OptionsAuth `json:"auth" yaml:"auth" toml:"auth" mapstructure:"auth" validate:"dive"` + Result OptionsHealthResult `json:"result" yaml:"result" toml:"result" mapstructure:"result" validate:"dive"` Monitor moncfg.Config `json:"monitor" yaml:"monitor" toml:"monitor" mapstructure:"monitor" validate:"required,dive"` } @@ -74,10 +74,10 @@ type OptionsHealthResult struct { } type Options struct { - Endpoint string `json:"endpoint" yaml:"endpoint" toml:"endpoint" mapstructure:"endpoint" validate:"required,url"` - HttpClient libhtc.Options `json:"http_client" yaml:"http_client" toml:"http_client" mapstructure:"http_client" validate:"required,dive"` - Auth OptionsAuth `json:"auth" yaml:"auth" toml:"auth" mapstructure:"auth" validate:"required,dive"` - Health OptionsHealth `json:"health" yaml:"health" toml:"health" mapstructure:"health" validate:"required,dive"` + Endpoint string `json:"endpoint" yaml:"endpoint" toml:"endpoint" mapstructure:"endpoint" validate:"url"` + HttpClient libhtc.Options `json:"http_client" yaml:"http_client" toml:"http_client" mapstructure:"http_client" validate:"dive"` + Auth OptionsAuth `json:"auth" yaml:"auth" toml:"auth" mapstructure:"auth" validate:"dive"` + Health OptionsHealth `json:"health" yaml:"health" toml:"health" mapstructure:"health" validate:"dive"` tls libtls.FctTLSDefault log liblog.FuncLog