Unverified Commit 50a8bf5c authored by Cristian Maglie's avatar Cristian Maglie Committed by GitHub

[breaking] Remove gRPC `settings` service (#2411)

* Removed setting service

* Updated docs

* Update mkdocs configuration
parent 0e5f6294
......@@ -237,13 +237,11 @@ tasks:
desc: Compile protobuf definitions
cmds:
- '{{ default "protoc" .PROTOC_BINARY }} --proto_path=rpc --go_out=./rpc --go_opt=paths=source_relative --go-grpc_out=./rpc --go-grpc_opt=paths=source_relative ./rpc/cc/arduino/cli/commands/v1/*.proto'
- '{{ default "protoc" .PROTOC_BINARY }} --proto_path=rpc --go_out=./rpc --go_opt=paths=source_relative --go-grpc_out=./rpc --go-grpc_opt=paths=source_relative ./rpc/cc/arduino/cli/settings/v1/*.proto'
protoc:docs:
desc: Generate docs for protobuf definitions
cmds:
- '{{ default "protoc" .PROTOC_BINARY }} --doc_out=./docs/rpc --doc_opt=markdown,commands.md --proto_path=rpc ./rpc/cc/arduino/cli/commands/v1/*.proto'
- '{{ default "protoc" .PROTOC_BINARY }} --doc_out=./docs/rpc --doc_opt=markdown,settings.md --proto_path=rpc ./rpc/cc/arduino/cli/settings/v1/*.proto'
docs:include-configuration-json-schema:
desc: Copy configuration JSON schema to make it available in documentation
......
......@@ -29,7 +29,6 @@ import (
"time"
rpc "github.com/arduino/arduino-cli/rpc/cc/arduino/cli/commands/v1"
"github.com/arduino/arduino-cli/rpc/cc/arduino/cli/settings/v1"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials/insecure"
)
......@@ -63,8 +62,6 @@ func main() {
// Create an instance of the gRPC clients.
client := rpc.NewArduinoCoreServiceClient(conn)
settingsClient := settings.NewSettingsServiceClient(conn)
// Now we can call various methods of the API...
// `Version` can be called without any setup or init procedure.
......@@ -76,39 +73,39 @@ func main() {
// Use SetValue to configure the arduino-cli directories.
log.Println("calling SetValue")
callSetValue(settingsClient)
callSetValue(client)
// List all the settings.
log.Println("calling GetAll()")
callGetAll(settingsClient)
// List all settings
log.Println("calling SettingsGetAll()")
callGetAll(client)
// Merge applies multiple settings values at once.
log.Println("calling Merge()")
callMerge(settingsClient, `{"foo": {"value": "bar"}, "daemon":{"port":"422"}, "board_manager": {"additional_urls":["https://example.com"]}}`)
log.Println("calling SettingsMerge()")
callMerge(client, `{"foo": {"value": "bar"}, "daemon":{"port":"422"}, "board_manager": {"additional_urls":["https://example.com"]}}`)
log.Println("calling GetAll()")
callGetAll(settingsClient)
log.Println("calling SettingsGetAll()")
callGetAll(client)
log.Println("calling Merge()")
callMerge(settingsClient, `{"foo": {} }`)
log.Println("calling SettingsMerge()")
callMerge(client, `{"foo": {} }`)
log.Println("calling GetAll()")
callGetAll(settingsClient)
log.Println("calling SettingsGetAll()")
callGetAll(client)
log.Println("calling Merge()")
callMerge(settingsClient, `{"foo": "bar" }`)
log.Println("calling SettingsMerge()")
callMerge(client, `{"foo": "bar" }`)
// Get the value of the foo key.
log.Println("calling GetValue(foo)")
callGetValue(settingsClient)
log.Println("calling SettingsGetValue(foo)")
callGetValue(client)
// List all the settings.
log.Println("calling GetAll()")
callGetAll(settingsClient)
// List all settings
log.Println("calling SettingsGetAll()")
callGetAll(client)
// Write settings to file.
log.Println("calling Write()")
callWrite(settingsClient)
callWrite(client)
// Before we can do anything with the CLI, an "instance" must be created.
// We keep a reference to the created instance because we will need it to
......@@ -121,7 +118,7 @@ func main() {
// We set up the proxy and then run the update to verify that the proxy settings are currently used
log.Println("calling setProxy")
callSetProxy(settingsClient)
callSetProxy(client)
// With a brand new instance, the first operation should always be updating
// the index.
......@@ -247,22 +244,21 @@ func callVersion(client rpc.ArduinoCoreServiceClient) {
log.Printf("arduino-cli version: %v", versionResp.GetVersion())
}
func callSetValue(client settings.SettingsServiceClient) {
_, err := client.SetValue(context.Background(),
&settings.SetValueRequest{
func callSetValue(client rpc.ArduinoCoreServiceClient) {
_, err := client.SettingsSetValue(context.Background(),
&rpc.SettingsSetValueRequest{
Key: "directories",
JsonData: `{"data": "` + dataDir + `", "downloads": "` + path.Join(dataDir, "staging") + `", "user": "` + path.Join(dataDir, "sketchbook") + `"}`,
})
if err != nil {
log.Fatalf("Error setting settings value: %s", err)
}
}
func callSetProxy(client settings.SettingsServiceClient) {
_, err := client.SetValue(context.Background(),
&settings.SetValueRequest{
func callSetProxy(client rpc.ArduinoCoreServiceClient) {
_, err := client.SettingsSetValue(context.Background(),
&rpc.SettingsSetValueRequest{
Key: "network.proxy",
JsonData: `"http://localhost:3128"`,
})
......@@ -272,9 +268,9 @@ func callSetProxy(client settings.SettingsServiceClient) {
}
}
func callUnsetProxy(client settings.SettingsServiceClient) {
_, err := client.SetValue(context.Background(),
&settings.SetValueRequest{
func callUnsetProxy(client rpc.ArduinoCoreServiceClient) {
_, err := client.SettingsSetValue(context.Background(),
&rpc.SettingsSetValueRequest{
Key: "network.proxy",
JsonData: `""`,
})
......@@ -284,9 +280,9 @@ func callUnsetProxy(client settings.SettingsServiceClient) {
}
}
func callMerge(client settings.SettingsServiceClient, jsonData string) {
_, err := client.Merge(context.Background(),
&settings.MergeRequest{
func callMerge(client rpc.ArduinoCoreServiceClient, jsonData string) {
_, err := client.SettingsMerge(context.Background(),
&rpc.SettingsMergeRequest{
JsonData: jsonData,
})
......@@ -295,9 +291,9 @@ func callMerge(client settings.SettingsServiceClient, jsonData string) {
}
}
func callGetValue(client settings.SettingsServiceClient) {
getValueResp, err := client.GetValue(context.Background(),
&settings.GetValueRequest{
func callGetValue(client rpc.ArduinoCoreServiceClient) {
getValueResp, err := client.SettingsGetValue(context.Background(),
&rpc.SettingsGetValueRequest{
Key: "foo",
})
......@@ -308,8 +304,8 @@ func callGetValue(client settings.SettingsServiceClient) {
log.Printf("Value: %s: %s", getValueResp.GetKey(), getValueResp.GetJsonData())
}
func callGetAll(client settings.SettingsServiceClient) {
getAllResp, err := client.GetAll(context.Background(), &settings.GetAllRequest{})
func callGetAll(client rpc.ArduinoCoreServiceClient) {
getAllResp, err := client.SettingsGetAll(context.Background(), &rpc.SettingsGetAllRequest{})
if err != nil {
log.Fatalf("Error getting settings: %s", err)
......@@ -318,10 +314,10 @@ func callGetAll(client settings.SettingsServiceClient) {
log.Printf("Settings: %s", getAllResp.GetJsonData())
}
func callWrite(client settings.SettingsServiceClient) {
_, err := client.Write(context.Background(),
&settings.WriteRequest{
FilePath: path.Join(dataDir, "written-settings.yml"),
func callWrite(client rpc.ArduinoCoreServiceClient) {
_, err := client.SettingsWrite(context.Background(),
&rpc.SettingsWriteRequest{
FilePath: path.Join(dataDir, "written-rpc.Settingsyml"),
})
if err != nil {
......
......@@ -23,20 +23,15 @@ import (
"strings"
"github.com/arduino/arduino-cli/configuration"
rpc "github.com/arduino/arduino-cli/rpc/cc/arduino/cli/settings/v1"
rpc "github.com/arduino/arduino-cli/rpc/cc/arduino/cli/commands/v1"
)
// SettingsService implements the `Settings` service
type SettingsService struct {
rpc.UnimplementedSettingsServiceServer
}
// GetAll returns a message with a string field containing all the settings
// SettingsGetAll returns a message with a string field containing all the settings
// currently in use, marshalled in JSON format.
func (s *SettingsService) GetAll(ctx context.Context, req *rpc.GetAllRequest) (*rpc.GetAllResponse, error) {
func (s *ArduinoCoreServerImpl) SettingsGetAll(ctx context.Context, req *rpc.SettingsGetAllRequest) (*rpc.SettingsGetAllResponse, error) {
b, err := json.Marshal(configuration.Settings.AllSettings())
if err == nil {
return &rpc.GetAllResponse{
return &rpc.SettingsGetAllResponse{
JsonData: string(b),
}, nil
}
......@@ -72,8 +67,8 @@ func mapper(toMap map[string]interface{}) map[string]interface{} {
return res
}
// Merge applies multiple settings values at once.
func (s *SettingsService) Merge(ctx context.Context, req *rpc.MergeRequest) (*rpc.MergeResponse, error) {
// SettingsMerge applies multiple settings values at once.
func (s *ArduinoCoreServerImpl) SettingsMerge(ctx context.Context, req *rpc.SettingsMergeRequest) (*rpc.SettingsMergeResponse, error) {
var toMerge map[string]interface{}
if err := json.Unmarshal([]byte(req.GetJsonData()), &toMerge); err != nil {
return nil, err
......@@ -88,13 +83,13 @@ func (s *SettingsService) Merge(ctx context.Context, req *rpc.MergeRequest) (*rp
configuration.Settings.Set(k, v)
}
return &rpc.MergeResponse{}, nil
return &rpc.SettingsMergeResponse{}, nil
}
// GetValue returns a settings value given its key. If the key is not present
// SettingsGetValue returns a settings value given its key. If the key is not present
// an error will be returned, so that we distinguish empty settings from missing
// ones.
func (s *SettingsService) GetValue(ctx context.Context, req *rpc.GetValueRequest) (*rpc.GetValueResponse, error) {
func (s *ArduinoCoreServerImpl) SettingsGetValue(ctx context.Context, req *rpc.SettingsGetValueRequest) (*rpc.SettingsGetValueResponse, error) {
key := req.GetKey()
// Check if settings key actually existing, we don't use Viper.InConfig()
......@@ -112,7 +107,7 @@ func (s *SettingsService) GetValue(ctx context.Context, req *rpc.GetValueRequest
}
b, err := json.Marshal(configuration.Settings.Get(key))
value := &rpc.GetValueResponse{}
value := &rpc.SettingsGetValueResponse{}
if err == nil {
value.Key = key
value.JsonData = string(b)
......@@ -121,8 +116,8 @@ func (s *SettingsService) GetValue(ctx context.Context, req *rpc.GetValueRequest
return value, err
}
// SetValue updates or set a value for a certain key.
func (s *SettingsService) SetValue(ctx context.Context, val *rpc.SetValueRequest) (*rpc.SetValueResponse, error) {
// SettingsSetValue updates or set a value for a certain key.
func (s *ArduinoCoreServerImpl) SettingsSetValue(ctx context.Context, val *rpc.SettingsSetValueRequest) (*rpc.SettingsSetValueResponse, error) {
key := val.GetKey()
var value interface{}
......@@ -131,22 +126,22 @@ func (s *SettingsService) SetValue(ctx context.Context, val *rpc.SetValueRequest
configuration.Settings.Set(key, value)
}
return &rpc.SetValueResponse{}, err
return &rpc.SettingsSetValueResponse{}, err
}
// Write to file set in request the settings currently stored in memory.
// SettingsWrite to file set in request the settings currently stored in memory.
// We don't have a Read() function, that's not necessary since we only want one config file to be used
// and that's picked up when the CLI is run as daemon, either using the default path or a custom one
// set with the --config-file flag.
func (s *SettingsService) Write(ctx context.Context, req *rpc.WriteRequest) (*rpc.WriteResponse, error) {
func (s *ArduinoCoreServerImpl) SettingsWrite(ctx context.Context, req *rpc.SettingsWriteRequest) (*rpc.SettingsWriteResponse, error) {
if err := configuration.Settings.WriteConfigAs(req.FilePath); err != nil {
return nil, err
}
return &rpc.WriteResponse{}, nil
return &rpc.SettingsWriteResponse{}, nil
}
// Delete removes a key from the config file
func (s *SettingsService) Delete(ctx context.Context, req *rpc.DeleteRequest) (*rpc.DeleteResponse, error) {
// SettingsDelete removes a key from the config file
func (s *ArduinoCoreServerImpl) SettingsDelete(ctx context.Context, req *rpc.SettingsDeleteRequest) (*rpc.SettingsDeleteResponse, error) {
toDelete := req.GetKey()
// Check if settings key actually existing, we don't use Viper.InConfig()
......@@ -175,5 +170,5 @@ func (s *SettingsService) Delete(ctx context.Context, req *rpc.DeleteRequest) (*
updatedSettings.SetConfigFile(configPath)
configuration.Settings = updatedSettings
return &rpc.DeleteResponse{}, nil
return &rpc.SettingsDeleteResponse{}, nil
}
......@@ -22,12 +22,12 @@ import (
"testing"
"github.com/arduino/arduino-cli/configuration"
rpc "github.com/arduino/arduino-cli/rpc/cc/arduino/cli/settings/v1"
rpc "github.com/arduino/arduino-cli/rpc/cc/arduino/cli/commands/v1"
"github.com/arduino/go-paths-helper"
"github.com/stretchr/testify/require"
)
var svc = SettingsService{}
var svc = ArduinoCoreServerImpl{}
func init() {
configuration.Settings = configuration.Init(filepath.Join("testdata", "arduino-cli.yaml"))
......@@ -38,7 +38,7 @@ func reset() {
}
func TestGetAll(t *testing.T) {
resp, err := svc.GetAll(context.Background(), &rpc.GetAllRequest{})
resp, err := svc.SettingsGetAll(context.Background(), &rpc.SettingsGetAllRequest{})
require.Nil(t, err)
content, err := json.Marshal(configuration.Settings.AllSettings())
......@@ -54,7 +54,7 @@ func TestMerge(t *testing.T) {
require.Equal(t, false, configuration.Settings.GetBool("sketch.always_export_binaries"))
bulkSettings := `{"foo": "bar", "daemon":{"port":"420"}, "sketch": {"always_export_binaries": "true"}}`
res, err := svc.Merge(context.Background(), &rpc.MergeRequest{JsonData: bulkSettings})
res, err := svc.SettingsMerge(context.Background(), &rpc.SettingsMergeRequest{JsonData: bulkSettings})
require.NotNil(t, res)
require.NoError(t, err)
......@@ -63,7 +63,7 @@ func TestMerge(t *testing.T) {
require.Equal(t, true, configuration.Settings.GetBool("sketch.always_export_binaries"))
bulkSettings = `{"foo":"", "daemon": {}, "sketch": {"always_export_binaries": "false"}}`
res, err = svc.Merge(context.Background(), &rpc.MergeRequest{JsonData: bulkSettings})
res, err = svc.SettingsMerge(context.Background(), &rpc.SettingsMergeRequest{JsonData: bulkSettings})
require.NotNil(t, res)
require.NoError(t, err)
......@@ -72,7 +72,7 @@ func TestMerge(t *testing.T) {
require.Equal(t, false, configuration.Settings.GetBool("sketch.always_export_binaries"))
bulkSettings = `{"daemon": {"port":""}}`
res, err = svc.Merge(context.Background(), &rpc.MergeRequest{JsonData: bulkSettings})
res, err = svc.SettingsMerge(context.Background(), &rpc.SettingsMergeRequest{JsonData: bulkSettings})
require.NotNil(t, res)
require.NoError(t, err)
......@@ -85,60 +85,60 @@ func TestMerge(t *testing.T) {
}
func TestGetValue(t *testing.T) {
key := &rpc.GetValueRequest{Key: "daemon"}
resp, err := svc.GetValue(context.Background(), key)
key := &rpc.SettingsGetValueRequest{Key: "daemon"}
resp, err := svc.SettingsGetValue(context.Background(), key)
require.NoError(t, err)
require.Equal(t, `{"port":"50051"}`, resp.GetJsonData())
key = &rpc.GetValueRequest{Key: "daemon.port"}
resp, err = svc.GetValue(context.Background(), key)
key = &rpc.SettingsGetValueRequest{Key: "daemon.port"}
resp, err = svc.SettingsGetValue(context.Background(), key)
require.NoError(t, err)
require.Equal(t, `"50051"`, resp.GetJsonData())
}
func TestGetMergedValue(t *testing.T) {
// Verifies value is not set
key := &rpc.GetValueRequest{Key: "foo"}
res, err := svc.GetValue(context.Background(), key)
key := &rpc.SettingsGetValueRequest{Key: "foo"}
res, err := svc.SettingsGetValue(context.Background(), key)
require.Nil(t, res)
require.Error(t, err, "Error getting settings value")
// Merge value
bulkSettings := `{"foo": "bar"}`
_, err = svc.Merge(context.Background(), &rpc.MergeRequest{JsonData: bulkSettings})
_, err = svc.SettingsMerge(context.Background(), &rpc.SettingsMergeRequest{JsonData: bulkSettings})
require.NoError(t, err)
// Verifies value is correctly returned
key = &rpc.GetValueRequest{Key: "foo"}
res, err = svc.GetValue(context.Background(), key)
key = &rpc.SettingsGetValueRequest{Key: "foo"}
res, err = svc.SettingsGetValue(context.Background(), key)
require.NoError(t, err)
require.Equal(t, `"bar"`, res.GetJsonData())
}
func TestGetValueNotFound(t *testing.T) {
key := &rpc.GetValueRequest{Key: "DOESNTEXIST"}
_, err := svc.GetValue(context.Background(), key)
key := &rpc.SettingsGetValueRequest{Key: "DOESNTEXIST"}
_, err := svc.SettingsGetValue(context.Background(), key)
require.NotNil(t, err)
require.Equal(t, `key not found in settings`, err.Error())
}
func TestSetValue(t *testing.T) {
val := &rpc.SetValueRequest{
val := &rpc.SettingsSetValueRequest{
Key: "foo",
JsonData: `"bar"`,
}
_, err := svc.SetValue(context.Background(), val)
_, err := svc.SettingsSetValue(context.Background(), val)
require.Nil(t, err)
require.Equal(t, "bar", configuration.Settings.GetString("foo"))
}
func TestWrite(t *testing.T) {
// Writes some settings
val := &rpc.SetValueRequest{
val := &rpc.SettingsSetValueRequest{
Key: "foo",
JsonData: `"bar"`,
}
_, err := svc.SetValue(context.Background(), val)
_, err := svc.SettingsSetValue(context.Background(), val)
require.NoError(t, err)
tempDir := paths.TempDir()
......@@ -150,7 +150,7 @@ func TestWrite(t *testing.T) {
configFile := testFolder.Join("arduino-cli.yml")
require.True(t, configFile.NotExist())
_, err = svc.Write(context.Background(), &rpc.WriteRequest{
_, err = svc.SettingsWrite(context.Background(), &rpc.SettingsWriteRequest{
FilePath: configFile.String(),
})
require.NoError(t, err)
......@@ -161,16 +161,16 @@ func TestWrite(t *testing.T) {
}
func TestDelete(t *testing.T) {
_, err := svc.Delete(context.Background(), &rpc.DeleteRequest{
_, err := svc.SettingsDelete(context.Background(), &rpc.SettingsDeleteRequest{
Key: "doesnotexist",
})
require.Error(t, err)
_, err = svc.Delete(context.Background(), &rpc.DeleteRequest{
_, err = svc.SettingsDelete(context.Background(), &rpc.SettingsDeleteRequest{
Key: "network",
})
require.NoError(t, err)
_, err = svc.GetValue(context.Background(), &rpc.GetValueRequest{Key: "network"})
_, err = svc.SettingsGetValue(context.Background(), &rpc.SettingsGetValueRequest{Key: "network"})
require.Error(t, err)
}
......@@ -4,6 +4,27 @@ Here you can find a list of migration guides to handle breaking changes between
## 0.36.0
### gRPC service `cc.arduino.cli.settings.v1` has been removed, and all RPC calls have been migrated to `cc.arduino.cli.commands.v1`
The service `cc.arduino.cli.settings.v1` no longer exists and all existing RPC calls have been moved to the
`cc.arduino.cli.commands.v1` service adding a `Settings` prefix to the names of all messages. The existing RPC calls:
- `rpc GetAll(GetAllRequest) returns (GetAllResponse)`
- `rpc Merge(MergeRequest) returns (MergeResponse)`
- `rpc GetValue(GetValueRequest) returns (GetValueResponse)`
- `rpc SetValue(SetValueRequest) returns (SetValueResponse)`
- `rpc Write(WriteRequest) returns (WriteResponse)`
- `rpc Delete(DeleteRequest) returns (DeleteResponse)`
are now renamed to:
- `rpc SettingsGetAll(SettingsGetAllRequest) returns (SettingsGetAllResponse)`
- `rpc SettingsMerge(SettingsMergeRequest) returns (SettingsMergeResponse)`
- `rpc SettingsGetValue(SettingsGetValueRequest) returns (SettingsGetValueResponse)`
- `rpc SettingsSetValue(SettingsSetValueRequest) returns (SettingsSetValueResponse)`
- `rpc SettingsWrite(SettingsWriteRequest) returns (SettingsWriteResponse)`
- `rpc SettingsDelete(SettingsDeleteRequest) returns (SettingsDeleteResponse)`
### gRPC `cc.arduino.cli.commands.v1.LibrarySearchRequest` message has been changed.
The `query` field has been removed, use `search_args` instead.
......
......@@ -21,7 +21,7 @@ import (
"github.com/arduino/arduino-cli/commands/daemon"
"github.com/arduino/arduino-cli/configuration"
"github.com/arduino/arduino-cli/internal/cli/feedback"
"github.com/arduino/arduino-cli/rpc/cc/arduino/cli/settings/v1"
rpc "github.com/arduino/arduino-cli/rpc/cc/arduino/cli/commands/v1"
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"
)
......@@ -47,12 +47,12 @@ func runDeleteCommand(cmd *cobra.Command, args []string) {
logrus.Info("Executing `arduino-cli config delete`")
toDelete := args[0]
svc := daemon.SettingsService{}
_, err := svc.Delete(cmd.Context(), &settings.DeleteRequest{Key: toDelete})
svc := daemon.ArduinoCoreServerImpl{}
_, err := svc.SettingsDelete(cmd.Context(), &rpc.SettingsDeleteRequest{Key: toDelete})
if err != nil {
feedback.Fatal(tr("Cannot delete the key %[1]s: %[2]v", toDelete, err), feedback.ErrGeneric)
}
_, err = svc.Write(cmd.Context(), &settings.WriteRequest{FilePath: configuration.Settings.ConfigFileUsed()})
_, err = svc.SettingsWrite(cmd.Context(), &rpc.SettingsWriteRequest{FilePath: configuration.Settings.ConfigFileUsed()})
if err != nil {
feedback.Fatal(tr("Cannot write the file %[1]s: %[2]v", configuration.Settings.ConfigFileUsed(), err), feedback.ErrGeneric)
}
......
......@@ -29,7 +29,6 @@ import (
"github.com/arduino/arduino-cli/i18n"
"github.com/arduino/arduino-cli/internal/cli/feedback"
srv_commands "github.com/arduino/arduino-cli/rpc/cc/arduino/cli/commands/v1"
srv_settings "github.com/arduino/arduino-cli/rpc/cc/arduino/cli/settings/v1"
"github.com/arduino/arduino-cli/version"
"github.com/arduino/go-paths-helper"
"github.com/sirupsen/logrus"
......@@ -107,9 +106,6 @@ func runDaemonCommand(cmd *cobra.Command, args []string) {
VersionString: version.VersionInfo.VersionString,
})
// Register the settings service
srv_settings.RegisterSettingsServiceServer(s, &daemon.SettingsService{})
if !daemonize {
// When parent process ends terminate also the daemon
go feedback.ExitWhenParentProcessEnds()
......
......@@ -31,7 +31,6 @@ import (
"github.com/arduino/arduino-cli/executils"
"github.com/arduino/arduino-cli/rpc/cc/arduino/cli/commands/v1"
"github.com/arduino/arduino-cli/rpc/cc/arduino/cli/settings/v1"
"github.com/arduino/go-paths-helper"
"github.com/fatih/color"
"github.com/stretchr/testify/require"
......@@ -70,20 +69,19 @@ func CreateArduinoCLIWithEnvironment(t *testing.T) (*Environment, *ArduinoCLI) {
// ArduinoCLI is an Arduino CLI client.
type ArduinoCLI struct {
path *paths.Path
t *require.Assertions
proc *executils.Process
stdIn io.WriteCloser
cliEnvVars map[string]string
cliConfigPath *paths.Path
stagingDir *paths.Path
dataDir *paths.Path
sketchbookDir *paths.Path
workingDir *paths.Path
daemonAddr string
daemonConn *grpc.ClientConn
daemonClient commands.ArduinoCoreServiceClient
daemonSettingsClient settings.SettingsServiceClient
path *paths.Path
t *require.Assertions
proc *executils.Process
stdIn io.WriteCloser
cliEnvVars map[string]string
cliConfigPath *paths.Path
stagingDir *paths.Path
dataDir *paths.Path
sketchbookDir *paths.Path
workingDir *paths.Path
daemonAddr string
daemonConn *grpc.ClientConn
daemonClient commands.ArduinoCoreServiceClient
}
// ArduinoCLIConfig is the configuration of the ArduinoCLI client
......@@ -386,7 +384,6 @@ func (cli *ArduinoCLI) StartDaemon(verbose bool) string {
cli.t.NoError(err)
cli.daemonConn = conn
cli.daemonClient = commands.NewArduinoCoreServiceClient(conn)
cli.daemonSettingsClient = settings.NewSettingsServiceClient(conn)
return cli.daemonAddr
}
......@@ -418,12 +415,12 @@ func (cli *ArduinoCLI) Create() *ArduinoCLIInstance {
// SetValue calls the "SetValue" gRPC method.
func (cli *ArduinoCLI) SetValue(key, jsonData string) error {
req := &settings.SetValueRequest{
req := &commands.SettingsSetValueRequest{
Key: key,
JsonData: jsonData,
}
logCallf(">>> SetValue(%+v)\n", req)
_, err := cli.daemonSettingsClient.SetValue(context.Background(), req)
_, err := cli.daemonClient.SettingsSetValue(context.Background(), req)
return err
}
......
......@@ -100,7 +100,6 @@ nav:
- version: commands/arduino-cli_version.md
- gRPC reference:
- commands: rpc/commands.md
- settings: rpc/settings.md
- configuration.md
- Integration options: integration-options.md
- sketch-build-process.md
......
......@@ -5,6 +5,3 @@ lint:
ignore_only:
ENUM_ZERO_VALUE_SUFFIX:
- cc/arduino/cli/commands/v1/lib.proto
- cc/arduino/cli/monitor/v1/monitor.proto
RPC_REQUEST_STANDARD_NAME:
- cc/arduino/cli/debug/v1/debug.proto
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -29,6 +29,7 @@ import "cc/arduino/cli/commands/v1/debug.proto";
import "cc/arduino/cli/commands/v1/monitor.proto";
import "cc/arduino/cli/commands/v1/upload.proto";
import "cc/arduino/cli/commands/v1/lib.proto";
import "cc/arduino/cli/commands/v1/settings.proto";
// The main Arduino Platform service API
service ArduinoCoreService {
......@@ -182,6 +183,26 @@ service ArduinoCoreService {
rpc Debug(stream DebugRequest) returns (stream DebugResponse) {}
rpc GetDebugConfig(GetDebugConfigRequest) returns (GetDebugConfigResponse) {}
// List all the settings.
rpc SettingsGetAll(SettingsGetAllRequest) returns (SettingsGetAllResponse);
// Set multiple settings values at once.
rpc SettingsMerge(SettingsMergeRequest) returns (SettingsMergeResponse);
// Get the value of a specific setting.
rpc SettingsGetValue(SettingsGetValueRequest)
returns (SettingsGetValueResponse);
// Set the value of a specific setting.
rpc SettingsSetValue(SettingsSetValueRequest)
returns (SettingsSetValueResponse);
// Writes to file settings currently stored in memory
rpc SettingsWrite(SettingsWriteRequest) returns (SettingsWriteResponse);
// Deletes an entry and rewrites the file settings
rpc SettingsDelete(SettingsDeleteRequest) returns (SettingsDeleteResponse);
}
message CreateRequest {}
......
......@@ -74,6 +74,12 @@ const (
ArduinoCoreService_EnumerateMonitorPortSettings_FullMethodName = "/cc.arduino.cli.commands.v1.ArduinoCoreService/EnumerateMonitorPortSettings"
ArduinoCoreService_Debug_FullMethodName = "/cc.arduino.cli.commands.v1.ArduinoCoreService/Debug"
ArduinoCoreService_GetDebugConfig_FullMethodName = "/cc.arduino.cli.commands.v1.ArduinoCoreService/GetDebugConfig"
ArduinoCoreService_SettingsGetAll_FullMethodName = "/cc.arduino.cli.commands.v1.ArduinoCoreService/SettingsGetAll"
ArduinoCoreService_SettingsMerge_FullMethodName = "/cc.arduino.cli.commands.v1.ArduinoCoreService/SettingsMerge"
ArduinoCoreService_SettingsGetValue_FullMethodName = "/cc.arduino.cli.commands.v1.ArduinoCoreService/SettingsGetValue"
ArduinoCoreService_SettingsSetValue_FullMethodName = "/cc.arduino.cli.commands.v1.ArduinoCoreService/SettingsSetValue"
ArduinoCoreService_SettingsWrite_FullMethodName = "/cc.arduino.cli.commands.v1.ArduinoCoreService/SettingsWrite"
ArduinoCoreService_SettingsDelete_FullMethodName = "/cc.arduino.cli.commands.v1.ArduinoCoreService/SettingsDelete"
)
// ArduinoCoreServiceClient is the client API for ArduinoCoreService service.
......@@ -167,6 +173,18 @@ type ArduinoCoreServiceClient interface {
// Start a debug session and communicate with the debugger tool.
Debug(ctx context.Context, opts ...grpc.CallOption) (ArduinoCoreService_DebugClient, error)
GetDebugConfig(ctx context.Context, in *GetDebugConfigRequest, opts ...grpc.CallOption) (*GetDebugConfigResponse, error)
// List all the settings.
SettingsGetAll(ctx context.Context, in *SettingsGetAllRequest, opts ...grpc.CallOption) (*SettingsGetAllResponse, error)
// Set multiple settings values at once.
SettingsMerge(ctx context.Context, in *SettingsMergeRequest, opts ...grpc.CallOption) (*SettingsMergeResponse, error)
// Get the value of a specific setting.
SettingsGetValue(ctx context.Context, in *SettingsGetValueRequest, opts ...grpc.CallOption) (*SettingsGetValueResponse, error)
// Set the value of a specific setting.
SettingsSetValue(ctx context.Context, in *SettingsSetValueRequest, opts ...grpc.CallOption) (*SettingsSetValueResponse, error)
// Writes to file settings currently stored in memory
SettingsWrite(ctx context.Context, in *SettingsWriteRequest, opts ...grpc.CallOption) (*SettingsWriteResponse, error)
// Deletes an entry and rewrites the file settings
SettingsDelete(ctx context.Context, in *SettingsDeleteRequest, opts ...grpc.CallOption) (*SettingsDeleteResponse, error)
}
type arduinoCoreServiceClient struct {
......@@ -1018,6 +1036,60 @@ func (c *arduinoCoreServiceClient) GetDebugConfig(ctx context.Context, in *GetDe
return out, nil
}
func (c *arduinoCoreServiceClient) SettingsGetAll(ctx context.Context, in *SettingsGetAllRequest, opts ...grpc.CallOption) (*SettingsGetAllResponse, error) {
out := new(SettingsGetAllResponse)
err := c.cc.Invoke(ctx, ArduinoCoreService_SettingsGetAll_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *arduinoCoreServiceClient) SettingsMerge(ctx context.Context, in *SettingsMergeRequest, opts ...grpc.CallOption) (*SettingsMergeResponse, error) {
out := new(SettingsMergeResponse)
err := c.cc.Invoke(ctx, ArduinoCoreService_SettingsMerge_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *arduinoCoreServiceClient) SettingsGetValue(ctx context.Context, in *SettingsGetValueRequest, opts ...grpc.CallOption) (*SettingsGetValueResponse, error) {
out := new(SettingsGetValueResponse)
err := c.cc.Invoke(ctx, ArduinoCoreService_SettingsGetValue_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *arduinoCoreServiceClient) SettingsSetValue(ctx context.Context, in *SettingsSetValueRequest, opts ...grpc.CallOption) (*SettingsSetValueResponse, error) {
out := new(SettingsSetValueResponse)
err := c.cc.Invoke(ctx, ArduinoCoreService_SettingsSetValue_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *arduinoCoreServiceClient) SettingsWrite(ctx context.Context, in *SettingsWriteRequest, opts ...grpc.CallOption) (*SettingsWriteResponse, error) {
out := new(SettingsWriteResponse)
err := c.cc.Invoke(ctx, ArduinoCoreService_SettingsWrite_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *arduinoCoreServiceClient) SettingsDelete(ctx context.Context, in *SettingsDeleteRequest, opts ...grpc.CallOption) (*SettingsDeleteResponse, error) {
out := new(SettingsDeleteResponse)
err := c.cc.Invoke(ctx, ArduinoCoreService_SettingsDelete_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// ArduinoCoreServiceServer is the server API for ArduinoCoreService service.
// All implementations must embed UnimplementedArduinoCoreServiceServer
// for forward compatibility
......@@ -1109,6 +1181,18 @@ type ArduinoCoreServiceServer interface {
// Start a debug session and communicate with the debugger tool.
Debug(ArduinoCoreService_DebugServer) error
GetDebugConfig(context.Context, *GetDebugConfigRequest) (*GetDebugConfigResponse, error)
// List all the settings.
SettingsGetAll(context.Context, *SettingsGetAllRequest) (*SettingsGetAllResponse, error)
// Set multiple settings values at once.
SettingsMerge(context.Context, *SettingsMergeRequest) (*SettingsMergeResponse, error)
// Get the value of a specific setting.
SettingsGetValue(context.Context, *SettingsGetValueRequest) (*SettingsGetValueResponse, error)
// Set the value of a specific setting.
SettingsSetValue(context.Context, *SettingsSetValueRequest) (*SettingsSetValueResponse, error)
// Writes to file settings currently stored in memory
SettingsWrite(context.Context, *SettingsWriteRequest) (*SettingsWriteResponse, error)
// Deletes an entry and rewrites the file settings
SettingsDelete(context.Context, *SettingsDeleteRequest) (*SettingsDeleteResponse, error)
mustEmbedUnimplementedArduinoCoreServiceServer()
}
......@@ -1236,6 +1320,24 @@ func (UnimplementedArduinoCoreServiceServer) Debug(ArduinoCoreService_DebugServe
func (UnimplementedArduinoCoreServiceServer) GetDebugConfig(context.Context, *GetDebugConfigRequest) (*GetDebugConfigResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetDebugConfig not implemented")
}
func (UnimplementedArduinoCoreServiceServer) SettingsGetAll(context.Context, *SettingsGetAllRequest) (*SettingsGetAllResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method SettingsGetAll not implemented")
}
func (UnimplementedArduinoCoreServiceServer) SettingsMerge(context.Context, *SettingsMergeRequest) (*SettingsMergeResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method SettingsMerge not implemented")
}
func (UnimplementedArduinoCoreServiceServer) SettingsGetValue(context.Context, *SettingsGetValueRequest) (*SettingsGetValueResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method SettingsGetValue not implemented")
}
func (UnimplementedArduinoCoreServiceServer) SettingsSetValue(context.Context, *SettingsSetValueRequest) (*SettingsSetValueResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method SettingsSetValue not implemented")
}
func (UnimplementedArduinoCoreServiceServer) SettingsWrite(context.Context, *SettingsWriteRequest) (*SettingsWriteResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method SettingsWrite not implemented")
}
func (UnimplementedArduinoCoreServiceServer) SettingsDelete(context.Context, *SettingsDeleteRequest) (*SettingsDeleteResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method SettingsDelete not implemented")
}
func (UnimplementedArduinoCoreServiceServer) mustEmbedUnimplementedArduinoCoreServiceServer() {}
// UnsafeArduinoCoreServiceServer may be embedded to opt out of forward compatibility for this service.
......@@ -2042,6 +2144,114 @@ func _ArduinoCoreService_GetDebugConfig_Handler(srv interface{}, ctx context.Con
return interceptor(ctx, in, info, handler)
}
func _ArduinoCoreService_SettingsGetAll_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(SettingsGetAllRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ArduinoCoreServiceServer).SettingsGetAll(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: ArduinoCoreService_SettingsGetAll_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ArduinoCoreServiceServer).SettingsGetAll(ctx, req.(*SettingsGetAllRequest))
}
return interceptor(ctx, in, info, handler)
}
func _ArduinoCoreService_SettingsMerge_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(SettingsMergeRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ArduinoCoreServiceServer).SettingsMerge(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: ArduinoCoreService_SettingsMerge_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ArduinoCoreServiceServer).SettingsMerge(ctx, req.(*SettingsMergeRequest))
}
return interceptor(ctx, in, info, handler)
}
func _ArduinoCoreService_SettingsGetValue_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(SettingsGetValueRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ArduinoCoreServiceServer).SettingsGetValue(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: ArduinoCoreService_SettingsGetValue_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ArduinoCoreServiceServer).SettingsGetValue(ctx, req.(*SettingsGetValueRequest))
}
return interceptor(ctx, in, info, handler)
}
func _ArduinoCoreService_SettingsSetValue_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(SettingsSetValueRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ArduinoCoreServiceServer).SettingsSetValue(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: ArduinoCoreService_SettingsSetValue_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ArduinoCoreServiceServer).SettingsSetValue(ctx, req.(*SettingsSetValueRequest))
}
return interceptor(ctx, in, info, handler)
}
func _ArduinoCoreService_SettingsWrite_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(SettingsWriteRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ArduinoCoreServiceServer).SettingsWrite(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: ArduinoCoreService_SettingsWrite_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ArduinoCoreServiceServer).SettingsWrite(ctx, req.(*SettingsWriteRequest))
}
return interceptor(ctx, in, info, handler)
}
func _ArduinoCoreService_SettingsDelete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(SettingsDeleteRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ArduinoCoreServiceServer).SettingsDelete(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: ArduinoCoreService_SettingsDelete_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ArduinoCoreServiceServer).SettingsDelete(ctx, req.(*SettingsDeleteRequest))
}
return interceptor(ctx, in, info, handler)
}
// ArduinoCoreService_ServiceDesc is the grpc.ServiceDesc for ArduinoCoreService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
......@@ -2125,6 +2335,30 @@ var ArduinoCoreService_ServiceDesc = grpc.ServiceDesc{
MethodName: "GetDebugConfig",
Handler: _ArduinoCoreService_GetDebugConfig_Handler,
},
{
MethodName: "SettingsGetAll",
Handler: _ArduinoCoreService_SettingsGetAll_Handler,
},
{
MethodName: "SettingsMerge",
Handler: _ArduinoCoreService_SettingsMerge_Handler,
},
{
MethodName: "SettingsGetValue",
Handler: _ArduinoCoreService_SettingsGetValue_Handler,
},
{
MethodName: "SettingsSetValue",
Handler: _ArduinoCoreService_SettingsSetValue_Handler,
},
{
MethodName: "SettingsWrite",
Handler: _ArduinoCoreService_SettingsWrite_Handler,
},
{
MethodName: "SettingsDelete",
Handler: _ArduinoCoreService_SettingsDelete_Handler,
},
},
Streams: []grpc.StreamDesc{
{
......
......@@ -17,9 +17,9 @@
// versions:
// protoc-gen-go v1.31.0
// protoc v4.24.3
// source: cc/arduino/cli/settings/v1/settings.proto
// source: cc/arduino/cli/commands/v1/settings.proto
package settings
package commands
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
......@@ -35,7 +35,7 @@ const (
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type GetAllResponse struct {
type SettingsGetAllResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
......@@ -44,23 +44,23 @@ type GetAllResponse struct {
JsonData string `protobuf:"bytes,1,opt,name=json_data,json=jsonData,proto3" json:"json_data,omitempty"`
}
func (x *GetAllResponse) Reset() {
*x = GetAllResponse{}
func (x *SettingsGetAllResponse) Reset() {
*x = SettingsGetAllResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_cc_arduino_cli_settings_v1_settings_proto_msgTypes[0]
mi := &file_cc_arduino_cli_commands_v1_settings_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetAllResponse) String() string {
func (x *SettingsGetAllResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetAllResponse) ProtoMessage() {}
func (*SettingsGetAllResponse) ProtoMessage() {}
func (x *GetAllResponse) ProtoReflect() protoreflect.Message {
mi := &file_cc_arduino_cli_settings_v1_settings_proto_msgTypes[0]
func (x *SettingsGetAllResponse) ProtoReflect() protoreflect.Message {
mi := &file_cc_arduino_cli_commands_v1_settings_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
......@@ -71,19 +71,19 @@ func (x *GetAllResponse) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
// Deprecated: Use GetAllResponse.ProtoReflect.Descriptor instead.
func (*GetAllResponse) Descriptor() ([]byte, []int) {
return file_cc_arduino_cli_settings_v1_settings_proto_rawDescGZIP(), []int{0}
// Deprecated: Use SettingsGetAllResponse.ProtoReflect.Descriptor instead.
func (*SettingsGetAllResponse) Descriptor() ([]byte, []int) {
return file_cc_arduino_cli_commands_v1_settings_proto_rawDescGZIP(), []int{0}
}
func (x *GetAllResponse) GetJsonData() string {
func (x *SettingsGetAllResponse) GetJsonData() string {
if x != nil {
return x.JsonData
}
return ""
}
type MergeRequest struct {
type SettingsMergeRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
......@@ -92,23 +92,23 @@ type MergeRequest struct {
JsonData string `protobuf:"bytes,1,opt,name=json_data,json=jsonData,proto3" json:"json_data,omitempty"`
}
func (x *MergeRequest) Reset() {
*x = MergeRequest{}
func (x *SettingsMergeRequest) Reset() {
*x = SettingsMergeRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_cc_arduino_cli_settings_v1_settings_proto_msgTypes[1]
mi := &file_cc_arduino_cli_commands_v1_settings_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MergeRequest) String() string {
func (x *SettingsMergeRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MergeRequest) ProtoMessage() {}
func (*SettingsMergeRequest) ProtoMessage() {}
func (x *MergeRequest) ProtoReflect() protoreflect.Message {
mi := &file_cc_arduino_cli_settings_v1_settings_proto_msgTypes[1]
func (x *SettingsMergeRequest) ProtoReflect() protoreflect.Message {
mi := &file_cc_arduino_cli_commands_v1_settings_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
......@@ -119,19 +119,19 @@ func (x *MergeRequest) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
// Deprecated: Use MergeRequest.ProtoReflect.Descriptor instead.
func (*MergeRequest) Descriptor() ([]byte, []int) {
return file_cc_arduino_cli_settings_v1_settings_proto_rawDescGZIP(), []int{1}
// Deprecated: Use SettingsMergeRequest.ProtoReflect.Descriptor instead.
func (*SettingsMergeRequest) Descriptor() ([]byte, []int) {
return file_cc_arduino_cli_commands_v1_settings_proto_rawDescGZIP(), []int{1}
}
func (x *MergeRequest) GetJsonData() string {
func (x *SettingsMergeRequest) GetJsonData() string {
if x != nil {
return x.JsonData
}
return ""
}
type GetValueResponse struct {
type SettingsGetValueResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
......@@ -142,23 +142,23 @@ type GetValueResponse struct {
JsonData string `protobuf:"bytes,2,opt,name=json_data,json=jsonData,proto3" json:"json_data,omitempty"`
}
func (x *GetValueResponse) Reset() {
*x = GetValueResponse{}
func (x *SettingsGetValueResponse) Reset() {
*x = SettingsGetValueResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_cc_arduino_cli_settings_v1_settings_proto_msgTypes[2]
mi := &file_cc_arduino_cli_commands_v1_settings_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetValueResponse) String() string {
func (x *SettingsGetValueResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetValueResponse) ProtoMessage() {}
func (*SettingsGetValueResponse) ProtoMessage() {}
func (x *GetValueResponse) ProtoReflect() protoreflect.Message {
mi := &file_cc_arduino_cli_settings_v1_settings_proto_msgTypes[2]
func (x *SettingsGetValueResponse) ProtoReflect() protoreflect.Message {
mi := &file_cc_arduino_cli_commands_v1_settings_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
......@@ -169,26 +169,26 @@ func (x *GetValueResponse) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
// Deprecated: Use GetValueResponse.ProtoReflect.Descriptor instead.
func (*GetValueResponse) Descriptor() ([]byte, []int) {
return file_cc_arduino_cli_settings_v1_settings_proto_rawDescGZIP(), []int{2}
// Deprecated: Use SettingsGetValueResponse.ProtoReflect.Descriptor instead.
func (*SettingsGetValueResponse) Descriptor() ([]byte, []int) {
return file_cc_arduino_cli_commands_v1_settings_proto_rawDescGZIP(), []int{2}
}
func (x *GetValueResponse) GetKey() string {
func (x *SettingsGetValueResponse) GetKey() string {
if x != nil {
return x.Key
}
return ""
}
func (x *GetValueResponse) GetJsonData() string {
func (x *SettingsGetValueResponse) GetJsonData() string {
if x != nil {
return x.JsonData
}
return ""
}
type SetValueRequest struct {
type SettingsSetValueRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
......@@ -199,23 +199,23 @@ type SetValueRequest struct {
JsonData string `protobuf:"bytes,2,opt,name=json_data,json=jsonData,proto3" json:"json_data,omitempty"`
}
func (x *SetValueRequest) Reset() {
*x = SetValueRequest{}
func (x *SettingsSetValueRequest) Reset() {
*x = SettingsSetValueRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_cc_arduino_cli_settings_v1_settings_proto_msgTypes[3]
mi := &file_cc_arduino_cli_commands_v1_settings_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SetValueRequest) String() string {
func (x *SettingsSetValueRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SetValueRequest) ProtoMessage() {}
func (*SettingsSetValueRequest) ProtoMessage() {}
func (x *SetValueRequest) ProtoReflect() protoreflect.Message {
mi := &file_cc_arduino_cli_settings_v1_settings_proto_msgTypes[3]
func (x *SettingsSetValueRequest) ProtoReflect() protoreflect.Message {
mi := &file_cc_arduino_cli_commands_v1_settings_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
......@@ -226,48 +226,48 @@ func (x *SetValueRequest) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
// Deprecated: Use SetValueRequest.ProtoReflect.Descriptor instead.
func (*SetValueRequest) Descriptor() ([]byte, []int) {
return file_cc_arduino_cli_settings_v1_settings_proto_rawDescGZIP(), []int{3}
// Deprecated: Use SettingsSetValueRequest.ProtoReflect.Descriptor instead.
func (*SettingsSetValueRequest) Descriptor() ([]byte, []int) {
return file_cc_arduino_cli_commands_v1_settings_proto_rawDescGZIP(), []int{3}
}
func (x *SetValueRequest) GetKey() string {
func (x *SettingsSetValueRequest) GetKey() string {
if x != nil {
return x.Key
}
return ""
}
func (x *SetValueRequest) GetJsonData() string {
func (x *SettingsSetValueRequest) GetJsonData() string {
if x != nil {
return x.JsonData
}
return ""
}
type GetAllRequest struct {
type SettingsGetAllRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *GetAllRequest) Reset() {
*x = GetAllRequest{}
func (x *SettingsGetAllRequest) Reset() {
*x = SettingsGetAllRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_cc_arduino_cli_settings_v1_settings_proto_msgTypes[4]
mi := &file_cc_arduino_cli_commands_v1_settings_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetAllRequest) String() string {
func (x *SettingsGetAllRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetAllRequest) ProtoMessage() {}
func (*SettingsGetAllRequest) ProtoMessage() {}
func (x *GetAllRequest) ProtoReflect() protoreflect.Message {
mi := &file_cc_arduino_cli_settings_v1_settings_proto_msgTypes[4]
func (x *SettingsGetAllRequest) ProtoReflect() protoreflect.Message {
mi := &file_cc_arduino_cli_commands_v1_settings_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
......@@ -278,12 +278,12 @@ func (x *GetAllRequest) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
// Deprecated: Use GetAllRequest.ProtoReflect.Descriptor instead.
func (*GetAllRequest) Descriptor() ([]byte, []int) {
return file_cc_arduino_cli_settings_v1_settings_proto_rawDescGZIP(), []int{4}
// Deprecated: Use SettingsGetAllRequest.ProtoReflect.Descriptor instead.
func (*SettingsGetAllRequest) Descriptor() ([]byte, []int) {
return file_cc_arduino_cli_commands_v1_settings_proto_rawDescGZIP(), []int{4}
}
type GetValueRequest struct {
type SettingsGetValueRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
......@@ -292,23 +292,23 @@ type GetValueRequest struct {
Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
}
func (x *GetValueRequest) Reset() {
*x = GetValueRequest{}
func (x *SettingsGetValueRequest) Reset() {
*x = SettingsGetValueRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_cc_arduino_cli_settings_v1_settings_proto_msgTypes[5]
mi := &file_cc_arduino_cli_commands_v1_settings_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetValueRequest) String() string {
func (x *SettingsGetValueRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetValueRequest) ProtoMessage() {}
func (*SettingsGetValueRequest) ProtoMessage() {}
func (x *GetValueRequest) ProtoReflect() protoreflect.Message {
mi := &file_cc_arduino_cli_settings_v1_settings_proto_msgTypes[5]
func (x *SettingsGetValueRequest) ProtoReflect() protoreflect.Message {
mi := &file_cc_arduino_cli_commands_v1_settings_proto_msgTypes[5]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
......@@ -319,41 +319,41 @@ func (x *GetValueRequest) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
// Deprecated: Use GetValueRequest.ProtoReflect.Descriptor instead.
func (*GetValueRequest) Descriptor() ([]byte, []int) {
return file_cc_arduino_cli_settings_v1_settings_proto_rawDescGZIP(), []int{5}
// Deprecated: Use SettingsGetValueRequest.ProtoReflect.Descriptor instead.
func (*SettingsGetValueRequest) Descriptor() ([]byte, []int) {
return file_cc_arduino_cli_commands_v1_settings_proto_rawDescGZIP(), []int{5}
}
func (x *GetValueRequest) GetKey() string {
func (x *SettingsGetValueRequest) GetKey() string {
if x != nil {
return x.Key
}
return ""
}
type MergeResponse struct {
type SettingsMergeResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *MergeResponse) Reset() {
*x = MergeResponse{}
func (x *SettingsMergeResponse) Reset() {
*x = SettingsMergeResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_cc_arduino_cli_settings_v1_settings_proto_msgTypes[6]
mi := &file_cc_arduino_cli_commands_v1_settings_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MergeResponse) String() string {
func (x *SettingsMergeResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MergeResponse) ProtoMessage() {}
func (*SettingsMergeResponse) ProtoMessage() {}
func (x *MergeResponse) ProtoReflect() protoreflect.Message {
mi := &file_cc_arduino_cli_settings_v1_settings_proto_msgTypes[6]
func (x *SettingsMergeResponse) ProtoReflect() protoreflect.Message {
mi := &file_cc_arduino_cli_commands_v1_settings_proto_msgTypes[6]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
......@@ -364,34 +364,34 @@ func (x *MergeResponse) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
// Deprecated: Use MergeResponse.ProtoReflect.Descriptor instead.
func (*MergeResponse) Descriptor() ([]byte, []int) {
return file_cc_arduino_cli_settings_v1_settings_proto_rawDescGZIP(), []int{6}
// Deprecated: Use SettingsMergeResponse.ProtoReflect.Descriptor instead.
func (*SettingsMergeResponse) Descriptor() ([]byte, []int) {
return file_cc_arduino_cli_commands_v1_settings_proto_rawDescGZIP(), []int{6}
}
type SetValueResponse struct {
type SettingsSetValueResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *SetValueResponse) Reset() {
*x = SetValueResponse{}
func (x *SettingsSetValueResponse) Reset() {
*x = SettingsSetValueResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_cc_arduino_cli_settings_v1_settings_proto_msgTypes[7]
mi := &file_cc_arduino_cli_commands_v1_settings_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SetValueResponse) String() string {
func (x *SettingsSetValueResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SetValueResponse) ProtoMessage() {}
func (*SettingsSetValueResponse) ProtoMessage() {}
func (x *SetValueResponse) ProtoReflect() protoreflect.Message {
mi := &file_cc_arduino_cli_settings_v1_settings_proto_msgTypes[7]
func (x *SettingsSetValueResponse) ProtoReflect() protoreflect.Message {
mi := &file_cc_arduino_cli_commands_v1_settings_proto_msgTypes[7]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
......@@ -402,12 +402,12 @@ func (x *SetValueResponse) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
// Deprecated: Use SetValueResponse.ProtoReflect.Descriptor instead.
func (*SetValueResponse) Descriptor() ([]byte, []int) {
return file_cc_arduino_cli_settings_v1_settings_proto_rawDescGZIP(), []int{7}
// Deprecated: Use SettingsSetValueResponse.ProtoReflect.Descriptor instead.
func (*SettingsSetValueResponse) Descriptor() ([]byte, []int) {
return file_cc_arduino_cli_commands_v1_settings_proto_rawDescGZIP(), []int{7}
}
type WriteRequest struct {
type SettingsWriteRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
......@@ -416,23 +416,23 @@ type WriteRequest struct {
FilePath string `protobuf:"bytes,1,opt,name=file_path,json=filePath,proto3" json:"file_path,omitempty"`
}
func (x *WriteRequest) Reset() {
*x = WriteRequest{}
func (x *SettingsWriteRequest) Reset() {
*x = SettingsWriteRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_cc_arduino_cli_settings_v1_settings_proto_msgTypes[8]
mi := &file_cc_arduino_cli_commands_v1_settings_proto_msgTypes[8]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *WriteRequest) String() string {
func (x *SettingsWriteRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*WriteRequest) ProtoMessage() {}
func (*SettingsWriteRequest) ProtoMessage() {}
func (x *WriteRequest) ProtoReflect() protoreflect.Message {
mi := &file_cc_arduino_cli_settings_v1_settings_proto_msgTypes[8]
func (x *SettingsWriteRequest) ProtoReflect() protoreflect.Message {
mi := &file_cc_arduino_cli_commands_v1_settings_proto_msgTypes[8]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
......@@ -443,41 +443,41 @@ func (x *WriteRequest) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
// Deprecated: Use WriteRequest.ProtoReflect.Descriptor instead.
func (*WriteRequest) Descriptor() ([]byte, []int) {
return file_cc_arduino_cli_settings_v1_settings_proto_rawDescGZIP(), []int{8}
// Deprecated: Use SettingsWriteRequest.ProtoReflect.Descriptor instead.
func (*SettingsWriteRequest) Descriptor() ([]byte, []int) {
return file_cc_arduino_cli_commands_v1_settings_proto_rawDescGZIP(), []int{8}
}
func (x *WriteRequest) GetFilePath() string {
func (x *SettingsWriteRequest) GetFilePath() string {
if x != nil {
return x.FilePath
}
return ""
}
type WriteResponse struct {
type SettingsWriteResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *WriteResponse) Reset() {
*x = WriteResponse{}
func (x *SettingsWriteResponse) Reset() {
*x = SettingsWriteResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_cc_arduino_cli_settings_v1_settings_proto_msgTypes[9]
mi := &file_cc_arduino_cli_commands_v1_settings_proto_msgTypes[9]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *WriteResponse) String() string {
func (x *SettingsWriteResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*WriteResponse) ProtoMessage() {}
func (*SettingsWriteResponse) ProtoMessage() {}
func (x *WriteResponse) ProtoReflect() protoreflect.Message {
mi := &file_cc_arduino_cli_settings_v1_settings_proto_msgTypes[9]
func (x *SettingsWriteResponse) ProtoReflect() protoreflect.Message {
mi := &file_cc_arduino_cli_commands_v1_settings_proto_msgTypes[9]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
......@@ -488,12 +488,12 @@ func (x *WriteResponse) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
// Deprecated: Use WriteResponse.ProtoReflect.Descriptor instead.
func (*WriteResponse) Descriptor() ([]byte, []int) {
return file_cc_arduino_cli_settings_v1_settings_proto_rawDescGZIP(), []int{9}
// Deprecated: Use SettingsWriteResponse.ProtoReflect.Descriptor instead.
func (*SettingsWriteResponse) Descriptor() ([]byte, []int) {
return file_cc_arduino_cli_commands_v1_settings_proto_rawDescGZIP(), []int{9}
}
type DeleteRequest struct {
type SettingsDeleteRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
......@@ -502,23 +502,23 @@ type DeleteRequest struct {
Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
}
func (x *DeleteRequest) Reset() {
*x = DeleteRequest{}
func (x *SettingsDeleteRequest) Reset() {
*x = SettingsDeleteRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_cc_arduino_cli_settings_v1_settings_proto_msgTypes[10]
mi := &file_cc_arduino_cli_commands_v1_settings_proto_msgTypes[10]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *DeleteRequest) String() string {
func (x *SettingsDeleteRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DeleteRequest) ProtoMessage() {}
func (*SettingsDeleteRequest) ProtoMessage() {}
func (x *DeleteRequest) ProtoReflect() protoreflect.Message {
mi := &file_cc_arduino_cli_settings_v1_settings_proto_msgTypes[10]
func (x *SettingsDeleteRequest) ProtoReflect() protoreflect.Message {
mi := &file_cc_arduino_cli_commands_v1_settings_proto_msgTypes[10]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
......@@ -529,41 +529,41 @@ func (x *DeleteRequest) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
// Deprecated: Use DeleteRequest.ProtoReflect.Descriptor instead.
func (*DeleteRequest) Descriptor() ([]byte, []int) {
return file_cc_arduino_cli_settings_v1_settings_proto_rawDescGZIP(), []int{10}
// Deprecated: Use SettingsDeleteRequest.ProtoReflect.Descriptor instead.
func (*SettingsDeleteRequest) Descriptor() ([]byte, []int) {
return file_cc_arduino_cli_commands_v1_settings_proto_rawDescGZIP(), []int{10}
}
func (x *DeleteRequest) GetKey() string {
func (x *SettingsDeleteRequest) GetKey() string {
if x != nil {
return x.Key
}
return ""
}
type DeleteResponse struct {
type SettingsDeleteResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *DeleteResponse) Reset() {
*x = DeleteResponse{}
func (x *SettingsDeleteResponse) Reset() {
*x = SettingsDeleteResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_cc_arduino_cli_settings_v1_settings_proto_msgTypes[11]
mi := &file_cc_arduino_cli_commands_v1_settings_proto_msgTypes[11]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *DeleteResponse) String() string {
func (x *SettingsDeleteResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DeleteResponse) ProtoMessage() {}
func (*SettingsDeleteResponse) ProtoMessage() {}
func (x *DeleteResponse) ProtoReflect() protoreflect.Message {
mi := &file_cc_arduino_cli_settings_v1_settings_proto_msgTypes[11]
func (x *SettingsDeleteResponse) ProtoReflect() protoreflect.Message {
mi := &file_cc_arduino_cli_commands_v1_settings_proto_msgTypes[11]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
......@@ -574,146 +574,102 @@ func (x *DeleteResponse) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
// Deprecated: Use DeleteResponse.ProtoReflect.Descriptor instead.
func (*DeleteResponse) Descriptor() ([]byte, []int) {
return file_cc_arduino_cli_settings_v1_settings_proto_rawDescGZIP(), []int{11}
// Deprecated: Use SettingsDeleteResponse.ProtoReflect.Descriptor instead.
func (*SettingsDeleteResponse) Descriptor() ([]byte, []int) {
return file_cc_arduino_cli_commands_v1_settings_proto_rawDescGZIP(), []int{11}
}
var File_cc_arduino_cli_settings_v1_settings_proto protoreflect.FileDescriptor
var File_cc_arduino_cli_commands_v1_settings_proto protoreflect.FileDescriptor
var file_cc_arduino_cli_settings_v1_settings_proto_rawDesc = []byte{
var file_cc_arduino_cli_commands_v1_settings_proto_rawDesc = []byte{
0x0a, 0x29, 0x63, 0x63, 0x2f, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2f, 0x63, 0x6c, 0x69,
0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x74,
0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x74,
0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1a, 0x63, 0x63, 0x2e,
0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6c, 0x69, 0x2e, 0x73, 0x65, 0x74, 0x74,
0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x31, 0x22, 0x2d, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x41, 0x6c,
0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x6a, 0x73, 0x6f,
0x6e, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6a, 0x73,
0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x22, 0x2b, 0x0a, 0x0c, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x52,
0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6c, 0x69, 0x2e, 0x63, 0x6f, 0x6d, 0x6d,
0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x22, 0x35, 0x0a, 0x16, 0x53, 0x65, 0x74, 0x74, 0x69,
0x6e, 0x67, 0x73, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
0x65, 0x12, 0x1b, 0x0a, 0x09, 0x6a, 0x73, 0x6f, 0x6e, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01,
0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6a, 0x73, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x22, 0x33,
0x0a, 0x14, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x6a, 0x73, 0x6f, 0x6e, 0x5f, 0x64,
0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6a, 0x73, 0x6f, 0x6e, 0x44,
0x61, 0x74, 0x61, 0x22, 0x41, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52,
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01,
0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x1b, 0x0a, 0x09, 0x6a, 0x73, 0x6f,
0x6e, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6a, 0x73,
0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x22, 0x40, 0x0a, 0x0f, 0x53, 0x65, 0x74, 0x56, 0x61, 0x6c,
0x61, 0x74, 0x61, 0x22, 0x49, 0x0a, 0x18, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x47,
0x65, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65,
0x79, 0x12, 0x1b, 0x0a, 0x09, 0x6a, 0x73, 0x6f, 0x6e, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02,
0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6a, 0x73, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x22, 0x48,
0x0a, 0x17, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x53, 0x65, 0x74, 0x56, 0x61, 0x6c,
0x75, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79,
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x1b, 0x0a, 0x09, 0x6a,
0x73, 0x6f, 0x6e, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08,
0x6a, 0x73, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x22, 0x0f, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x41,
0x6c, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x23, 0x0a, 0x0f, 0x47, 0x65, 0x74,
0x6a, 0x73, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x22, 0x17, 0x0a, 0x15, 0x53, 0x65, 0x74, 0x74,
0x69, 0x6e, 0x67, 0x73, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
0x74, 0x22, 0x2b, 0x0a, 0x17, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x47, 0x65, 0x74,
0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03,
0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x22, 0x0f,
0x0a, 0x0d, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22,
0x12, 0x0a, 0x10, 0x53, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f,
0x6e, 0x73, 0x65, 0x22, 0x2b, 0x0a, 0x0c, 0x57, 0x72, 0x69, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x70, 0x61, 0x74, 0x68,
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x50, 0x61, 0x74, 0x68,
0x22, 0x0f, 0x0a, 0x0d, 0x57, 0x72, 0x69, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
0x65, 0x22, 0x21, 0x0a, 0x0d, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
0x03, 0x6b, 0x65, 0x79, 0x22, 0x10, 0x0a, 0x0e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65,
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xdd, 0x04, 0x0a, 0x0f, 0x53, 0x65, 0x74, 0x74, 0x69,
0x6e, 0x67, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x5f, 0x0a, 0x06, 0x47, 0x65,
0x74, 0x41, 0x6c, 0x6c, 0x12, 0x29, 0x2e, 0x63, 0x63, 0x2e, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e,
0x6f, 0x2e, 0x63, 0x6c, 0x69, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76,
0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
0x2a, 0x2e, 0x63, 0x63, 0x2e, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6c, 0x69,
0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74,
0x41, 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5c, 0x0a, 0x05, 0x4d,
0x65, 0x72, 0x67, 0x65, 0x12, 0x28, 0x2e, 0x63, 0x63, 0x2e, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e,
0x6f, 0x2e, 0x63, 0x6c, 0x69, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76,
0x31, 0x2e, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29,
0x2e, 0x63, 0x63, 0x2e, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6c, 0x69, 0x2e,
0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x72, 0x67,
0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x65, 0x0a, 0x08, 0x47, 0x65, 0x74,
0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x2b, 0x2e, 0x63, 0x63, 0x2e, 0x61, 0x72, 0x64, 0x75, 0x69,
0x6e, 0x6f, 0x2e, 0x63, 0x6c, 0x69, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e,
0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x63, 0x63, 0x2e, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2e,
0x63, 0x6c, 0x69, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x31, 0x2e,
0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x12, 0x65, 0x0a, 0x08, 0x53, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x2b, 0x2e, 0x63,
0x63, 0x2e, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6c, 0x69, 0x2e, 0x73, 0x65,
0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x56, 0x61, 0x6c,
0x75, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x63, 0x63, 0x2e, 0x61,
0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6c, 0x69, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69,
0x6e, 0x67, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52,
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5c, 0x0a, 0x05, 0x57, 0x72, 0x69, 0x74, 0x65,
0x12, 0x28, 0x2e, 0x63, 0x63, 0x2e, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6c,
0x69, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x57, 0x72,
0x69, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x63, 0x63, 0x2e,
0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6c, 0x69, 0x2e, 0x73, 0x65, 0x74, 0x74,
0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x57, 0x72, 0x69, 0x74, 0x65, 0x52, 0x65, 0x73,
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5f, 0x0a, 0x06, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12,
0x29, 0x2e, 0x63, 0x63, 0x2e, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6c, 0x69,
0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c,
0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x63, 0x63, 0x2e,
0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6c, 0x69, 0x2e, 0x73, 0x65, 0x74, 0x74,
0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65,
0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x22, 0x17,
0x0a, 0x15, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x52,
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1a, 0x0a, 0x18, 0x53, 0x65, 0x74, 0x74, 0x69,
0x6e, 0x67, 0x73, 0x53, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f,
0x6e, 0x73, 0x65, 0x22, 0x33, 0x0a, 0x14, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x57,
0x72, 0x69, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x66,
0x69, 0x6c, 0x65, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08,
0x66, 0x69, 0x6c, 0x65, 0x50, 0x61, 0x74, 0x68, 0x22, 0x17, 0x0a, 0x15, 0x53, 0x65, 0x74, 0x74,
0x69, 0x6e, 0x67, 0x73, 0x57, 0x72, 0x69, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
0x65, 0x22, 0x29, 0x0a, 0x15, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x44, 0x65, 0x6c,
0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65,
0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x22, 0x18, 0x0a, 0x16,
0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65,
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x48, 0x5a, 0x46, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62,
0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2f, 0x61, 0x72, 0x64,
0x75, 0x69, 0x6e, 0x6f, 0x2d, 0x63, 0x6c, 0x69, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x63, 0x63, 0x2f,
0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2f, 0x63, 0x6c, 0x69, 0x2f, 0x73, 0x65, 0x74, 0x74,
0x69, 0x6e, 0x67, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73,
0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2f, 0x63, 0x6c, 0x69, 0x2f, 0x63, 0x6f, 0x6d, 0x6d,
0x61, 0x6e, 0x64, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73,
0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_cc_arduino_cli_settings_v1_settings_proto_rawDescOnce sync.Once
file_cc_arduino_cli_settings_v1_settings_proto_rawDescData = file_cc_arduino_cli_settings_v1_settings_proto_rawDesc
file_cc_arduino_cli_commands_v1_settings_proto_rawDescOnce sync.Once
file_cc_arduino_cli_commands_v1_settings_proto_rawDescData = file_cc_arduino_cli_commands_v1_settings_proto_rawDesc
)
func file_cc_arduino_cli_settings_v1_settings_proto_rawDescGZIP() []byte {
file_cc_arduino_cli_settings_v1_settings_proto_rawDescOnce.Do(func() {
file_cc_arduino_cli_settings_v1_settings_proto_rawDescData = protoimpl.X.CompressGZIP(file_cc_arduino_cli_settings_v1_settings_proto_rawDescData)
func file_cc_arduino_cli_commands_v1_settings_proto_rawDescGZIP() []byte {
file_cc_arduino_cli_commands_v1_settings_proto_rawDescOnce.Do(func() {
file_cc_arduino_cli_commands_v1_settings_proto_rawDescData = protoimpl.X.CompressGZIP(file_cc_arduino_cli_commands_v1_settings_proto_rawDescData)
})
return file_cc_arduino_cli_settings_v1_settings_proto_rawDescData
}
var file_cc_arduino_cli_settings_v1_settings_proto_msgTypes = make([]protoimpl.MessageInfo, 12)
var file_cc_arduino_cli_settings_v1_settings_proto_goTypes = []interface{}{
(*GetAllResponse)(nil), // 0: cc.arduino.cli.settings.v1.GetAllResponse
(*MergeRequest)(nil), // 1: cc.arduino.cli.settings.v1.MergeRequest
(*GetValueResponse)(nil), // 2: cc.arduino.cli.settings.v1.GetValueResponse
(*SetValueRequest)(nil), // 3: cc.arduino.cli.settings.v1.SetValueRequest
(*GetAllRequest)(nil), // 4: cc.arduino.cli.settings.v1.GetAllRequest
(*GetValueRequest)(nil), // 5: cc.arduino.cli.settings.v1.GetValueRequest
(*MergeResponse)(nil), // 6: cc.arduino.cli.settings.v1.MergeResponse
(*SetValueResponse)(nil), // 7: cc.arduino.cli.settings.v1.SetValueResponse
(*WriteRequest)(nil), // 8: cc.arduino.cli.settings.v1.WriteRequest
(*WriteResponse)(nil), // 9: cc.arduino.cli.settings.v1.WriteResponse
(*DeleteRequest)(nil), // 10: cc.arduino.cli.settings.v1.DeleteRequest
(*DeleteResponse)(nil), // 11: cc.arduino.cli.settings.v1.DeleteResponse
}
var file_cc_arduino_cli_settings_v1_settings_proto_depIdxs = []int32{
4, // 0: cc.arduino.cli.settings.v1.SettingsService.GetAll:input_type -> cc.arduino.cli.settings.v1.GetAllRequest
1, // 1: cc.arduino.cli.settings.v1.SettingsService.Merge:input_type -> cc.arduino.cli.settings.v1.MergeRequest
5, // 2: cc.arduino.cli.settings.v1.SettingsService.GetValue:input_type -> cc.arduino.cli.settings.v1.GetValueRequest
3, // 3: cc.arduino.cli.settings.v1.SettingsService.SetValue:input_type -> cc.arduino.cli.settings.v1.SetValueRequest
8, // 4: cc.arduino.cli.settings.v1.SettingsService.Write:input_type -> cc.arduino.cli.settings.v1.WriteRequest
10, // 5: cc.arduino.cli.settings.v1.SettingsService.Delete:input_type -> cc.arduino.cli.settings.v1.DeleteRequest
0, // 6: cc.arduino.cli.settings.v1.SettingsService.GetAll:output_type -> cc.arduino.cli.settings.v1.GetAllResponse
6, // 7: cc.arduino.cli.settings.v1.SettingsService.Merge:output_type -> cc.arduino.cli.settings.v1.MergeResponse
2, // 8: cc.arduino.cli.settings.v1.SettingsService.GetValue:output_type -> cc.arduino.cli.settings.v1.GetValueResponse
7, // 9: cc.arduino.cli.settings.v1.SettingsService.SetValue:output_type -> cc.arduino.cli.settings.v1.SetValueResponse
9, // 10: cc.arduino.cli.settings.v1.SettingsService.Write:output_type -> cc.arduino.cli.settings.v1.WriteResponse
11, // 11: cc.arduino.cli.settings.v1.SettingsService.Delete:output_type -> cc.arduino.cli.settings.v1.DeleteResponse
6, // [6:12] is the sub-list for method output_type
0, // [0:6] is the sub-list for method input_type
0, // [0:0] is the sub-list for extension type_name
0, // [0:0] is the sub-list for extension extendee
0, // [0:0] is the sub-list for field type_name
}
func init() { file_cc_arduino_cli_settings_v1_settings_proto_init() }
func file_cc_arduino_cli_settings_v1_settings_proto_init() {
if File_cc_arduino_cli_settings_v1_settings_proto != nil {
return file_cc_arduino_cli_commands_v1_settings_proto_rawDescData
}
var file_cc_arduino_cli_commands_v1_settings_proto_msgTypes = make([]protoimpl.MessageInfo, 12)
var file_cc_arduino_cli_commands_v1_settings_proto_goTypes = []interface{}{
(*SettingsGetAllResponse)(nil), // 0: cc.arduino.cli.commands.v1.SettingsGetAllResponse
(*SettingsMergeRequest)(nil), // 1: cc.arduino.cli.commands.v1.SettingsMergeRequest
(*SettingsGetValueResponse)(nil), // 2: cc.arduino.cli.commands.v1.SettingsGetValueResponse
(*SettingsSetValueRequest)(nil), // 3: cc.arduino.cli.commands.v1.SettingsSetValueRequest
(*SettingsGetAllRequest)(nil), // 4: cc.arduino.cli.commands.v1.SettingsGetAllRequest
(*SettingsGetValueRequest)(nil), // 5: cc.arduino.cli.commands.v1.SettingsGetValueRequest
(*SettingsMergeResponse)(nil), // 6: cc.arduino.cli.commands.v1.SettingsMergeResponse
(*SettingsSetValueResponse)(nil), // 7: cc.arduino.cli.commands.v1.SettingsSetValueResponse
(*SettingsWriteRequest)(nil), // 8: cc.arduino.cli.commands.v1.SettingsWriteRequest
(*SettingsWriteResponse)(nil), // 9: cc.arduino.cli.commands.v1.SettingsWriteResponse
(*SettingsDeleteRequest)(nil), // 10: cc.arduino.cli.commands.v1.SettingsDeleteRequest
(*SettingsDeleteResponse)(nil), // 11: cc.arduino.cli.commands.v1.SettingsDeleteResponse
}
var file_cc_arduino_cli_commands_v1_settings_proto_depIdxs = []int32{
0, // [0:0] is the sub-list for method output_type
0, // [0:0] is the sub-list for method input_type
0, // [0:0] is the sub-list for extension type_name
0, // [0:0] is the sub-list for extension extendee
0, // [0:0] is the sub-list for field type_name
}
func init() { file_cc_arduino_cli_commands_v1_settings_proto_init() }
func file_cc_arduino_cli_commands_v1_settings_proto_init() {
if File_cc_arduino_cli_commands_v1_settings_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_cc_arduino_cli_settings_v1_settings_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetAllResponse); i {
file_cc_arduino_cli_commands_v1_settings_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SettingsGetAllResponse); i {
case 0:
return &v.state
case 1:
......@@ -724,8 +680,8 @@ func file_cc_arduino_cli_settings_v1_settings_proto_init() {
return nil
}
}
file_cc_arduino_cli_settings_v1_settings_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MergeRequest); i {
file_cc_arduino_cli_commands_v1_settings_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SettingsMergeRequest); i {
case 0:
return &v.state
case 1:
......@@ -736,8 +692,8 @@ func file_cc_arduino_cli_settings_v1_settings_proto_init() {
return nil
}
}
file_cc_arduino_cli_settings_v1_settings_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetValueResponse); i {
file_cc_arduino_cli_commands_v1_settings_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SettingsGetValueResponse); i {
case 0:
return &v.state
case 1:
......@@ -748,8 +704,8 @@ func file_cc_arduino_cli_settings_v1_settings_proto_init() {
return nil
}
}
file_cc_arduino_cli_settings_v1_settings_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SetValueRequest); i {
file_cc_arduino_cli_commands_v1_settings_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SettingsSetValueRequest); i {
case 0:
return &v.state
case 1:
......@@ -760,8 +716,8 @@ func file_cc_arduino_cli_settings_v1_settings_proto_init() {
return nil
}
}
file_cc_arduino_cli_settings_v1_settings_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetAllRequest); i {
file_cc_arduino_cli_commands_v1_settings_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SettingsGetAllRequest); i {
case 0:
return &v.state
case 1:
......@@ -772,8 +728,8 @@ func file_cc_arduino_cli_settings_v1_settings_proto_init() {
return nil
}
}
file_cc_arduino_cli_settings_v1_settings_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetValueRequest); i {
file_cc_arduino_cli_commands_v1_settings_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SettingsGetValueRequest); i {
case 0:
return &v.state
case 1:
......@@ -784,8 +740,8 @@ func file_cc_arduino_cli_settings_v1_settings_proto_init() {
return nil
}
}
file_cc_arduino_cli_settings_v1_settings_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MergeResponse); i {
file_cc_arduino_cli_commands_v1_settings_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SettingsMergeResponse); i {
case 0:
return &v.state
case 1:
......@@ -796,8 +752,8 @@ func file_cc_arduino_cli_settings_v1_settings_proto_init() {
return nil
}
}
file_cc_arduino_cli_settings_v1_settings_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SetValueResponse); i {
file_cc_arduino_cli_commands_v1_settings_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SettingsSetValueResponse); i {
case 0:
return &v.state
case 1:
......@@ -808,8 +764,8 @@ func file_cc_arduino_cli_settings_v1_settings_proto_init() {
return nil
}
}
file_cc_arduino_cli_settings_v1_settings_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*WriteRequest); i {
file_cc_arduino_cli_commands_v1_settings_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SettingsWriteRequest); i {
case 0:
return &v.state
case 1:
......@@ -820,8 +776,8 @@ func file_cc_arduino_cli_settings_v1_settings_proto_init() {
return nil
}
}
file_cc_arduino_cli_settings_v1_settings_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*WriteResponse); i {
file_cc_arduino_cli_commands_v1_settings_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SettingsWriteResponse); i {
case 0:
return &v.state
case 1:
......@@ -832,8 +788,8 @@ func file_cc_arduino_cli_settings_v1_settings_proto_init() {
return nil
}
}
file_cc_arduino_cli_settings_v1_settings_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DeleteRequest); i {
file_cc_arduino_cli_commands_v1_settings_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SettingsDeleteRequest); i {
case 0:
return &v.state
case 1:
......@@ -844,8 +800,8 @@ func file_cc_arduino_cli_settings_v1_settings_proto_init() {
return nil
}
}
file_cc_arduino_cli_settings_v1_settings_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DeleteResponse); i {
file_cc_arduino_cli_commands_v1_settings_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SettingsDeleteResponse); i {
case 0:
return &v.state
case 1:
......@@ -861,18 +817,18 @@ func file_cc_arduino_cli_settings_v1_settings_proto_init() {
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_cc_arduino_cli_settings_v1_settings_proto_rawDesc,
RawDescriptor: file_cc_arduino_cli_commands_v1_settings_proto_rawDesc,
NumEnums: 0,
NumMessages: 12,
NumExtensions: 0,
NumServices: 1,
NumServices: 0,
},
GoTypes: file_cc_arduino_cli_settings_v1_settings_proto_goTypes,
DependencyIndexes: file_cc_arduino_cli_settings_v1_settings_proto_depIdxs,
MessageInfos: file_cc_arduino_cli_settings_v1_settings_proto_msgTypes,
GoTypes: file_cc_arduino_cli_commands_v1_settings_proto_goTypes,
DependencyIndexes: file_cc_arduino_cli_commands_v1_settings_proto_depIdxs,
MessageInfos: file_cc_arduino_cli_commands_v1_settings_proto_msgTypes,
}.Build()
File_cc_arduino_cli_settings_v1_settings_proto = out.File
file_cc_arduino_cli_settings_v1_settings_proto_rawDesc = nil
file_cc_arduino_cli_settings_v1_settings_proto_goTypes = nil
file_cc_arduino_cli_settings_v1_settings_proto_depIdxs = nil
File_cc_arduino_cli_commands_v1_settings_proto = out.File
file_cc_arduino_cli_commands_v1_settings_proto_rawDesc = nil
file_cc_arduino_cli_commands_v1_settings_proto_goTypes = nil
file_cc_arduino_cli_commands_v1_settings_proto_depIdxs = nil
}
......@@ -15,77 +15,55 @@
syntax = "proto3";
package cc.arduino.cli.settings.v1;
package cc.arduino.cli.commands.v1;
option go_package = "github.com/arduino/arduino-cli/rpc/cc/arduino/cli/settings/v1;settings";
option go_package = "github.com/arduino/arduino-cli/rpc/cc/arduino/cli/commands/v1;commands";
// The SettingsService provides an interface to Arduino CLI configuration
// options
service SettingsService {
// List all the settings.
rpc GetAll(GetAllRequest) returns (GetAllResponse);
// Set multiple settings values at once.
rpc Merge(MergeRequest) returns (MergeResponse);
// Get the value of a specific setting.
rpc GetValue(GetValueRequest) returns (GetValueResponse);
// Set the value of a specific setting.
rpc SetValue(SetValueRequest) returns (SetValueResponse);
// Writes to file settings currently stored in memory
rpc Write(WriteRequest) returns (WriteResponse);
// Deletes an entry and rewrites the file settings
rpc Delete(DeleteRequest) returns (DeleteResponse);
}
message GetAllResponse {
message SettingsGetAllResponse {
// The settings, in JSON format.
string json_data = 1;
}
message MergeRequest {
message SettingsMergeRequest {
// The settings, in JSON format.
string json_data = 1;
}
message GetValueResponse {
message SettingsGetValueResponse {
// The key of the setting.
string key = 1;
// The setting, in JSON format.
string json_data = 2;
}
message SetValueRequest {
message SettingsSetValueRequest {
// The key of the setting.
string key = 1;
// The setting, in JSON format.
string json_data = 2;
}
message GetAllRequest {}
message SettingsGetAllRequest {}
message GetValueRequest {
message SettingsGetValueRequest {
// The key of the setting.
string key = 1;
}
message MergeResponse {}
message SettingsMergeResponse {}
message SetValueResponse {}
message SettingsSetValueResponse {}
message WriteRequest {
message SettingsWriteRequest {
// Path to settings file (e.g. /path/to/arduino-cli.yaml)
string file_path = 1;
}
message WriteResponse {}
message SettingsWriteResponse {}
message DeleteRequest {
message SettingsDeleteRequest {
// The key of the setting to delete.
string key = 1;
}
message DeleteResponse {}
message SettingsDeleteResponse {}
// This file is part of arduino-cli.
//
// Copyright 2020 ARDUINO SA (http://www.arduino.cc/)
//
// This software is released under the GNU General Public License version 3,
// which covers the main part of arduino-cli.
// The terms of this license can be found at:
// https://www.gnu.org/licenses/gpl-3.0.en.html
//
// You can be released from the requirements of the above licenses by purchasing
// a commercial license. Buying such a license is mandatory if you want to
// modify or otherwise use the software for commercial activities involving the
// Arduino software without disclosing the source code of your own applications.
// To purchase a commercial license, send an email to license@arduino.cc.
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.3.0
// - protoc v4.24.3
// source: cc/arduino/cli/settings/v1/settings.proto
package settings
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later.
const _ = grpc.SupportPackageIsVersion7
const (
SettingsService_GetAll_FullMethodName = "/cc.arduino.cli.settings.v1.SettingsService/GetAll"
SettingsService_Merge_FullMethodName = "/cc.arduino.cli.settings.v1.SettingsService/Merge"
SettingsService_GetValue_FullMethodName = "/cc.arduino.cli.settings.v1.SettingsService/GetValue"
SettingsService_SetValue_FullMethodName = "/cc.arduino.cli.settings.v1.SettingsService/SetValue"
SettingsService_Write_FullMethodName = "/cc.arduino.cli.settings.v1.SettingsService/Write"
SettingsService_Delete_FullMethodName = "/cc.arduino.cli.settings.v1.SettingsService/Delete"
)
// SettingsServiceClient is the client API for SettingsService service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type SettingsServiceClient interface {
// List all the settings.
GetAll(ctx context.Context, in *GetAllRequest, opts ...grpc.CallOption) (*GetAllResponse, error)
// Set multiple settings values at once.
Merge(ctx context.Context, in *MergeRequest, opts ...grpc.CallOption) (*MergeResponse, error)
// Get the value of a specific setting.
GetValue(ctx context.Context, in *GetValueRequest, opts ...grpc.CallOption) (*GetValueResponse, error)
// Set the value of a specific setting.
SetValue(ctx context.Context, in *SetValueRequest, opts ...grpc.CallOption) (*SetValueResponse, error)
// Writes to file settings currently stored in memory
Write(ctx context.Context, in *WriteRequest, opts ...grpc.CallOption) (*WriteResponse, error)
// Deletes an entry and rewrites the file settings
Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*DeleteResponse, error)
}
type settingsServiceClient struct {
cc grpc.ClientConnInterface
}
func NewSettingsServiceClient(cc grpc.ClientConnInterface) SettingsServiceClient {
return &settingsServiceClient{cc}
}
func (c *settingsServiceClient) GetAll(ctx context.Context, in *GetAllRequest, opts ...grpc.CallOption) (*GetAllResponse, error) {
out := new(GetAllResponse)
err := c.cc.Invoke(ctx, SettingsService_GetAll_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *settingsServiceClient) Merge(ctx context.Context, in *MergeRequest, opts ...grpc.CallOption) (*MergeResponse, error) {
out := new(MergeResponse)
err := c.cc.Invoke(ctx, SettingsService_Merge_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *settingsServiceClient) GetValue(ctx context.Context, in *GetValueRequest, opts ...grpc.CallOption) (*GetValueResponse, error) {
out := new(GetValueResponse)
err := c.cc.Invoke(ctx, SettingsService_GetValue_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *settingsServiceClient) SetValue(ctx context.Context, in *SetValueRequest, opts ...grpc.CallOption) (*SetValueResponse, error) {
out := new(SetValueResponse)
err := c.cc.Invoke(ctx, SettingsService_SetValue_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *settingsServiceClient) Write(ctx context.Context, in *WriteRequest, opts ...grpc.CallOption) (*WriteResponse, error) {
out := new(WriteResponse)
err := c.cc.Invoke(ctx, SettingsService_Write_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *settingsServiceClient) Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*DeleteResponse, error) {
out := new(DeleteResponse)
err := c.cc.Invoke(ctx, SettingsService_Delete_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// SettingsServiceServer is the server API for SettingsService service.
// All implementations must embed UnimplementedSettingsServiceServer
// for forward compatibility
type SettingsServiceServer interface {
// List all the settings.
GetAll(context.Context, *GetAllRequest) (*GetAllResponse, error)
// Set multiple settings values at once.
Merge(context.Context, *MergeRequest) (*MergeResponse, error)
// Get the value of a specific setting.
GetValue(context.Context, *GetValueRequest) (*GetValueResponse, error)
// Set the value of a specific setting.
SetValue(context.Context, *SetValueRequest) (*SetValueResponse, error)
// Writes to file settings currently stored in memory
Write(context.Context, *WriteRequest) (*WriteResponse, error)
// Deletes an entry and rewrites the file settings
Delete(context.Context, *DeleteRequest) (*DeleteResponse, error)
mustEmbedUnimplementedSettingsServiceServer()
}
// UnimplementedSettingsServiceServer must be embedded to have forward compatible implementations.
type UnimplementedSettingsServiceServer struct {
}
func (UnimplementedSettingsServiceServer) GetAll(context.Context, *GetAllRequest) (*GetAllResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetAll not implemented")
}
func (UnimplementedSettingsServiceServer) Merge(context.Context, *MergeRequest) (*MergeResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Merge not implemented")
}
func (UnimplementedSettingsServiceServer) GetValue(context.Context, *GetValueRequest) (*GetValueResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetValue not implemented")
}
func (UnimplementedSettingsServiceServer) SetValue(context.Context, *SetValueRequest) (*SetValueResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method SetValue not implemented")
}
func (UnimplementedSettingsServiceServer) Write(context.Context, *WriteRequest) (*WriteResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Write not implemented")
}
func (UnimplementedSettingsServiceServer) Delete(context.Context, *DeleteRequest) (*DeleteResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented")
}
func (UnimplementedSettingsServiceServer) mustEmbedUnimplementedSettingsServiceServer() {}
// UnsafeSettingsServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to SettingsServiceServer will
// result in compilation errors.
type UnsafeSettingsServiceServer interface {
mustEmbedUnimplementedSettingsServiceServer()
}
func RegisterSettingsServiceServer(s grpc.ServiceRegistrar, srv SettingsServiceServer) {
s.RegisterService(&SettingsService_ServiceDesc, srv)
}
func _SettingsService_GetAll_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetAllRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(SettingsServiceServer).GetAll(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: SettingsService_GetAll_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(SettingsServiceServer).GetAll(ctx, req.(*GetAllRequest))
}
return interceptor(ctx, in, info, handler)
}
func _SettingsService_Merge_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(MergeRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(SettingsServiceServer).Merge(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: SettingsService_Merge_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(SettingsServiceServer).Merge(ctx, req.(*MergeRequest))
}
return interceptor(ctx, in, info, handler)
}
func _SettingsService_GetValue_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetValueRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(SettingsServiceServer).GetValue(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: SettingsService_GetValue_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(SettingsServiceServer).GetValue(ctx, req.(*GetValueRequest))
}
return interceptor(ctx, in, info, handler)
}
func _SettingsService_SetValue_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(SetValueRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(SettingsServiceServer).SetValue(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: SettingsService_SetValue_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(SettingsServiceServer).SetValue(ctx, req.(*SetValueRequest))
}
return interceptor(ctx, in, info, handler)
}
func _SettingsService_Write_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(WriteRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(SettingsServiceServer).Write(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: SettingsService_Write_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(SettingsServiceServer).Write(ctx, req.(*WriteRequest))
}
return interceptor(ctx, in, info, handler)
}
func _SettingsService_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DeleteRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(SettingsServiceServer).Delete(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: SettingsService_Delete_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(SettingsServiceServer).Delete(ctx, req.(*DeleteRequest))
}
return interceptor(ctx, in, info, handler)
}
// SettingsService_ServiceDesc is the grpc.ServiceDesc for SettingsService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var SettingsService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "cc.arduino.cli.settings.v1.SettingsService",
HandlerType: (*SettingsServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "GetAll",
Handler: _SettingsService_GetAll_Handler,
},
{
MethodName: "Merge",
Handler: _SettingsService_Merge_Handler,
},
{
MethodName: "GetValue",
Handler: _SettingsService_GetValue_Handler,
},
{
MethodName: "SetValue",
Handler: _SettingsService_SetValue_Handler,
},
{
MethodName: "Write",
Handler: _SettingsService_Write_Handler,
},
{
MethodName: "Delete",
Handler: _SettingsService_Delete_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "cc/arduino/cli/settings/v1/settings.proto",
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment