@@ -136,9 +136,10 @@ type SFTP struct {
136
136
Hostname string
137
137
Username string
138
138
139
- Password string
140
- ClientPrivateKey string
141
- HostPublicKey string
139
+ Password string
140
+ ClientPrivateKey string
141
+ ClientPrivateKeyFile string
142
+ HostPublicKey string
142
143
143
144
DialTimeout time.Duration
144
145
MaxConnectionsPerFile int
@@ -154,9 +155,10 @@ func (cfg *SFTP) MarshalJSON() ([]byte, error) {
154
155
Hostname string
155
156
Username string
156
157
157
- Password string
158
- ClientPrivateKey string
159
- HostPublicKey string
158
+ Password string
159
+ ClientPrivateKey string
160
+ ClientPrivateKeyFile string
161
+ HostPublicKey string
160
162
161
163
DialTimeout time.Duration
162
164
MaxConnectionsPerFile int
@@ -168,9 +170,10 @@ func (cfg *SFTP) MarshalJSON() ([]byte, error) {
168
170
Hostname : cfg .Hostname ,
169
171
Username : cfg .Username ,
170
172
171
- Password : mask .Password (cfg .Password ),
172
- ClientPrivateKey : cfg .ClientPrivateKey ,
173
- HostPublicKey : cfg .HostPublicKey ,
173
+ Password : mask .Password (cfg .Password ),
174
+ ClientPrivateKey : cfg .ClientPrivateKey ,
175
+ ClientPrivateKeyFile : cfg .ClientPrivateKeyFile ,
176
+ HostPublicKey : cfg .HostPublicKey ,
174
177
175
178
DialTimeout : cfg .DialTimeout ,
176
179
MaxConnectionsPerFile : cfg .MaxConnectionsPerFile ,
@@ -207,6 +210,7 @@ func (cfg *SFTP) String() string {
207
210
buf .WriteString (fmt .Sprintf ("Username=%s, " , cfg .Username ))
208
211
buf .WriteString (fmt .Sprintf ("Password=%s, " , mask .Password (cfg .Password )))
209
212
buf .WriteString (fmt .Sprintf ("ClientPrivateKey:%v, " , cfg .ClientPrivateKey != "" ))
213
+ buf .WriteString (fmt .Sprintf ("ClientPrivateKeyFile:%v, " , cfg .ClientPrivateKeyFile != "" ))
210
214
buf .WriteString (fmt .Sprintf ("HostPublicKey:%v}, " , cfg .HostPublicKey != "" ))
211
215
return buf .String ()
212
216
}
0 commit comments