feat: complete Kra admin backend migration

This commit is contained in:
2026-08-14 00:28:37 +08:00
parent c4bf7ee03b
commit acba9624d7
88 changed files with 1765 additions and 8623 deletions
+2 -4
View File
@@ -1,14 +1,12 @@
package biz
import (
v1 "kra/api/kratos/admin/v1"
"github.com/go-kratos/kratos/v3/errors"
)
var (
// ErrAdminNotFound error admin not found.
ErrAdminNotFound = errors.NotFound(v1.ErrorReason_ADMIN_NOT_FOUND.String(), "admin not found")
ErrUserNotFound = errors.NotFound("USER_NOT_FOUND", "user not found")
// ErrInvalidCredentials is returned for any failed login, regardless of
// whether the user exists, to avoid leaking which accounts are registered.
ErrInvalidCredentials = errors.Unauthorized(v1.ErrorReason_INVALID_CREDENTIALS.String(), "invalid credentials")
ErrInvalidCredentials = errors.Unauthorized("INVALID_CREDENTIALS", "invalid credentials")
)