A community based topic aggregation platform built on atproto
1package users 2 3import "context" 4 5// UserRepository defines the interface for user data persistence 6type UserRepository interface { 7 Create(ctx context.Context, user *User) (*User, error) 8 GetByDID(ctx context.Context, did string) (*User, error) 9 GetByHandle(ctx context.Context, handle string) (*User, error) 10 UpdateHandle(ctx context.Context, did, newHandle string) (*User, error) 11 GetByDIDs(ctx context.Context, dids []string) (map[string]*User, error) 12} 13 14// UserService defines the interface for user business logic 15type UserService interface { 16 CreateUser(ctx context.Context, req CreateUserRequest) (*User, error) 17 GetUserByDID(ctx context.Context, did string) (*User, error) 18 GetUserByHandle(ctx context.Context, handle string) (*User, error) 19 UpdateHandle(ctx context.Context, did, newHandle string) (*User, error) 20 ResolveHandleToDID(ctx context.Context, handle string) (string, error) 21 RegisterAccount(ctx context.Context, req RegisterAccountRequest) (*RegisterAccountResponse, error) 22}