Add workflow execution process

This commit is contained in:
yoan
2024-11-18 19:40:24 +08:00
parent bde2147dd3
commit 775b12aec1
23 changed files with 741 additions and 21 deletions

View File

@@ -1,6 +1,16 @@
package domain
var ErrAuthFailed = NewXError(4999, "auth failed")
var (
ErrInvalidParams = NewXError(400, "invalid params")
ErrRecordNotFound = NewXError(404, "record not found")
)
func IsRecordNotFound(err error) bool {
if e, ok := err.(*XError); ok {
return e.GetCode() == ErrRecordNotFound.GetCode()
}
return false
}
type XError struct {
Code int `json:"code"`