From 41b0c98c4760e008dc0066b7cb4a85463bb3db60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lovro=20Ma=C5=BEgon?= Date: Wed, 7 Aug 2024 10:53:36 +0200 Subject: [PATCH] make generate --- paramgen_dest.go | 9 +++++++-- paramgen_src.go | 9 +++++++-- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/paramgen_dest.go b/paramgen_dest.go index 7880dbc..376ba64 100644 --- a/paramgen_dest.go +++ b/paramgen_dest.go @@ -7,9 +7,14 @@ import ( "github.com/conduitio/conduit-commons/config" ) +const ( + DestinationConfigDestinationConfigParam = "destinationConfigParam" + DestinationConfigGlobalConfigParamName = "global_config_param_name" +) + func (DestinationConfig) Parameters() map[string]config.Parameter { return map[string]config.Parameter{ - "destinationConfigParam": { + DestinationConfigDestinationConfigParam: { Default: "yes", Description: "DestinationConfigParam must be either yes or no (defaults to yes).", Type: config.ParameterTypeString, @@ -17,7 +22,7 @@ func (DestinationConfig) Parameters() map[string]config.Parameter { config.ValidationInclusion{List: []string{"yes", "no"}}, }, }, - "global_config_param_name": { + DestinationConfigGlobalConfigParamName: { Default: "", Description: "GlobalConfigParam is named global_config_param_name and needs to be\nprovided by the user.", Type: config.ParameterTypeString, diff --git a/paramgen_src.go b/paramgen_src.go index 8faf018..539d403 100644 --- a/paramgen_src.go +++ b/paramgen_src.go @@ -7,9 +7,14 @@ import ( "github.com/conduitio/conduit-commons/config" ) +const ( + SourceConfigFoo = "foo" + SourceConfigGlobalConfigParamName = "global_config_param_name" +) + func (SourceConfig) Parameters() map[string]config.Parameter { return map[string]config.Parameter{ - "foo": { + SourceConfigFoo: { Default: "", Description: "SourceConfigParam is named foo and must be provided by the user.", Type: config.ParameterTypeString, @@ -17,7 +22,7 @@ func (SourceConfig) Parameters() map[string]config.Parameter { config.ValidationRequired{}, }, }, - "global_config_param_name": { + SourceConfigGlobalConfigParamName: { Default: "", Description: "GlobalConfigParam is named global_config_param_name and needs to be\nprovided by the user.", Type: config.ParameterTypeString,