feat: backend core - auth, user, role, permission, device, webhook, monitoring, cache, repository, service, middleware, API handlers

This commit is contained in:
2026-04-02 11:19:50 +08:00
parent e59a77bc49
commit dcc1f186f8
298 changed files with 62603 additions and 0 deletions

26
internal/auth/errors.go Normal file
View File

@@ -0,0 +1,26 @@
package auth
import "errors"
var (
// ErrOAuthProviderNotSupported OAuth提供商不支持
ErrOAuthProviderNotSupported = errors.New("OAuth provider not supported")
// ErrOAuthCodeInvalid OAuth授权码无效
ErrOAuthCodeInvalid = errors.New("OAuth authorization code is invalid")
// ErrOAuthTokenExpired OAuth令牌已过期
ErrOAuthTokenExpired = errors.New("OAuth token has expired")
// ErrOAuthUserInfoFailed 获取OAuth用户信息失败
ErrOAuthUserInfoFailed = errors.New("failed to get OAuth user info")
// ErrOAuthStateInvalid OAuth状态验证失败
ErrOAuthStateInvalid = errors.New("OAuth state validation failed")
// ErrOAuthAlreadyBound 社交账号已绑定
ErrOAuthAlreadyBound = errors.New("social account already bound")
// ErrOAuthNotFound 未找到绑定的社交账号
ErrOAuthNotFound = errors.New("social account not found")
)