feat: add independent platform modules and multi-provider storage

This commit is contained in:
2026-09-23 14:51:14 +08:00
parent f91034477b
commit 208a9c3fbd
57 changed files with 4890 additions and 48 deletions

View File

@@ -21,9 +21,10 @@ var (
// Principal is the authenticated identity made available to business handlers.
// Claims are optional provider-specific values and should not be required by core business code.
type Principal struct {
UserID string
Roles []string
Claims map[string]any
UserID string `json:"userId"`
TenantID string `json:"tenantId,omitempty"`
Roles []string `json:"roles,omitempty"`
Claims map[string]any `json:"claims,omitempty"`
}
func (p Principal) HasRole(role string) bool {