MCPcopy Create free account
hub / github.com/actiontech/dtle / decryptMySQLPwd

Function decryptMySQLPwd

api/handler/v2/validation.go:87–98  ·  view source on GitHub ↗
(apiSrcTask *models.SrcTaskConfig, apiDestTask *models.DestTaskConfig)

Source from the content-addressed store, hash-verified

85}
86
87func decryptMySQLPwd(apiSrcTask *models.SrcTaskConfig, apiDestTask *models.DestTaskConfig) (err error) {
88 // decrypt mysql password
89 apiSrcTask.ConnectionConfig.Password, err = handler.DecryptPassword(apiSrcTask.ConnectionConfig.Password, g.RsaPrivateKey)
90 if nil != err {
91 return fmt.Errorf("decrypt src mysql password failed: %v", err)
92 }
93 apiDestTask.ConnectionConfig.Password, err = handler.DecryptPassword(apiDestTask.ConnectionConfig.Password, g.RsaPrivateKey)
94 if nil != err {
95 return fmt.Errorf("decrypt src mysql password failed: %v", err)
96 }
97 return
98}
99
100func validateTaskConfig(apiSrcTask *models.SrcTaskConfig, apiDestTask *models.DestTaskConfig) ([]*models.MysqlTaskValidationReport, error) {
101 taskValidationRes := []*models.MysqlTaskValidationReport{}

Callers 2

ReverseJobV2Function · 0.85
ValidateJobV2Function · 0.85

Calls 1

DecryptPasswordFunction · 0.92

Tested by

no test coverage detected