You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

21 lines
532 B

package dao
import (
"context"
"errors"
"go-common/app/service/main/workflow/model"
"go-common/library/log"
)
// Callback callback message
func (d *Dao) Callback(c context.Context, chall *model.Challenge, businessID int8) (err error) {
if URL, ok := d.callbackMap[businessID]; ok {
if err = d.callback.Post(context.Background(), URL, "", nil, &chall); err != nil {
log.Error("d.CallbackSetting(%s) error(%v)", chall, err)
return
}
return
}
return errors.New("Callback cannot find businessID in callbackMap")
}