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

Function BindAndValidate

api/handler/common.go:127–136  ·  view source on GitHub ↗
(logger g.LoggerType, c echo.Context, reqParam interface{})

Source from the content-addressed store, hash-verified

125}
126
127func BindAndValidate(logger g.LoggerType, c echo.Context, reqParam interface{}) error {
128 logger.Info("validate params")
129 if err := c.Bind(reqParam); nil != err {
130 return fmt.Errorf("bind reqParam param failed, error: %v", err)
131 }
132 if err := c.Validate(reqParam); nil != err {
133 return fmt.Errorf("invalid params:\n%v", err)
134 }
135 return nil
136}
137
138func rsaDecrypt(ciphertext []byte, privateKey string) ([]byte, error) {
139 block, _ := pem.Decode([]byte(privateKey))

Callers 15

JobListV2Function · 0.92
GetJobDetailFunction · 0.92
CreateOrUpdateSyncJobV2Function · 0.92
PauseJobV2Function · 0.92
ResumeJobV2Function · 0.92
DeleteJobV2Function · 0.92
GetJobPositionV2Function · 0.92
ReverseStartJobV2Function · 0.92
ReverseJobV2Function · 0.92

Calls 1

ValidateMethod · 0.80

Tested by

no test coverage detected