@@ -25,6 +25,8 @@ const (
25
25
ParamCredentialsYcServiceAccountKey = "CredentialsYcServiceAccountKey"
26
26
ParamCredentialsYcMetadata = "CredentialsYcMetadata"
27
27
ParamCredentialsStatic = "CredentialsStatic"
28
+ ParamCredentialsStaticLogin = "CredentialsStaticLogin"
29
+ ParamCredentialsStaticPassword = "CredentialsStaticPassword"
28
30
ParamCredentialsToken = "CredentialsToken"
29
31
ParamCredentialsAnonymous = "CredentialsAnonymous"
30
32
ParamLogLevel = "LogLevel"
@@ -87,7 +89,37 @@ var credentialsChooser = map[string]credentialsDescription{
87
89
},
88
90
about : func () string {
89
91
return fmt .Sprintf (
90
- "value of parameter '%s' must be a string with template 'user:password'" ,
92
+ "value of parameter %q must be a string with template 'user:password'. Alternatively parameter for splitted parameters %q and %q" , //nolint:lll
93
+ ParamCredentialsStatic ,
94
+ ParamCredentialsStaticLogin ,
95
+ ParamCredentialsStaticPassword ,
96
+ )
97
+ },
98
+ },
99
+ ParamCredentialsStaticLogin : {
100
+ make : func (value string ) (ydb.Option , error ) {
101
+ return ydb .WithStaticCredentialsLogin (value ), nil
102
+ },
103
+ about : func () string {
104
+ return fmt .Sprintf (
105
+ "value of parameter %q must be a string with static credentials login. %q uses with %q. Alternatively you can use parameter %q" , //nolint:lll
106
+ ParamCredentialsStaticLogin ,
107
+ ParamCredentialsStaticLogin ,
108
+ ParamCredentialsStaticPassword ,
109
+ ParamCredentialsStatic ,
110
+ )
111
+ },
112
+ },
113
+ ParamCredentialsStaticPassword : {
114
+ make : func (value string ) (ydb.Option , error ) {
115
+ return ydb .WithStaticCredentialsPassword (value ), nil
116
+ },
117
+ about : func () string {
118
+ return fmt .Sprintf (
119
+ "value of parameter %q must be a string with static credentials password. %q uses with %q. Alternatively you can use parameter %q" , //nolint:lll
120
+ ParamCredentialsStaticPassword ,
121
+ ParamCredentialsStaticPassword ,
122
+ ParamCredentialsStaticLogin ,
91
123
ParamCredentialsStatic ,
92
124
)
93
125
},
0 commit comments