createAuthFunc 创建FTP认证函数
(info *common.HostInfo, config *common.Config, state *common.State)
| 71 | |
| 72 | // createAuthFunc 创建FTP认证函数 |
| 73 | func (p *FTPPlugin) createAuthFunc(info *common.HostInfo, config *common.Config, state *common.State) AuthFunc { |
| 74 | return func(ctx context.Context, cred Credential) *AuthResult { |
| 75 | return p.doFTPAuth(ctx, info, cred, config, state) |
| 76 | } |
| 77 | } |
| 78 | |
| 79 | // doFTPAuth 执行FTP认证 |
| 80 | func (p *FTPPlugin) doFTPAuth(ctx context.Context, info *common.HostInfo, cred Credential, config *common.Config, state *common.State) *AuthResult { |