Skip to content

Commit

Permalink
Add a GetUserPreferencesResponse message
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanclark committed Jun 29, 2023
1 parent e7368ff commit 939192e
Show file tree
Hide file tree
Showing 11 changed files with 161 additions and 85 deletions.
2 changes: 1 addition & 1 deletion api/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -3985,7 +3985,7 @@ func (c *Client) GetAssistantEmbeddings(ctx context.Context, in *assist.GetAssis
}

// GetUserPreferences returns the user preferences for a given user.
func (c *Client) GetUserPreferences(ctx context.Context, in *userpreferencespb.GetUserPreferencesRequest) (*userpreferencespb.UserPreferences, error) {
func (c *Client) GetUserPreferences(ctx context.Context, in *userpreferencespb.GetUserPreferencesRequest) (*userpreferencespb.GetUserPreferencesResponse, error) {
resp, err := c.grpc.GetUserPreferences(ctx, in)
if err != nil {
return nil, trail.FromGRPC(err)
Expand Down
174 changes: 122 additions & 52 deletions api/gen/proto/go/userpreferences/v1/userpreferences.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions api/gen/proto/go/userpreferences/v1/userpreferences_grpc.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 7 additions & 1 deletion api/proto/teleport/userpreferences/v1/userpreferences.proto
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@ message GetUserPreferencesRequest {
string username = 1;
}

// GetUserPreferencesResponse is a response to get the user preferences.
message GetUserPreferencesResponse {
// preferences is the user preferences.
UserPreferences preferences = 1;
}

// UpsertUserPreferencesRequest is a request to create or update the user preferences.
message UpsertUserPreferencesRequest {
// preferences is the new user preferences to set.
Expand All @@ -47,7 +53,7 @@ message UpsertUserPreferencesRequest {
// UserPreferencesService is a service that stores user settings.
service UserPreferencesService {
// GetUserPreferences returns the user preferences for a given user.
rpc GetUserPreferences(GetUserPreferencesRequest) returns (UserPreferences);
rpc GetUserPreferences(GetUserPreferencesRequest) returns (GetUserPreferencesResponse);
// UpsertUserPreferences creates or updates user preferences for a given username.
rpc UpsertUserPreferences(UpsertUserPreferencesRequest) returns (google.protobuf.Empty);
}

0 comments on commit 939192e

Please sign in to comment.