users
Package github.com/emergent-company/emergent.memory/apps/server/pkg/sdk/users
The users client manages the authenticated user’s profile.
Methods
Section titled “Methods”func (c *Client) GetProfile(ctx context.Context) (*UserProfile, error)func (c *Client) UpdateProfile(ctx context.Context, req *UpdateProfileRequest) (*UserProfile, error)Key Types
Section titled “Key Types”UserProfile
Section titled “UserProfile”type UserProfile struct { ID string Name string Email string Role string CreatedAt time.Time UpdatedAt time.Time}UpdateProfileRequest
Section titled “UpdateProfileRequest”type UpdateProfileRequest struct { Name string Email string}Example
Section titled “Example”// Get the current user's profileprofile, err := client.Users.GetProfile(ctx)fmt.Printf("Logged in as: %s (%s)\n", profile.Name, profile.Email)
// Update the profileupdated, err := client.Users.UpdateProfile(ctx, &users.UpdateProfileRequest{ Name: "Jane Smith",})