New capability interfaces: - menus.Menus: menu/nav access (GetMenuByName, GetMenuItems) - subscriptions.Subscriptions: tier/plan access (GetUserTierLevel, GetTierBySlug, ListActivePlans) - auth.PublicUsers: public user profiles (GetByUsername, GetByID) - plugin.PluginBridge: inter-plugin service registry with typed GetServiceAs[T] helper All added to ServiceDeps for plugin consumption. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
26 lines
597 B
Go
26 lines
597 B
Go
package auth
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/google/uuid"
|
|
)
|
|
|
|
// PublicUsers provides public/community user profile access for plugins.
|
|
type PublicUsers interface {
|
|
GetByUsername(ctx context.Context, username string) (*PublicUserProfile, error)
|
|
GetByID(ctx context.Context, id uuid.UUID) (*PublicUserProfile, error)
|
|
}
|
|
|
|
// PublicUserProfile is a plugin-facing view of a public user.
|
|
type PublicUserProfile struct {
|
|
ID uuid.UUID
|
|
Email string
|
|
Username string
|
|
DisplayName string
|
|
AvatarURL string
|
|
Bio string
|
|
EmailVerified bool
|
|
Role string
|
|
}
|