Skip to content

[skip changelog] Add documentation for Settings service #678

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 8, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion rpc/settings/settings.pb.go

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

14 changes: 13 additions & 1 deletion rpc/settings/settings.proto
Original file line number Diff line number Diff line change
Expand Up @@ -19,23 +19,35 @@ package cc.arduino.cli.settings;

option go_package = "github.com/arduino/arduino-cli/rpc/settings";

// The Settings service provides an interface to Arduino CLI's configuration
// options
service Settings {
// List all the settings.
rpc GetAll(GetAllRequest) returns (RawData);
// Set multiple settings values at once.
rpc Merge(RawData) returns (MergeResponse);
// Get the value of a specific setting.
rpc GetValue(GetValueRequest) returns (Value);
// Set the value of a specific setting.
rpc SetValue(Value) returns (SetValueResponse);
}

message RawData {
// The settings, in JSON format.
string jsonData = 1;
}

message Value {
// The key of the setting.
string key = 1;
// The setting, in JSON format.
string jsonData = 2;
}

message GetAllRequest {}
message GetValueRequest { string key = 1; }
message GetValueRequest {
// The key of the setting.
string key = 1;
}
message MergeResponse {}
message SetValueResponse {}