From eeee6f37a739889a6ea8a1366717fb48db10d7c7 Mon Sep 17 00:00:00 2001 From: Alessio Perugini Date: Fri, 25 Oct 2024 17:57:20 +0200 Subject: [PATCH] Use `buf.build` to manage our protobuf related activities (#2736) * Introduce `buf.build` files * protobuf: remove google, and use buf dep * Taskfile: use `buf` instead of `protoc` * rpc: regenerate all with `buf` * Taskfile: use buf to generate docs * github: update protobuf related actions * docs: update CONTRIBUTING * buf: add COMMENT linter * Added missing comments (for linter) * Fixed punctation and capitalization of grpc comments --------- Co-authored-by: Cristian Maglie --- .github/workflows/check-markdown-task.yml | 5 +- .github/workflows/check-mkdocs-task.yml | 5 +- .github/workflows/check-protobuf-task.yml | 62 +- .../deploy-cobra-mkdocs-versioned-poetry.yml | 5 +- Taskfile.yml | 16 +- buf.doc.gen.yaml | 10 + buf.gen.yaml | 14 + buf.lock | 6 + buf.yaml | 19 + docs/CONTRIBUTING.md | 10 +- rpc/buf.yaml | 7 - rpc/cc/arduino/cli/commands/v1/board.pb.go | 28 +- rpc/cc/arduino/cli/commands/v1/board.proto | 30 +- rpc/cc/arduino/cli/commands/v1/commands.pb.go | 116 +- rpc/cc/arduino/cli/commands/v1/commands.proto | 203 ++- .../cli/commands/v1/commands_grpc.pb.go | 1204 +++++------------ rpc/cc/arduino/cli/commands/v1/common.pb.go | 85 +- rpc/cc/arduino/cli/commands/v1/common.proto | 81 +- rpc/cc/arduino/cli/commands/v1/compile.pb.go | 71 +- rpc/cc/arduino/cli/commands/v1/compile.proto | 69 +- rpc/cc/arduino/cli/commands/v1/core.pb.go | 17 +- rpc/cc/arduino/cli/commands/v1/core.proto | 15 +- rpc/cc/arduino/cli/commands/v1/debug.pb.go | 36 +- rpc/cc/arduino/cli/commands/v1/debug.proto | 38 +- rpc/cc/arduino/cli/commands/v1/lib.pb.go | 18 +- rpc/cc/arduino/cli/commands/v1/lib.proto | 20 +- rpc/cc/arduino/cli/commands/v1/monitor.pb.go | 32 +- rpc/cc/arduino/cli/commands/v1/monitor.proto | 34 +- rpc/cc/arduino/cli/commands/v1/port.pb.go | 10 +- rpc/cc/arduino/cli/commands/v1/port.proto | 8 +- rpc/cc/arduino/cli/commands/v1/settings.pb.go | 97 +- rpc/cc/arduino/cli/commands/v1/settings.proto | 79 +- rpc/cc/arduino/cli/commands/v1/upload.pb.go | 21 +- rpc/cc/arduino/cli/commands/v1/upload.proto | 19 +- rpc/google/rpc/status.proto | 49 - 35 files changed, 1029 insertions(+), 1510 deletions(-) create mode 100644 buf.doc.gen.yaml create mode 100644 buf.gen.yaml create mode 100644 buf.lock create mode 100644 buf.yaml delete mode 100644 rpc/buf.yaml delete mode 100644 rpc/google/rpc/status.proto diff --git a/.github/workflows/check-markdown-task.yml b/.github/workflows/check-markdown-task.yml index ce99a259cea..5e8a72add69 100644 --- a/.github/workflows/check-markdown-task.yml +++ b/.github/workflows/check-markdown-task.yml @@ -116,10 +116,9 @@ jobs: - name: Install Go dependencies run: go install github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc@v1.4.1 - - name: Install protoc compiler - uses: arduino/setup-protoc@v3 + - uses: bufbuild/buf-action@v1 with: - repo-token: ${{ secrets.GITHUB_TOKEN }} + setup_only: true - name: Install Task uses: arduino/setup-task@v2 diff --git a/.github/workflows/check-mkdocs-task.yml b/.github/workflows/check-mkdocs-task.yml index 103f07842df..228a288d785 100644 --- a/.github/workflows/check-mkdocs-task.yml +++ b/.github/workflows/check-mkdocs-task.yml @@ -44,10 +44,9 @@ jobs: - name: Install Go dependencies run: go install github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc@v1.4.1 - - name: Install protoc compiler - uses: arduino/setup-protoc@v3 + - uses: bufbuild/buf-action@v1 with: - repo-token: ${{ secrets.GITHUB_TOKEN }} + setup_only: true - name: Install Python uses: actions/setup-python@v5 diff --git a/.github/workflows/check-protobuf-task.yml b/.github/workflows/check-protobuf-task.yml index 46664220e37..f81a5da2a05 100644 --- a/.github/workflows/check-protobuf-task.yml +++ b/.github/workflows/check-protobuf-task.yml @@ -53,21 +53,9 @@ jobs: - name: Checkout repository uses: actions/checkout@v4 - - name: Install Go - uses: actions/setup-go@v5 + - uses: bufbuild/buf-action@v1 with: - go-version: ${{ env.GO_VERSION }} - - - name: Install protoc compiler - uses: arduino/setup-protoc@v3 - with: - version: v26.1 - repo-token: ${{ secrets.GITHUB_TOKEN }} - - - name: Install Go deps - run: | - go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.34.2 - go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.3.0 + setup_only: true - name: Install Task uses: arduino/setup-task@v2 @@ -90,43 +78,15 @@ jobs: - name: Checkout repository uses: actions/checkout@v4 - - name: Install Go - uses: actions/setup-go@v5 - with: - go-version: ${{ env.GO_VERSION }} - - - name: Install buf (protoc linter) + # used by the protobuf breaking change detector + - name: Fetch main branch run: | - go install github.com/bufbuild/buf/cmd/buf@v1.20.0 - go install github.com/bufbuild/buf/cmd/protoc-gen-buf-breaking@v1.20.0 - go install github.com/bufbuild/buf/cmd/protoc-gen-buf-lint@v1.20.0 - - - name: Install Task - uses: arduino/setup-task@v2 - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - version: 3.x - - - name: Lint protocol buffers - run: task protoc:check + git fetch origin master - check-formatting: - needs: run-determination - if: needs.run-determination.outputs.result == 'true' - runs-on: ubuntu-latest - - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Install Task - uses: arduino/setup-task@v2 + - uses: bufbuild/buf-action@v1 with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - version: 3.x - - - name: Format protocol buffers - run: task protoc:format - - - name: Check formatting - run: git diff --color --exit-code + pr_comment: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository }} + lint: ${{ github.event_name == 'pull_request' }} + format: ${{ github.event_name == 'pull_request' }} + breaking: ${{ github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'buf skip breaking') }} + breaking_against: ".git#branch=origin/master,subdir=rpc" diff --git a/.github/workflows/deploy-cobra-mkdocs-versioned-poetry.yml b/.github/workflows/deploy-cobra-mkdocs-versioned-poetry.yml index d1c4013cf56..da7e07b514a 100644 --- a/.github/workflows/deploy-cobra-mkdocs-versioned-poetry.yml +++ b/.github/workflows/deploy-cobra-mkdocs-versioned-poetry.yml @@ -64,10 +64,9 @@ jobs: - name: Install Go dependencies run: go install github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc@v1.4.1 - - name: Install protoc compiler - uses: arduino/setup-protoc@v3 + - uses: bufbuild/buf-action@v1 with: - repo-token: ${{ secrets.GITHUB_TOKEN }} + setup_only: true - name: Install Python uses: actions/setup-python@v5 diff --git a/Taskfile.yml b/Taskfile.yml index d5cbf0131a0..c375e5eb39d 100755 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -232,16 +232,19 @@ tasks: - protoc:check - protoc:format - protoc:compile + - protoc:breaking-change-detection protoc:compile: 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' + - buf dep update + - buf generate 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' + - | + buf generate --template buf.doc.gen.yaml docs:include-configuration-json-schema: desc: Copy configuration JSON schema to make it available in documentation @@ -251,7 +254,7 @@ tasks: protoc:check: desc: Perform linting of the protobuf definitions cmds: - - buf lint rpc + - buf lint protoc:collect: desc: Create a zip file containing all .proto files in DIST_DIR @@ -263,7 +266,12 @@ tasks: protoc:format: desc: Perform formatting of the protobuf definitions cmds: - - clang-format -i rpc/cc/arduino/cli/*/*/*.proto + - buf format --write --exit-code + + protoc:breaking-change-detection: + desc: Detect protobuf breaking changes + cmds: + - buf breaking --against '.git#branch=origin/master,subdir=rpc' build: desc: Build the project diff --git a/buf.doc.gen.yaml b/buf.doc.gen.yaml new file mode 100644 index 00000000000..c516b499eab --- /dev/null +++ b/buf.doc.gen.yaml @@ -0,0 +1,10 @@ +version: v2 +plugins: + # Local plugin used to generate docs + # go install github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc@v1.4.1 + - local: protoc-gen-doc + out: ./docs/rpc + opt: + - markdown,commands.md +inputs: + - directory: ./rpc diff --git a/buf.gen.yaml b/buf.gen.yaml new file mode 100644 index 00000000000..b00e81d4279 --- /dev/null +++ b/buf.gen.yaml @@ -0,0 +1,14 @@ +version: v2 +plugins: + # Use protoc-gen-go + - remote: buf.build/protocolbuffers/go:v1.34.2 + out: ./rpc + opt: + - paths=source_relative + # Use of protoc-gen-go-grpc + - remote: buf.build/grpc/go:v1.5.1 + out: ./rpc + opt: + - paths=source_relative +inputs: + - directory: ./rpc diff --git a/buf.lock b/buf.lock new file mode 100644 index 00000000000..27f70aeb053 --- /dev/null +++ b/buf.lock @@ -0,0 +1,6 @@ +# Generated by buf. DO NOT EDIT. +version: v2 +deps: + - name: buf.build/googleapis/googleapis + commit: e7f8d366f5264595bcc4cd4139af9973 + digest: b5:0cd69a689ee320ed815663d57d1bc3a1d6823224a7a717d46fee3a68197c25a6f5f932c0b0e49f8370c70c247a6635969a6a54af5345cafd51e0667298768aca diff --git a/buf.yaml b/buf.yaml new file mode 100644 index 00000000000..16a8f720093 --- /dev/null +++ b/buf.yaml @@ -0,0 +1,19 @@ +version: v2 +deps: + - buf.build/googleapis/googleapis:e7f8d366f5264595bcc4cd4139af9973 +breaking: + use: + - FILE +lint: + use: + - STANDARD + - COMMENT_ENUM + - COMMENT_ENUM_VALUE + - COMMENT_FIELD + - COMMENT_RPC + - COMMENT_SERVICE + ignore_only: + ENUM_ZERO_VALUE_SUFFIX: + - rpc/cc/arduino/cli/commands/v1/lib.proto +modules: + - path: rpc diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md index ba3856034b9..bb7a0832ea4 100644 --- a/docs/CONTRIBUTING.md +++ b/docs/CONTRIBUTING.md @@ -79,13 +79,7 @@ If you want to run integration tests you will also need: If you're working on the gRPC interface you will also have to: -- download and install the [protoc][6] compiler (use the version required to match the generated code, please note that - the latest releases does not follow semantic versioning anymore so, for example, the version 5.26.1 must be searched - as 26.1 dropping the major number) -- install `protoc-gen-go` using: `go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.34.2` (use the version - required to match the generated code) -- install `protoc-gen-go-grpc` using: `go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.3.0` (use the version - required to match the generated code) +- download and install [buf][6] our tool to compile and generate proto files ### Building the source code @@ -337,7 +331,7 @@ If your PR doesn't need to be included in the changelog, please start the commit [1]: https://go.dev/doc/install [2]: https://taskfile.dev/#/installation [3]: https://www.python.org/downloads/ -[6]: https://github.com/protocolbuffers/protobuf/releases +[6]: https://buf.build/docs/installation/ [7]: https://pages.github.com/ [9]: https://www.mkdocs.org/ [11]: https://github.com/arduino/arduino-cli/blob/master/.github/workflows/deploy-cobra-mkdocs-versioned-poetry.yml diff --git a/rpc/buf.yaml b/rpc/buf.yaml deleted file mode 100644 index 95f08ebd923..00000000000 --- a/rpc/buf.yaml +++ /dev/null @@ -1,7 +0,0 @@ -version: v1beta1 -lint: - ignore: - - google - ignore_only: - ENUM_ZERO_VALUE_SUFFIX: - - cc/arduino/cli/commands/v1/lib.proto diff --git a/rpc/cc/arduino/cli/commands/v1/board.pb.go b/rpc/cc/arduino/cli/commands/v1/board.pb.go index 7fb7f583b2a..3bc667e8192 100644 --- a/rpc/cc/arduino/cli/commands/v1/board.pb.go +++ b/rpc/cc/arduino/cli/commands/v1/board.pb.go @@ -17,7 +17,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.34.2 -// protoc v5.26.1 +// protoc (unknown) // source: cc/arduino/cli/commands/v1/board.proto package commands @@ -132,13 +132,13 @@ type BoardDetailsResponse struct { ToolsDependencies []*ToolsDependencies `protobuf:"bytes,10,rep,name=tools_dependencies,json=toolsDependencies,proto3" json:"tools_dependencies,omitempty"` // The board's custom configuration options. ConfigOptions []*ConfigOption `protobuf:"bytes,11,rep,name=config_options,json=configOptions,proto3" json:"config_options,omitempty"` - // List of programmers supported by the board + // List of programmers supported by the board. Programmers []*Programmer `protobuf:"bytes,13,rep,name=programmers,proto3" json:"programmers,omitempty"` // Identifying information for the board (e.g., USB VID/PID). IdentificationProperties []*BoardIdentificationProperties `protobuf:"bytes,15,rep,name=identification_properties,json=identificationProperties,proto3" json:"identification_properties,omitempty"` - // Board build properties used for compiling + // Board build properties used for compiling. BuildProperties []string `protobuf:"bytes,16,rep,name=build_properties,json=buildProperties,proto3" json:"build_properties,omitempty"` - // Default programmer for the board + // Default programmer for the board. DefaultProgrammerId string `protobuf:"bytes,17,opt,name=default_programmer_id,json=defaultProgrammerId,proto3" json:"default_programmer_id,omitempty"` } @@ -284,7 +284,7 @@ type BoardIdentificationProperties struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // A set of properties that must all be matched to identify the board + // A set of properties that must all be matched to identify the board. Properties map[string]string `protobuf:"bytes,1,rep,name=properties,proto3" json:"properties,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` } @@ -869,7 +869,7 @@ type BoardListRequest struct { // Arduino Core Service instance from the `Init` response. Instance *Instance `protobuf:"bytes,1,opt,name=instance,proto3" json:"instance,omitempty"` - // Search for boards for the given time (in milliseconds) + // Search for boards for the given time (in milliseconds). Timeout int64 `protobuf:"varint,2,opt,name=timeout,proto3" json:"timeout,omitempty"` // The fully qualified board name of the board you want information about // (e.g., `arduino:avr:uno`). @@ -993,7 +993,7 @@ type DetectedPort struct { // The possible boards attached to the port. MatchingBoards []*BoardListItem `protobuf:"bytes,1,rep,name=matching_boards,json=matchingBoards,proto3" json:"matching_boards,omitempty"` - // The port details + // The port details. Port *Port `protobuf:"bytes,2,opt,name=port,proto3" json:"port,omitempty"` } @@ -1052,7 +1052,7 @@ type BoardListAllRequest struct { Instance *Instance `protobuf:"bytes,1,opt,name=instance,proto3" json:"instance,omitempty"` // The search query to filter the board list by. SearchArgs []string `protobuf:"bytes,2,rep,name=search_args,json=searchArgs,proto3" json:"search_args,omitempty"` - // Set to true to get also the boards marked as "hidden" in the platform + // Set to true to get also the boards marked as "hidden" in the platform. IncludeHiddenBoards bool `protobuf:"varint,3,opt,name=include_hidden_boards,json=includeHiddenBoards,proto3" json:"include_hidden_boards,omitempty"` } @@ -1210,11 +1210,11 @@ type BoardListWatchResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Event type as received from the serial discovery tool + // Event type as received from the serial discovery tool. EventType string `protobuf:"bytes,1,opt,name=event_type,json=eventType,proto3" json:"event_type,omitempty"` - // Information about the port + // Information about the port. Port *DetectedPort `protobuf:"bytes,2,opt,name=port,proto3" json:"port,omitempty"` - // Eventual errors when detecting connected boards + // Eventual errors when detecting connected boards. Error string `protobuf:"bytes,3,opt,name=error,proto3" json:"error,omitempty"` } @@ -1280,9 +1280,9 @@ type BoardListItem struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // The fully qualified board name. Used to identify the board to a machine. Fqbn string `protobuf:"bytes,2,opt,name=fqbn,proto3" json:"fqbn,omitempty"` - // If the board is marked as "hidden" in the platform + // If the board is marked as "hidden" in the platform. IsHidden bool `protobuf:"varint,3,opt,name=is_hidden,json=isHidden,proto3" json:"is_hidden,omitempty"` - // Platform this board belongs to + // Platform this board belongs to. Platform *Platform `protobuf:"bytes,6,opt,name=platform,proto3" json:"platform,omitempty"` } @@ -1356,7 +1356,7 @@ type BoardSearchRequest struct { // The search query to filter the board list by. SearchArgs string `protobuf:"bytes,2,opt,name=search_args,json=searchArgs,proto3" json:"search_args,omitempty"` // Set to true to get also the boards marked as "hidden" in installed - // platforms + // platforms. IncludeHiddenBoards bool `protobuf:"varint,3,opt,name=include_hidden_boards,json=includeHiddenBoards,proto3" json:"include_hidden_boards,omitempty"` } diff --git a/rpc/cc/arduino/cli/commands/v1/board.proto b/rpc/cc/arduino/cli/commands/v1/board.proto index 8120f956b5d..27be0f19d01 100644 --- a/rpc/cc/arduino/cli/commands/v1/board.proto +++ b/rpc/cc/arduino/cli/commands/v1/board.proto @@ -18,11 +18,11 @@ syntax = "proto3"; package cc.arduino.cli.commands.v1; -option go_package = "github.com/arduino/arduino-cli/rpc/cc/arduino/cli/commands/v1;commands"; - import "cc/arduino/cli/commands/v1/common.proto"; import "cc/arduino/cli/commands/v1/port.proto"; +option go_package = "github.com/arduino/arduino-cli/rpc/cc/arduino/cli/commands/v1;commands"; + message BoardDetailsRequest { // Arduino Core Service instance from the `Init` response. Instance instance = 1; @@ -58,19 +58,19 @@ message BoardDetailsResponse { repeated ToolsDependencies tools_dependencies = 10; // The board's custom configuration options. repeated ConfigOption config_options = 11; - // List of programmers supported by the board + // List of programmers supported by the board. repeated Programmer programmers = 13; reserved 14; // Identifying information for the board (e.g., USB VID/PID). repeated BoardIdentificationProperties identification_properties = 15; - // Board build properties used for compiling + // Board build properties used for compiling. repeated string build_properties = 16; - // Default programmer for the board + // Default programmer for the board. string default_programmer_id = 17; } message BoardIdentificationProperties { - // A set of properties that must all be matched to identify the board + // A set of properties that must all be matched to identify the board. map properties = 1; } @@ -157,7 +157,7 @@ message ConfigValue { message BoardListRequest { // Arduino Core Service instance from the `Init` response. Instance instance = 1; - // Search for boards for the given time (in milliseconds) + // Search for boards for the given time (in milliseconds). int64 timeout = 2; // The fully qualified board name of the board you want information about // (e.g., `arduino:avr:uno`). @@ -174,7 +174,7 @@ message BoardListResponse { message DetectedPort { // The possible boards attached to the port. repeated BoardListItem matching_boards = 1; - // The port details + // The port details. Port port = 2; } @@ -183,7 +183,7 @@ message BoardListAllRequest { Instance instance = 1; // The search query to filter the board list by. repeated string search_args = 2; - // Set to true to get also the boards marked as "hidden" in the platform + // Set to true to get also the boards marked as "hidden" in the platform. bool include_hidden_boards = 3; } @@ -198,11 +198,11 @@ message BoardListWatchRequest { } message BoardListWatchResponse { - // Event type as received from the serial discovery tool + // Event type as received from the serial discovery tool. string event_type = 1; - // Information about the port + // Information about the port. DetectedPort port = 2; - // Eventual errors when detecting connected boards + // Eventual errors when detecting connected boards. string error = 3; } @@ -211,9 +211,9 @@ message BoardListItem { string name = 1; // The fully qualified board name. Used to identify the board to a machine. string fqbn = 2; - // If the board is marked as "hidden" in the platform + // If the board is marked as "hidden" in the platform. bool is_hidden = 3; - // Platform this board belongs to + // Platform this board belongs to. Platform platform = 6; } @@ -223,7 +223,7 @@ message BoardSearchRequest { // The search query to filter the board list by. string search_args = 2; // Set to true to get also the boards marked as "hidden" in installed - // platforms + // platforms. bool include_hidden_boards = 3; } diff --git a/rpc/cc/arduino/cli/commands/v1/commands.pb.go b/rpc/cc/arduino/cli/commands/v1/commands.pb.go index 4e7675c5a34..b79b2aa7893 100644 --- a/rpc/cc/arduino/cli/commands/v1/commands.pb.go +++ b/rpc/cc/arduino/cli/commands/v1/commands.pb.go @@ -17,7 +17,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.34.2 -// protoc v5.26.1 +// protoc (unknown) // source: cc/arduino/cli/commands/v1/commands.proto package commands @@ -37,21 +37,22 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +// Represent the reason why an instance initialization failed. type FailedInstanceInitReason int32 const ( - // FAILED_INSTANCE_INIT_REASON_UNSPECIFIED the error reason is not specialized + // FAILED_INSTANCE_INIT_REASON_UNSPECIFIED the error reason is not specialized. FailedInstanceInitReason_FAILED_INSTANCE_INIT_REASON_UNSPECIFIED FailedInstanceInitReason = 0 - // INVALID_INDEX_URL a package index url is malformed + // INVALID_INDEX_URL a package index url is malformed. FailedInstanceInitReason_FAILED_INSTANCE_INIT_REASON_INVALID_INDEX_URL FailedInstanceInitReason = 1 // FAILED_INSTANCE_INIT_REASON_INDEX_LOAD_ERROR failure encountered while - // loading an index + // loading an index. FailedInstanceInitReason_FAILED_INSTANCE_INIT_REASON_INDEX_LOAD_ERROR FailedInstanceInitReason = 2 // FAILED_INSTANCE_INIT_REASON_TOOL_LOAD_ERROR failure encountered while - // loading a tool + // loading a tool. FailedInstanceInitReason_FAILED_INSTANCE_INIT_REASON_TOOL_LOAD_ERROR FailedInstanceInitReason = 3 // FAILED_INSTANCE_INIT_REASON_INDEX_DOWNLOAD_ERROR failure encountered while - // downloading an index + // downloading an index. FailedInstanceInitReason_FAILED_INSTANCE_INIT_REASON_INDEX_DOWNLOAD_ERROR FailedInstanceInitReason = 4 ) @@ -100,6 +101,7 @@ func (FailedInstanceInitReason) EnumDescriptor() ([]byte, []int) { return file_cc_arduino_cli_commands_v1_commands_proto_rawDescGZIP(), []int{0} } +// The status represents the result of the index update. type IndexUpdateReport_Status int32 const ( @@ -253,9 +255,9 @@ type InitRequest struct { // An Arduino Core instance. Instance *Instance `protobuf:"bytes,1,opt,name=instance,proto3" json:"instance,omitempty"` - // Profile to use + // Profile to use. Profile string `protobuf:"bytes,2,opt,name=profile,proto3" json:"profile,omitempty"` - // The path where the sketch is stored + // The path where the sketch is stored. SketchPath string `protobuf:"bytes,3,opt,name=sketch_path,json=sketchPath,proto3" json:"sketch_path,omitempty"` } @@ -390,15 +392,17 @@ type isInitResponse_Message interface { } type InitResponse_InitProgress struct { + // The initialization progress. InitProgress *InitResponse_Progress `protobuf:"bytes,1,opt,name=init_progress,json=initProgress,proto3,oneof"` } type InitResponse_Error struct { + // The error in case the initialization failed. Error *status.Status `protobuf:"bytes,2,opt,name=error,proto3,oneof"` } type InitResponse_Profile struct { - // Selected profile information + // Selected profile information. Profile *SketchProfile `protobuf:"bytes,3,opt,name=profile,proto3,oneof"` } @@ -413,9 +417,9 @@ type FailedInstanceInitError struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // specific cause of the error + // specific cause of the error. Reason FailedInstanceInitReason `protobuf:"varint,1,opt,name=reason,proto3,enum=cc.arduino.cli.commands.v1.FailedInstanceInitReason" json:"reason,omitempty"` - // explanation of the error + // explanation of the error. Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` } @@ -990,14 +994,14 @@ type NewSketchRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // New sketch name + // New sketch name. SketchName string `protobuf:"bytes,2,opt,name=sketch_name,json=sketchName,proto3" json:"sketch_name,omitempty"` // Optional: create a Sketch in this directory // (used as "Sketchbook" directory). // Default Sketchbook directory "directories.User" is used if sketch_dir is // empty. SketchDir string `protobuf:"bytes,3,opt,name=sketch_dir,json=sketchDir,proto3" json:"sketch_dir,omitempty"` - // Specificies if an existing .ino sketch should be overwritten + // Specificies if an existing .ino sketch should be overwritten. Overwrite bool `protobuf:"varint,4,opt,name=overwrite,proto3" json:"overwrite,omitempty"` } @@ -1059,7 +1063,7 @@ type NewSketchResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Absolute path to a main sketch file + // Absolute path to a main sketch file. MainFile string `protobuf:"bytes,1,opt,name=main_file,json=mainFile,proto3" json:"main_file,omitempty"` } @@ -1107,7 +1111,7 @@ type LoadSketchRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Absolute path to single sketch file or a sketch folder + // Absolute path to single sketch file or a sketch folder. SketchPath string `protobuf:"bytes,2,opt,name=sketch_path,json=sketchPath,proto3" json:"sketch_path,omitempty"` } @@ -1155,7 +1159,7 @@ type LoadSketchResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The loaded sketch + // The loaded sketch. Sketch *Sketch `protobuf:"bytes,1,opt,name=sketch,proto3" json:"sketch,omitempty"` } @@ -1203,14 +1207,14 @@ type ArchiveSketchRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Absolute path to Sketch file or folder containing Sketch file + // Absolute path to Sketch file or folder containing Sketch file. SketchPath string `protobuf:"bytes,1,opt,name=sketch_path,json=sketchPath,proto3" json:"sketch_path,omitempty"` // Absolute path to archive that will be created or folder that will contain - // it + // it. ArchivePath string `protobuf:"bytes,2,opt,name=archive_path,json=archivePath,proto3" json:"archive_path,omitempty"` - // Specifies if build directory should be included in the archive + // Specifies if build directory should be included in the archive. IncludeBuildDir bool `protobuf:"varint,3,opt,name=include_build_dir,json=includeBuildDir,proto3" json:"include_build_dir,omitempty"` - // Allows to override an already existing archive + // Allows to override an already existing archive. Overwrite bool `protobuf:"varint,4,opt,name=overwrite,proto3" json:"overwrite,omitempty"` } @@ -1317,15 +1321,15 @@ type SetSketchDefaultsRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Absolute path to Sketch file or folder containing Sketch file + // Absolute path to Sketch file or folder containing Sketch file. SketchPath string `protobuf:"bytes,1,opt,name=sketch_path,json=sketchPath,proto3" json:"sketch_path,omitempty"` - // The desired value for default_fqbn in project file (sketch.yaml) + // The desired value for default_fqbn in project file (sketch.yaml). DefaultFqbn string `protobuf:"bytes,2,opt,name=default_fqbn,json=defaultFqbn,proto3" json:"default_fqbn,omitempty"` - // The desired value for default_port in project file (sketch.yaml) + // The desired value for default_port in project file (sketch.yaml). DefaultPortAddress string `protobuf:"bytes,3,opt,name=default_port_address,json=defaultPortAddress,proto3" json:"default_port_address,omitempty"` - // The desired value for default_protocol in project file (sketch.yaml) + // The desired value for default_protocol in project file (sketch.yaml). DefaultPortProtocol string `protobuf:"bytes,4,opt,name=default_port_protocol,json=defaultPortProtocol,proto3" json:"default_port_protocol,omitempty"` - // The desired value for default_programmer in project file (sketch.yaml) + // The desired value for default_programmer in project file (sketch.yaml). DefaultProgrammer string `protobuf:"bytes,5,opt,name=default_programmer,json=defaultProgrammer,proto3" json:"default_programmer,omitempty"` } @@ -1402,16 +1406,16 @@ type SetSketchDefaultsResponse struct { unknownFields protoimpl.UnknownFields // The value of default_fqnn that has been written in project file - // (sketch.yaml) + // (sketch.yaml). DefaultFqbn string `protobuf:"bytes,1,opt,name=default_fqbn,json=defaultFqbn,proto3" json:"default_fqbn,omitempty"` // The value of default_port that has been written in project file - // (sketch.yaml) + // (sketch.yaml). DefaultPortAddress string `protobuf:"bytes,2,opt,name=default_port_address,json=defaultPortAddress,proto3" json:"default_port_address,omitempty"` // The value of default_protocol that has been written in project file - // (sketch.yaml) + // (sketch.yaml). DefaultPortProtocol string `protobuf:"bytes,3,opt,name=default_port_protocol,json=defaultPortProtocol,proto3" json:"default_port_protocol,omitempty"` // The value of default_programmer that has been written in project file - // (sketch.yaml) + // (sketch.yaml). DefaultProgrammer string `protobuf:"bytes,4,opt,name=default_programmer,json=defaultProgrammer,proto3" json:"default_programmer,omitempty"` } @@ -1819,31 +1823,31 @@ var file_cc_arduino_cli_commands_v1_commands_proto_rawDesc = []byte{ 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1a, 0x63, 0x63, 0x2e, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6c, 0x69, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, - 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x1a, 0x17, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, - 0x72, 0x70, 0x63, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x27, 0x63, 0x63, 0x2f, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2f, 0x63, 0x6c, 0x69, - 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, - 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x26, 0x63, 0x63, 0x2f, 0x61, 0x72, + 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x1a, 0x26, 0x63, 0x63, 0x2f, 0x61, 0x72, 0x64, 0x75, + 0x69, 0x6e, 0x6f, 0x2f, 0x63, 0x6c, 0x69, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, + 0x2f, 0x76, 0x31, 0x2f, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x27, 0x63, 0x63, 0x2f, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2f, 0x63, 0x6c, 0x69, 0x2f, + 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, + 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x28, 0x63, 0x63, 0x2f, 0x61, 0x72, 0x64, + 0x75, 0x69, 0x6e, 0x6f, 0x2f, 0x63, 0x6c, 0x69, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, + 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x25, 0x63, 0x63, 0x2f, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2f, 0x63, + 0x6c, 0x69, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x63, + 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x26, 0x63, 0x63, 0x2f, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2f, 0x63, 0x6c, 0x69, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, - 0x64, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x28, 0x63, 0x63, 0x2f, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2f, 0x63, 0x6c, - 0x69, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, - 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x25, 0x63, 0x63, 0x2f, - 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2f, 0x63, 0x6c, 0x69, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, - 0x61, 0x6e, 0x64, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x26, 0x63, 0x63, 0x2f, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2f, 0x63, - 0x6c, 0x69, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x64, - 0x65, 0x62, 0x75, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x28, 0x63, 0x63, 0x2f, 0x61, - 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2f, 0x63, 0x6c, 0x69, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x61, - 0x6e, 0x64, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x27, 0x63, 0x63, 0x2f, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, - 0x2f, 0x63, 0x6c, 0x69, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2f, 0x76, 0x31, - 0x2f, 0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x24, 0x63, - 0x63, 0x2f, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2f, 0x63, 0x6c, 0x69, 0x2f, 0x63, 0x6f, - 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x6c, 0x69, 0x62, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x29, 0x63, 0x63, 0x2f, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2f, - 0x63, 0x6c, 0x69, 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, 0x22, 0x0f, + 0x64, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x64, 0x65, 0x62, 0x75, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x24, 0x63, 0x63, 0x2f, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2f, 0x63, 0x6c, + 0x69, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x6c, 0x69, + 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x28, 0x63, 0x63, 0x2f, 0x61, 0x72, 0x64, 0x75, + 0x69, 0x6e, 0x6f, 0x2f, 0x63, 0x6c, 0x69, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, + 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x29, 0x63, 0x63, 0x2f, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2f, 0x63, 0x6c, + 0x69, 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, 0x1a, 0x27, 0x63, 0x63, + 0x2f, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2f, 0x63, 0x6c, 0x69, 0x2f, 0x63, 0x6f, 0x6d, + 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x72, 0x70, + 0x63, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x0f, 0x0a, 0x0d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x52, 0x0a, 0x0e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x08, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x01, 0x20, @@ -2727,15 +2731,15 @@ func file_cc_arduino_cli_commands_v1_commands_proto_init() { if File_cc_arduino_cli_commands_v1_commands_proto != nil { return } - file_cc_arduino_cli_commands_v1_common_proto_init() file_cc_arduino_cli_commands_v1_board_proto_init() + file_cc_arduino_cli_commands_v1_common_proto_init() file_cc_arduino_cli_commands_v1_compile_proto_init() file_cc_arduino_cli_commands_v1_core_proto_init() file_cc_arduino_cli_commands_v1_debug_proto_init() - file_cc_arduino_cli_commands_v1_monitor_proto_init() - file_cc_arduino_cli_commands_v1_upload_proto_init() file_cc_arduino_cli_commands_v1_lib_proto_init() + file_cc_arduino_cli_commands_v1_monitor_proto_init() file_cc_arduino_cli_commands_v1_settings_proto_init() + file_cc_arduino_cli_commands_v1_upload_proto_init() if !protoimpl.UnsafeEnabled { file_cc_arduino_cli_commands_v1_commands_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*CreateRequest); i { diff --git a/rpc/cc/arduino/cli/commands/v1/commands.proto b/rpc/cc/arduino/cli/commands/v1/commands.proto index 8b3894e610e..e7c7d078cb2 100644 --- a/rpc/cc/arduino/cli/commands/v1/commands.proto +++ b/rpc/cc/arduino/cli/commands/v1/commands.proto @@ -18,61 +18,55 @@ syntax = "proto3"; package cc.arduino.cli.commands.v1; -option go_package = "github.com/arduino/arduino-cli/rpc/cc/arduino/cli/commands/v1;commands"; - -import "google/rpc/status.proto"; - -import "cc/arduino/cli/commands/v1/common.proto"; import "cc/arduino/cli/commands/v1/board.proto"; +import "cc/arduino/cli/commands/v1/common.proto"; import "cc/arduino/cli/commands/v1/compile.proto"; import "cc/arduino/cli/commands/v1/core.proto"; 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/monitor.proto"; import "cc/arduino/cli/commands/v1/settings.proto"; +import "cc/arduino/cli/commands/v1/upload.proto"; +import "google/rpc/status.proto"; -// The main Arduino Platform service API +option go_package = "github.com/arduino/arduino-cli/rpc/cc/arduino/cli/commands/v1;commands"; + +// The main Arduino Platform service API. service ArduinoCoreService { - // Create a new Arduino Core instance + // Create a new Arduino Core instance. rpc Create(CreateRequest) returns (CreateResponse) {} // Initializes an existing Arduino Core instance by loading platforms and - // libraries + // libraries. rpc Init(InitRequest) returns (stream InitResponse) {} - // Destroy an instance of the Arduino Core Service + // Destroy an instance of the Arduino Core Service. rpc Destroy(DestroyRequest) returns (DestroyResponse) {} - // Update package index of the Arduino Core Service + // Update package index of the Arduino Core Service. rpc UpdateIndex(UpdateIndexRequest) returns (stream UpdateIndexResponse) {} - // Update libraries index - rpc UpdateLibrariesIndex(UpdateLibrariesIndexRequest) - returns (stream UpdateLibrariesIndexResponse) {} + // Update libraries index. + rpc UpdateLibrariesIndex(UpdateLibrariesIndexRequest) returns (stream UpdateLibrariesIndexResponse) {} // Get the version of Arduino CLI in use. rpc Version(VersionRequest) returns (VersionResponse) {} - // Create a new Sketch + // Create a new Sketch. rpc NewSketch(NewSketchRequest) returns (NewSketchResponse) {} - // Returns all files composing a Sketch + // Returns all files composing a Sketch. rpc LoadSketch(LoadSketchRequest) returns (LoadSketchResponse) {} - // Creates a zip file containing all files of specified Sketch + // Creates a zip file containing all files of specified Sketch. rpc ArchiveSketch(ArchiveSketchRequest) returns (ArchiveSketchResponse) {} // Sets the sketch default FQBN and Port Address/Protocol in // the sketch project file (sketch.yaml). These metadata can be retrieved // using LoadSketch. - rpc SetSketchDefaults(SetSketchDefaultsRequest) - returns (SetSketchDefaultsResponse) {} - - // BOARD COMMANDS - // -------------- + rpc SetSketchDefaults(SetSketchDefaultsRequest) returns (SetSketchDefaultsResponse) {} - // Requests details about a board + // Requests details about a board. rpc BoardDetails(BoardDetailsRequest) returns (BoardDetailsResponse); // List the boards currently connected to the computer. @@ -85,87 +79,69 @@ service ArduinoCoreService { rpc BoardSearch(BoardSearchRequest) returns (BoardSearchResponse); // List boards connection and disconnected events. - rpc BoardListWatch(BoardListWatchRequest) - returns (stream BoardListWatchResponse); + rpc BoardListWatch(BoardListWatchRequest) returns (stream BoardListWatchResponse); // Compile an Arduino sketch. rpc Compile(CompileRequest) returns (stream CompileResponse); // Download and install a platform and its tool dependencies. - rpc PlatformInstall(PlatformInstallRequest) - returns (stream PlatformInstallResponse); + rpc PlatformInstall(PlatformInstallRequest) returns (stream PlatformInstallResponse); // Download a platform and its tool dependencies to the `staging/packages` // subdirectory of the data directory. - rpc PlatformDownload(PlatformDownloadRequest) - returns (stream PlatformDownloadResponse); + rpc PlatformDownload(PlatformDownloadRequest) returns (stream PlatformDownloadResponse); // Uninstall a platform as well as its tool dependencies that are not used by // other installed platforms. - rpc PlatformUninstall(PlatformUninstallRequest) - returns (stream PlatformUninstallResponse); + rpc PlatformUninstall(PlatformUninstallRequest) returns (stream PlatformUninstallResponse); // Upgrade an installed platform to the latest version. - rpc PlatformUpgrade(PlatformUpgradeRequest) - returns (stream PlatformUpgradeResponse); + rpc PlatformUpgrade(PlatformUpgradeRequest) returns (stream PlatformUpgradeResponse); // Upload a compiled sketch to a board. rpc Upload(UploadRequest) returns (stream UploadResponse); // Upload a compiled sketch to a board using a programmer. - rpc UploadUsingProgrammer(UploadUsingProgrammerRequest) - returns (stream UploadUsingProgrammerResponse); + rpc UploadUsingProgrammer(UploadUsingProgrammerRequest) returns (stream UploadUsingProgrammerResponse); // Returns the list of users fields necessary to upload to that board // using the specified protocol. - rpc SupportedUserFields(SupportedUserFieldsRequest) - returns (SupportedUserFieldsResponse); + rpc SupportedUserFields(SupportedUserFieldsRequest) returns (SupportedUserFieldsResponse); // List programmers available for a board. - rpc ListProgrammersAvailableForUpload( - ListProgrammersAvailableForUploadRequest) - returns (ListProgrammersAvailableForUploadResponse); + rpc ListProgrammersAvailableForUpload(ListProgrammersAvailableForUploadRequest) returns (ListProgrammersAvailableForUploadResponse); // Burn bootloader to a board. - rpc BurnBootloader(BurnBootloaderRequest) - returns (stream BurnBootloaderResponse); + rpc BurnBootloader(BurnBootloaderRequest) returns (stream BurnBootloaderResponse); // Search for a platform in the platforms indexes. rpc PlatformSearch(PlatformSearchRequest) returns (PlatformSearchResponse); // Download the archive file of an Arduino library in the libraries index to // the staging directory. - rpc LibraryDownload(LibraryDownloadRequest) - returns (stream LibraryDownloadResponse); + rpc LibraryDownload(LibraryDownloadRequest) returns (stream LibraryDownloadResponse); // Download and install an Arduino library from the libraries index. - rpc LibraryInstall(LibraryInstallRequest) - returns (stream LibraryInstallResponse); + rpc LibraryInstall(LibraryInstallRequest) returns (stream LibraryInstallResponse); // Upgrade a library to the newest version available. - rpc LibraryUpgrade(LibraryUpgradeRequest) - returns (stream LibraryUpgradeResponse); + rpc LibraryUpgrade(LibraryUpgradeRequest) returns (stream LibraryUpgradeResponse); - // Install a library from a Zip File - rpc ZipLibraryInstall(ZipLibraryInstallRequest) - returns (stream ZipLibraryInstallResponse); + // Install a library from a Zip File. + rpc ZipLibraryInstall(ZipLibraryInstallRequest) returns (stream ZipLibraryInstallResponse); - // Download and install a library from a git url - rpc GitLibraryInstall(GitLibraryInstallRequest) - returns (stream GitLibraryInstallResponse); + // Download and install a library from a git url. + rpc GitLibraryInstall(GitLibraryInstallRequest) returns (stream GitLibraryInstallResponse); // Uninstall an Arduino library. - rpc LibraryUninstall(LibraryUninstallRequest) - returns (stream LibraryUninstallResponse); + rpc LibraryUninstall(LibraryUninstallRequest) returns (stream LibraryUninstallResponse); // Upgrade all installed Arduino libraries to the newest version available. - rpc LibraryUpgradeAll(LibraryUpgradeAllRequest) - returns (stream LibraryUpgradeAllResponse); + rpc LibraryUpgradeAll(LibraryUpgradeAllRequest) returns (stream LibraryUpgradeAllResponse); // List the recursive dependencies of a library, as defined by the `depends` // field of the library.properties files. - rpc LibraryResolveDependencies(LibraryResolveDependenciesRequest) - returns (LibraryResolveDependenciesResponse); + rpc LibraryResolveDependencies(LibraryResolveDependenciesRequest) returns (LibraryResolveDependenciesResponse); // Search the Arduino libraries index for libraries. rpc LibrarySearch(LibrarySearchRequest) returns (LibrarySearchResponse); @@ -173,53 +149,44 @@ service ArduinoCoreService { // List the installed libraries. rpc LibraryList(LibraryListRequest) returns (LibraryListResponse); - // Open a monitor connection to a board port + // Open a monitor connection to a board port. rpc Monitor(stream MonitorRequest) returns (stream MonitorResponse); - // Returns the parameters that can be set in the MonitorRequest calls - rpc EnumerateMonitorPortSettings(EnumerateMonitorPortSettingsRequest) - returns (EnumerateMonitorPortSettingsResponse); + // Returns the parameters that can be set in the MonitorRequest calls. + rpc EnumerateMonitorPortSettings(EnumerateMonitorPortSettingsRequest) returns (EnumerateMonitorPortSettingsResponse); // Start a debug session and communicate with the debugger tool. rpc Debug(stream DebugRequest) returns (stream DebugResponse) {} // Determine if debugging is suported given a specific configuration. - rpc IsDebugSupported(IsDebugSupportedRequest) - returns (IsDebugSupportedResponse) {} + rpc IsDebugSupported(IsDebugSupportedRequest) returns (IsDebugSupportedResponse) {} // Query the debugger information given a specific configuration. rpc GetDebugConfig(GetDebugConfigRequest) returns (GetDebugConfigResponse) {} // Check for updates to the Arduino CLI. - rpc CheckForArduinoCLIUpdates(CheckForArduinoCLIUpdatesRequest) - returns (CheckForArduinoCLIUpdatesResponse); + rpc CheckForArduinoCLIUpdates(CheckForArduinoCLIUpdatesRequest) returns (CheckForArduinoCLIUpdatesResponse); // Clean the download cache directory (where archives are downloaded). - rpc CleanDownloadCacheDirectory(CleanDownloadCacheDirectoryRequest) - returns (CleanDownloadCacheDirectoryResponse); + rpc CleanDownloadCacheDirectory(CleanDownloadCacheDirectoryRequest) returns (CleanDownloadCacheDirectoryResponse); - // Writes the settings currently stored in memory in a YAML file - rpc ConfigurationSave(ConfigurationSaveRequest) - returns (ConfigurationSaveResponse); + // Writes the settings currently stored in memory in a YAML file. + rpc ConfigurationSave(ConfigurationSaveRequest) returns (ConfigurationSaveResponse); - // Read the settings from a YAML file - rpc ConfigurationOpen(ConfigurationOpenRequest) - returns (ConfigurationOpenResponse); + // Read the settings from a YAML file. + rpc ConfigurationOpen(ConfigurationOpenRequest) returns (ConfigurationOpenResponse); - rpc ConfigurationGet(ConfigurationGetRequest) - returns (ConfigurationGetResponse); + // Get the current configuration. + rpc ConfigurationGet(ConfigurationGetRequest) returns (ConfigurationGetResponse); - // Enumerate all the keys/values pairs available in the configuration - rpc SettingsEnumerate(SettingsEnumerateRequest) - returns (SettingsEnumerateResponse); + // Enumerate all the keys/values pairs available in the configuration. + rpc SettingsEnumerate(SettingsEnumerateRequest) returns (SettingsEnumerateResponse); - // Get a single configuration value - rpc SettingsGetValue(SettingsGetValueRequest) - returns (SettingsGetValueResponse); + // Get a single configuration value. + rpc SettingsGetValue(SettingsGetValueRequest) returns (SettingsGetValueResponse); - // Set a single configuration value - rpc SettingsSetValue(SettingsSetValueRequest) - returns (SettingsSetValueResponse); + // Set a single configuration value. + rpc SettingsSetValue(SettingsSetValueRequest) returns (SettingsSetValueResponse); } message CreateRequest {} @@ -232,9 +199,9 @@ message CreateResponse { message InitRequest { // An Arduino Core instance. Instance instance = 1; - // Profile to use + // Profile to use. string profile = 2; - // The path where the sketch is stored + // The path where the sketch is stored. string sketch_path = 3; } @@ -246,33 +213,36 @@ message InitResponse { TaskProgress task_progress = 2; } oneof message { + // The initialization progress. Progress init_progress = 1; + // The error in case the initialization failed. google.rpc.Status error = 2; - // Selected profile information + // Selected profile information. SketchProfile profile = 3; } } +// Represent the reason why an instance initialization failed. enum FailedInstanceInitReason { - // FAILED_INSTANCE_INIT_REASON_UNSPECIFIED the error reason is not specialized + // FAILED_INSTANCE_INIT_REASON_UNSPECIFIED the error reason is not specialized. FAILED_INSTANCE_INIT_REASON_UNSPECIFIED = 0; - // INVALID_INDEX_URL a package index url is malformed + // INVALID_INDEX_URL a package index url is malformed. FAILED_INSTANCE_INIT_REASON_INVALID_INDEX_URL = 1; // FAILED_INSTANCE_INIT_REASON_INDEX_LOAD_ERROR failure encountered while - // loading an index + // loading an index. FAILED_INSTANCE_INIT_REASON_INDEX_LOAD_ERROR = 2; // FAILED_INSTANCE_INIT_REASON_TOOL_LOAD_ERROR failure encountered while - // loading a tool + // loading a tool. FAILED_INSTANCE_INIT_REASON_TOOL_LOAD_ERROR = 3; // FAILED_INSTANCE_INIT_REASON_INDEX_DOWNLOAD_ERROR failure encountered while - // downloading an index + // downloading an index. FAILED_INSTANCE_INIT_REASON_INDEX_DOWNLOAD_ERROR = 4; } message FailedInstanceInitError { - // specific cause of the error + // specific cause of the error. FailedInstanceInitReason reason = 1; - // explanation of the error + // explanation of the error. string message = 2; } @@ -328,6 +298,7 @@ message UpdateLibrariesIndexResponse { } message IndexUpdateReport { + // The status represents the result of the index update. enum Status { // The status of the index update is unspecified. STATUS_UNSPECIFIED = 0; @@ -355,75 +326,75 @@ message VersionResponse { } message NewSketchRequest { - // New sketch name + // New sketch name. string sketch_name = 2; // Optional: create a Sketch in this directory // (used as "Sketchbook" directory). // Default Sketchbook directory "directories.User" is used if sketch_dir is // empty. string sketch_dir = 3; - // Specificies if an existing .ino sketch should be overwritten + // Specificies if an existing .ino sketch should be overwritten. bool overwrite = 4; reserved 1; } message NewSketchResponse { - // Absolute path to a main sketch file + // Absolute path to a main sketch file. string main_file = 1; } message LoadSketchRequest { - // Absolute path to single sketch file or a sketch folder + // Absolute path to single sketch file or a sketch folder. string sketch_path = 2; reserved 1; } message LoadSketchResponse { - // The loaded sketch + // The loaded sketch. Sketch sketch = 1; } message ArchiveSketchRequest { - // Absolute path to Sketch file or folder containing Sketch file + // Absolute path to Sketch file or folder containing Sketch file. string sketch_path = 1; // Absolute path to archive that will be created or folder that will contain - // it + // it. string archive_path = 2; - // Specifies if build directory should be included in the archive + // Specifies if build directory should be included in the archive. bool include_build_dir = 3; - // Allows to override an already existing archive + // Allows to override an already existing archive. bool overwrite = 4; } message ArchiveSketchResponse {} message SetSketchDefaultsRequest { - // Absolute path to Sketch file or folder containing Sketch file + // Absolute path to Sketch file or folder containing Sketch file. string sketch_path = 1; - // The desired value for default_fqbn in project file (sketch.yaml) + // The desired value for default_fqbn in project file (sketch.yaml). string default_fqbn = 2; - // The desired value for default_port in project file (sketch.yaml) + // The desired value for default_port in project file (sketch.yaml). string default_port_address = 3; - // The desired value for default_protocol in project file (sketch.yaml) + // The desired value for default_protocol in project file (sketch.yaml). string default_port_protocol = 4; - // The desired value for default_programmer in project file (sketch.yaml) + // The desired value for default_programmer in project file (sketch.yaml). string default_programmer = 5; } message SetSketchDefaultsResponse { // The value of default_fqnn that has been written in project file - // (sketch.yaml) + // (sketch.yaml). string default_fqbn = 1; // The value of default_port that has been written in project file - // (sketch.yaml) + // (sketch.yaml). string default_port_address = 2; // The value of default_protocol that has been written in project file - // (sketch.yaml) + // (sketch.yaml). string default_port_protocol = 3; // The value of default_programmer that has been written in project file - // (sketch.yaml) + // (sketch.yaml). string default_programmer = 4; } diff --git a/rpc/cc/arduino/cli/commands/v1/commands_grpc.pb.go b/rpc/cc/arduino/cli/commands/v1/commands_grpc.pb.go index 45e55002d87..4eb8d9b4e4b 100644 --- a/rpc/cc/arduino/cli/commands/v1/commands_grpc.pb.go +++ b/rpc/cc/arduino/cli/commands/v1/commands_grpc.pb.go @@ -16,8 +16,8 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.3.0 -// - protoc v5.26.1 +// - protoc-gen-go-grpc v1.5.1 +// - protoc (unknown) // source: cc/arduino/cli/commands/v1/commands.proto package commands @@ -31,8 +31,8 @@ import ( // 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 +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 const ( ArduinoCoreService_Create_FullMethodName = "/cc.arduino.cli.commands.v1.ArduinoCoreService/Create" @@ -89,31 +89,33 @@ const ( // ArduinoCoreServiceClient is the client API for ArduinoCoreService 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. +// +// The main Arduino Platform service API. type ArduinoCoreServiceClient interface { - // Create a new Arduino Core instance + // Create a new Arduino Core instance. Create(ctx context.Context, in *CreateRequest, opts ...grpc.CallOption) (*CreateResponse, error) // Initializes an existing Arduino Core instance by loading platforms and - // libraries - Init(ctx context.Context, in *InitRequest, opts ...grpc.CallOption) (ArduinoCoreService_InitClient, error) - // Destroy an instance of the Arduino Core Service + // libraries. + Init(ctx context.Context, in *InitRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[InitResponse], error) + // Destroy an instance of the Arduino Core Service. Destroy(ctx context.Context, in *DestroyRequest, opts ...grpc.CallOption) (*DestroyResponse, error) - // Update package index of the Arduino Core Service - UpdateIndex(ctx context.Context, in *UpdateIndexRequest, opts ...grpc.CallOption) (ArduinoCoreService_UpdateIndexClient, error) - // Update libraries index - UpdateLibrariesIndex(ctx context.Context, in *UpdateLibrariesIndexRequest, opts ...grpc.CallOption) (ArduinoCoreService_UpdateLibrariesIndexClient, error) + // Update package index of the Arduino Core Service. + UpdateIndex(ctx context.Context, in *UpdateIndexRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[UpdateIndexResponse], error) + // Update libraries index. + UpdateLibrariesIndex(ctx context.Context, in *UpdateLibrariesIndexRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[UpdateLibrariesIndexResponse], error) // Get the version of Arduino CLI in use. Version(ctx context.Context, in *VersionRequest, opts ...grpc.CallOption) (*VersionResponse, error) - // Create a new Sketch + // Create a new Sketch. NewSketch(ctx context.Context, in *NewSketchRequest, opts ...grpc.CallOption) (*NewSketchResponse, error) - // Returns all files composing a Sketch + // Returns all files composing a Sketch. LoadSketch(ctx context.Context, in *LoadSketchRequest, opts ...grpc.CallOption) (*LoadSketchResponse, error) - // Creates a zip file containing all files of specified Sketch + // Creates a zip file containing all files of specified Sketch. ArchiveSketch(ctx context.Context, in *ArchiveSketchRequest, opts ...grpc.CallOption) (*ArchiveSketchResponse, error) // Sets the sketch default FQBN and Port Address/Protocol in // the sketch project file (sketch.yaml). These metadata can be retrieved // using LoadSketch. SetSketchDefaults(ctx context.Context, in *SetSketchDefaultsRequest, opts ...grpc.CallOption) (*SetSketchDefaultsResponse, error) - // Requests details about a board + // Requests details about a board. BoardDetails(ctx context.Context, in *BoardDetailsRequest, opts ...grpc.CallOption) (*BoardDetailsResponse, error) // List the boards currently connected to the computer. BoardList(ctx context.Context, in *BoardListRequest, opts ...grpc.CallOption) (*BoardListResponse, error) @@ -122,47 +124,47 @@ type ArduinoCoreServiceClient interface { // Search boards in installed and not installed Platforms. BoardSearch(ctx context.Context, in *BoardSearchRequest, opts ...grpc.CallOption) (*BoardSearchResponse, error) // List boards connection and disconnected events. - BoardListWatch(ctx context.Context, in *BoardListWatchRequest, opts ...grpc.CallOption) (ArduinoCoreService_BoardListWatchClient, error) + BoardListWatch(ctx context.Context, in *BoardListWatchRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[BoardListWatchResponse], error) // Compile an Arduino sketch. - Compile(ctx context.Context, in *CompileRequest, opts ...grpc.CallOption) (ArduinoCoreService_CompileClient, error) + Compile(ctx context.Context, in *CompileRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[CompileResponse], error) // Download and install a platform and its tool dependencies. - PlatformInstall(ctx context.Context, in *PlatformInstallRequest, opts ...grpc.CallOption) (ArduinoCoreService_PlatformInstallClient, error) + PlatformInstall(ctx context.Context, in *PlatformInstallRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[PlatformInstallResponse], error) // Download a platform and its tool dependencies to the `staging/packages` // subdirectory of the data directory. - PlatformDownload(ctx context.Context, in *PlatformDownloadRequest, opts ...grpc.CallOption) (ArduinoCoreService_PlatformDownloadClient, error) + PlatformDownload(ctx context.Context, in *PlatformDownloadRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[PlatformDownloadResponse], error) // Uninstall a platform as well as its tool dependencies that are not used by // other installed platforms. - PlatformUninstall(ctx context.Context, in *PlatformUninstallRequest, opts ...grpc.CallOption) (ArduinoCoreService_PlatformUninstallClient, error) + PlatformUninstall(ctx context.Context, in *PlatformUninstallRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[PlatformUninstallResponse], error) // Upgrade an installed platform to the latest version. - PlatformUpgrade(ctx context.Context, in *PlatformUpgradeRequest, opts ...grpc.CallOption) (ArduinoCoreService_PlatformUpgradeClient, error) + PlatformUpgrade(ctx context.Context, in *PlatformUpgradeRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[PlatformUpgradeResponse], error) // Upload a compiled sketch to a board. - Upload(ctx context.Context, in *UploadRequest, opts ...grpc.CallOption) (ArduinoCoreService_UploadClient, error) + Upload(ctx context.Context, in *UploadRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[UploadResponse], error) // Upload a compiled sketch to a board using a programmer. - UploadUsingProgrammer(ctx context.Context, in *UploadUsingProgrammerRequest, opts ...grpc.CallOption) (ArduinoCoreService_UploadUsingProgrammerClient, error) + UploadUsingProgrammer(ctx context.Context, in *UploadUsingProgrammerRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[UploadUsingProgrammerResponse], error) // Returns the list of users fields necessary to upload to that board // using the specified protocol. SupportedUserFields(ctx context.Context, in *SupportedUserFieldsRequest, opts ...grpc.CallOption) (*SupportedUserFieldsResponse, error) // List programmers available for a board. ListProgrammersAvailableForUpload(ctx context.Context, in *ListProgrammersAvailableForUploadRequest, opts ...grpc.CallOption) (*ListProgrammersAvailableForUploadResponse, error) // Burn bootloader to a board. - BurnBootloader(ctx context.Context, in *BurnBootloaderRequest, opts ...grpc.CallOption) (ArduinoCoreService_BurnBootloaderClient, error) + BurnBootloader(ctx context.Context, in *BurnBootloaderRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[BurnBootloaderResponse], error) // Search for a platform in the platforms indexes. PlatformSearch(ctx context.Context, in *PlatformSearchRequest, opts ...grpc.CallOption) (*PlatformSearchResponse, error) // Download the archive file of an Arduino library in the libraries index to // the staging directory. - LibraryDownload(ctx context.Context, in *LibraryDownloadRequest, opts ...grpc.CallOption) (ArduinoCoreService_LibraryDownloadClient, error) + LibraryDownload(ctx context.Context, in *LibraryDownloadRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[LibraryDownloadResponse], error) // Download and install an Arduino library from the libraries index. - LibraryInstall(ctx context.Context, in *LibraryInstallRequest, opts ...grpc.CallOption) (ArduinoCoreService_LibraryInstallClient, error) + LibraryInstall(ctx context.Context, in *LibraryInstallRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[LibraryInstallResponse], error) // Upgrade a library to the newest version available. - LibraryUpgrade(ctx context.Context, in *LibraryUpgradeRequest, opts ...grpc.CallOption) (ArduinoCoreService_LibraryUpgradeClient, error) - // Install a library from a Zip File - ZipLibraryInstall(ctx context.Context, in *ZipLibraryInstallRequest, opts ...grpc.CallOption) (ArduinoCoreService_ZipLibraryInstallClient, error) - // Download and install a library from a git url - GitLibraryInstall(ctx context.Context, in *GitLibraryInstallRequest, opts ...grpc.CallOption) (ArduinoCoreService_GitLibraryInstallClient, error) + LibraryUpgrade(ctx context.Context, in *LibraryUpgradeRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[LibraryUpgradeResponse], error) + // Install a library from a Zip File. + ZipLibraryInstall(ctx context.Context, in *ZipLibraryInstallRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[ZipLibraryInstallResponse], error) + // Download and install a library from a git url. + GitLibraryInstall(ctx context.Context, in *GitLibraryInstallRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[GitLibraryInstallResponse], error) // Uninstall an Arduino library. - LibraryUninstall(ctx context.Context, in *LibraryUninstallRequest, opts ...grpc.CallOption) (ArduinoCoreService_LibraryUninstallClient, error) + LibraryUninstall(ctx context.Context, in *LibraryUninstallRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[LibraryUninstallResponse], error) // Upgrade all installed Arduino libraries to the newest version available. - LibraryUpgradeAll(ctx context.Context, in *LibraryUpgradeAllRequest, opts ...grpc.CallOption) (ArduinoCoreService_LibraryUpgradeAllClient, error) + LibraryUpgradeAll(ctx context.Context, in *LibraryUpgradeAllRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[LibraryUpgradeAllResponse], error) // List the recursive dependencies of a library, as defined by the `depends` // field of the library.properties files. LibraryResolveDependencies(ctx context.Context, in *LibraryResolveDependenciesRequest, opts ...grpc.CallOption) (*LibraryResolveDependenciesResponse, error) @@ -170,12 +172,12 @@ type ArduinoCoreServiceClient interface { LibrarySearch(ctx context.Context, in *LibrarySearchRequest, opts ...grpc.CallOption) (*LibrarySearchResponse, error) // List the installed libraries. LibraryList(ctx context.Context, in *LibraryListRequest, opts ...grpc.CallOption) (*LibraryListResponse, error) - // Open a monitor connection to a board port - Monitor(ctx context.Context, opts ...grpc.CallOption) (ArduinoCoreService_MonitorClient, error) - // Returns the parameters that can be set in the MonitorRequest calls + // Open a monitor connection to a board port. + Monitor(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[MonitorRequest, MonitorResponse], error) + // Returns the parameters that can be set in the MonitorRequest calls. EnumerateMonitorPortSettings(ctx context.Context, in *EnumerateMonitorPortSettingsRequest, opts ...grpc.CallOption) (*EnumerateMonitorPortSettingsResponse, error) // Start a debug session and communicate with the debugger tool. - Debug(ctx context.Context, opts ...grpc.CallOption) (ArduinoCoreService_DebugClient, error) + Debug(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[DebugRequest, DebugResponse], error) // Determine if debugging is suported given a specific configuration. IsDebugSupported(ctx context.Context, in *IsDebugSupportedRequest, opts ...grpc.CallOption) (*IsDebugSupportedResponse, error) // Query the debugger information given a specific configuration. @@ -184,16 +186,17 @@ type ArduinoCoreServiceClient interface { CheckForArduinoCLIUpdates(ctx context.Context, in *CheckForArduinoCLIUpdatesRequest, opts ...grpc.CallOption) (*CheckForArduinoCLIUpdatesResponse, error) // Clean the download cache directory (where archives are downloaded). CleanDownloadCacheDirectory(ctx context.Context, in *CleanDownloadCacheDirectoryRequest, opts ...grpc.CallOption) (*CleanDownloadCacheDirectoryResponse, error) - // Writes the settings currently stored in memory in a YAML file + // Writes the settings currently stored in memory in a YAML file. ConfigurationSave(ctx context.Context, in *ConfigurationSaveRequest, opts ...grpc.CallOption) (*ConfigurationSaveResponse, error) - // Read the settings from a YAML file + // Read the settings from a YAML file. ConfigurationOpen(ctx context.Context, in *ConfigurationOpenRequest, opts ...grpc.CallOption) (*ConfigurationOpenResponse, error) + // Get the current configuration. ConfigurationGet(ctx context.Context, in *ConfigurationGetRequest, opts ...grpc.CallOption) (*ConfigurationGetResponse, error) - // Enumerate all the keys/values pairs available in the configuration + // Enumerate all the keys/values pairs available in the configuration. SettingsEnumerate(ctx context.Context, in *SettingsEnumerateRequest, opts ...grpc.CallOption) (*SettingsEnumerateResponse, error) - // Get a single configuration value + // Get a single configuration value. SettingsGetValue(ctx context.Context, in *SettingsGetValueRequest, opts ...grpc.CallOption) (*SettingsGetValueResponse, error) - // Set a single configuration value + // Set a single configuration value. SettingsSetValue(ctx context.Context, in *SettingsSetValueRequest, opts ...grpc.CallOption) (*SettingsSetValueResponse, error) } @@ -206,20 +209,22 @@ func NewArduinoCoreServiceClient(cc grpc.ClientConnInterface) ArduinoCoreService } func (c *arduinoCoreServiceClient) Create(ctx context.Context, in *CreateRequest, opts ...grpc.CallOption) (*CreateResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(CreateResponse) - err := c.cc.Invoke(ctx, ArduinoCoreService_Create_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, ArduinoCoreService_Create_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } -func (c *arduinoCoreServiceClient) Init(ctx context.Context, in *InitRequest, opts ...grpc.CallOption) (ArduinoCoreService_InitClient, error) { - stream, err := c.cc.NewStream(ctx, &ArduinoCoreService_ServiceDesc.Streams[0], ArduinoCoreService_Init_FullMethodName, opts...) +func (c *arduinoCoreServiceClient) Init(ctx context.Context, in *InitRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[InitResponse], error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + stream, err := c.cc.NewStream(ctx, &ArduinoCoreService_ServiceDesc.Streams[0], ArduinoCoreService_Init_FullMethodName, cOpts...) if err != nil { return nil, err } - x := &arduinoCoreServiceInitClient{stream} + x := &grpc.GenericClientStream[InitRequest, InitResponse]{ClientStream: stream} if err := x.ClientStream.SendMsg(in); err != nil { return nil, err } @@ -229,38 +234,26 @@ func (c *arduinoCoreServiceClient) Init(ctx context.Context, in *InitRequest, op return x, nil } -type ArduinoCoreService_InitClient interface { - Recv() (*InitResponse, error) - grpc.ClientStream -} - -type arduinoCoreServiceInitClient struct { - grpc.ClientStream -} - -func (x *arduinoCoreServiceInitClient) Recv() (*InitResponse, error) { - m := new(InitResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type ArduinoCoreService_InitClient = grpc.ServerStreamingClient[InitResponse] func (c *arduinoCoreServiceClient) Destroy(ctx context.Context, in *DestroyRequest, opts ...grpc.CallOption) (*DestroyResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(DestroyResponse) - err := c.cc.Invoke(ctx, ArduinoCoreService_Destroy_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, ArduinoCoreService_Destroy_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } -func (c *arduinoCoreServiceClient) UpdateIndex(ctx context.Context, in *UpdateIndexRequest, opts ...grpc.CallOption) (ArduinoCoreService_UpdateIndexClient, error) { - stream, err := c.cc.NewStream(ctx, &ArduinoCoreService_ServiceDesc.Streams[1], ArduinoCoreService_UpdateIndex_FullMethodName, opts...) +func (c *arduinoCoreServiceClient) UpdateIndex(ctx context.Context, in *UpdateIndexRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[UpdateIndexResponse], error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + stream, err := c.cc.NewStream(ctx, &ArduinoCoreService_ServiceDesc.Streams[1], ArduinoCoreService_UpdateIndex_FullMethodName, cOpts...) if err != nil { return nil, err } - x := &arduinoCoreServiceUpdateIndexClient{stream} + x := &grpc.GenericClientStream[UpdateIndexRequest, UpdateIndexResponse]{ClientStream: stream} if err := x.ClientStream.SendMsg(in); err != nil { return nil, err } @@ -270,29 +263,16 @@ func (c *arduinoCoreServiceClient) UpdateIndex(ctx context.Context, in *UpdateIn return x, nil } -type ArduinoCoreService_UpdateIndexClient interface { - Recv() (*UpdateIndexResponse, error) - grpc.ClientStream -} +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type ArduinoCoreService_UpdateIndexClient = grpc.ServerStreamingClient[UpdateIndexResponse] -type arduinoCoreServiceUpdateIndexClient struct { - grpc.ClientStream -} - -func (x *arduinoCoreServiceUpdateIndexClient) Recv() (*UpdateIndexResponse, error) { - m := new(UpdateIndexResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func (c *arduinoCoreServiceClient) UpdateLibrariesIndex(ctx context.Context, in *UpdateLibrariesIndexRequest, opts ...grpc.CallOption) (ArduinoCoreService_UpdateLibrariesIndexClient, error) { - stream, err := c.cc.NewStream(ctx, &ArduinoCoreService_ServiceDesc.Streams[2], ArduinoCoreService_UpdateLibrariesIndex_FullMethodName, opts...) +func (c *arduinoCoreServiceClient) UpdateLibrariesIndex(ctx context.Context, in *UpdateLibrariesIndexRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[UpdateLibrariesIndexResponse], error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + stream, err := c.cc.NewStream(ctx, &ArduinoCoreService_ServiceDesc.Streams[2], ArduinoCoreService_UpdateLibrariesIndex_FullMethodName, cOpts...) if err != nil { return nil, err } - x := &arduinoCoreServiceUpdateLibrariesIndexClient{stream} + x := &grpc.GenericClientStream[UpdateLibrariesIndexRequest, UpdateLibrariesIndexResponse]{ClientStream: stream} if err := x.ClientStream.SendMsg(in); err != nil { return nil, err } @@ -302,26 +282,13 @@ func (c *arduinoCoreServiceClient) UpdateLibrariesIndex(ctx context.Context, in return x, nil } -type ArduinoCoreService_UpdateLibrariesIndexClient interface { - Recv() (*UpdateLibrariesIndexResponse, error) - grpc.ClientStream -} - -type arduinoCoreServiceUpdateLibrariesIndexClient struct { - grpc.ClientStream -} - -func (x *arduinoCoreServiceUpdateLibrariesIndexClient) Recv() (*UpdateLibrariesIndexResponse, error) { - m := new(UpdateLibrariesIndexResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type ArduinoCoreService_UpdateLibrariesIndexClient = grpc.ServerStreamingClient[UpdateLibrariesIndexResponse] func (c *arduinoCoreServiceClient) Version(ctx context.Context, in *VersionRequest, opts ...grpc.CallOption) (*VersionResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(VersionResponse) - err := c.cc.Invoke(ctx, ArduinoCoreService_Version_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, ArduinoCoreService_Version_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -329,8 +296,9 @@ func (c *arduinoCoreServiceClient) Version(ctx context.Context, in *VersionReque } func (c *arduinoCoreServiceClient) NewSketch(ctx context.Context, in *NewSketchRequest, opts ...grpc.CallOption) (*NewSketchResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(NewSketchResponse) - err := c.cc.Invoke(ctx, ArduinoCoreService_NewSketch_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, ArduinoCoreService_NewSketch_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -338,8 +306,9 @@ func (c *arduinoCoreServiceClient) NewSketch(ctx context.Context, in *NewSketchR } func (c *arduinoCoreServiceClient) LoadSketch(ctx context.Context, in *LoadSketchRequest, opts ...grpc.CallOption) (*LoadSketchResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(LoadSketchResponse) - err := c.cc.Invoke(ctx, ArduinoCoreService_LoadSketch_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, ArduinoCoreService_LoadSketch_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -347,8 +316,9 @@ func (c *arduinoCoreServiceClient) LoadSketch(ctx context.Context, in *LoadSketc } func (c *arduinoCoreServiceClient) ArchiveSketch(ctx context.Context, in *ArchiveSketchRequest, opts ...grpc.CallOption) (*ArchiveSketchResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ArchiveSketchResponse) - err := c.cc.Invoke(ctx, ArduinoCoreService_ArchiveSketch_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, ArduinoCoreService_ArchiveSketch_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -356,8 +326,9 @@ func (c *arduinoCoreServiceClient) ArchiveSketch(ctx context.Context, in *Archiv } func (c *arduinoCoreServiceClient) SetSketchDefaults(ctx context.Context, in *SetSketchDefaultsRequest, opts ...grpc.CallOption) (*SetSketchDefaultsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(SetSketchDefaultsResponse) - err := c.cc.Invoke(ctx, ArduinoCoreService_SetSketchDefaults_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, ArduinoCoreService_SetSketchDefaults_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -365,8 +336,9 @@ func (c *arduinoCoreServiceClient) SetSketchDefaults(ctx context.Context, in *Se } func (c *arduinoCoreServiceClient) BoardDetails(ctx context.Context, in *BoardDetailsRequest, opts ...grpc.CallOption) (*BoardDetailsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(BoardDetailsResponse) - err := c.cc.Invoke(ctx, ArduinoCoreService_BoardDetails_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, ArduinoCoreService_BoardDetails_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -374,8 +346,9 @@ func (c *arduinoCoreServiceClient) BoardDetails(ctx context.Context, in *BoardDe } func (c *arduinoCoreServiceClient) BoardList(ctx context.Context, in *BoardListRequest, opts ...grpc.CallOption) (*BoardListResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(BoardListResponse) - err := c.cc.Invoke(ctx, ArduinoCoreService_BoardList_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, ArduinoCoreService_BoardList_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -383,8 +356,9 @@ func (c *arduinoCoreServiceClient) BoardList(ctx context.Context, in *BoardListR } func (c *arduinoCoreServiceClient) BoardListAll(ctx context.Context, in *BoardListAllRequest, opts ...grpc.CallOption) (*BoardListAllResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(BoardListAllResponse) - err := c.cc.Invoke(ctx, ArduinoCoreService_BoardListAll_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, ArduinoCoreService_BoardListAll_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -392,20 +366,22 @@ func (c *arduinoCoreServiceClient) BoardListAll(ctx context.Context, in *BoardLi } func (c *arduinoCoreServiceClient) BoardSearch(ctx context.Context, in *BoardSearchRequest, opts ...grpc.CallOption) (*BoardSearchResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(BoardSearchResponse) - err := c.cc.Invoke(ctx, ArduinoCoreService_BoardSearch_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, ArduinoCoreService_BoardSearch_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } -func (c *arduinoCoreServiceClient) BoardListWatch(ctx context.Context, in *BoardListWatchRequest, opts ...grpc.CallOption) (ArduinoCoreService_BoardListWatchClient, error) { - stream, err := c.cc.NewStream(ctx, &ArduinoCoreService_ServiceDesc.Streams[3], ArduinoCoreService_BoardListWatch_FullMethodName, opts...) +func (c *arduinoCoreServiceClient) BoardListWatch(ctx context.Context, in *BoardListWatchRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[BoardListWatchResponse], error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + stream, err := c.cc.NewStream(ctx, &ArduinoCoreService_ServiceDesc.Streams[3], ArduinoCoreService_BoardListWatch_FullMethodName, cOpts...) if err != nil { return nil, err } - x := &arduinoCoreServiceBoardListWatchClient{stream} + x := &grpc.GenericClientStream[BoardListWatchRequest, BoardListWatchResponse]{ClientStream: stream} if err := x.ClientStream.SendMsg(in); err != nil { return nil, err } @@ -415,29 +391,16 @@ func (c *arduinoCoreServiceClient) BoardListWatch(ctx context.Context, in *Board return x, nil } -type ArduinoCoreService_BoardListWatchClient interface { - Recv() (*BoardListWatchResponse, error) - grpc.ClientStream -} - -type arduinoCoreServiceBoardListWatchClient struct { - grpc.ClientStream -} +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type ArduinoCoreService_BoardListWatchClient = grpc.ServerStreamingClient[BoardListWatchResponse] -func (x *arduinoCoreServiceBoardListWatchClient) Recv() (*BoardListWatchResponse, error) { - m := new(BoardListWatchResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func (c *arduinoCoreServiceClient) Compile(ctx context.Context, in *CompileRequest, opts ...grpc.CallOption) (ArduinoCoreService_CompileClient, error) { - stream, err := c.cc.NewStream(ctx, &ArduinoCoreService_ServiceDesc.Streams[4], ArduinoCoreService_Compile_FullMethodName, opts...) +func (c *arduinoCoreServiceClient) Compile(ctx context.Context, in *CompileRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[CompileResponse], error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + stream, err := c.cc.NewStream(ctx, &ArduinoCoreService_ServiceDesc.Streams[4], ArduinoCoreService_Compile_FullMethodName, cOpts...) if err != nil { return nil, err } - x := &arduinoCoreServiceCompileClient{stream} + x := &grpc.GenericClientStream[CompileRequest, CompileResponse]{ClientStream: stream} if err := x.ClientStream.SendMsg(in); err != nil { return nil, err } @@ -447,29 +410,16 @@ func (c *arduinoCoreServiceClient) Compile(ctx context.Context, in *CompileReque return x, nil } -type ArduinoCoreService_CompileClient interface { - Recv() (*CompileResponse, error) - grpc.ClientStream -} - -type arduinoCoreServiceCompileClient struct { - grpc.ClientStream -} - -func (x *arduinoCoreServiceCompileClient) Recv() (*CompileResponse, error) { - m := new(CompileResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type ArduinoCoreService_CompileClient = grpc.ServerStreamingClient[CompileResponse] -func (c *arduinoCoreServiceClient) PlatformInstall(ctx context.Context, in *PlatformInstallRequest, opts ...grpc.CallOption) (ArduinoCoreService_PlatformInstallClient, error) { - stream, err := c.cc.NewStream(ctx, &ArduinoCoreService_ServiceDesc.Streams[5], ArduinoCoreService_PlatformInstall_FullMethodName, opts...) +func (c *arduinoCoreServiceClient) PlatformInstall(ctx context.Context, in *PlatformInstallRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[PlatformInstallResponse], error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + stream, err := c.cc.NewStream(ctx, &ArduinoCoreService_ServiceDesc.Streams[5], ArduinoCoreService_PlatformInstall_FullMethodName, cOpts...) if err != nil { return nil, err } - x := &arduinoCoreServicePlatformInstallClient{stream} + x := &grpc.GenericClientStream[PlatformInstallRequest, PlatformInstallResponse]{ClientStream: stream} if err := x.ClientStream.SendMsg(in); err != nil { return nil, err } @@ -479,29 +429,16 @@ func (c *arduinoCoreServiceClient) PlatformInstall(ctx context.Context, in *Plat return x, nil } -type ArduinoCoreService_PlatformInstallClient interface { - Recv() (*PlatformInstallResponse, error) - grpc.ClientStream -} - -type arduinoCoreServicePlatformInstallClient struct { - grpc.ClientStream -} - -func (x *arduinoCoreServicePlatformInstallClient) Recv() (*PlatformInstallResponse, error) { - m := new(PlatformInstallResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type ArduinoCoreService_PlatformInstallClient = grpc.ServerStreamingClient[PlatformInstallResponse] -func (c *arduinoCoreServiceClient) PlatformDownload(ctx context.Context, in *PlatformDownloadRequest, opts ...grpc.CallOption) (ArduinoCoreService_PlatformDownloadClient, error) { - stream, err := c.cc.NewStream(ctx, &ArduinoCoreService_ServiceDesc.Streams[6], ArduinoCoreService_PlatformDownload_FullMethodName, opts...) +func (c *arduinoCoreServiceClient) PlatformDownload(ctx context.Context, in *PlatformDownloadRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[PlatformDownloadResponse], error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + stream, err := c.cc.NewStream(ctx, &ArduinoCoreService_ServiceDesc.Streams[6], ArduinoCoreService_PlatformDownload_FullMethodName, cOpts...) if err != nil { return nil, err } - x := &arduinoCoreServicePlatformDownloadClient{stream} + x := &grpc.GenericClientStream[PlatformDownloadRequest, PlatformDownloadResponse]{ClientStream: stream} if err := x.ClientStream.SendMsg(in); err != nil { return nil, err } @@ -511,29 +448,16 @@ func (c *arduinoCoreServiceClient) PlatformDownload(ctx context.Context, in *Pla return x, nil } -type ArduinoCoreService_PlatformDownloadClient interface { - Recv() (*PlatformDownloadResponse, error) - grpc.ClientStream -} - -type arduinoCoreServicePlatformDownloadClient struct { - grpc.ClientStream -} - -func (x *arduinoCoreServicePlatformDownloadClient) Recv() (*PlatformDownloadResponse, error) { - m := new(PlatformDownloadResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type ArduinoCoreService_PlatformDownloadClient = grpc.ServerStreamingClient[PlatformDownloadResponse] -func (c *arduinoCoreServiceClient) PlatformUninstall(ctx context.Context, in *PlatformUninstallRequest, opts ...grpc.CallOption) (ArduinoCoreService_PlatformUninstallClient, error) { - stream, err := c.cc.NewStream(ctx, &ArduinoCoreService_ServiceDesc.Streams[7], ArduinoCoreService_PlatformUninstall_FullMethodName, opts...) +func (c *arduinoCoreServiceClient) PlatformUninstall(ctx context.Context, in *PlatformUninstallRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[PlatformUninstallResponse], error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + stream, err := c.cc.NewStream(ctx, &ArduinoCoreService_ServiceDesc.Streams[7], ArduinoCoreService_PlatformUninstall_FullMethodName, cOpts...) if err != nil { return nil, err } - x := &arduinoCoreServicePlatformUninstallClient{stream} + x := &grpc.GenericClientStream[PlatformUninstallRequest, PlatformUninstallResponse]{ClientStream: stream} if err := x.ClientStream.SendMsg(in); err != nil { return nil, err } @@ -543,29 +467,16 @@ func (c *arduinoCoreServiceClient) PlatformUninstall(ctx context.Context, in *Pl return x, nil } -type ArduinoCoreService_PlatformUninstallClient interface { - Recv() (*PlatformUninstallResponse, error) - grpc.ClientStream -} - -type arduinoCoreServicePlatformUninstallClient struct { - grpc.ClientStream -} +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type ArduinoCoreService_PlatformUninstallClient = grpc.ServerStreamingClient[PlatformUninstallResponse] -func (x *arduinoCoreServicePlatformUninstallClient) Recv() (*PlatformUninstallResponse, error) { - m := new(PlatformUninstallResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func (c *arduinoCoreServiceClient) PlatformUpgrade(ctx context.Context, in *PlatformUpgradeRequest, opts ...grpc.CallOption) (ArduinoCoreService_PlatformUpgradeClient, error) { - stream, err := c.cc.NewStream(ctx, &ArduinoCoreService_ServiceDesc.Streams[8], ArduinoCoreService_PlatformUpgrade_FullMethodName, opts...) +func (c *arduinoCoreServiceClient) PlatformUpgrade(ctx context.Context, in *PlatformUpgradeRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[PlatformUpgradeResponse], error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + stream, err := c.cc.NewStream(ctx, &ArduinoCoreService_ServiceDesc.Streams[8], ArduinoCoreService_PlatformUpgrade_FullMethodName, cOpts...) if err != nil { return nil, err } - x := &arduinoCoreServicePlatformUpgradeClient{stream} + x := &grpc.GenericClientStream[PlatformUpgradeRequest, PlatformUpgradeResponse]{ClientStream: stream} if err := x.ClientStream.SendMsg(in); err != nil { return nil, err } @@ -575,29 +486,16 @@ func (c *arduinoCoreServiceClient) PlatformUpgrade(ctx context.Context, in *Plat return x, nil } -type ArduinoCoreService_PlatformUpgradeClient interface { - Recv() (*PlatformUpgradeResponse, error) - grpc.ClientStream -} - -type arduinoCoreServicePlatformUpgradeClient struct { - grpc.ClientStream -} +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type ArduinoCoreService_PlatformUpgradeClient = grpc.ServerStreamingClient[PlatformUpgradeResponse] -func (x *arduinoCoreServicePlatformUpgradeClient) Recv() (*PlatformUpgradeResponse, error) { - m := new(PlatformUpgradeResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func (c *arduinoCoreServiceClient) Upload(ctx context.Context, in *UploadRequest, opts ...grpc.CallOption) (ArduinoCoreService_UploadClient, error) { - stream, err := c.cc.NewStream(ctx, &ArduinoCoreService_ServiceDesc.Streams[9], ArduinoCoreService_Upload_FullMethodName, opts...) +func (c *arduinoCoreServiceClient) Upload(ctx context.Context, in *UploadRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[UploadResponse], error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + stream, err := c.cc.NewStream(ctx, &ArduinoCoreService_ServiceDesc.Streams[9], ArduinoCoreService_Upload_FullMethodName, cOpts...) if err != nil { return nil, err } - x := &arduinoCoreServiceUploadClient{stream} + x := &grpc.GenericClientStream[UploadRequest, UploadResponse]{ClientStream: stream} if err := x.ClientStream.SendMsg(in); err != nil { return nil, err } @@ -607,29 +505,16 @@ func (c *arduinoCoreServiceClient) Upload(ctx context.Context, in *UploadRequest return x, nil } -type ArduinoCoreService_UploadClient interface { - Recv() (*UploadResponse, error) - grpc.ClientStream -} - -type arduinoCoreServiceUploadClient struct { - grpc.ClientStream -} +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type ArduinoCoreService_UploadClient = grpc.ServerStreamingClient[UploadResponse] -func (x *arduinoCoreServiceUploadClient) Recv() (*UploadResponse, error) { - m := new(UploadResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func (c *arduinoCoreServiceClient) UploadUsingProgrammer(ctx context.Context, in *UploadUsingProgrammerRequest, opts ...grpc.CallOption) (ArduinoCoreService_UploadUsingProgrammerClient, error) { - stream, err := c.cc.NewStream(ctx, &ArduinoCoreService_ServiceDesc.Streams[10], ArduinoCoreService_UploadUsingProgrammer_FullMethodName, opts...) +func (c *arduinoCoreServiceClient) UploadUsingProgrammer(ctx context.Context, in *UploadUsingProgrammerRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[UploadUsingProgrammerResponse], error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + stream, err := c.cc.NewStream(ctx, &ArduinoCoreService_ServiceDesc.Streams[10], ArduinoCoreService_UploadUsingProgrammer_FullMethodName, cOpts...) if err != nil { return nil, err } - x := &arduinoCoreServiceUploadUsingProgrammerClient{stream} + x := &grpc.GenericClientStream[UploadUsingProgrammerRequest, UploadUsingProgrammerResponse]{ClientStream: stream} if err := x.ClientStream.SendMsg(in); err != nil { return nil, err } @@ -639,26 +524,13 @@ func (c *arduinoCoreServiceClient) UploadUsingProgrammer(ctx context.Context, in return x, nil } -type ArduinoCoreService_UploadUsingProgrammerClient interface { - Recv() (*UploadUsingProgrammerResponse, error) - grpc.ClientStream -} - -type arduinoCoreServiceUploadUsingProgrammerClient struct { - grpc.ClientStream -} - -func (x *arduinoCoreServiceUploadUsingProgrammerClient) Recv() (*UploadUsingProgrammerResponse, error) { - m := new(UploadUsingProgrammerResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type ArduinoCoreService_UploadUsingProgrammerClient = grpc.ServerStreamingClient[UploadUsingProgrammerResponse] func (c *arduinoCoreServiceClient) SupportedUserFields(ctx context.Context, in *SupportedUserFieldsRequest, opts ...grpc.CallOption) (*SupportedUserFieldsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(SupportedUserFieldsResponse) - err := c.cc.Invoke(ctx, ArduinoCoreService_SupportedUserFields_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, ArduinoCoreService_SupportedUserFields_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -666,20 +538,22 @@ func (c *arduinoCoreServiceClient) SupportedUserFields(ctx context.Context, in * } func (c *arduinoCoreServiceClient) ListProgrammersAvailableForUpload(ctx context.Context, in *ListProgrammersAvailableForUploadRequest, opts ...grpc.CallOption) (*ListProgrammersAvailableForUploadResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ListProgrammersAvailableForUploadResponse) - err := c.cc.Invoke(ctx, ArduinoCoreService_ListProgrammersAvailableForUpload_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, ArduinoCoreService_ListProgrammersAvailableForUpload_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } -func (c *arduinoCoreServiceClient) BurnBootloader(ctx context.Context, in *BurnBootloaderRequest, opts ...grpc.CallOption) (ArduinoCoreService_BurnBootloaderClient, error) { - stream, err := c.cc.NewStream(ctx, &ArduinoCoreService_ServiceDesc.Streams[11], ArduinoCoreService_BurnBootloader_FullMethodName, opts...) +func (c *arduinoCoreServiceClient) BurnBootloader(ctx context.Context, in *BurnBootloaderRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[BurnBootloaderResponse], error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + stream, err := c.cc.NewStream(ctx, &ArduinoCoreService_ServiceDesc.Streams[11], ArduinoCoreService_BurnBootloader_FullMethodName, cOpts...) if err != nil { return nil, err } - x := &arduinoCoreServiceBurnBootloaderClient{stream} + x := &grpc.GenericClientStream[BurnBootloaderRequest, BurnBootloaderResponse]{ClientStream: stream} if err := x.ClientStream.SendMsg(in); err != nil { return nil, err } @@ -689,38 +563,26 @@ func (c *arduinoCoreServiceClient) BurnBootloader(ctx context.Context, in *BurnB return x, nil } -type ArduinoCoreService_BurnBootloaderClient interface { - Recv() (*BurnBootloaderResponse, error) - grpc.ClientStream -} - -type arduinoCoreServiceBurnBootloaderClient struct { - grpc.ClientStream -} - -func (x *arduinoCoreServiceBurnBootloaderClient) Recv() (*BurnBootloaderResponse, error) { - m := new(BurnBootloaderResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type ArduinoCoreService_BurnBootloaderClient = grpc.ServerStreamingClient[BurnBootloaderResponse] func (c *arduinoCoreServiceClient) PlatformSearch(ctx context.Context, in *PlatformSearchRequest, opts ...grpc.CallOption) (*PlatformSearchResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(PlatformSearchResponse) - err := c.cc.Invoke(ctx, ArduinoCoreService_PlatformSearch_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, ArduinoCoreService_PlatformSearch_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } -func (c *arduinoCoreServiceClient) LibraryDownload(ctx context.Context, in *LibraryDownloadRequest, opts ...grpc.CallOption) (ArduinoCoreService_LibraryDownloadClient, error) { - stream, err := c.cc.NewStream(ctx, &ArduinoCoreService_ServiceDesc.Streams[12], ArduinoCoreService_LibraryDownload_FullMethodName, opts...) +func (c *arduinoCoreServiceClient) LibraryDownload(ctx context.Context, in *LibraryDownloadRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[LibraryDownloadResponse], error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + stream, err := c.cc.NewStream(ctx, &ArduinoCoreService_ServiceDesc.Streams[12], ArduinoCoreService_LibraryDownload_FullMethodName, cOpts...) if err != nil { return nil, err } - x := &arduinoCoreServiceLibraryDownloadClient{stream} + x := &grpc.GenericClientStream[LibraryDownloadRequest, LibraryDownloadResponse]{ClientStream: stream} if err := x.ClientStream.SendMsg(in); err != nil { return nil, err } @@ -730,29 +592,16 @@ func (c *arduinoCoreServiceClient) LibraryDownload(ctx context.Context, in *Libr return x, nil } -type ArduinoCoreService_LibraryDownloadClient interface { - Recv() (*LibraryDownloadResponse, error) - grpc.ClientStream -} - -type arduinoCoreServiceLibraryDownloadClient struct { - grpc.ClientStream -} +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type ArduinoCoreService_LibraryDownloadClient = grpc.ServerStreamingClient[LibraryDownloadResponse] -func (x *arduinoCoreServiceLibraryDownloadClient) Recv() (*LibraryDownloadResponse, error) { - m := new(LibraryDownloadResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func (c *arduinoCoreServiceClient) LibraryInstall(ctx context.Context, in *LibraryInstallRequest, opts ...grpc.CallOption) (ArduinoCoreService_LibraryInstallClient, error) { - stream, err := c.cc.NewStream(ctx, &ArduinoCoreService_ServiceDesc.Streams[13], ArduinoCoreService_LibraryInstall_FullMethodName, opts...) +func (c *arduinoCoreServiceClient) LibraryInstall(ctx context.Context, in *LibraryInstallRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[LibraryInstallResponse], error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + stream, err := c.cc.NewStream(ctx, &ArduinoCoreService_ServiceDesc.Streams[13], ArduinoCoreService_LibraryInstall_FullMethodName, cOpts...) if err != nil { return nil, err } - x := &arduinoCoreServiceLibraryInstallClient{stream} + x := &grpc.GenericClientStream[LibraryInstallRequest, LibraryInstallResponse]{ClientStream: stream} if err := x.ClientStream.SendMsg(in); err != nil { return nil, err } @@ -762,29 +611,16 @@ func (c *arduinoCoreServiceClient) LibraryInstall(ctx context.Context, in *Libra return x, nil } -type ArduinoCoreService_LibraryInstallClient interface { - Recv() (*LibraryInstallResponse, error) - grpc.ClientStream -} +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type ArduinoCoreService_LibraryInstallClient = grpc.ServerStreamingClient[LibraryInstallResponse] -type arduinoCoreServiceLibraryInstallClient struct { - grpc.ClientStream -} - -func (x *arduinoCoreServiceLibraryInstallClient) Recv() (*LibraryInstallResponse, error) { - m := new(LibraryInstallResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func (c *arduinoCoreServiceClient) LibraryUpgrade(ctx context.Context, in *LibraryUpgradeRequest, opts ...grpc.CallOption) (ArduinoCoreService_LibraryUpgradeClient, error) { - stream, err := c.cc.NewStream(ctx, &ArduinoCoreService_ServiceDesc.Streams[14], ArduinoCoreService_LibraryUpgrade_FullMethodName, opts...) +func (c *arduinoCoreServiceClient) LibraryUpgrade(ctx context.Context, in *LibraryUpgradeRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[LibraryUpgradeResponse], error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + stream, err := c.cc.NewStream(ctx, &ArduinoCoreService_ServiceDesc.Streams[14], ArduinoCoreService_LibraryUpgrade_FullMethodName, cOpts...) if err != nil { return nil, err } - x := &arduinoCoreServiceLibraryUpgradeClient{stream} + x := &grpc.GenericClientStream[LibraryUpgradeRequest, LibraryUpgradeResponse]{ClientStream: stream} if err := x.ClientStream.SendMsg(in); err != nil { return nil, err } @@ -794,29 +630,16 @@ func (c *arduinoCoreServiceClient) LibraryUpgrade(ctx context.Context, in *Libra return x, nil } -type ArduinoCoreService_LibraryUpgradeClient interface { - Recv() (*LibraryUpgradeResponse, error) - grpc.ClientStream -} - -type arduinoCoreServiceLibraryUpgradeClient struct { - grpc.ClientStream -} +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type ArduinoCoreService_LibraryUpgradeClient = grpc.ServerStreamingClient[LibraryUpgradeResponse] -func (x *arduinoCoreServiceLibraryUpgradeClient) Recv() (*LibraryUpgradeResponse, error) { - m := new(LibraryUpgradeResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func (c *arduinoCoreServiceClient) ZipLibraryInstall(ctx context.Context, in *ZipLibraryInstallRequest, opts ...grpc.CallOption) (ArduinoCoreService_ZipLibraryInstallClient, error) { - stream, err := c.cc.NewStream(ctx, &ArduinoCoreService_ServiceDesc.Streams[15], ArduinoCoreService_ZipLibraryInstall_FullMethodName, opts...) +func (c *arduinoCoreServiceClient) ZipLibraryInstall(ctx context.Context, in *ZipLibraryInstallRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[ZipLibraryInstallResponse], error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + stream, err := c.cc.NewStream(ctx, &ArduinoCoreService_ServiceDesc.Streams[15], ArduinoCoreService_ZipLibraryInstall_FullMethodName, cOpts...) if err != nil { return nil, err } - x := &arduinoCoreServiceZipLibraryInstallClient{stream} + x := &grpc.GenericClientStream[ZipLibraryInstallRequest, ZipLibraryInstallResponse]{ClientStream: stream} if err := x.ClientStream.SendMsg(in); err != nil { return nil, err } @@ -826,29 +649,16 @@ func (c *arduinoCoreServiceClient) ZipLibraryInstall(ctx context.Context, in *Zi return x, nil } -type ArduinoCoreService_ZipLibraryInstallClient interface { - Recv() (*ZipLibraryInstallResponse, error) - grpc.ClientStream -} +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type ArduinoCoreService_ZipLibraryInstallClient = grpc.ServerStreamingClient[ZipLibraryInstallResponse] -type arduinoCoreServiceZipLibraryInstallClient struct { - grpc.ClientStream -} - -func (x *arduinoCoreServiceZipLibraryInstallClient) Recv() (*ZipLibraryInstallResponse, error) { - m := new(ZipLibraryInstallResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func (c *arduinoCoreServiceClient) GitLibraryInstall(ctx context.Context, in *GitLibraryInstallRequest, opts ...grpc.CallOption) (ArduinoCoreService_GitLibraryInstallClient, error) { - stream, err := c.cc.NewStream(ctx, &ArduinoCoreService_ServiceDesc.Streams[16], ArduinoCoreService_GitLibraryInstall_FullMethodName, opts...) +func (c *arduinoCoreServiceClient) GitLibraryInstall(ctx context.Context, in *GitLibraryInstallRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[GitLibraryInstallResponse], error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + stream, err := c.cc.NewStream(ctx, &ArduinoCoreService_ServiceDesc.Streams[16], ArduinoCoreService_GitLibraryInstall_FullMethodName, cOpts...) if err != nil { return nil, err } - x := &arduinoCoreServiceGitLibraryInstallClient{stream} + x := &grpc.GenericClientStream[GitLibraryInstallRequest, GitLibraryInstallResponse]{ClientStream: stream} if err := x.ClientStream.SendMsg(in); err != nil { return nil, err } @@ -858,29 +668,16 @@ func (c *arduinoCoreServiceClient) GitLibraryInstall(ctx context.Context, in *Gi return x, nil } -type ArduinoCoreService_GitLibraryInstallClient interface { - Recv() (*GitLibraryInstallResponse, error) - grpc.ClientStream -} - -type arduinoCoreServiceGitLibraryInstallClient struct { - grpc.ClientStream -} +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type ArduinoCoreService_GitLibraryInstallClient = grpc.ServerStreamingClient[GitLibraryInstallResponse] -func (x *arduinoCoreServiceGitLibraryInstallClient) Recv() (*GitLibraryInstallResponse, error) { - m := new(GitLibraryInstallResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func (c *arduinoCoreServiceClient) LibraryUninstall(ctx context.Context, in *LibraryUninstallRequest, opts ...grpc.CallOption) (ArduinoCoreService_LibraryUninstallClient, error) { - stream, err := c.cc.NewStream(ctx, &ArduinoCoreService_ServiceDesc.Streams[17], ArduinoCoreService_LibraryUninstall_FullMethodName, opts...) +func (c *arduinoCoreServiceClient) LibraryUninstall(ctx context.Context, in *LibraryUninstallRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[LibraryUninstallResponse], error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + stream, err := c.cc.NewStream(ctx, &ArduinoCoreService_ServiceDesc.Streams[17], ArduinoCoreService_LibraryUninstall_FullMethodName, cOpts...) if err != nil { return nil, err } - x := &arduinoCoreServiceLibraryUninstallClient{stream} + x := &grpc.GenericClientStream[LibraryUninstallRequest, LibraryUninstallResponse]{ClientStream: stream} if err := x.ClientStream.SendMsg(in); err != nil { return nil, err } @@ -890,29 +687,16 @@ func (c *arduinoCoreServiceClient) LibraryUninstall(ctx context.Context, in *Lib return x, nil } -type ArduinoCoreService_LibraryUninstallClient interface { - Recv() (*LibraryUninstallResponse, error) - grpc.ClientStream -} - -type arduinoCoreServiceLibraryUninstallClient struct { - grpc.ClientStream -} - -func (x *arduinoCoreServiceLibraryUninstallClient) Recv() (*LibraryUninstallResponse, error) { - m := new(LibraryUninstallResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type ArduinoCoreService_LibraryUninstallClient = grpc.ServerStreamingClient[LibraryUninstallResponse] -func (c *arduinoCoreServiceClient) LibraryUpgradeAll(ctx context.Context, in *LibraryUpgradeAllRequest, opts ...grpc.CallOption) (ArduinoCoreService_LibraryUpgradeAllClient, error) { - stream, err := c.cc.NewStream(ctx, &ArduinoCoreService_ServiceDesc.Streams[18], ArduinoCoreService_LibraryUpgradeAll_FullMethodName, opts...) +func (c *arduinoCoreServiceClient) LibraryUpgradeAll(ctx context.Context, in *LibraryUpgradeAllRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[LibraryUpgradeAllResponse], error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + stream, err := c.cc.NewStream(ctx, &ArduinoCoreService_ServiceDesc.Streams[18], ArduinoCoreService_LibraryUpgradeAll_FullMethodName, cOpts...) if err != nil { return nil, err } - x := &arduinoCoreServiceLibraryUpgradeAllClient{stream} + x := &grpc.GenericClientStream[LibraryUpgradeAllRequest, LibraryUpgradeAllResponse]{ClientStream: stream} if err := x.ClientStream.SendMsg(in); err != nil { return nil, err } @@ -922,26 +706,13 @@ func (c *arduinoCoreServiceClient) LibraryUpgradeAll(ctx context.Context, in *Li return x, nil } -type ArduinoCoreService_LibraryUpgradeAllClient interface { - Recv() (*LibraryUpgradeAllResponse, error) - grpc.ClientStream -} - -type arduinoCoreServiceLibraryUpgradeAllClient struct { - grpc.ClientStream -} - -func (x *arduinoCoreServiceLibraryUpgradeAllClient) Recv() (*LibraryUpgradeAllResponse, error) { - m := new(LibraryUpgradeAllResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type ArduinoCoreService_LibraryUpgradeAllClient = grpc.ServerStreamingClient[LibraryUpgradeAllResponse] func (c *arduinoCoreServiceClient) LibraryResolveDependencies(ctx context.Context, in *LibraryResolveDependenciesRequest, opts ...grpc.CallOption) (*LibraryResolveDependenciesResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(LibraryResolveDependenciesResponse) - err := c.cc.Invoke(ctx, ArduinoCoreService_LibraryResolveDependencies_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, ArduinoCoreService_LibraryResolveDependencies_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -949,8 +720,9 @@ func (c *arduinoCoreServiceClient) LibraryResolveDependencies(ctx context.Contex } func (c *arduinoCoreServiceClient) LibrarySearch(ctx context.Context, in *LibrarySearchRequest, opts ...grpc.CallOption) (*LibrarySearchResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(LibrarySearchResponse) - err := c.cc.Invoke(ctx, ArduinoCoreService_LibrarySearch_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, ArduinoCoreService_LibrarySearch_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -958,88 +730,55 @@ func (c *arduinoCoreServiceClient) LibrarySearch(ctx context.Context, in *Librar } func (c *arduinoCoreServiceClient) LibraryList(ctx context.Context, in *LibraryListRequest, opts ...grpc.CallOption) (*LibraryListResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(LibraryListResponse) - err := c.cc.Invoke(ctx, ArduinoCoreService_LibraryList_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, ArduinoCoreService_LibraryList_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } -func (c *arduinoCoreServiceClient) Monitor(ctx context.Context, opts ...grpc.CallOption) (ArduinoCoreService_MonitorClient, error) { - stream, err := c.cc.NewStream(ctx, &ArduinoCoreService_ServiceDesc.Streams[19], ArduinoCoreService_Monitor_FullMethodName, opts...) +func (c *arduinoCoreServiceClient) Monitor(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[MonitorRequest, MonitorResponse], error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + stream, err := c.cc.NewStream(ctx, &ArduinoCoreService_ServiceDesc.Streams[19], ArduinoCoreService_Monitor_FullMethodName, cOpts...) if err != nil { return nil, err } - x := &arduinoCoreServiceMonitorClient{stream} + x := &grpc.GenericClientStream[MonitorRequest, MonitorResponse]{ClientStream: stream} return x, nil } -type ArduinoCoreService_MonitorClient interface { - Send(*MonitorRequest) error - Recv() (*MonitorResponse, error) - grpc.ClientStream -} - -type arduinoCoreServiceMonitorClient struct { - grpc.ClientStream -} - -func (x *arduinoCoreServiceMonitorClient) Send(m *MonitorRequest) error { - return x.ClientStream.SendMsg(m) -} - -func (x *arduinoCoreServiceMonitorClient) Recv() (*MonitorResponse, error) { - m := new(MonitorResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type ArduinoCoreService_MonitorClient = grpc.BidiStreamingClient[MonitorRequest, MonitorResponse] func (c *arduinoCoreServiceClient) EnumerateMonitorPortSettings(ctx context.Context, in *EnumerateMonitorPortSettingsRequest, opts ...grpc.CallOption) (*EnumerateMonitorPortSettingsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(EnumerateMonitorPortSettingsResponse) - err := c.cc.Invoke(ctx, ArduinoCoreService_EnumerateMonitorPortSettings_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, ArduinoCoreService_EnumerateMonitorPortSettings_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } -func (c *arduinoCoreServiceClient) Debug(ctx context.Context, opts ...grpc.CallOption) (ArduinoCoreService_DebugClient, error) { - stream, err := c.cc.NewStream(ctx, &ArduinoCoreService_ServiceDesc.Streams[20], ArduinoCoreService_Debug_FullMethodName, opts...) +func (c *arduinoCoreServiceClient) Debug(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[DebugRequest, DebugResponse], error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + stream, err := c.cc.NewStream(ctx, &ArduinoCoreService_ServiceDesc.Streams[20], ArduinoCoreService_Debug_FullMethodName, cOpts...) if err != nil { return nil, err } - x := &arduinoCoreServiceDebugClient{stream} + x := &grpc.GenericClientStream[DebugRequest, DebugResponse]{ClientStream: stream} return x, nil } -type ArduinoCoreService_DebugClient interface { - Send(*DebugRequest) error - Recv() (*DebugResponse, error) - grpc.ClientStream -} - -type arduinoCoreServiceDebugClient struct { - grpc.ClientStream -} - -func (x *arduinoCoreServiceDebugClient) Send(m *DebugRequest) error { - return x.ClientStream.SendMsg(m) -} - -func (x *arduinoCoreServiceDebugClient) Recv() (*DebugResponse, error) { - m := new(DebugResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type ArduinoCoreService_DebugClient = grpc.BidiStreamingClient[DebugRequest, DebugResponse] func (c *arduinoCoreServiceClient) IsDebugSupported(ctx context.Context, in *IsDebugSupportedRequest, opts ...grpc.CallOption) (*IsDebugSupportedResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(IsDebugSupportedResponse) - err := c.cc.Invoke(ctx, ArduinoCoreService_IsDebugSupported_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, ArduinoCoreService_IsDebugSupported_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -1047,8 +786,9 @@ func (c *arduinoCoreServiceClient) IsDebugSupported(ctx context.Context, in *IsD } func (c *arduinoCoreServiceClient) GetDebugConfig(ctx context.Context, in *GetDebugConfigRequest, opts ...grpc.CallOption) (*GetDebugConfigResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetDebugConfigResponse) - err := c.cc.Invoke(ctx, ArduinoCoreService_GetDebugConfig_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, ArduinoCoreService_GetDebugConfig_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -1056,8 +796,9 @@ func (c *arduinoCoreServiceClient) GetDebugConfig(ctx context.Context, in *GetDe } func (c *arduinoCoreServiceClient) CheckForArduinoCLIUpdates(ctx context.Context, in *CheckForArduinoCLIUpdatesRequest, opts ...grpc.CallOption) (*CheckForArduinoCLIUpdatesResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(CheckForArduinoCLIUpdatesResponse) - err := c.cc.Invoke(ctx, ArduinoCoreService_CheckForArduinoCLIUpdates_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, ArduinoCoreService_CheckForArduinoCLIUpdates_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -1065,8 +806,9 @@ func (c *arduinoCoreServiceClient) CheckForArduinoCLIUpdates(ctx context.Context } func (c *arduinoCoreServiceClient) CleanDownloadCacheDirectory(ctx context.Context, in *CleanDownloadCacheDirectoryRequest, opts ...grpc.CallOption) (*CleanDownloadCacheDirectoryResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(CleanDownloadCacheDirectoryResponse) - err := c.cc.Invoke(ctx, ArduinoCoreService_CleanDownloadCacheDirectory_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, ArduinoCoreService_CleanDownloadCacheDirectory_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -1074,8 +816,9 @@ func (c *arduinoCoreServiceClient) CleanDownloadCacheDirectory(ctx context.Conte } func (c *arduinoCoreServiceClient) ConfigurationSave(ctx context.Context, in *ConfigurationSaveRequest, opts ...grpc.CallOption) (*ConfigurationSaveResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ConfigurationSaveResponse) - err := c.cc.Invoke(ctx, ArduinoCoreService_ConfigurationSave_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, ArduinoCoreService_ConfigurationSave_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -1083,8 +826,9 @@ func (c *arduinoCoreServiceClient) ConfigurationSave(ctx context.Context, in *Co } func (c *arduinoCoreServiceClient) ConfigurationOpen(ctx context.Context, in *ConfigurationOpenRequest, opts ...grpc.CallOption) (*ConfigurationOpenResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ConfigurationOpenResponse) - err := c.cc.Invoke(ctx, ArduinoCoreService_ConfigurationOpen_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, ArduinoCoreService_ConfigurationOpen_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -1092,8 +836,9 @@ func (c *arduinoCoreServiceClient) ConfigurationOpen(ctx context.Context, in *Co } func (c *arduinoCoreServiceClient) ConfigurationGet(ctx context.Context, in *ConfigurationGetRequest, opts ...grpc.CallOption) (*ConfigurationGetResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ConfigurationGetResponse) - err := c.cc.Invoke(ctx, ArduinoCoreService_ConfigurationGet_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, ArduinoCoreService_ConfigurationGet_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -1101,8 +846,9 @@ func (c *arduinoCoreServiceClient) ConfigurationGet(ctx context.Context, in *Con } func (c *arduinoCoreServiceClient) SettingsEnumerate(ctx context.Context, in *SettingsEnumerateRequest, opts ...grpc.CallOption) (*SettingsEnumerateResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(SettingsEnumerateResponse) - err := c.cc.Invoke(ctx, ArduinoCoreService_SettingsEnumerate_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, ArduinoCoreService_SettingsEnumerate_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -1110,8 +856,9 @@ func (c *arduinoCoreServiceClient) SettingsEnumerate(ctx context.Context, in *Se } func (c *arduinoCoreServiceClient) SettingsGetValue(ctx context.Context, in *SettingsGetValueRequest, opts ...grpc.CallOption) (*SettingsGetValueResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(SettingsGetValueResponse) - err := c.cc.Invoke(ctx, ArduinoCoreService_SettingsGetValue_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, ArduinoCoreService_SettingsGetValue_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -1119,8 +866,9 @@ func (c *arduinoCoreServiceClient) SettingsGetValue(ctx context.Context, in *Set } func (c *arduinoCoreServiceClient) SettingsSetValue(ctx context.Context, in *SettingsSetValueRequest, opts ...grpc.CallOption) (*SettingsSetValueResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(SettingsSetValueResponse) - err := c.cc.Invoke(ctx, ArduinoCoreService_SettingsSetValue_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, ArduinoCoreService_SettingsSetValue_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -1129,32 +877,34 @@ func (c *arduinoCoreServiceClient) SettingsSetValue(ctx context.Context, in *Set // ArduinoCoreServiceServer is the server API for ArduinoCoreService service. // All implementations must embed UnimplementedArduinoCoreServiceServer -// for forward compatibility +// for forward compatibility. +// +// The main Arduino Platform service API. type ArduinoCoreServiceServer interface { - // Create a new Arduino Core instance + // Create a new Arduino Core instance. Create(context.Context, *CreateRequest) (*CreateResponse, error) // Initializes an existing Arduino Core instance by loading platforms and - // libraries - Init(*InitRequest, ArduinoCoreService_InitServer) error - // Destroy an instance of the Arduino Core Service + // libraries. + Init(*InitRequest, grpc.ServerStreamingServer[InitResponse]) error + // Destroy an instance of the Arduino Core Service. Destroy(context.Context, *DestroyRequest) (*DestroyResponse, error) - // Update package index of the Arduino Core Service - UpdateIndex(*UpdateIndexRequest, ArduinoCoreService_UpdateIndexServer) error - // Update libraries index - UpdateLibrariesIndex(*UpdateLibrariesIndexRequest, ArduinoCoreService_UpdateLibrariesIndexServer) error + // Update package index of the Arduino Core Service. + UpdateIndex(*UpdateIndexRequest, grpc.ServerStreamingServer[UpdateIndexResponse]) error + // Update libraries index. + UpdateLibrariesIndex(*UpdateLibrariesIndexRequest, grpc.ServerStreamingServer[UpdateLibrariesIndexResponse]) error // Get the version of Arduino CLI in use. Version(context.Context, *VersionRequest) (*VersionResponse, error) - // Create a new Sketch + // Create a new Sketch. NewSketch(context.Context, *NewSketchRequest) (*NewSketchResponse, error) - // Returns all files composing a Sketch + // Returns all files composing a Sketch. LoadSketch(context.Context, *LoadSketchRequest) (*LoadSketchResponse, error) - // Creates a zip file containing all files of specified Sketch + // Creates a zip file containing all files of specified Sketch. ArchiveSketch(context.Context, *ArchiveSketchRequest) (*ArchiveSketchResponse, error) // Sets the sketch default FQBN and Port Address/Protocol in // the sketch project file (sketch.yaml). These metadata can be retrieved // using LoadSketch. SetSketchDefaults(context.Context, *SetSketchDefaultsRequest) (*SetSketchDefaultsResponse, error) - // Requests details about a board + // Requests details about a board. BoardDetails(context.Context, *BoardDetailsRequest) (*BoardDetailsResponse, error) // List the boards currently connected to the computer. BoardList(context.Context, *BoardListRequest) (*BoardListResponse, error) @@ -1163,47 +913,47 @@ type ArduinoCoreServiceServer interface { // Search boards in installed and not installed Platforms. BoardSearch(context.Context, *BoardSearchRequest) (*BoardSearchResponse, error) // List boards connection and disconnected events. - BoardListWatch(*BoardListWatchRequest, ArduinoCoreService_BoardListWatchServer) error + BoardListWatch(*BoardListWatchRequest, grpc.ServerStreamingServer[BoardListWatchResponse]) error // Compile an Arduino sketch. - Compile(*CompileRequest, ArduinoCoreService_CompileServer) error + Compile(*CompileRequest, grpc.ServerStreamingServer[CompileResponse]) error // Download and install a platform and its tool dependencies. - PlatformInstall(*PlatformInstallRequest, ArduinoCoreService_PlatformInstallServer) error + PlatformInstall(*PlatformInstallRequest, grpc.ServerStreamingServer[PlatformInstallResponse]) error // Download a platform and its tool dependencies to the `staging/packages` // subdirectory of the data directory. - PlatformDownload(*PlatformDownloadRequest, ArduinoCoreService_PlatformDownloadServer) error + PlatformDownload(*PlatformDownloadRequest, grpc.ServerStreamingServer[PlatformDownloadResponse]) error // Uninstall a platform as well as its tool dependencies that are not used by // other installed platforms. - PlatformUninstall(*PlatformUninstallRequest, ArduinoCoreService_PlatformUninstallServer) error + PlatformUninstall(*PlatformUninstallRequest, grpc.ServerStreamingServer[PlatformUninstallResponse]) error // Upgrade an installed platform to the latest version. - PlatformUpgrade(*PlatformUpgradeRequest, ArduinoCoreService_PlatformUpgradeServer) error + PlatformUpgrade(*PlatformUpgradeRequest, grpc.ServerStreamingServer[PlatformUpgradeResponse]) error // Upload a compiled sketch to a board. - Upload(*UploadRequest, ArduinoCoreService_UploadServer) error + Upload(*UploadRequest, grpc.ServerStreamingServer[UploadResponse]) error // Upload a compiled sketch to a board using a programmer. - UploadUsingProgrammer(*UploadUsingProgrammerRequest, ArduinoCoreService_UploadUsingProgrammerServer) error + UploadUsingProgrammer(*UploadUsingProgrammerRequest, grpc.ServerStreamingServer[UploadUsingProgrammerResponse]) error // Returns the list of users fields necessary to upload to that board // using the specified protocol. SupportedUserFields(context.Context, *SupportedUserFieldsRequest) (*SupportedUserFieldsResponse, error) // List programmers available for a board. ListProgrammersAvailableForUpload(context.Context, *ListProgrammersAvailableForUploadRequest) (*ListProgrammersAvailableForUploadResponse, error) // Burn bootloader to a board. - BurnBootloader(*BurnBootloaderRequest, ArduinoCoreService_BurnBootloaderServer) error + BurnBootloader(*BurnBootloaderRequest, grpc.ServerStreamingServer[BurnBootloaderResponse]) error // Search for a platform in the platforms indexes. PlatformSearch(context.Context, *PlatformSearchRequest) (*PlatformSearchResponse, error) // Download the archive file of an Arduino library in the libraries index to // the staging directory. - LibraryDownload(*LibraryDownloadRequest, ArduinoCoreService_LibraryDownloadServer) error + LibraryDownload(*LibraryDownloadRequest, grpc.ServerStreamingServer[LibraryDownloadResponse]) error // Download and install an Arduino library from the libraries index. - LibraryInstall(*LibraryInstallRequest, ArduinoCoreService_LibraryInstallServer) error + LibraryInstall(*LibraryInstallRequest, grpc.ServerStreamingServer[LibraryInstallResponse]) error // Upgrade a library to the newest version available. - LibraryUpgrade(*LibraryUpgradeRequest, ArduinoCoreService_LibraryUpgradeServer) error - // Install a library from a Zip File - ZipLibraryInstall(*ZipLibraryInstallRequest, ArduinoCoreService_ZipLibraryInstallServer) error - // Download and install a library from a git url - GitLibraryInstall(*GitLibraryInstallRequest, ArduinoCoreService_GitLibraryInstallServer) error + LibraryUpgrade(*LibraryUpgradeRequest, grpc.ServerStreamingServer[LibraryUpgradeResponse]) error + // Install a library from a Zip File. + ZipLibraryInstall(*ZipLibraryInstallRequest, grpc.ServerStreamingServer[ZipLibraryInstallResponse]) error + // Download and install a library from a git url. + GitLibraryInstall(*GitLibraryInstallRequest, grpc.ServerStreamingServer[GitLibraryInstallResponse]) error // Uninstall an Arduino library. - LibraryUninstall(*LibraryUninstallRequest, ArduinoCoreService_LibraryUninstallServer) error + LibraryUninstall(*LibraryUninstallRequest, grpc.ServerStreamingServer[LibraryUninstallResponse]) error // Upgrade all installed Arduino libraries to the newest version available. - LibraryUpgradeAll(*LibraryUpgradeAllRequest, ArduinoCoreService_LibraryUpgradeAllServer) error + LibraryUpgradeAll(*LibraryUpgradeAllRequest, grpc.ServerStreamingServer[LibraryUpgradeAllResponse]) error // List the recursive dependencies of a library, as defined by the `depends` // field of the library.properties files. LibraryResolveDependencies(context.Context, *LibraryResolveDependenciesRequest) (*LibraryResolveDependenciesResponse, error) @@ -1211,12 +961,12 @@ type ArduinoCoreServiceServer interface { LibrarySearch(context.Context, *LibrarySearchRequest) (*LibrarySearchResponse, error) // List the installed libraries. LibraryList(context.Context, *LibraryListRequest) (*LibraryListResponse, error) - // Open a monitor connection to a board port - Monitor(ArduinoCoreService_MonitorServer) error - // Returns the parameters that can be set in the MonitorRequest calls + // Open a monitor connection to a board port. + Monitor(grpc.BidiStreamingServer[MonitorRequest, MonitorResponse]) error + // Returns the parameters that can be set in the MonitorRequest calls. EnumerateMonitorPortSettings(context.Context, *EnumerateMonitorPortSettingsRequest) (*EnumerateMonitorPortSettingsResponse, error) // Start a debug session and communicate with the debugger tool. - Debug(ArduinoCoreService_DebugServer) error + Debug(grpc.BidiStreamingServer[DebugRequest, DebugResponse]) error // Determine if debugging is suported given a specific configuration. IsDebugSupported(context.Context, *IsDebugSupportedRequest) (*IsDebugSupportedResponse, error) // Query the debugger information given a specific configuration. @@ -1225,37 +975,41 @@ type ArduinoCoreServiceServer interface { CheckForArduinoCLIUpdates(context.Context, *CheckForArduinoCLIUpdatesRequest) (*CheckForArduinoCLIUpdatesResponse, error) // Clean the download cache directory (where archives are downloaded). CleanDownloadCacheDirectory(context.Context, *CleanDownloadCacheDirectoryRequest) (*CleanDownloadCacheDirectoryResponse, error) - // Writes the settings currently stored in memory in a YAML file + // Writes the settings currently stored in memory in a YAML file. ConfigurationSave(context.Context, *ConfigurationSaveRequest) (*ConfigurationSaveResponse, error) - // Read the settings from a YAML file + // Read the settings from a YAML file. ConfigurationOpen(context.Context, *ConfigurationOpenRequest) (*ConfigurationOpenResponse, error) + // Get the current configuration. ConfigurationGet(context.Context, *ConfigurationGetRequest) (*ConfigurationGetResponse, error) - // Enumerate all the keys/values pairs available in the configuration + // Enumerate all the keys/values pairs available in the configuration. SettingsEnumerate(context.Context, *SettingsEnumerateRequest) (*SettingsEnumerateResponse, error) - // Get a single configuration value + // Get a single configuration value. SettingsGetValue(context.Context, *SettingsGetValueRequest) (*SettingsGetValueResponse, error) - // Set a single configuration value + // Set a single configuration value. SettingsSetValue(context.Context, *SettingsSetValueRequest) (*SettingsSetValueResponse, error) mustEmbedUnimplementedArduinoCoreServiceServer() } -// UnimplementedArduinoCoreServiceServer must be embedded to have forward compatible implementations. -type UnimplementedArduinoCoreServiceServer struct { -} +// UnimplementedArduinoCoreServiceServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedArduinoCoreServiceServer struct{} func (UnimplementedArduinoCoreServiceServer) Create(context.Context, *CreateRequest) (*CreateResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Create not implemented") } -func (UnimplementedArduinoCoreServiceServer) Init(*InitRequest, ArduinoCoreService_InitServer) error { +func (UnimplementedArduinoCoreServiceServer) Init(*InitRequest, grpc.ServerStreamingServer[InitResponse]) error { return status.Errorf(codes.Unimplemented, "method Init not implemented") } func (UnimplementedArduinoCoreServiceServer) Destroy(context.Context, *DestroyRequest) (*DestroyResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Destroy not implemented") } -func (UnimplementedArduinoCoreServiceServer) UpdateIndex(*UpdateIndexRequest, ArduinoCoreService_UpdateIndexServer) error { +func (UnimplementedArduinoCoreServiceServer) UpdateIndex(*UpdateIndexRequest, grpc.ServerStreamingServer[UpdateIndexResponse]) error { return status.Errorf(codes.Unimplemented, "method UpdateIndex not implemented") } -func (UnimplementedArduinoCoreServiceServer) UpdateLibrariesIndex(*UpdateLibrariesIndexRequest, ArduinoCoreService_UpdateLibrariesIndexServer) error { +func (UnimplementedArduinoCoreServiceServer) UpdateLibrariesIndex(*UpdateLibrariesIndexRequest, grpc.ServerStreamingServer[UpdateLibrariesIndexResponse]) error { return status.Errorf(codes.Unimplemented, "method UpdateLibrariesIndex not implemented") } func (UnimplementedArduinoCoreServiceServer) Version(context.Context, *VersionRequest) (*VersionResponse, error) { @@ -1285,28 +1039,28 @@ func (UnimplementedArduinoCoreServiceServer) BoardListAll(context.Context, *Boar func (UnimplementedArduinoCoreServiceServer) BoardSearch(context.Context, *BoardSearchRequest) (*BoardSearchResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method BoardSearch not implemented") } -func (UnimplementedArduinoCoreServiceServer) BoardListWatch(*BoardListWatchRequest, ArduinoCoreService_BoardListWatchServer) error { +func (UnimplementedArduinoCoreServiceServer) BoardListWatch(*BoardListWatchRequest, grpc.ServerStreamingServer[BoardListWatchResponse]) error { return status.Errorf(codes.Unimplemented, "method BoardListWatch not implemented") } -func (UnimplementedArduinoCoreServiceServer) Compile(*CompileRequest, ArduinoCoreService_CompileServer) error { +func (UnimplementedArduinoCoreServiceServer) Compile(*CompileRequest, grpc.ServerStreamingServer[CompileResponse]) error { return status.Errorf(codes.Unimplemented, "method Compile not implemented") } -func (UnimplementedArduinoCoreServiceServer) PlatformInstall(*PlatformInstallRequest, ArduinoCoreService_PlatformInstallServer) error { +func (UnimplementedArduinoCoreServiceServer) PlatformInstall(*PlatformInstallRequest, grpc.ServerStreamingServer[PlatformInstallResponse]) error { return status.Errorf(codes.Unimplemented, "method PlatformInstall not implemented") } -func (UnimplementedArduinoCoreServiceServer) PlatformDownload(*PlatformDownloadRequest, ArduinoCoreService_PlatformDownloadServer) error { +func (UnimplementedArduinoCoreServiceServer) PlatformDownload(*PlatformDownloadRequest, grpc.ServerStreamingServer[PlatformDownloadResponse]) error { return status.Errorf(codes.Unimplemented, "method PlatformDownload not implemented") } -func (UnimplementedArduinoCoreServiceServer) PlatformUninstall(*PlatformUninstallRequest, ArduinoCoreService_PlatformUninstallServer) error { +func (UnimplementedArduinoCoreServiceServer) PlatformUninstall(*PlatformUninstallRequest, grpc.ServerStreamingServer[PlatformUninstallResponse]) error { return status.Errorf(codes.Unimplemented, "method PlatformUninstall not implemented") } -func (UnimplementedArduinoCoreServiceServer) PlatformUpgrade(*PlatformUpgradeRequest, ArduinoCoreService_PlatformUpgradeServer) error { +func (UnimplementedArduinoCoreServiceServer) PlatformUpgrade(*PlatformUpgradeRequest, grpc.ServerStreamingServer[PlatformUpgradeResponse]) error { return status.Errorf(codes.Unimplemented, "method PlatformUpgrade not implemented") } -func (UnimplementedArduinoCoreServiceServer) Upload(*UploadRequest, ArduinoCoreService_UploadServer) error { +func (UnimplementedArduinoCoreServiceServer) Upload(*UploadRequest, grpc.ServerStreamingServer[UploadResponse]) error { return status.Errorf(codes.Unimplemented, "method Upload not implemented") } -func (UnimplementedArduinoCoreServiceServer) UploadUsingProgrammer(*UploadUsingProgrammerRequest, ArduinoCoreService_UploadUsingProgrammerServer) error { +func (UnimplementedArduinoCoreServiceServer) UploadUsingProgrammer(*UploadUsingProgrammerRequest, grpc.ServerStreamingServer[UploadUsingProgrammerResponse]) error { return status.Errorf(codes.Unimplemented, "method UploadUsingProgrammer not implemented") } func (UnimplementedArduinoCoreServiceServer) SupportedUserFields(context.Context, *SupportedUserFieldsRequest) (*SupportedUserFieldsResponse, error) { @@ -1315,31 +1069,31 @@ func (UnimplementedArduinoCoreServiceServer) SupportedUserFields(context.Context func (UnimplementedArduinoCoreServiceServer) ListProgrammersAvailableForUpload(context.Context, *ListProgrammersAvailableForUploadRequest) (*ListProgrammersAvailableForUploadResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListProgrammersAvailableForUpload not implemented") } -func (UnimplementedArduinoCoreServiceServer) BurnBootloader(*BurnBootloaderRequest, ArduinoCoreService_BurnBootloaderServer) error { +func (UnimplementedArduinoCoreServiceServer) BurnBootloader(*BurnBootloaderRequest, grpc.ServerStreamingServer[BurnBootloaderResponse]) error { return status.Errorf(codes.Unimplemented, "method BurnBootloader not implemented") } func (UnimplementedArduinoCoreServiceServer) PlatformSearch(context.Context, *PlatformSearchRequest) (*PlatformSearchResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method PlatformSearch not implemented") } -func (UnimplementedArduinoCoreServiceServer) LibraryDownload(*LibraryDownloadRequest, ArduinoCoreService_LibraryDownloadServer) error { +func (UnimplementedArduinoCoreServiceServer) LibraryDownload(*LibraryDownloadRequest, grpc.ServerStreamingServer[LibraryDownloadResponse]) error { return status.Errorf(codes.Unimplemented, "method LibraryDownload not implemented") } -func (UnimplementedArduinoCoreServiceServer) LibraryInstall(*LibraryInstallRequest, ArduinoCoreService_LibraryInstallServer) error { +func (UnimplementedArduinoCoreServiceServer) LibraryInstall(*LibraryInstallRequest, grpc.ServerStreamingServer[LibraryInstallResponse]) error { return status.Errorf(codes.Unimplemented, "method LibraryInstall not implemented") } -func (UnimplementedArduinoCoreServiceServer) LibraryUpgrade(*LibraryUpgradeRequest, ArduinoCoreService_LibraryUpgradeServer) error { +func (UnimplementedArduinoCoreServiceServer) LibraryUpgrade(*LibraryUpgradeRequest, grpc.ServerStreamingServer[LibraryUpgradeResponse]) error { return status.Errorf(codes.Unimplemented, "method LibraryUpgrade not implemented") } -func (UnimplementedArduinoCoreServiceServer) ZipLibraryInstall(*ZipLibraryInstallRequest, ArduinoCoreService_ZipLibraryInstallServer) error { +func (UnimplementedArduinoCoreServiceServer) ZipLibraryInstall(*ZipLibraryInstallRequest, grpc.ServerStreamingServer[ZipLibraryInstallResponse]) error { return status.Errorf(codes.Unimplemented, "method ZipLibraryInstall not implemented") } -func (UnimplementedArduinoCoreServiceServer) GitLibraryInstall(*GitLibraryInstallRequest, ArduinoCoreService_GitLibraryInstallServer) error { +func (UnimplementedArduinoCoreServiceServer) GitLibraryInstall(*GitLibraryInstallRequest, grpc.ServerStreamingServer[GitLibraryInstallResponse]) error { return status.Errorf(codes.Unimplemented, "method GitLibraryInstall not implemented") } -func (UnimplementedArduinoCoreServiceServer) LibraryUninstall(*LibraryUninstallRequest, ArduinoCoreService_LibraryUninstallServer) error { +func (UnimplementedArduinoCoreServiceServer) LibraryUninstall(*LibraryUninstallRequest, grpc.ServerStreamingServer[LibraryUninstallResponse]) error { return status.Errorf(codes.Unimplemented, "method LibraryUninstall not implemented") } -func (UnimplementedArduinoCoreServiceServer) LibraryUpgradeAll(*LibraryUpgradeAllRequest, ArduinoCoreService_LibraryUpgradeAllServer) error { +func (UnimplementedArduinoCoreServiceServer) LibraryUpgradeAll(*LibraryUpgradeAllRequest, grpc.ServerStreamingServer[LibraryUpgradeAllResponse]) error { return status.Errorf(codes.Unimplemented, "method LibraryUpgradeAll not implemented") } func (UnimplementedArduinoCoreServiceServer) LibraryResolveDependencies(context.Context, *LibraryResolveDependenciesRequest) (*LibraryResolveDependenciesResponse, error) { @@ -1351,13 +1105,13 @@ func (UnimplementedArduinoCoreServiceServer) LibrarySearch(context.Context, *Lib func (UnimplementedArduinoCoreServiceServer) LibraryList(context.Context, *LibraryListRequest) (*LibraryListResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method LibraryList not implemented") } -func (UnimplementedArduinoCoreServiceServer) Monitor(ArduinoCoreService_MonitorServer) error { +func (UnimplementedArduinoCoreServiceServer) Monitor(grpc.BidiStreamingServer[MonitorRequest, MonitorResponse]) error { return status.Errorf(codes.Unimplemented, "method Monitor not implemented") } func (UnimplementedArduinoCoreServiceServer) EnumerateMonitorPortSettings(context.Context, *EnumerateMonitorPortSettingsRequest) (*EnumerateMonitorPortSettingsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method EnumerateMonitorPortSettings not implemented") } -func (UnimplementedArduinoCoreServiceServer) Debug(ArduinoCoreService_DebugServer) error { +func (UnimplementedArduinoCoreServiceServer) Debug(grpc.BidiStreamingServer[DebugRequest, DebugResponse]) error { return status.Errorf(codes.Unimplemented, "method Debug not implemented") } func (UnimplementedArduinoCoreServiceServer) IsDebugSupported(context.Context, *IsDebugSupportedRequest) (*IsDebugSupportedResponse, error) { @@ -1391,6 +1145,7 @@ func (UnimplementedArduinoCoreServiceServer) SettingsSetValue(context.Context, * return nil, status.Errorf(codes.Unimplemented, "method SettingsSetValue not implemented") } func (UnimplementedArduinoCoreServiceServer) mustEmbedUnimplementedArduinoCoreServiceServer() {} +func (UnimplementedArduinoCoreServiceServer) testEmbeddedByValue() {} // UnsafeArduinoCoreServiceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to ArduinoCoreServiceServer will @@ -1400,6 +1155,13 @@ type UnsafeArduinoCoreServiceServer interface { } func RegisterArduinoCoreServiceServer(s grpc.ServiceRegistrar, srv ArduinoCoreServiceServer) { + // If the following call pancis, it indicates UnimplementedArduinoCoreServiceServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } s.RegisterService(&ArduinoCoreService_ServiceDesc, srv) } @@ -1426,21 +1188,11 @@ func _ArduinoCoreService_Init_Handler(srv interface{}, stream grpc.ServerStream) if err := stream.RecvMsg(m); err != nil { return err } - return srv.(ArduinoCoreServiceServer).Init(m, &arduinoCoreServiceInitServer{stream}) + return srv.(ArduinoCoreServiceServer).Init(m, &grpc.GenericServerStream[InitRequest, InitResponse]{ServerStream: stream}) } -type ArduinoCoreService_InitServer interface { - Send(*InitResponse) error - grpc.ServerStream -} - -type arduinoCoreServiceInitServer struct { - grpc.ServerStream -} - -func (x *arduinoCoreServiceInitServer) Send(m *InitResponse) error { - return x.ServerStream.SendMsg(m) -} +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type ArduinoCoreService_InitServer = grpc.ServerStreamingServer[InitResponse] func _ArduinoCoreService_Destroy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(DestroyRequest) @@ -1465,42 +1217,22 @@ func _ArduinoCoreService_UpdateIndex_Handler(srv interface{}, stream grpc.Server if err := stream.RecvMsg(m); err != nil { return err } - return srv.(ArduinoCoreServiceServer).UpdateIndex(m, &arduinoCoreServiceUpdateIndexServer{stream}) + return srv.(ArduinoCoreServiceServer).UpdateIndex(m, &grpc.GenericServerStream[UpdateIndexRequest, UpdateIndexResponse]{ServerStream: stream}) } -type ArduinoCoreService_UpdateIndexServer interface { - Send(*UpdateIndexResponse) error - grpc.ServerStream -} - -type arduinoCoreServiceUpdateIndexServer struct { - grpc.ServerStream -} - -func (x *arduinoCoreServiceUpdateIndexServer) Send(m *UpdateIndexResponse) error { - return x.ServerStream.SendMsg(m) -} +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type ArduinoCoreService_UpdateIndexServer = grpc.ServerStreamingServer[UpdateIndexResponse] func _ArduinoCoreService_UpdateLibrariesIndex_Handler(srv interface{}, stream grpc.ServerStream) error { m := new(UpdateLibrariesIndexRequest) if err := stream.RecvMsg(m); err != nil { return err } - return srv.(ArduinoCoreServiceServer).UpdateLibrariesIndex(m, &arduinoCoreServiceUpdateLibrariesIndexServer{stream}) -} - -type ArduinoCoreService_UpdateLibrariesIndexServer interface { - Send(*UpdateLibrariesIndexResponse) error - grpc.ServerStream + return srv.(ArduinoCoreServiceServer).UpdateLibrariesIndex(m, &grpc.GenericServerStream[UpdateLibrariesIndexRequest, UpdateLibrariesIndexResponse]{ServerStream: stream}) } -type arduinoCoreServiceUpdateLibrariesIndexServer struct { - grpc.ServerStream -} - -func (x *arduinoCoreServiceUpdateLibrariesIndexServer) Send(m *UpdateLibrariesIndexResponse) error { - return x.ServerStream.SendMsg(m) -} +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type ArduinoCoreService_UpdateLibrariesIndexServer = grpc.ServerStreamingServer[UpdateLibrariesIndexResponse] func _ArduinoCoreService_Version_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(VersionRequest) @@ -1669,168 +1401,88 @@ func _ArduinoCoreService_BoardListWatch_Handler(srv interface{}, stream grpc.Ser if err := stream.RecvMsg(m); err != nil { return err } - return srv.(ArduinoCoreServiceServer).BoardListWatch(m, &arduinoCoreServiceBoardListWatchServer{stream}) + return srv.(ArduinoCoreServiceServer).BoardListWatch(m, &grpc.GenericServerStream[BoardListWatchRequest, BoardListWatchResponse]{ServerStream: stream}) } -type ArduinoCoreService_BoardListWatchServer interface { - Send(*BoardListWatchResponse) error - grpc.ServerStream -} - -type arduinoCoreServiceBoardListWatchServer struct { - grpc.ServerStream -} - -func (x *arduinoCoreServiceBoardListWatchServer) Send(m *BoardListWatchResponse) error { - return x.ServerStream.SendMsg(m) -} +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type ArduinoCoreService_BoardListWatchServer = grpc.ServerStreamingServer[BoardListWatchResponse] func _ArduinoCoreService_Compile_Handler(srv interface{}, stream grpc.ServerStream) error { m := new(CompileRequest) if err := stream.RecvMsg(m); err != nil { return err } - return srv.(ArduinoCoreServiceServer).Compile(m, &arduinoCoreServiceCompileServer{stream}) + return srv.(ArduinoCoreServiceServer).Compile(m, &grpc.GenericServerStream[CompileRequest, CompileResponse]{ServerStream: stream}) } -type ArduinoCoreService_CompileServer interface { - Send(*CompileResponse) error - grpc.ServerStream -} - -type arduinoCoreServiceCompileServer struct { - grpc.ServerStream -} - -func (x *arduinoCoreServiceCompileServer) Send(m *CompileResponse) error { - return x.ServerStream.SendMsg(m) -} +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type ArduinoCoreService_CompileServer = grpc.ServerStreamingServer[CompileResponse] func _ArduinoCoreService_PlatformInstall_Handler(srv interface{}, stream grpc.ServerStream) error { m := new(PlatformInstallRequest) if err := stream.RecvMsg(m); err != nil { return err } - return srv.(ArduinoCoreServiceServer).PlatformInstall(m, &arduinoCoreServicePlatformInstallServer{stream}) -} - -type ArduinoCoreService_PlatformInstallServer interface { - Send(*PlatformInstallResponse) error - grpc.ServerStream -} - -type arduinoCoreServicePlatformInstallServer struct { - grpc.ServerStream + return srv.(ArduinoCoreServiceServer).PlatformInstall(m, &grpc.GenericServerStream[PlatformInstallRequest, PlatformInstallResponse]{ServerStream: stream}) } -func (x *arduinoCoreServicePlatformInstallServer) Send(m *PlatformInstallResponse) error { - return x.ServerStream.SendMsg(m) -} +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type ArduinoCoreService_PlatformInstallServer = grpc.ServerStreamingServer[PlatformInstallResponse] func _ArduinoCoreService_PlatformDownload_Handler(srv interface{}, stream grpc.ServerStream) error { m := new(PlatformDownloadRequest) if err := stream.RecvMsg(m); err != nil { return err } - return srv.(ArduinoCoreServiceServer).PlatformDownload(m, &arduinoCoreServicePlatformDownloadServer{stream}) + return srv.(ArduinoCoreServiceServer).PlatformDownload(m, &grpc.GenericServerStream[PlatformDownloadRequest, PlatformDownloadResponse]{ServerStream: stream}) } -type ArduinoCoreService_PlatformDownloadServer interface { - Send(*PlatformDownloadResponse) error - grpc.ServerStream -} - -type arduinoCoreServicePlatformDownloadServer struct { - grpc.ServerStream -} - -func (x *arduinoCoreServicePlatformDownloadServer) Send(m *PlatformDownloadResponse) error { - return x.ServerStream.SendMsg(m) -} +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type ArduinoCoreService_PlatformDownloadServer = grpc.ServerStreamingServer[PlatformDownloadResponse] func _ArduinoCoreService_PlatformUninstall_Handler(srv interface{}, stream grpc.ServerStream) error { m := new(PlatformUninstallRequest) if err := stream.RecvMsg(m); err != nil { return err } - return srv.(ArduinoCoreServiceServer).PlatformUninstall(m, &arduinoCoreServicePlatformUninstallServer{stream}) -} - -type ArduinoCoreService_PlatformUninstallServer interface { - Send(*PlatformUninstallResponse) error - grpc.ServerStream -} - -type arduinoCoreServicePlatformUninstallServer struct { - grpc.ServerStream + return srv.(ArduinoCoreServiceServer).PlatformUninstall(m, &grpc.GenericServerStream[PlatformUninstallRequest, PlatformUninstallResponse]{ServerStream: stream}) } -func (x *arduinoCoreServicePlatformUninstallServer) Send(m *PlatformUninstallResponse) error { - return x.ServerStream.SendMsg(m) -} +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type ArduinoCoreService_PlatformUninstallServer = grpc.ServerStreamingServer[PlatformUninstallResponse] func _ArduinoCoreService_PlatformUpgrade_Handler(srv interface{}, stream grpc.ServerStream) error { m := new(PlatformUpgradeRequest) if err := stream.RecvMsg(m); err != nil { return err } - return srv.(ArduinoCoreServiceServer).PlatformUpgrade(m, &arduinoCoreServicePlatformUpgradeServer{stream}) -} - -type ArduinoCoreService_PlatformUpgradeServer interface { - Send(*PlatformUpgradeResponse) error - grpc.ServerStream + return srv.(ArduinoCoreServiceServer).PlatformUpgrade(m, &grpc.GenericServerStream[PlatformUpgradeRequest, PlatformUpgradeResponse]{ServerStream: stream}) } -type arduinoCoreServicePlatformUpgradeServer struct { - grpc.ServerStream -} - -func (x *arduinoCoreServicePlatformUpgradeServer) Send(m *PlatformUpgradeResponse) error { - return x.ServerStream.SendMsg(m) -} +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type ArduinoCoreService_PlatformUpgradeServer = grpc.ServerStreamingServer[PlatformUpgradeResponse] func _ArduinoCoreService_Upload_Handler(srv interface{}, stream grpc.ServerStream) error { m := new(UploadRequest) if err := stream.RecvMsg(m); err != nil { return err } - return srv.(ArduinoCoreServiceServer).Upload(m, &arduinoCoreServiceUploadServer{stream}) -} - -type ArduinoCoreService_UploadServer interface { - Send(*UploadResponse) error - grpc.ServerStream + return srv.(ArduinoCoreServiceServer).Upload(m, &grpc.GenericServerStream[UploadRequest, UploadResponse]{ServerStream: stream}) } -type arduinoCoreServiceUploadServer struct { - grpc.ServerStream -} - -func (x *arduinoCoreServiceUploadServer) Send(m *UploadResponse) error { - return x.ServerStream.SendMsg(m) -} +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type ArduinoCoreService_UploadServer = grpc.ServerStreamingServer[UploadResponse] func _ArduinoCoreService_UploadUsingProgrammer_Handler(srv interface{}, stream grpc.ServerStream) error { m := new(UploadUsingProgrammerRequest) if err := stream.RecvMsg(m); err != nil { return err } - return srv.(ArduinoCoreServiceServer).UploadUsingProgrammer(m, &arduinoCoreServiceUploadUsingProgrammerServer{stream}) + return srv.(ArduinoCoreServiceServer).UploadUsingProgrammer(m, &grpc.GenericServerStream[UploadUsingProgrammerRequest, UploadUsingProgrammerResponse]{ServerStream: stream}) } -type ArduinoCoreService_UploadUsingProgrammerServer interface { - Send(*UploadUsingProgrammerResponse) error - grpc.ServerStream -} - -type arduinoCoreServiceUploadUsingProgrammerServer struct { - grpc.ServerStream -} - -func (x *arduinoCoreServiceUploadUsingProgrammerServer) Send(m *UploadUsingProgrammerResponse) error { - return x.ServerStream.SendMsg(m) -} +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type ArduinoCoreService_UploadUsingProgrammerServer = grpc.ServerStreamingServer[UploadUsingProgrammerResponse] func _ArduinoCoreService_SupportedUserFields_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(SupportedUserFieldsRequest) @@ -1873,21 +1525,11 @@ func _ArduinoCoreService_BurnBootloader_Handler(srv interface{}, stream grpc.Ser if err := stream.RecvMsg(m); err != nil { return err } - return srv.(ArduinoCoreServiceServer).BurnBootloader(m, &arduinoCoreServiceBurnBootloaderServer{stream}) + return srv.(ArduinoCoreServiceServer).BurnBootloader(m, &grpc.GenericServerStream[BurnBootloaderRequest, BurnBootloaderResponse]{ServerStream: stream}) } -type ArduinoCoreService_BurnBootloaderServer interface { - Send(*BurnBootloaderResponse) error - grpc.ServerStream -} - -type arduinoCoreServiceBurnBootloaderServer struct { - grpc.ServerStream -} - -func (x *arduinoCoreServiceBurnBootloaderServer) Send(m *BurnBootloaderResponse) error { - return x.ServerStream.SendMsg(m) -} +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type ArduinoCoreService_BurnBootloaderServer = grpc.ServerStreamingServer[BurnBootloaderResponse] func _ArduinoCoreService_PlatformSearch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(PlatformSearchRequest) @@ -1912,147 +1554,77 @@ func _ArduinoCoreService_LibraryDownload_Handler(srv interface{}, stream grpc.Se if err := stream.RecvMsg(m); err != nil { return err } - return srv.(ArduinoCoreServiceServer).LibraryDownload(m, &arduinoCoreServiceLibraryDownloadServer{stream}) -} - -type ArduinoCoreService_LibraryDownloadServer interface { - Send(*LibraryDownloadResponse) error - grpc.ServerStream -} - -type arduinoCoreServiceLibraryDownloadServer struct { - grpc.ServerStream + return srv.(ArduinoCoreServiceServer).LibraryDownload(m, &grpc.GenericServerStream[LibraryDownloadRequest, LibraryDownloadResponse]{ServerStream: stream}) } -func (x *arduinoCoreServiceLibraryDownloadServer) Send(m *LibraryDownloadResponse) error { - return x.ServerStream.SendMsg(m) -} +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type ArduinoCoreService_LibraryDownloadServer = grpc.ServerStreamingServer[LibraryDownloadResponse] func _ArduinoCoreService_LibraryInstall_Handler(srv interface{}, stream grpc.ServerStream) error { m := new(LibraryInstallRequest) if err := stream.RecvMsg(m); err != nil { return err } - return srv.(ArduinoCoreServiceServer).LibraryInstall(m, &arduinoCoreServiceLibraryInstallServer{stream}) + return srv.(ArduinoCoreServiceServer).LibraryInstall(m, &grpc.GenericServerStream[LibraryInstallRequest, LibraryInstallResponse]{ServerStream: stream}) } -type ArduinoCoreService_LibraryInstallServer interface { - Send(*LibraryInstallResponse) error - grpc.ServerStream -} - -type arduinoCoreServiceLibraryInstallServer struct { - grpc.ServerStream -} - -func (x *arduinoCoreServiceLibraryInstallServer) Send(m *LibraryInstallResponse) error { - return x.ServerStream.SendMsg(m) -} +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type ArduinoCoreService_LibraryInstallServer = grpc.ServerStreamingServer[LibraryInstallResponse] func _ArduinoCoreService_LibraryUpgrade_Handler(srv interface{}, stream grpc.ServerStream) error { m := new(LibraryUpgradeRequest) if err := stream.RecvMsg(m); err != nil { return err } - return srv.(ArduinoCoreServiceServer).LibraryUpgrade(m, &arduinoCoreServiceLibraryUpgradeServer{stream}) + return srv.(ArduinoCoreServiceServer).LibraryUpgrade(m, &grpc.GenericServerStream[LibraryUpgradeRequest, LibraryUpgradeResponse]{ServerStream: stream}) } -type ArduinoCoreService_LibraryUpgradeServer interface { - Send(*LibraryUpgradeResponse) error - grpc.ServerStream -} - -type arduinoCoreServiceLibraryUpgradeServer struct { - grpc.ServerStream -} - -func (x *arduinoCoreServiceLibraryUpgradeServer) Send(m *LibraryUpgradeResponse) error { - return x.ServerStream.SendMsg(m) -} +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type ArduinoCoreService_LibraryUpgradeServer = grpc.ServerStreamingServer[LibraryUpgradeResponse] func _ArduinoCoreService_ZipLibraryInstall_Handler(srv interface{}, stream grpc.ServerStream) error { m := new(ZipLibraryInstallRequest) if err := stream.RecvMsg(m); err != nil { return err } - return srv.(ArduinoCoreServiceServer).ZipLibraryInstall(m, &arduinoCoreServiceZipLibraryInstallServer{stream}) -} - -type ArduinoCoreService_ZipLibraryInstallServer interface { - Send(*ZipLibraryInstallResponse) error - grpc.ServerStream -} - -type arduinoCoreServiceZipLibraryInstallServer struct { - grpc.ServerStream + return srv.(ArduinoCoreServiceServer).ZipLibraryInstall(m, &grpc.GenericServerStream[ZipLibraryInstallRequest, ZipLibraryInstallResponse]{ServerStream: stream}) } -func (x *arduinoCoreServiceZipLibraryInstallServer) Send(m *ZipLibraryInstallResponse) error { - return x.ServerStream.SendMsg(m) -} +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type ArduinoCoreService_ZipLibraryInstallServer = grpc.ServerStreamingServer[ZipLibraryInstallResponse] func _ArduinoCoreService_GitLibraryInstall_Handler(srv interface{}, stream grpc.ServerStream) error { m := new(GitLibraryInstallRequest) if err := stream.RecvMsg(m); err != nil { return err } - return srv.(ArduinoCoreServiceServer).GitLibraryInstall(m, &arduinoCoreServiceGitLibraryInstallServer{stream}) + return srv.(ArduinoCoreServiceServer).GitLibraryInstall(m, &grpc.GenericServerStream[GitLibraryInstallRequest, GitLibraryInstallResponse]{ServerStream: stream}) } -type ArduinoCoreService_GitLibraryInstallServer interface { - Send(*GitLibraryInstallResponse) error - grpc.ServerStream -} - -type arduinoCoreServiceGitLibraryInstallServer struct { - grpc.ServerStream -} - -func (x *arduinoCoreServiceGitLibraryInstallServer) Send(m *GitLibraryInstallResponse) error { - return x.ServerStream.SendMsg(m) -} +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type ArduinoCoreService_GitLibraryInstallServer = grpc.ServerStreamingServer[GitLibraryInstallResponse] func _ArduinoCoreService_LibraryUninstall_Handler(srv interface{}, stream grpc.ServerStream) error { m := new(LibraryUninstallRequest) if err := stream.RecvMsg(m); err != nil { return err } - return srv.(ArduinoCoreServiceServer).LibraryUninstall(m, &arduinoCoreServiceLibraryUninstallServer{stream}) + return srv.(ArduinoCoreServiceServer).LibraryUninstall(m, &grpc.GenericServerStream[LibraryUninstallRequest, LibraryUninstallResponse]{ServerStream: stream}) } -type ArduinoCoreService_LibraryUninstallServer interface { - Send(*LibraryUninstallResponse) error - grpc.ServerStream -} - -type arduinoCoreServiceLibraryUninstallServer struct { - grpc.ServerStream -} - -func (x *arduinoCoreServiceLibraryUninstallServer) Send(m *LibraryUninstallResponse) error { - return x.ServerStream.SendMsg(m) -} +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type ArduinoCoreService_LibraryUninstallServer = grpc.ServerStreamingServer[LibraryUninstallResponse] func _ArduinoCoreService_LibraryUpgradeAll_Handler(srv interface{}, stream grpc.ServerStream) error { m := new(LibraryUpgradeAllRequest) if err := stream.RecvMsg(m); err != nil { return err } - return srv.(ArduinoCoreServiceServer).LibraryUpgradeAll(m, &arduinoCoreServiceLibraryUpgradeAllServer{stream}) -} - -type ArduinoCoreService_LibraryUpgradeAllServer interface { - Send(*LibraryUpgradeAllResponse) error - grpc.ServerStream -} - -type arduinoCoreServiceLibraryUpgradeAllServer struct { - grpc.ServerStream + return srv.(ArduinoCoreServiceServer).LibraryUpgradeAll(m, &grpc.GenericServerStream[LibraryUpgradeAllRequest, LibraryUpgradeAllResponse]{ServerStream: stream}) } -func (x *arduinoCoreServiceLibraryUpgradeAllServer) Send(m *LibraryUpgradeAllResponse) error { - return x.ServerStream.SendMsg(m) -} +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type ArduinoCoreService_LibraryUpgradeAllServer = grpc.ServerStreamingServer[LibraryUpgradeAllResponse] func _ArduinoCoreService_LibraryResolveDependencies_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(LibraryResolveDependenciesRequest) @@ -2109,30 +1681,11 @@ func _ArduinoCoreService_LibraryList_Handler(srv interface{}, ctx context.Contex } func _ArduinoCoreService_Monitor_Handler(srv interface{}, stream grpc.ServerStream) error { - return srv.(ArduinoCoreServiceServer).Monitor(&arduinoCoreServiceMonitorServer{stream}) + return srv.(ArduinoCoreServiceServer).Monitor(&grpc.GenericServerStream[MonitorRequest, MonitorResponse]{ServerStream: stream}) } -type ArduinoCoreService_MonitorServer interface { - Send(*MonitorResponse) error - Recv() (*MonitorRequest, error) - grpc.ServerStream -} - -type arduinoCoreServiceMonitorServer struct { - grpc.ServerStream -} - -func (x *arduinoCoreServiceMonitorServer) Send(m *MonitorResponse) error { - return x.ServerStream.SendMsg(m) -} - -func (x *arduinoCoreServiceMonitorServer) Recv() (*MonitorRequest, error) { - m := new(MonitorRequest) - if err := x.ServerStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type ArduinoCoreService_MonitorServer = grpc.BidiStreamingServer[MonitorRequest, MonitorResponse] func _ArduinoCoreService_EnumerateMonitorPortSettings_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(EnumerateMonitorPortSettingsRequest) @@ -2153,30 +1706,11 @@ func _ArduinoCoreService_EnumerateMonitorPortSettings_Handler(srv interface{}, c } func _ArduinoCoreService_Debug_Handler(srv interface{}, stream grpc.ServerStream) error { - return srv.(ArduinoCoreServiceServer).Debug(&arduinoCoreServiceDebugServer{stream}) -} - -type ArduinoCoreService_DebugServer interface { - Send(*DebugResponse) error - Recv() (*DebugRequest, error) - grpc.ServerStream -} - -type arduinoCoreServiceDebugServer struct { - grpc.ServerStream -} - -func (x *arduinoCoreServiceDebugServer) Send(m *DebugResponse) error { - return x.ServerStream.SendMsg(m) + return srv.(ArduinoCoreServiceServer).Debug(&grpc.GenericServerStream[DebugRequest, DebugResponse]{ServerStream: stream}) } -func (x *arduinoCoreServiceDebugServer) Recv() (*DebugRequest, error) { - m := new(DebugRequest) - if err := x.ServerStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type ArduinoCoreService_DebugServer = grpc.BidiStreamingServer[DebugRequest, DebugResponse] func _ArduinoCoreService_IsDebugSupported_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(IsDebugSupportedRequest) diff --git a/rpc/cc/arduino/cli/commands/v1/common.pb.go b/rpc/cc/arduino/cli/commands/v1/common.pb.go index c18b5491a4e..1d8d47f0af0 100644 --- a/rpc/cc/arduino/cli/commands/v1/common.pb.go +++ b/rpc/cc/arduino/cli/commands/v1/common.pb.go @@ -17,7 +17,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.34.2 -// protoc v5.26.1 +// protoc (unknown) // source: cc/arduino/cli/commands/v1/common.proto package commands @@ -162,14 +162,17 @@ type isDownloadProgress_Message interface { } type DownloadProgress_Start struct { + // Sent when a download is started. Start *DownloadProgressStart `protobuf:"bytes,1,opt,name=start,proto3,oneof"` } type DownloadProgress_Update struct { + // Progress updates for a download. Update *DownloadProgressUpdate `protobuf:"bytes,2,opt,name=update,proto3,oneof"` } type DownloadProgress_End struct { + // Sent when a download is finished or failed. End *DownloadProgressEnd `protobuf:"bytes,3,opt,name=end,proto3,oneof"` } @@ -298,10 +301,10 @@ type DownloadProgressEnd struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // True if the download is successful + // True if the download is successful. Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` // Info or error message, depending on the value of 'success'. Some examples: - // "File xxx already downloaded" or "Connection timeout" + // "File xxx already downloaded" or "Connection timeout". Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` } @@ -362,7 +365,7 @@ type TaskProgress struct { Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` // Whether the task is complete. Completed bool `protobuf:"varint,3,opt,name=completed,proto3" json:"completed,omitempty"` - // Amount in percent of the task completion (optional) + // Amount in percent of the task completion (optional). Percent float32 `protobuf:"fixed32,4,opt,name=percent,proto3" json:"percent,omitempty"` } @@ -431,11 +434,11 @@ type Programmer struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Platform name + // Platform name. Platform string `protobuf:"bytes,1,opt,name=platform,proto3" json:"platform,omitempty"` - // Programmer ID + // Programmer ID. Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` - // Programmer name + // Programmer name. Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` } @@ -539,9 +542,9 @@ type Platform struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Generic information about a platform + // Generic information about a platform. Metadata *PlatformMetadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` - // Information about a specific release of a platform + // Information about a specific release of a platform. Release *PlatformRelease `protobuf:"bytes,2,opt,name=release,proto3" json:"release,omitempty"` } @@ -598,11 +601,11 @@ type PlatformSummary struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Generic information about a platform + // Generic information about a platform. Metadata *PlatformMetadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` - // Maps version to the corresponding PlatformRelease + // Maps version to the corresponding PlatformRelease. Releases map[string]*PlatformRelease `protobuf:"bytes,2,rep,name=releases,proto3" json:"releases,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - // The installed version of the platform, or empty string if none installed + // The installed version of the platform, or empty string if none installed. InstalledVersion string `protobuf:"bytes,3,opt,name=installed_version,json=installedVersion,proto3" json:"installed_version,omitempty"` // The latest available version of the platform that can be installable, or // empty if none available. @@ -686,11 +689,11 @@ type PlatformMetadata struct { // Email of the maintainer of the platform's package. Email string `protobuf:"bytes,4,opt,name=email,proto3" json:"email,omitempty"` // If true this Platform has been installed manually in the user' sketchbook - // hardware folder + // hardware folder. ManuallyInstalled bool `protobuf:"varint,5,opt,name=manually_installed,json=manuallyInstalled,proto3" json:"manually_installed,omitempty"` - // True if the latest release of this Platform has been deprecated + // True if the latest release of this Platform has been deprecated. Deprecated bool `protobuf:"varint,6,opt,name=deprecated,proto3" json:"deprecated,omitempty"` - // If true the platform is indexed + // If true the platform is indexed. Indexed bool `protobuf:"varint,7,opt,name=indexed,proto3" json:"indexed,omitempty"` } @@ -783,11 +786,11 @@ type PlatformRelease struct { // Name used to identify the platform to humans (e.g., "Arduino AVR Boards"). Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // Version of the platform release + // Version of the platform release. Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` // Type of the platform. Types []string `protobuf:"bytes,3,rep,name=types,proto3" json:"types,omitempty"` - // True if the platform is installed + // True if the platform is installed. Installed bool `protobuf:"varint,4,opt,name=installed,proto3" json:"installed,omitempty"` // List of boards provided by the platform. If the platform is installed, // this is the boards listed in the platform's boards.txt. If the platform is @@ -804,7 +807,7 @@ type PlatformRelease struct { // may need to be reinstalled. This should be evaluated only when the // PlatformRelease is `Installed` otherwise is an undefined behaviour. MissingMetadata bool `protobuf:"varint,7,opt,name=missing_metadata,json=missingMetadata,proto3" json:"missing_metadata,omitempty"` - // True this release is deprecated + // True this release is deprecated. Deprecated bool `protobuf:"varint,8,opt,name=deprecated,proto3" json:"deprecated,omitempty"` // True if the platform dependencies are available for the current OS/ARCH. // This also means that the platform is installable. @@ -915,9 +918,9 @@ type InstalledPlatformReference struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // Version of the platform. Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` - // Installation directory of the platform + // Installation directory of the platform. InstallDir string `protobuf:"bytes,3,opt,name=install_dir,json=installDir,proto3" json:"install_dir,omitempty"` - // 3rd party platform URL + // 3rd party platform URL. PackageUrl string `protobuf:"bytes,4,opt,name=package_url,json=packageUrl,proto3" json:"package_url,omitempty"` } @@ -1093,30 +1096,30 @@ type Sketch struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Absolute path to a main sketch files + // Absolute path to a main sketch files. MainFile string `protobuf:"bytes,1,opt,name=main_file,json=mainFile,proto3" json:"main_file,omitempty"` - // Absolute path to folder that contains main_file + // Absolute path to folder that contains main_file. LocationPath string `protobuf:"bytes,2,opt,name=location_path,json=locationPath,proto3" json:"location_path,omitempty"` - // List of absolute paths to other sketch files + // List of absolute paths to other sketch files. OtherSketchFiles []string `protobuf:"bytes,3,rep,name=other_sketch_files,json=otherSketchFiles,proto3" json:"other_sketch_files,omitempty"` - // List of absolute paths to additional sketch files + // List of absolute paths to additional sketch files. AdditionalFiles []string `protobuf:"bytes,4,rep,name=additional_files,json=additionalFiles,proto3" json:"additional_files,omitempty"` // List of absolute paths to supported files in the sketch root folder, main - // file excluded + // file excluded. RootFolderFiles []string `protobuf:"bytes,5,rep,name=root_folder_files,json=rootFolderFiles,proto3" json:"root_folder_files,omitempty"` - // Default FQBN set in project file (sketch.yaml) + // Default FQBN set in project file (sketch.yaml). DefaultFqbn string `protobuf:"bytes,6,opt,name=default_fqbn,json=defaultFqbn,proto3" json:"default_fqbn,omitempty"` - // Default Port set in project file (sketch.yaml) + // Default Port set in project file (sketch.yaml). DefaultPort string `protobuf:"bytes,7,opt,name=default_port,json=defaultPort,proto3" json:"default_port,omitempty"` - // Default Protocol set in project file (sketch.yaml) + // Default Protocol set in project file (sketch.yaml). DefaultProtocol string `protobuf:"bytes,8,opt,name=default_protocol,json=defaultProtocol,proto3" json:"default_protocol,omitempty"` - // List of profiles present in the project file (sketch.yaml) + // List of profiles present in the project file (sketch.yaml). Profiles []*SketchProfile `protobuf:"bytes,9,rep,name=profiles,proto3" json:"profiles,omitempty"` - // Default profile set in the project file (sketch.yaml) + // Default profile set in the project file (sketch.yaml). DefaultProfile *SketchProfile `protobuf:"bytes,10,opt,name=default_profile,json=defaultProfile,proto3" json:"default_profile,omitempty"` - // Default Programmer set in project file (sketch.yaml) + // Default Programmer set in project file (sketch.yaml). DefaultProgrammer string `protobuf:"bytes,11,opt,name=default_programmer,json=defaultProgrammer,proto3" json:"default_programmer,omitempty"` - // Default Port configuration set in project file (sketch.yaml) + // Default Port configuration set in project file (sketch.yaml). DefaultPortConfig *MonitorPortConfiguration `protobuf:"bytes,12,opt,name=default_port_config,json=defaultPortConfig,proto3" json:"default_port_config,omitempty"` } @@ -1241,7 +1244,7 @@ type MonitorPortConfiguration struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The port configuration parameters + // The port configuration parameters. Settings []*MonitorPortSetting `protobuf:"bytes,1,rep,name=settings,proto3" json:"settings,omitempty"` } @@ -1289,8 +1292,10 @@ type MonitorPortSetting struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + // The setting identifier. SettingId string `protobuf:"bytes,1,opt,name=setting_id,json=settingId,proto3" json:"setting_id,omitempty"` - Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` + // The setting value. + Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` } func (x *MonitorPortSetting) Reset() { @@ -1344,17 +1349,17 @@ type SketchProfile struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Name of the profile + // Name of the profile. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // FQBN used by the profile + // FQBN used by the profile. Fqbn string `protobuf:"bytes,2,opt,name=fqbn,proto3" json:"fqbn,omitempty"` - // Programmer used by the profile + // Programmer used by the profile. Programmer string `protobuf:"bytes,3,opt,name=programmer,proto3" json:"programmer,omitempty"` - // Default Port in this profile + // Default Port in this profile. Port string `protobuf:"bytes,4,opt,name=port,proto3" json:"port,omitempty"` - // Default Port configuration set in project file (sketch.yaml) + // Default Port configuration set in project file (sketch.yaml). PortConfig *MonitorPortConfiguration `protobuf:"bytes,5,opt,name=port_config,json=portConfig,proto3" json:"port_config,omitempty"` - // Default Protocol in this profile + // Default Protocol in this profile. Protocol string `protobuf:"bytes,6,opt,name=protocol,proto3" json:"protocol,omitempty"` } diff --git a/rpc/cc/arduino/cli/commands/v1/common.proto b/rpc/cc/arduino/cli/commands/v1/common.proto index 99cd611bfde..bc8ed2e7263 100644 --- a/rpc/cc/arduino/cli/commands/v1/common.proto +++ b/rpc/cc/arduino/cli/commands/v1/common.proto @@ -27,8 +27,11 @@ message Instance { message DownloadProgress { oneof message { + // Sent when a download is started. DownloadProgressStart start = 1; + // Progress updates for a download. DownloadProgressUpdate update = 2; + // Sent when a download is finished or failed. DownloadProgressEnd end = 3; } } @@ -48,10 +51,10 @@ message DownloadProgressUpdate { } message DownloadProgressEnd { - // True if the download is successful + // True if the download is successful. bool success = 1; // Info or error message, depending on the value of 'success'. Some examples: - // "File xxx already downloaded" or "Connection timeout" + // "File xxx already downloaded" or "Connection timeout". string message = 2; } @@ -62,16 +65,16 @@ message TaskProgress { string message = 2; // Whether the task is complete. bool completed = 3; - // Amount in percent of the task completion (optional) + // Amount in percent of the task completion (optional). float percent = 4; } message Programmer { - // Platform name + // Platform name. string platform = 1; - // Programmer ID + // Programmer ID. string id = 2; - // Programmer name + // Programmer name. string name = 3; } @@ -82,20 +85,20 @@ message MissingProgrammerError {} // Platform is a structure containing all the information about a single // platform release. message Platform { - // Generic information about a platform + // Generic information about a platform. PlatformMetadata metadata = 1; - // Information about a specific release of a platform + // Information about a specific release of a platform. PlatformRelease release = 2; } // PlatformSummary is a structure containing all the information about // a platform and all its available releases. message PlatformSummary { - // Generic information about a platform + // Generic information about a platform. PlatformMetadata metadata = 1; - // Maps version to the corresponding PlatformRelease + // Maps version to the corresponding PlatformRelease. map releases = 2; - // The installed version of the platform, or empty string if none installed + // The installed version of the platform, or empty string if none installed. string installed_version = 3; // The latest available version of the platform that can be installable, or // empty if none available. @@ -115,11 +118,11 @@ message PlatformMetadata { // Email of the maintainer of the platform's package. string email = 4; // If true this Platform has been installed manually in the user' sketchbook - // hardware folder + // hardware folder. bool manually_installed = 5; - // True if the latest release of this Platform has been deprecated + // True if the latest release of this Platform has been deprecated. bool deprecated = 6; - // If true the platform is indexed + // If true the platform is indexed. bool indexed = 7; } @@ -127,11 +130,11 @@ message PlatformMetadata { message PlatformRelease { // Name used to identify the platform to humans (e.g., "Arduino AVR Boards"). string name = 1; - // Version of the platform release + // Version of the platform release. string version = 2; // Type of the platform. repeated string types = 3; - // True if the platform is installed + // True if the platform is installed. bool installed = 4; // List of boards provided by the platform. If the platform is installed, // this is the boards listed in the platform's boards.txt. If the platform is @@ -148,7 +151,7 @@ message PlatformRelease { // may need to be reinstalled. This should be evaluated only when the // PlatformRelease is `Installed` otherwise is an undefined behaviour. bool missing_metadata = 7; - // True this release is deprecated + // True this release is deprecated. bool deprecated = 8; // True if the platform dependencies are available for the current OS/ARCH. // This also means that the platform is installable. @@ -160,9 +163,9 @@ message InstalledPlatformReference { string id = 1; // Version of the platform. string version = 2; - // Installation directory of the platform + // Installation directory of the platform. string install_dir = 3; - // 3rd party platform URL + // 3rd party platform URL. string package_url = 4; } @@ -181,54 +184,56 @@ message HelpResources { } message Sketch { - // Absolute path to a main sketch files + // Absolute path to a main sketch files. string main_file = 1; - // Absolute path to folder that contains main_file + // Absolute path to folder that contains main_file. string location_path = 2; - // List of absolute paths to other sketch files + // List of absolute paths to other sketch files. repeated string other_sketch_files = 3; - // List of absolute paths to additional sketch files + // List of absolute paths to additional sketch files. repeated string additional_files = 4; // List of absolute paths to supported files in the sketch root folder, main - // file excluded + // file excluded. repeated string root_folder_files = 5; - // Default FQBN set in project file (sketch.yaml) + // Default FQBN set in project file (sketch.yaml). string default_fqbn = 6; - // Default Port set in project file (sketch.yaml) + // Default Port set in project file (sketch.yaml). string default_port = 7; - // Default Protocol set in project file (sketch.yaml) + // Default Protocol set in project file (sketch.yaml). string default_protocol = 8; - // List of profiles present in the project file (sketch.yaml) + // List of profiles present in the project file (sketch.yaml). repeated SketchProfile profiles = 9; - // Default profile set in the project file (sketch.yaml) + // Default profile set in the project file (sketch.yaml). SketchProfile default_profile = 10; - // Default Programmer set in project file (sketch.yaml) + // Default Programmer set in project file (sketch.yaml). string default_programmer = 11; - // Default Port configuration set in project file (sketch.yaml) + // Default Port configuration set in project file (sketch.yaml). MonitorPortConfiguration default_port_config = 12; } message MonitorPortConfiguration { - // The port configuration parameters + // The port configuration parameters. repeated MonitorPortSetting settings = 1; } message MonitorPortSetting { + // The setting identifier. string setting_id = 1; + // The setting value. string value = 2; } message SketchProfile { - // Name of the profile + // Name of the profile. string name = 1; - // FQBN used by the profile + // FQBN used by the profile. string fqbn = 2; - // Programmer used by the profile + // Programmer used by the profile. string programmer = 3; - // Default Port in this profile + // Default Port in this profile. string port = 4; - // Default Port configuration set in project file (sketch.yaml) + // Default Port configuration set in project file (sketch.yaml). MonitorPortConfiguration port_config = 5; - // Default Protocol in this profile + // Default Protocol in this profile. string protocol = 6; } diff --git a/rpc/cc/arduino/cli/commands/v1/compile.pb.go b/rpc/cc/arduino/cli/commands/v1/compile.pb.go index 87aaa41f88f..d06b0973d09 100644 --- a/rpc/cc/arduino/cli/commands/v1/compile.pb.go +++ b/rpc/cc/arduino/cli/commands/v1/compile.pb.go @@ -17,7 +17,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.34.2 -// protoc v5.26.1 +// protoc (unknown) // source: cc/arduino/cli/commands/v1/compile.proto package commands @@ -83,7 +83,7 @@ type CompileRequest struct { // exist. ExportDir string `protobuf:"bytes,18,opt,name=export_dir,json=exportDir,proto3" json:"export_dir,omitempty"` // Optional: cleanup the build folder and do not use any previously cached - // build + // build. Clean bool `protobuf:"varint,19,opt,name=clean,proto3" json:"clean,omitempty"` // When set to `true` only the compilation database will be produced and no // actual build will be performed. @@ -99,11 +99,11 @@ type CompileRequest struct { // A list of paths to single libraries root directory. Library []string `protobuf:"bytes,24,rep,name=library,proto3" json:"library,omitempty"` // The path where to search for the custom signing key name and the encrypt - // key name + // key name. KeysKeychain string `protobuf:"bytes,25,opt,name=keys_keychain,json=keysKeychain,proto3" json:"keys_keychain,omitempty"` - // The name of the custom key to use for signing during the compile process + // The name of the custom key to use for signing during the compile process. SignKey string `protobuf:"bytes,26,opt,name=sign_key,json=signKey,proto3" json:"sign_key,omitempty"` - // The name of the custom key to use for encrypting during the compile process + // The name of the custom key to use for encrypting during the compile process. EncryptKey string `protobuf:"bytes,27,opt,name=encrypt_key,json=encryptKey,proto3" json:"encrypt_key,omitempty"` // If set to true the build will skip the library discovery process and will // use the same libraries of latest build. Enabling this flag may produce a @@ -420,22 +420,22 @@ type isCompileResponse_Message interface { } type CompileResponse_OutStream struct { - // The output of the compilation process (stream) + // The output of the compilation process (stream). OutStream []byte `protobuf:"bytes,1,opt,name=out_stream,json=outStream,proto3,oneof"` } type CompileResponse_ErrStream struct { - // The error output of the compilation process (stream) + // The error output of the compilation process (stream). ErrStream []byte `protobuf:"bytes,2,opt,name=err_stream,json=errStream,proto3,oneof"` } type CompileResponse_Progress struct { - // Completions reports of the compilation process (stream) + // Completions reports of the compilation process (stream). Progress *TaskProgress `protobuf:"bytes,3,opt,name=progress,proto3,oneof"` } type CompileResponse_Result struct { - // The compilation result + // The compilation result. Result *BuilderResult `protobuf:"bytes,4,opt,name=result,proto3,oneof"` } @@ -490,19 +490,19 @@ type BuilderResult struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The compiler build path + // The compiler build path. BuildPath string `protobuf:"bytes,1,opt,name=build_path,json=buildPath,proto3" json:"build_path,omitempty"` - // The libraries used in the build + // The libraries used in the build. UsedLibraries []*Library `protobuf:"bytes,2,rep,name=used_libraries,json=usedLibraries,proto3" json:"used_libraries,omitempty"` - // The size of the executable split by sections + // The size of the executable split by sections. ExecutableSectionsSize []*ExecutableSectionSize `protobuf:"bytes,3,rep,name=executable_sections_size,json=executableSectionsSize,proto3" json:"executable_sections_size,omitempty"` - // The platform where the board is defined + // The platform where the board is defined. BoardPlatform *InstalledPlatformReference `protobuf:"bytes,4,opt,name=board_platform,json=boardPlatform,proto3" json:"board_platform,omitempty"` - // The platform used for the build (if referenced from the board platform) + // The platform used for the build (if referenced from the board platform). BuildPlatform *InstalledPlatformReference `protobuf:"bytes,5,opt,name=build_platform,json=buildPlatform,proto3" json:"build_platform,omitempty"` - // Build properties used for compiling + // Build properties used for compiling. BuildProperties []string `protobuf:"bytes,7,rep,name=build_properties,json=buildProperties,proto3" json:"build_properties,omitempty"` - // Compiler errors and warnings + // Compiler errors and warnings. Diagnostics []*CompileDiagnostic `protobuf:"bytes,8,rep,name=diagnostics,proto3" json:"diagnostics,omitempty"` } @@ -592,9 +592,12 @@ type ExecutableSectionSize struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Size int64 `protobuf:"varint,2,opt,name=size,proto3" json:"size,omitempty"` - MaxSize int64 `protobuf:"varint,3,opt,name=max_size,json=maxSize,proto3" json:"max_size,omitempty"` + // The name of the section. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // The used size of the section in bytes. + Size int64 `protobuf:"varint,2,opt,name=size,proto3" json:"size,omitempty"` + // The maximum size of the section in bytes. + MaxSize int64 `protobuf:"varint,3,opt,name=max_size,json=maxSize,proto3" json:"max_size,omitempty"` } func (x *ExecutableSectionSize) Reset() { @@ -655,21 +658,21 @@ type CompileDiagnostic struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Severity of the diagnostic + // Severity of the diagnostic. Severity string `protobuf:"bytes,1,opt,name=severity,proto3" json:"severity,omitempty"` - // The explanation of the diagnostic (it may be multiple preformatted lines) + // The explanation of the diagnostic (it may be multiple preformatted lines). Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` - // The file containing the diagnostic + // The file containing the diagnostic. File string `protobuf:"bytes,3,opt,name=file,proto3" json:"file,omitempty"` - // The line of the diagnostic if available (starts from 1) + // The line of the diagnostic if available (starts from 1). Line int64 `protobuf:"varint,4,opt,name=line,proto3" json:"line,omitempty"` - // The column of the diagnostic if available (starts from 1) + // The column of the diagnostic if available (starts from 1). Column int64 `protobuf:"varint,5,opt,name=column,proto3" json:"column,omitempty"` // The context where this diagnostic is found (it may be multiple files that // represents a chain of includes, or a text describing where the diagnostic - // is found) + // is found). Context []*CompileDiagnosticContext `protobuf:"bytes,6,rep,name=context,proto3" json:"context,omitempty"` - // Annotations or suggestions to the diagnostic made by the compiler + // Annotations or suggestions to the diagnostic made by the compiler. Notes []*CompileDiagnosticNote `protobuf:"bytes,7,rep,name=notes,proto3" json:"notes,omitempty"` } @@ -759,13 +762,13 @@ type CompileDiagnosticContext struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The message describing the context reference + // The message describing the context reference. Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` - // The file of the context reference + // The file of the context reference. File string `protobuf:"bytes,2,opt,name=file,proto3" json:"file,omitempty"` - // The line of the context reference + // The line of the context reference. Line int64 `protobuf:"varint,3,opt,name=line,proto3" json:"line,omitempty"` - // The column of the context reference + // The column of the context reference. Column int64 `protobuf:"varint,4,opt,name=column,proto3" json:"column,omitempty"` } @@ -834,13 +837,13 @@ type CompileDiagnosticNote struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The message describing the compiler note + // The message describing the compiler note. Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` - // The file of the compiler note + // The file of the compiler note. File string `protobuf:"bytes,2,opt,name=file,proto3" json:"file,omitempty"` - // The line of the compiler note + // The line of the compiler note. Line int64 `protobuf:"varint,3,opt,name=line,proto3" json:"line,omitempty"` - // The column of the compiler note + // The column of the compiler note. Column int64 `protobuf:"varint,4,opt,name=column,proto3" json:"column,omitempty"` } diff --git a/rpc/cc/arduino/cli/commands/v1/compile.proto b/rpc/cc/arduino/cli/commands/v1/compile.proto index 7bd9bb7c900..da1d0f465fb 100644 --- a/rpc/cc/arduino/cli/commands/v1/compile.proto +++ b/rpc/cc/arduino/cli/commands/v1/compile.proto @@ -18,11 +18,11 @@ syntax = "proto3"; package cc.arduino.cli.commands.v1; -option go_package = "github.com/arduino/arduino-cli/rpc/cc/arduino/cli/commands/v1;commands"; - import "cc/arduino/cli/commands/v1/common.proto"; import "cc/arduino/cli/commands/v1/lib.proto"; +option go_package = "github.com/arduino/arduino-cli/rpc/cc/arduino/cli/commands/v1;commands"; + message CompileRequest { // Arduino Core Service instance from the `Init` response. Instance instance = 1; @@ -38,7 +38,7 @@ message CompileRequest { bool preprocess = 5; // Builds of core and sketches are saved into this path to be cached and // reused. - string build_cache_path = 6 [ deprecated = true ]; + string build_cache_path = 6 [deprecated = true]; // Path to use to store the files used for the compilation. If omitted, // a directory will be created in the operating system's default temporary // path. @@ -64,7 +64,7 @@ message CompileRequest { // exist. string export_dir = 18; // Optional: cleanup the build folder and do not use any previously cached - // build + // build. bool clean = 19; // When set to `true` only the compilation database will be produced and no // actual build will be performed. @@ -80,11 +80,11 @@ message CompileRequest { // A list of paths to single libraries root directory. repeated string library = 24; // The path where to search for the custom signing key name and the encrypt - // key name + // key name. string keys_keychain = 25; - // The name of the custom key to use for signing during the compile process + // The name of the custom key to use for signing during the compile process. string sign_key = 26; - // The name of the custom key to use for encrypting during the compile process + // The name of the custom key to use for encrypting during the compile process. string encrypt_key = 27; // If set to true the build will skip the library discovery process and will // use the same libraries of latest build. Enabling this flag may produce a @@ -102,13 +102,13 @@ message CompileRequest { message CompileResponse { oneof message { - // The output of the compilation process (stream) + // The output of the compilation process (stream). bytes out_stream = 1; - // The error output of the compilation process (stream) + // The error output of the compilation process (stream). bytes err_stream = 2; - // Completions reports of the compilation process (stream) + // Completions reports of the compilation process (stream). TaskProgress progress = 3; - // The compilation result + // The compilation result. BuilderResult result = 4; } } @@ -116,65 +116,68 @@ message CompileResponse { message InstanceNeedsReinitializationError {} message BuilderResult { - // The compiler build path + // The compiler build path. string build_path = 1; - // The libraries used in the build + // The libraries used in the build. repeated Library used_libraries = 2; - // The size of the executable split by sections + // The size of the executable split by sections. repeated ExecutableSectionSize executable_sections_size = 3; - // The platform where the board is defined + // The platform where the board is defined. InstalledPlatformReference board_platform = 4; - // The platform used for the build (if referenced from the board platform) + // The platform used for the build (if referenced from the board platform). InstalledPlatformReference build_platform = 5; - // Build properties used for compiling + // Build properties used for compiling. repeated string build_properties = 7; - // Compiler errors and warnings + // Compiler errors and warnings. repeated CompileDiagnostic diagnostics = 8; } message ExecutableSectionSize { + // The name of the section. string name = 1; + // The used size of the section in bytes. int64 size = 2; + // The maximum size of the section in bytes. int64 max_size = 3; } message CompileDiagnostic { - // Severity of the diagnostic + // Severity of the diagnostic. string severity = 1; - // The explanation of the diagnostic (it may be multiple preformatted lines) + // The explanation of the diagnostic (it may be multiple preformatted lines). string message = 2; - // The file containing the diagnostic + // The file containing the diagnostic. string file = 3; - // The line of the diagnostic if available (starts from 1) + // The line of the diagnostic if available (starts from 1). int64 line = 4; - // The column of the diagnostic if available (starts from 1) + // The column of the diagnostic if available (starts from 1). int64 column = 5; // The context where this diagnostic is found (it may be multiple files that // represents a chain of includes, or a text describing where the diagnostic - // is found) + // is found). repeated CompileDiagnosticContext context = 6; - // Annotations or suggestions to the diagnostic made by the compiler + // Annotations or suggestions to the diagnostic made by the compiler. repeated CompileDiagnosticNote notes = 7; } message CompileDiagnosticContext { - // The message describing the context reference + // The message describing the context reference. string message = 1; - // The file of the context reference + // The file of the context reference. string file = 2; - // The line of the context reference + // The line of the context reference. int64 line = 3; - // The column of the context reference + // The column of the context reference. int64 column = 4; } message CompileDiagnosticNote { - // The message describing the compiler note + // The message describing the compiler note. string message = 1; - // The file of the compiler note + // The file of the compiler note. string file = 2; - // The line of the compiler note + // The line of the compiler note. int64 line = 3; - // The column of the compiler note + // The column of the compiler note. int64 column = 4; } diff --git a/rpc/cc/arduino/cli/commands/v1/core.pb.go b/rpc/cc/arduino/cli/commands/v1/core.pb.go index 8641b8fe860..fdb965841cc 100644 --- a/rpc/cc/arduino/cli/commands/v1/core.pb.go +++ b/rpc/cc/arduino/cli/commands/v1/core.pb.go @@ -17,7 +17,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.34.2 -// protoc v5.26.1 +// protoc (unknown) // source: cc/arduino/cli/commands/v1/core.proto package commands @@ -50,13 +50,13 @@ type PlatformInstallRequest struct { // Platform version to install. Version string `protobuf:"bytes,4,opt,name=version,proto3" json:"version,omitempty"` // Set to true to not run (eventual) post install scripts for trusted - // platforms + // platforms. SkipPostInstall bool `protobuf:"varint,5,opt,name=skip_post_install,json=skipPostInstall,proto3" json:"skip_post_install,omitempty"` // Set to true to skip installation if a different version of the platform // is already installed. NoOverwrite bool `protobuf:"varint,6,opt,name=no_overwrite,json=noOverwrite,proto3" json:"no_overwrite,omitempty"` // Set to true to not run (eventual) pre uninstall scripts for trusted - // platforms when performing platform upgrades + // platforms when performing platform upgrades. SkipPreUninstall bool `protobuf:"varint,7,opt,name=skip_pre_uninstall,json=skipPreUninstall,proto3" json:"skip_pre_uninstall,omitempty"` } @@ -283,8 +283,9 @@ type PlatformDownloadRequest struct { unknownFields protoimpl.UnknownFields // Arduino Core Service instance from the `Init` response. - Instance *Instance `protobuf:"bytes,1,opt,name=instance,proto3" json:"instance,omitempty"` - PlatformPackage string `protobuf:"bytes,2,opt,name=platform_package,json=platformPackage,proto3" json:"platform_package,omitempty"` + Instance *Instance `protobuf:"bytes,1,opt,name=instance,proto3" json:"instance,omitempty"` + // Vendor name of the platform (e.g., `arduino`). + PlatformPackage string `protobuf:"bytes,2,opt,name=platform_package,json=platformPackage,proto3" json:"platform_package,omitempty"` // Architecture name of the platform (e.g., `avr`). Architecture string `protobuf:"bytes,3,opt,name=architecture,proto3" json:"architecture,omitempty"` // Platform version to download. @@ -446,7 +447,7 @@ type PlatformUninstallRequest struct { // Architecture name of the platform (e.g., `avr`). Architecture string `protobuf:"bytes,3,opt,name=architecture,proto3" json:"architecture,omitempty"` // Set to true to not run (eventual) pre uninstall scripts for trusted - // platforms + // platforms. SkipPreUninstall bool `protobuf:"varint,4,opt,name=skip_pre_uninstall,json=skipPreUninstall,proto3" json:"skip_pre_uninstall,omitempty"` } @@ -645,10 +646,10 @@ type PlatformUpgradeRequest struct { // Architecture name of the platform (e.g., `avr`). Architecture string `protobuf:"bytes,3,opt,name=architecture,proto3" json:"architecture,omitempty"` // Set to true to not run (eventual) post install scripts for trusted - // platforms + // platforms. SkipPostInstall bool `protobuf:"varint,4,opt,name=skip_post_install,json=skipPostInstall,proto3" json:"skip_post_install,omitempty"` // Set to true to not run (eventual) pre uninstall scripts for trusted - // platforms when performing platform upgrades + // platforms when performing platform upgrades. SkipPreUninstall bool `protobuf:"varint,5,opt,name=skip_pre_uninstall,json=skipPreUninstall,proto3" json:"skip_pre_uninstall,omitempty"` } diff --git a/rpc/cc/arduino/cli/commands/v1/core.proto b/rpc/cc/arduino/cli/commands/v1/core.proto index 19210075891..345c4c88d18 100644 --- a/rpc/cc/arduino/cli/commands/v1/core.proto +++ b/rpc/cc/arduino/cli/commands/v1/core.proto @@ -18,10 +18,10 @@ syntax = "proto3"; package cc.arduino.cli.commands.v1; -option go_package = "github.com/arduino/arduino-cli/rpc/cc/arduino/cli/commands/v1;commands"; - import "cc/arduino/cli/commands/v1/common.proto"; +option go_package = "github.com/arduino/arduino-cli/rpc/cc/arduino/cli/commands/v1;commands"; + message PlatformInstallRequest { // Arduino Core Service instance from the `Init` response. Instance instance = 1; @@ -32,13 +32,13 @@ message PlatformInstallRequest { // Platform version to install. string version = 4; // Set to true to not run (eventual) post install scripts for trusted - // platforms + // platforms. bool skip_post_install = 5; // Set to true to skip installation if a different version of the platform // is already installed. bool no_overwrite = 6; // Set to true to not run (eventual) pre uninstall scripts for trusted - // platforms when performing platform upgrades + // platforms when performing platform upgrades. bool skip_pre_uninstall = 7; } @@ -61,6 +61,7 @@ message PlatformLoadingError {} message PlatformDownloadRequest { // Arduino Core Service instance from the `Init` response. Instance instance = 1; + // Vendor name of the platform (e.g., `arduino`). string platform_package = 2; // Architecture name of the platform (e.g., `avr`). string architecture = 3; @@ -88,7 +89,7 @@ message PlatformUninstallRequest { // Architecture name of the platform (e.g., `avr`). string architecture = 3; // Set to true to not run (eventual) pre uninstall scripts for trusted - // platforms + // platforms. bool skip_pre_uninstall = 4; } @@ -116,10 +117,10 @@ message PlatformUpgradeRequest { // Architecture name of the platform (e.g., `avr`). string architecture = 3; // Set to true to not run (eventual) post install scripts for trusted - // platforms + // platforms. bool skip_post_install = 4; // Set to true to not run (eventual) pre uninstall scripts for trusted - // platforms when performing platform upgrades + // platforms when performing platform upgrades. bool skip_pre_uninstall = 5; } diff --git a/rpc/cc/arduino/cli/commands/v1/debug.pb.go b/rpc/cc/arduino/cli/commands/v1/debug.pb.go index 7d0deb00cee..3e313926d94 100644 --- a/rpc/cc/arduino/cli/commands/v1/debug.pb.go +++ b/rpc/cc/arduino/cli/commands/v1/debug.pb.go @@ -17,7 +17,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.34.2 -// protoc v5.26.1 +// protoc (unknown) // source: cc/arduino/cli/commands/v1/debug.proto package commands @@ -53,7 +53,7 @@ type DebugRequest struct { DebugRequest *GetDebugConfigRequest `protobuf:"bytes,1,opt,name=debug_request,json=debugRequest,proto3" json:"debug_request,omitempty"` // The data to be sent to the target being monitored. Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` - // Set this to true to send and Interrupt signal to the debugger process + // Set this to true to send and Interrupt signal to the debugger process. SendInterrupt bool `protobuf:"varint,3,opt,name=send_interrupt,json=sendInterrupt,proto3" json:"send_interrupt,omitempty"` } @@ -294,7 +294,7 @@ type IsDebugSupportedResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // True if debugging is supported + // True if debugging is supported. DebuggingSupported bool `protobuf:"varint,1,opt,name=debugging_supported,json=debuggingSupported,proto3" json:"debugging_supported,omitempty"` // This is the same FQBN given in the IsDebugSupportedRequest but cleaned // up of the board options that do not affect the debugger configuration. @@ -470,31 +470,31 @@ type GetDebugConfigResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The executable binary to debug + // The executable binary to debug. Executable string `protobuf:"bytes,1,opt,name=executable,proto3" json:"executable,omitempty"` - // The toolchain type used for the build (for example "gcc") + // The toolchain type used for the build (for example "gcc"). Toolchain string `protobuf:"bytes,2,opt,name=toolchain,proto3" json:"toolchain,omitempty"` - // The toolchain directory + // The toolchain directory. ToolchainPath string `protobuf:"bytes,3,opt,name=toolchain_path,json=toolchainPath,proto3" json:"toolchain_path,omitempty"` - // The toolchain architecture prefix (for example "arm-none-eabi") + // The toolchain architecture prefix (for example "arm-none-eabi"). ToolchainPrefix string `protobuf:"bytes,4,opt,name=toolchain_prefix,json=toolchainPrefix,proto3" json:"toolchain_prefix,omitempty"` // The GDB server type used to connect to the programmer/board (for example - // "openocd") + // "openocd"). Server string `protobuf:"bytes,5,opt,name=server,proto3" json:"server,omitempty"` - // The GDB server directory + // The GDB server directory. ServerPath string `protobuf:"bytes,6,opt,name=server_path,json=serverPath,proto3" json:"server_path,omitempty"` - // Extra configuration parameters wrt toolchain + // Extra configuration parameters wrt toolchain. ToolchainConfiguration *anypb.Any `protobuf:"bytes,7,opt,name=toolchain_configuration,json=toolchainConfiguration,proto3" json:"toolchain_configuration,omitempty"` - // Extra configuration parameters wrt GDB server + // Extra configuration parameters wrt GDB server. ServerConfiguration *anypb.Any `protobuf:"bytes,8,opt,name=server_configuration,json=serverConfiguration,proto3" json:"server_configuration,omitempty"` // Custom debugger configurations (not handled directly by Arduino CLI but // provided for 3rd party plugins/debuggers). The map keys identifies which // 3rd party plugin/debugger is referred, the map string values contains a // JSON configuration for it. CustomConfigs map[string]string `protobuf:"bytes,9,rep,name=custom_configs,json=customConfigs,proto3" json:"custom_configs,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - // the SVD file to use + // the SVD file to use. SvdFile string `protobuf:"bytes,10,opt,name=svd_file,json=svdFile,proto3" json:"svd_file,omitempty"` - // The programmer specified in the request + // The programmer specified in the request. Programmer string `protobuf:"bytes,11,opt,name=programmer,proto3" json:"programmer,omitempty"` } @@ -607,7 +607,7 @@ func (x *GetDebugConfigResponse) GetProgrammer() string { return "" } -// Configurations specific for the 'gcc' toolchain +// Configurations specific for the 'gcc' toolchain. type DebugGCCToolchainConfiguration struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -646,17 +646,17 @@ func (*DebugGCCToolchainConfiguration) Descriptor() ([]byte, []int) { return file_cc_arduino_cli_commands_v1_debug_proto_rawDescGZIP(), []int{6} } -// Configuration specific for the 'openocd` server +// Configuration specific for the 'openocd` server. type DebugOpenOCDServerConfiguration struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // path to openocd + // Path to openocd. Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` - // path to openocd scripts + // Path to openocd scripts. ScriptsDir string `protobuf:"bytes,2,opt,name=scripts_dir,json=scriptsDir,proto3" json:"scripts_dir,omitempty"` - // list of scripts to execute by openocd + // List of scripts to execute by openocd. Scripts []string `protobuf:"bytes,3,rep,name=scripts,proto3" json:"scripts,omitempty"` } diff --git a/rpc/cc/arduino/cli/commands/v1/debug.proto b/rpc/cc/arduino/cli/commands/v1/debug.proto index 6a53e0f27cc..c2a89e01d6b 100644 --- a/rpc/cc/arduino/cli/commands/v1/debug.proto +++ b/rpc/cc/arduino/cli/commands/v1/debug.proto @@ -18,12 +18,12 @@ syntax = "proto3"; package cc.arduino.cli.commands.v1; -option go_package = "github.com/arduino/arduino-cli/rpc/cc/arduino/cli/commands/v1;commands"; - import "cc/arduino/cli/commands/v1/common.proto"; import "cc/arduino/cli/commands/v1/port.proto"; import "google/protobuf/any.proto"; +option go_package = "github.com/arduino/arduino-cli/rpc/cc/arduino/cli/commands/v1;commands"; + // The top-level message sent by the client for the `Debug` method. // Multiple `DebugRequest` messages can be sent but the first message // must contain a `GetDebugConfigRequest` message to initialize the debug @@ -40,7 +40,7 @@ message DebugRequest { // The data to be sent to the target being monitored. bytes data = 2; - // Set this to true to send and Interrupt signal to the debugger process + // Set this to true to send and Interrupt signal to the debugger process. bool send_interrupt = 3; } @@ -76,7 +76,7 @@ message IsDebugSupportedRequest { } message IsDebugSupportedResponse { - // True if debugging is supported + // True if debugging is supported. bool debugging_supported = 1; // This is the same FQBN given in the IsDebugSupportedRequest but cleaned // up of the board options that do not affect the debugger configuration. @@ -110,43 +110,43 @@ message GetDebugConfigRequest { } message GetDebugConfigResponse { - // The executable binary to debug + // The executable binary to debug. string executable = 1; - // The toolchain type used for the build (for example "gcc") + // The toolchain type used for the build (for example "gcc"). string toolchain = 2; - // The toolchain directory + // The toolchain directory. string toolchain_path = 3; - // The toolchain architecture prefix (for example "arm-none-eabi") + // The toolchain architecture prefix (for example "arm-none-eabi"). string toolchain_prefix = 4; // The GDB server type used to connect to the programmer/board (for example - // "openocd") + // "openocd"). string server = 5; - // The GDB server directory + // The GDB server directory. string server_path = 6; - // Extra configuration parameters wrt toolchain + // Extra configuration parameters wrt toolchain. google.protobuf.Any toolchain_configuration = 7; - // Extra configuration parameters wrt GDB server + // Extra configuration parameters wrt GDB server. google.protobuf.Any server_configuration = 8; // Custom debugger configurations (not handled directly by Arduino CLI but // provided for 3rd party plugins/debuggers). The map keys identifies which // 3rd party plugin/debugger is referred, the map string values contains a // JSON configuration for it. map custom_configs = 9; - // the SVD file to use + // the SVD file to use. string svd_file = 10; - // The programmer specified in the request + // The programmer specified in the request. string programmer = 11; } -// Configurations specific for the 'gcc' toolchain +// Configurations specific for the 'gcc' toolchain. message DebugGCCToolchainConfiguration {} -// Configuration specific for the 'openocd` server +// Configuration specific for the 'openocd` server. message DebugOpenOCDServerConfiguration { - // path to openocd + // Path to openocd. string path = 1; - // path to openocd scripts + // Path to openocd scripts. string scripts_dir = 2; - // list of scripts to execute by openocd + // List of scripts to execute by openocd. repeated string scripts = 3; } diff --git a/rpc/cc/arduino/cli/commands/v1/lib.pb.go b/rpc/cc/arduino/cli/commands/v1/lib.pb.go index 10f95317c0b..0910be91d8a 100644 --- a/rpc/cc/arduino/cli/commands/v1/lib.pb.go +++ b/rpc/cc/arduino/cli/commands/v1/lib.pb.go @@ -17,7 +17,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.34.2 -// protoc v5.26.1 +// protoc (unknown) // source: cc/arduino/cli/commands/v1/lib.proto package commands @@ -36,6 +36,7 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +// Represent a library installation location. type LibraryInstallLocation int32 const ( @@ -85,6 +86,7 @@ func (LibraryInstallLocation) EnumDescriptor() ([]byte, []int) { return file_cc_arduino_cli_commands_v1_lib_proto_rawDescGZIP(), []int{0} } +// Represent the result of the library search. type LibrarySearchStatus int32 const ( @@ -133,6 +135,7 @@ func (LibrarySearchStatus) EnumDescriptor() ([]byte, []int) { return file_cc_arduino_cli_commands_v1_lib_proto_rawDescGZIP(), []int{1} } +// Represent the library layout. type LibraryLayout int32 const ( @@ -181,6 +184,7 @@ func (LibraryLayout) EnumDescriptor() ([]byte, []int) { return file_cc_arduino_cli_commands_v1_lib_proto_rawDescGZIP(), []int{2} } +// Represent the location of the library. type LibraryLocation int32 const ( @@ -409,7 +413,7 @@ type LibraryInstallRequest struct { // Set to true to skip installation if a different version of the library or // one of its dependencies is already installed, defaults to false. NoOverwrite bool `protobuf:"varint,5,opt,name=no_overwrite,json=noOverwrite,proto3" json:"no_overwrite,omitempty"` - // Install the library and dependencies in the specified location + // Install the library and dependencies in the specified location. InstallLocation LibraryInstallLocation `protobuf:"varint,6,opt,name=install_location,json=installLocation,proto3,enum=cc.arduino.cli.commands.v1.LibraryInstallLocation" json:"install_location,omitempty"` } @@ -1750,7 +1754,7 @@ type LibraryListRequest struct { // Whether to list only libraries for which there is a newer version than // the installed version available in the libraries index. Updatable bool `protobuf:"varint,3,opt,name=updatable,proto3" json:"updatable,omitempty"` - // If set filters out the libraries not matching name + // If set filters out the libraries not matching name. Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"` // By setting this field all duplicate libraries are filtered out leaving // only the libraries that will be used to compile for the specified board @@ -1985,12 +1989,12 @@ type Library struct { Location LibraryLocation `protobuf:"varint,24,opt,name=location,proto3,enum=cc.arduino.cli.commands.v1.LibraryLocation" json:"location,omitempty"` // The library format type. Layout LibraryLayout `protobuf:"varint,25,opt,name=layout,proto3,enum=cc.arduino.cli.commands.v1.LibraryLayout" json:"layout,omitempty"` - // The example sketches provided by the library + // The example sketches provided by the library. Examples []string `protobuf:"bytes,26,rep,name=examples,proto3" json:"examples,omitempty"` // Value of the `includes` field in library.properties or, if missing, the // list of include files available on the library source root directory. ProvidesIncludes []string `protobuf:"bytes,27,rep,name=provides_includes,json=providesIncludes,proto3" json:"provides_includes,omitempty"` - // Map of FQBNs that specifies if library is compatible with this library + // Map of FQBNs that specifies if library is compatible with this library. CompatibleWith map[string]bool `protobuf:"bytes,28,rep,name=compatible_with,json=compatibleWith,proto3" json:"compatible_with,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // This value is set to true if the library is in development and should not // be treated as read-only. This status is determined by the presence of a @@ -2219,7 +2223,7 @@ type ZipLibraryInstallRequest struct { // Arduino Core Service instance from the `Init` response. Instance *Instance `protobuf:"bytes,1,opt,name=instance,proto3" json:"instance,omitempty"` - // Path to the archived library + // Path to the archived library. Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"` // Set to true to overwrite an already installed library with the same name. // Defaults to false. @@ -2369,7 +2373,7 @@ type GitLibraryInstallRequest struct { // Arduino Core Service instance from the `Init` response. Instance *Instance `protobuf:"bytes,1,opt,name=instance,proto3" json:"instance,omitempty"` - // URL to the repository containing the library + // URL to the repository containing the library. Url string `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"` // Set to true to overwrite an already installed library with the same name. // Defaults to false. diff --git a/rpc/cc/arduino/cli/commands/v1/lib.proto b/rpc/cc/arduino/cli/commands/v1/lib.proto index cf43fc36082..1878b07ec53 100644 --- a/rpc/cc/arduino/cli/commands/v1/lib.proto +++ b/rpc/cc/arduino/cli/commands/v1/lib.proto @@ -18,10 +18,10 @@ syntax = "proto3"; package cc.arduino.cli.commands.v1; -option go_package = "github.com/arduino/arduino-cli/rpc/cc/arduino/cli/commands/v1;commands"; - import "cc/arduino/cli/commands/v1/common.proto"; +option go_package = "github.com/arduino/arduino-cli/rpc/cc/arduino/cli/commands/v1;commands"; + message LibraryDownloadRequest { // Arduino Core Service instance from the `Init` response. Instance instance = 1; @@ -56,10 +56,11 @@ message LibraryInstallRequest { // Set to true to skip installation if a different version of the library or // one of its dependencies is already installed, defaults to false. bool no_overwrite = 5; - // Install the library and dependencies in the specified location + // Install the library and dependencies in the specified location. LibraryInstallLocation install_location = 6; } +// Represent a library installation location. enum LibraryInstallLocation { // In the `libraries` subdirectory of the user directory (sketchbook). This is // the default if not specified. @@ -183,6 +184,7 @@ message LibrarySearchRequest { string search_args = 3; } +// Represent the result of the library search. enum LibrarySearchStatus { // No search results were found. LIBRARY_SEARCH_STATUS_FAILED = 0; @@ -271,7 +273,7 @@ message LibraryListRequest { // Whether to list only libraries for which there is a newer version than // the installed version available in the libraries index. bool updatable = 3; - // If set filters out the libraries not matching name + // If set filters out the libraries not matching name. string name = 4; // By setting this field all duplicate libraries are filtered out leaving // only the libraries that will be used to compile for the specified board @@ -342,12 +344,12 @@ message Library { LibraryLocation location = 24; // The library format type. LibraryLayout layout = 25; - // The example sketches provided by the library + // The example sketches provided by the library. repeated string examples = 26; // Value of the `includes` field in library.properties or, if missing, the // list of include files available on the library source root directory. repeated string provides_includes = 27; - // Map of FQBNs that specifies if library is compatible with this library + // Map of FQBNs that specifies if library is compatible with this library. map compatible_with = 28; // This value is set to true if the library is in development and should not // be treated as read-only. This status is determined by the presence of a @@ -355,6 +357,7 @@ message Library { bool in_development = 29; } +// Represent the library layout. enum LibraryLayout { // Library is in the 1.0 Arduino library format. LIBRARY_LAYOUT_FLAT = 0; @@ -362,6 +365,7 @@ enum LibraryLayout { LIBRARY_LAYOUT_RECURSIVE = 1; } +// Represent the location of the library. enum LibraryLocation { // In the configured 'builtin.libraries' directory. LIBRARY_LOCATION_BUILTIN = 0; @@ -380,7 +384,7 @@ enum LibraryLocation { message ZipLibraryInstallRequest { // Arduino Core Service instance from the `Init` response. Instance instance = 1; - // Path to the archived library + // Path to the archived library. string path = 2; // Set to true to overwrite an already installed library with the same name. // Defaults to false. @@ -402,7 +406,7 @@ message ZipLibraryInstallResponse { message GitLibraryInstallRequest { // Arduino Core Service instance from the `Init` response. Instance instance = 1; - // URL to the repository containing the library + // URL to the repository containing the library. string url = 2; // Set to true to overwrite an already installed library with the same name. // Defaults to false. diff --git a/rpc/cc/arduino/cli/commands/v1/monitor.pb.go b/rpc/cc/arduino/cli/commands/v1/monitor.pb.go index 7a655956660..465ed17235e 100644 --- a/rpc/cc/arduino/cli/commands/v1/monitor.pb.go +++ b/rpc/cc/arduino/cli/commands/v1/monitor.pb.go @@ -17,7 +17,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.34.2 -// protoc v5.26.1 +// protoc (unknown) // source: cc/arduino/cli/commands/v1/monitor.proto package commands @@ -122,24 +122,24 @@ type isMonitorRequest_Message interface { } type MonitorRequest_OpenRequest struct { - // Open request, it must be the first incoming message + // Open request, it must be the first incoming message. OpenRequest *MonitorPortOpenRequest `protobuf:"bytes,1,opt,name=open_request,json=openRequest,proto3,oneof"` } type MonitorRequest_TxData struct { - // Data to send to the port + // Data to send to the port. TxData []byte `protobuf:"bytes,2,opt,name=tx_data,json=txData,proto3,oneof"` } type MonitorRequest_UpdatedConfiguration struct { - // Port configuration, contains settings of the port to be changed + // Port configuration, contains settings of the port to be changed. UpdatedConfiguration *MonitorPortConfiguration `protobuf:"bytes,3,opt,name=updated_configuration,json=updatedConfiguration,proto3,oneof"` } type MonitorRequest_Close struct { // Close message, set to true to gracefully close a port (this ensure // that the gRPC streaming call is closed by the daemon AFTER the port - // has been successfully closed) + // has been successfully closed). Close bool `protobuf:"varint,4,opt,name=close,proto3,oneof"` } @@ -158,13 +158,13 @@ type MonitorPortOpenRequest struct { // Arduino Core Service instance from the `Init` response. Instance *Instance `protobuf:"bytes,1,opt,name=instance,proto3" json:"instance,omitempty"` - // Port to open, must be filled only on the first request + // Port to open, must be filled only on the first request. Port *Port `protobuf:"bytes,2,opt,name=port,proto3" json:"port,omitempty"` // The board FQBN we are trying to connect to. This is optional, and it's // needed to disambiguate if more than one platform provides the pluggable // monitor for a given port protocol. Fqbn string `protobuf:"bytes,3,opt,name=fqbn,proto3" json:"fqbn,omitempty"` - // Port configuration, optional, contains settings of the port to be applied + // Port configuration, optional, contains settings of the port to be applied. PortConfiguration *MonitorPortConfiguration `protobuf:"bytes,4,opt,name=port_configuration,json=portConfiguration,proto3" json:"port_configuration,omitempty"` } @@ -314,25 +314,25 @@ type isMonitorResponse_Message interface { } type MonitorResponse_Error struct { - // Eventual errors dealing with monitor port + // Eventual errors dealing with monitor port. Error string `protobuf:"bytes,1,opt,name=error,proto3,oneof"` } type MonitorResponse_RxData struct { - // Data received from the port + // Data received from the port. RxData []byte `protobuf:"bytes,2,opt,name=rx_data,json=rxData,proto3,oneof"` } type MonitorResponse_AppliedSettings struct { // Settings applied to the port, may be returned after a port is opened (to // report the default settings) or after a new port_configuration is sent - // (to report the new settings applied) + // (to report the new settings applied). AppliedSettings *MonitorPortConfiguration `protobuf:"bytes,3,opt,name=applied_settings,json=appliedSettings,proto3,oneof"` } type MonitorResponse_Success struct { // A message with this field set to true is sent as soon as the port is - // succesfully opened + // succesfully opened. Success bool `protobuf:"varint,4,opt,name=success,proto3,oneof"` } @@ -466,15 +466,15 @@ type MonitorPortSettingDescriptor struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The setting identifier + // The setting identifier. SettingId string `protobuf:"bytes,1,opt,name=setting_id,json=settingId,proto3" json:"setting_id,omitempty"` - // A human-readable label of the setting (to be displayed on the GUI) + // A human-readable label of the setting (to be displayed on the GUI). Label string `protobuf:"bytes,2,opt,name=label,proto3" json:"label,omitempty"` - // The setting type (at the moment only "enum" is avaiable) + // The setting type (at the moment only "enum" is avaiable). Type string `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"` - // The values allowed on "enum" types + // The values allowed on "enum" types. EnumValues []string `protobuf:"bytes,4,rep,name=enum_values,json=enumValues,proto3" json:"enum_values,omitempty"` - // The selected or default value + // The selected or default value. Value string `protobuf:"bytes,5,opt,name=value,proto3" json:"value,omitempty"` } diff --git a/rpc/cc/arduino/cli/commands/v1/monitor.proto b/rpc/cc/arduino/cli/commands/v1/monitor.proto index a15cc490849..58acff0a78d 100644 --- a/rpc/cc/arduino/cli/commands/v1/monitor.proto +++ b/rpc/cc/arduino/cli/commands/v1/monitor.proto @@ -18,22 +18,22 @@ syntax = "proto3"; package cc.arduino.cli.commands.v1; -option go_package = "github.com/arduino/arduino-cli/rpc/cc/arduino/cli/commands/v1;commands"; - import "cc/arduino/cli/commands/v1/common.proto"; import "cc/arduino/cli/commands/v1/port.proto"; +option go_package = "github.com/arduino/arduino-cli/rpc/cc/arduino/cli/commands/v1;commands"; + message MonitorRequest { oneof message { - // Open request, it must be the first incoming message + // Open request, it must be the first incoming message. MonitorPortOpenRequest open_request = 1; - // Data to send to the port + // Data to send to the port. bytes tx_data = 2; - // Port configuration, contains settings of the port to be changed + // Port configuration, contains settings of the port to be changed. MonitorPortConfiguration updated_configuration = 3; // Close message, set to true to gracefully close a port (this ensure // that the gRPC streaming call is closed by the daemon AFTER the port - // has been successfully closed) + // has been successfully closed). bool close = 4; } } @@ -41,28 +41,28 @@ message MonitorRequest { message MonitorPortOpenRequest { // Arduino Core Service instance from the `Init` response. Instance instance = 1; - // Port to open, must be filled only on the first request + // Port to open, must be filled only on the first request. Port port = 2; // The board FQBN we are trying to connect to. This is optional, and it's // needed to disambiguate if more than one platform provides the pluggable // monitor for a given port protocol. string fqbn = 3; - // Port configuration, optional, contains settings of the port to be applied + // Port configuration, optional, contains settings of the port to be applied. MonitorPortConfiguration port_configuration = 4; } message MonitorResponse { oneof message { - // Eventual errors dealing with monitor port + // Eventual errors dealing with monitor port. string error = 1; - // Data received from the port + // Data received from the port. bytes rx_data = 2; // Settings applied to the port, may be returned after a port is opened (to // report the default settings) or after a new port_configuration is sent - // (to report the new settings applied) + // (to report the new settings applied). MonitorPortConfiguration applied_settings = 3; // A message with this field set to true is sent as soon as the port is - // succesfully opened + // succesfully opened. bool success = 4; } } @@ -85,14 +85,14 @@ message EnumerateMonitorPortSettingsResponse { } message MonitorPortSettingDescriptor { - // The setting identifier + // The setting identifier. string setting_id = 1; - // A human-readable label of the setting (to be displayed on the GUI) + // A human-readable label of the setting (to be displayed on the GUI). string label = 2; - // The setting type (at the moment only "enum" is avaiable) + // The setting type (at the moment only "enum" is avaiable). string type = 3; - // The values allowed on "enum" types + // The values allowed on "enum" types. repeated string enum_values = 4; - // The selected or default value + // The selected or default value. string value = 5; } diff --git a/rpc/cc/arduino/cli/commands/v1/port.pb.go b/rpc/cc/arduino/cli/commands/v1/port.pb.go index 4b9642c74ac..85a86a521a5 100644 --- a/rpc/cc/arduino/cli/commands/v1/port.pb.go +++ b/rpc/cc/arduino/cli/commands/v1/port.pb.go @@ -17,7 +17,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.34.2 -// protoc v5.26.1 +// protoc (unknown) // source: cc/arduino/cli/commands/v1/port.proto package commands @@ -36,7 +36,7 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// Port represents a board port that may be used to upload or to monitor a board +// Port represents a board port that may be used to upload or to monitor a board. type Port struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -44,15 +44,15 @@ type Port struct { // Address of the port (e.g., `/dev/ttyACM0`). Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` - // The port label to show on the GUI (e.g. "ttyACM0") + // The port label to show on the GUI (e.g. "ttyACM0"). Label string `protobuf:"bytes,2,opt,name=label,proto3" json:"label,omitempty"` // Protocol of the port (e.g., `serial`, `network`, ...). Protocol string `protobuf:"bytes,3,opt,name=protocol,proto3" json:"protocol,omitempty"` // A human friendly description of the protocol (e.g., "Serial Port (USB)"). ProtocolLabel string `protobuf:"bytes,4,opt,name=protocol_label,json=protocolLabel,proto3" json:"protocol_label,omitempty"` - // A set of properties of the port + // A set of properties of the port. Properties map[string]string `protobuf:"bytes,5,rep,name=properties,proto3" json:"properties,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - // The hardware ID (serial number) of the board attached to the port + // The hardware ID (serial number) of the board attached to the port. HardwareId string `protobuf:"bytes,6,opt,name=hardware_id,json=hardwareId,proto3" json:"hardware_id,omitempty"` } diff --git a/rpc/cc/arduino/cli/commands/v1/port.proto b/rpc/cc/arduino/cli/commands/v1/port.proto index ca103b7e1d1..ebdcd785fea 100644 --- a/rpc/cc/arduino/cli/commands/v1/port.proto +++ b/rpc/cc/arduino/cli/commands/v1/port.proto @@ -20,18 +20,18 @@ package cc.arduino.cli.commands.v1; option go_package = "github.com/arduino/arduino-cli/rpc/cc/arduino/cli/commands/v1;commands"; -// Port represents a board port that may be used to upload or to monitor a board +// Port represents a board port that may be used to upload or to monitor a board. message Port { // Address of the port (e.g., `/dev/ttyACM0`). string address = 1; - // The port label to show on the GUI (e.g. "ttyACM0") + // The port label to show on the GUI (e.g. "ttyACM0"). string label = 2; // Protocol of the port (e.g., `serial`, `network`, ...). string protocol = 3; // A human friendly description of the protocol (e.g., "Serial Port (USB)"). string protocol_label = 4; - // A set of properties of the port + // A set of properties of the port. map properties = 5; - // The hardware ID (serial number) of the board attached to the port + // The hardware ID (serial number) of the board attached to the port. string hardware_id = 6; } diff --git a/rpc/cc/arduino/cli/commands/v1/settings.pb.go b/rpc/cc/arduino/cli/commands/v1/settings.pb.go index 073ce65dcad..be6d037a7b9 100644 --- a/rpc/cc/arduino/cli/commands/v1/settings.pb.go +++ b/rpc/cc/arduino/cli/commands/v1/settings.pb.go @@ -17,7 +17,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.34.2 -// protoc v5.26.1 +// protoc (unknown) // source: cc/arduino/cli/commands/v1/settings.proto package commands @@ -43,17 +43,28 @@ type Configuration struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Directories *Configuration_Directories `protobuf:"bytes,1,opt,name=directories,proto3" json:"directories,omitempty"` - Network *Configuration_Network `protobuf:"bytes,2,opt,name=network,proto3" json:"network,omitempty"` - Sketch *Configuration_Sketch `protobuf:"bytes,3,opt,name=sketch,proto3" json:"sketch,omitempty"` - BuildCache *Configuration_BuildCache `protobuf:"bytes,4,opt,name=build_cache,json=buildCache,proto3" json:"build_cache,omitempty"` + // The directories configuration. + Directories *Configuration_Directories `protobuf:"bytes,1,opt,name=directories,proto3" json:"directories,omitempty"` + // The network configuration. + Network *Configuration_Network `protobuf:"bytes,2,opt,name=network,proto3" json:"network,omitempty"` + // The sketch configuration. + Sketch *Configuration_Sketch `protobuf:"bytes,3,opt,name=sketch,proto3" json:"sketch,omitempty"` + // The build cache configuration. + BuildCache *Configuration_BuildCache `protobuf:"bytes,4,opt,name=build_cache,json=buildCache,proto3" json:"build_cache,omitempty"` + // The board manager configuration. BoardManager *Configuration_BoardManager `protobuf:"bytes,5,opt,name=board_manager,json=boardManager,proto3" json:"board_manager,omitempty"` - Daemon *Configuration_Daemon `protobuf:"bytes,6,opt,name=daemon,proto3" json:"daemon,omitempty"` - Output *Configuration_Output `protobuf:"bytes,7,opt,name=output,proto3" json:"output,omitempty"` - Logging *Configuration_Logging `protobuf:"bytes,8,opt,name=logging,proto3" json:"logging,omitempty"` - Library *Configuration_Library `protobuf:"bytes,9,opt,name=library,proto3" json:"library,omitempty"` - Updater *Configuration_Updater `protobuf:"bytes,10,opt,name=updater,proto3" json:"updater,omitempty"` - Locale *string `protobuf:"bytes,100,opt,name=locale,proto3,oneof" json:"locale,omitempty"` + // The daemon configuration. + Daemon *Configuration_Daemon `protobuf:"bytes,6,opt,name=daemon,proto3" json:"daemon,omitempty"` + // The console output configuration. + Output *Configuration_Output `protobuf:"bytes,7,opt,name=output,proto3" json:"output,omitempty"` + // The logging configuration. + Logging *Configuration_Logging `protobuf:"bytes,8,opt,name=logging,proto3" json:"logging,omitempty"` + // The library configuration. + Library *Configuration_Library `protobuf:"bytes,9,opt,name=library,proto3" json:"library,omitempty"` + // The updater configuration. + Updater *Configuration_Updater `protobuf:"bytes,10,opt,name=updater,proto3" json:"updater,omitempty"` + // The language locale to use. + Locale *string `protobuf:"bytes,100,opt,name=locale,proto3,oneof" json:"locale,omitempty"` } func (x *Configuration) Reset() { @@ -208,7 +219,7 @@ type ConfigurationGetResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The current configuration + // The current configuration. Configuration *Configuration `protobuf:"bytes,1,opt,name=configuration,proto3" json:"configuration,omitempty"` } @@ -256,7 +267,7 @@ type ConfigurationSaveRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The format of the encoded settings, allowed values are "json" and "yaml" + // The format of the encoded settings, allowed values are "json" and "yaml". SettingsFormat string `protobuf:"bytes,1,opt,name=settings_format,json=settingsFormat,proto3" json:"settings_format,omitempty"` } @@ -304,7 +315,7 @@ type ConfigurationSaveResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The encoded settings + // The encoded settings. EncodedSettings string `protobuf:"bytes,1,opt,name=encoded_settings,json=encodedSettings,proto3" json:"encoded_settings,omitempty"` } @@ -352,9 +363,9 @@ type ConfigurationOpenRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The encoded settings + // The encoded settings. EncodedSettings string `protobuf:"bytes,1,opt,name=encoded_settings,json=encodedSettings,proto3" json:"encoded_settings,omitempty"` - // The format of the encoded settings, allowed values are "json" and "yaml" + // The format of the encoded settings, allowed values are "json" and "yaml". SettingsFormat string `protobuf:"bytes,2,opt,name=settings_format,json=settingsFormat,proto3" json:"settings_format,omitempty"` } @@ -410,7 +421,7 @@ type ConfigurationOpenResponse struct { unknownFields protoimpl.UnknownFields // Warnings that occurred while opening the configuration (e.g. unknown keys, - // or invalid values) + // or invalid values). Warnings []string `protobuf:"bytes,1,rep,name=warnings,proto3" json:"warnings,omitempty"` } @@ -458,10 +469,10 @@ type SettingsGetValueRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The key to get + // The key to get. Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` // The format of the encoded_value (default is "json", allowed values are - // "json" and "yaml) + // "json" and "yaml). ValueFormat string `protobuf:"bytes,2,opt,name=value_format,json=valueFormat,proto3" json:"value_format,omitempty"` } @@ -516,7 +527,7 @@ type SettingsGetValueResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The value of the key (encoded) + // The value of the key (encoded). EncodedValue string `protobuf:"bytes,1,opt,name=encoded_value,json=encodedValue,proto3" json:"encoded_value,omitempty"` } @@ -564,13 +575,13 @@ type SettingsSetValueRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The key to change + // The key to change. Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` // The new value (encoded), no objects, only scalar or array of scalars are // allowed. EncodedValue string `protobuf:"bytes,2,opt,name=encoded_value,json=encodedValue,proto3" json:"encoded_value,omitempty"` // The format of the encoded_value (default is "json", allowed values are - // "json", "yaml" and "cli") + // "json", "yaml" and "cli"). ValueFormat string `protobuf:"bytes,3,opt,name=value_format,json=valueFormat,proto3" json:"value_format,omitempty"` } @@ -708,7 +719,7 @@ type SettingsEnumerateResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The list of key/value pairs + // The list of key/value pairs. Entries []*SettingsEnumerateResponse_Entry `protobuf:"bytes,1,rep,name=entries,proto3" json:"entries,omitempty"` } @@ -756,13 +767,13 @@ type Configuration_Directories struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Data directory + // Data directory. Data string `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` - // User directory + // User directory. User string `protobuf:"bytes,2,opt,name=user,proto3" json:"user,omitempty"` - // Downloads directory + // Downloads directory. Downloads string `protobuf:"bytes,3,opt,name=downloads,proto3" json:"downloads,omitempty"` - // The directory where the built-in resources are installed + // The directory where the built-in resources are installed. Builtin *Configuration_Directories_Builtin `protobuf:"bytes,4,opt,name=builtin,proto3,oneof" json:"builtin,omitempty"` } @@ -831,9 +842,9 @@ type Configuration_Network struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Extra user-agent information to be appended in network requests + // Extra user-agent information to be appended in network requests. ExtraUserAgent *string `protobuf:"bytes,1,opt,name=extra_user_agent,json=extraUserAgent,proto3,oneof" json:"extra_user_agent,omitempty"` - // The proxy to use for network requests + // The proxy to use for network requests. Proxy *string `protobuf:"bytes,2,opt,name=proxy,proto3,oneof" json:"proxy,omitempty"` } @@ -888,7 +899,7 @@ type Configuration_Sketch struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Set to true to always export binaries to the sketch directory + // Set to true to always export binaries to the sketch directory. AlwaysExportBinaries bool `protobuf:"varint,1,opt,name=always_export_binaries,json=alwaysExportBinaries,proto3" json:"always_export_binaries,omitempty"` } @@ -936,9 +947,9 @@ type Configuration_BuildCache struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The minimum number of compilations before the cache is purged + // The minimum number of compilations before the cache is purged. CompilationsBeforePurge uint64 `protobuf:"varint,1,opt,name=compilations_before_purge,json=compilationsBeforePurge,proto3" json:"compilations_before_purge,omitempty"` - // Time to live of the cache in seconds + // Time to live of the cache in seconds. TtlSecs uint64 `protobuf:"varint,2,opt,name=ttl_secs,json=ttlSecs,proto3" json:"ttl_secs,omitempty"` } @@ -993,7 +1004,7 @@ type Configuration_BoardManager struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Additional URLs to be used for the board manager + // Additional URLs to be used for the board manager. AdditionalUrls []string `protobuf:"bytes,1,rep,name=additional_urls,json=additionalUrls,proto3" json:"additional_urls,omitempty"` } @@ -1041,7 +1052,7 @@ type Configuration_Daemon struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The TCP port of the daemon + // The TCP port of the daemon. Port string `protobuf:"bytes,1,opt,name=port,proto3" json:"port,omitempty"` } @@ -1089,7 +1100,7 @@ type Configuration_Output struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Set to true to disable coloring of the output + // Set to true to disable coloring of the output. NoColor bool `protobuf:"varint,1,opt,name=no_color,json=noColor,proto3" json:"no_color,omitempty"` } @@ -1137,11 +1148,11 @@ type Configuration_Logging struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The logging level + // The logging level. Level string `protobuf:"bytes,1,opt,name=level,proto3" json:"level,omitempty"` - // The logging format + // The logging format. Format string `protobuf:"bytes,2,opt,name=format,proto3" json:"format,omitempty"` - // The logging file + // The logging file. File *string `protobuf:"bytes,3,opt,name=file,proto3,oneof" json:"file,omitempty"` } @@ -1204,7 +1215,7 @@ type Configuration_Library struct { unknownFields protoimpl.UnknownFields // Set to true to enable library installation from zip archives or git - // repositories + // repositories. EnableUnsafeInstall bool `protobuf:"varint,1,opt,name=enable_unsafe_install,json=enableUnsafeInstall,proto3" json:"enable_unsafe_install,omitempty"` } @@ -1252,7 +1263,7 @@ type Configuration_Updater struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Set to true to enable notifications for updates + // Set to true to enable notifications for updates. EnableNotification bool `protobuf:"varint,1,opt,name=enable_notification,json=enableNotification,proto3" json:"enable_notification,omitempty"` } @@ -1300,7 +1311,7 @@ type Configuration_Directories_Builtin struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The directory where the built-in libraries are installed + // The directory where the built-in libraries are installed. Libraries *string `protobuf:"bytes,1,opt,name=libraries,proto3,oneof" json:"libraries,omitempty"` } @@ -1348,9 +1359,9 @@ type SettingsEnumerateResponse_Entry struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The key + // The key. Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` - // The key type + // The key type. Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"` } diff --git a/rpc/cc/arduino/cli/commands/v1/settings.proto b/rpc/cc/arduino/cli/commands/v1/settings.proto index 852830d0084..7d93464ce53 100644 --- a/rpc/cc/arduino/cli/commands/v1/settings.proto +++ b/rpc/cc/arduino/cli/commands/v1/settings.proto @@ -25,129 +25,140 @@ option go_package = "github.com/arduino/arduino-cli/rpc/cc/arduino/cli/commands/ message Configuration { message Directories { message Builtin { - // The directory where the built-in libraries are installed + // The directory where the built-in libraries are installed. optional string libraries = 1; } - // Data directory + // Data directory. string data = 1; - // User directory + // User directory. string user = 2; - // Downloads directory + // Downloads directory. string downloads = 3; - // The directory where the built-in resources are installed + // The directory where the built-in resources are installed. optional Builtin builtin = 4; - }; + } message Network { - // Extra user-agent information to be appended in network requests + // Extra user-agent information to be appended in network requests. optional string extra_user_agent = 1; - // The proxy to use for network requests + // The proxy to use for network requests. optional string proxy = 2; - }; + } message Sketch { - // Set to true to always export binaries to the sketch directory + // Set to true to always export binaries to the sketch directory. bool always_export_binaries = 1; } message BuildCache { - // The minimum number of compilations before the cache is purged + // The minimum number of compilations before the cache is purged. uint64 compilations_before_purge = 1; - // Time to live of the cache in seconds + // Time to live of the cache in seconds. uint64 ttl_secs = 2; } message BoardManager { - // Additional URLs to be used for the board manager + // Additional URLs to be used for the board manager. repeated string additional_urls = 1; } message Daemon { - // The TCP port of the daemon + // The TCP port of the daemon. string port = 1; } message Output { - // Set to true to disable coloring of the output + // Set to true to disable coloring of the output. bool no_color = 1; } message Logging { - // The logging level + // The logging level. string level = 1; - // The logging format + // The logging format. string format = 2; - // The logging file + // The logging file. optional string file = 3; } message Library { // Set to true to enable library installation from zip archives or git - // repositories + // repositories. bool enable_unsafe_install = 1; } message Updater { - // Set to true to enable notifications for updates + // Set to true to enable notifications for updates. bool enable_notification = 1; } + // The directories configuration. Directories directories = 1; + // The network configuration. Network network = 2; + // The sketch configuration. Sketch sketch = 3; + // The build cache configuration. BuildCache build_cache = 4; + // The board manager configuration. BoardManager board_manager = 5; + // The daemon configuration. Daemon daemon = 6; + // The console output configuration. Output output = 7; + // The logging configuration. Logging logging = 8; + // The library configuration. Library library = 9; + // The updater configuration. Updater updater = 10; + // The language locale to use. optional string locale = 100; } message ConfigurationGetRequest {} message ConfigurationGetResponse { - // The current configuration + // The current configuration. Configuration configuration = 1; } message ConfigurationSaveRequest { - // The format of the encoded settings, allowed values are "json" and "yaml" + // The format of the encoded settings, allowed values are "json" and "yaml". string settings_format = 1; } message ConfigurationSaveResponse { - // The encoded settings + // The encoded settings. string encoded_settings = 1; } message ConfigurationOpenRequest { - // The encoded settings + // The encoded settings. string encoded_settings = 1; - // The format of the encoded settings, allowed values are "json" and "yaml" + // The format of the encoded settings, allowed values are "json" and "yaml". string settings_format = 2; } message ConfigurationOpenResponse { // Warnings that occurred while opening the configuration (e.g. unknown keys, - // or invalid values) + // or invalid values). repeated string warnings = 1; } message SettingsGetValueRequest { - // The key to get + // The key to get. string key = 1; // The format of the encoded_value (default is "json", allowed values are - // "json" and "yaml) + // "json" and "yaml). string value_format = 2; } message SettingsGetValueResponse { - // The value of the key (encoded) + // The value of the key (encoded). string encoded_value = 1; } message SettingsSetValueRequest { - // The key to change + // The key to change. string key = 1; // The new value (encoded), no objects, only scalar or array of scalars are // allowed. string encoded_value = 2; // The format of the encoded_value (default is "json", allowed values are - // "json", "yaml" and "cli") + // "json", "yaml" and "cli"). string value_format = 3; } @@ -157,12 +168,12 @@ message SettingsEnumerateRequest {} message SettingsEnumerateResponse { message Entry { - // The key + // The key. string key = 1; - // The key type + // The key type. string type = 2; } - // The list of key/value pairs + // The list of key/value pairs. repeated Entry entries = 1; } diff --git a/rpc/cc/arduino/cli/commands/v1/upload.pb.go b/rpc/cc/arduino/cli/commands/v1/upload.pb.go index 6491669c2c6..6647c641a54 100644 --- a/rpc/cc/arduino/cli/commands/v1/upload.pb.go +++ b/rpc/cc/arduino/cli/commands/v1/upload.pb.go @@ -17,7 +17,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.34.2 -// protoc v5.26.1 +// protoc (unknown) // source: cc/arduino/cli/commands/v1/upload.proto package commands @@ -285,7 +285,7 @@ type UploadResponse_ErrStream struct { } type UploadResponse_Result struct { - // The upload result + // The upload result. Result *UploadResult `protobuf:"bytes,3,opt,name=result,proto3,oneof"` } @@ -838,8 +838,10 @@ type ListProgrammersAvailableForUploadRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + // Arduino Core Service instance from the `Init` response. Instance *Instance `protobuf:"bytes,1,opt,name=instance,proto3" json:"instance,omitempty"` - Fqbn string `protobuf:"bytes,2,opt,name=fqbn,proto3" json:"fqbn,omitempty"` + // Fully qualified board name of the target board (e.g., `arduino:avr:uno`). + Fqbn string `protobuf:"bytes,2,opt,name=fqbn,proto3" json:"fqbn,omitempty"` } func (x *ListProgrammersAvailableForUploadRequest) Reset() { @@ -893,6 +895,7 @@ type ListProgrammersAvailableForUploadResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + // List of programmers supported by the board. Programmers []*Programmer `protobuf:"bytes,1,rep,name=programmers,proto3" json:"programmers,omitempty"` } @@ -940,8 +943,10 @@ type SupportedUserFieldsRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + // Arduino Core Service instance from the `Init` response. Instance *Instance `protobuf:"bytes,1,opt,name=instance,proto3" json:"instance,omitempty"` - Fqbn string `protobuf:"bytes,2,opt,name=fqbn,proto3" json:"fqbn,omitempty"` + // Fully qualified board name of the target board (e.g., `arduino:avr:uno`). + Fqbn string `protobuf:"bytes,2,opt,name=fqbn,proto3" json:"fqbn,omitempty"` // Protocol that will be used to upload, this information is // necessary to pick the right upload tool for the board specified // with the FQBN. @@ -1006,14 +1011,14 @@ type UserField struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Id of the tool that supports this field + // Id of the tool that supports this field. ToolId string `protobuf:"bytes,1,opt,name=tool_id,json=toolId,proto3" json:"tool_id,omitempty"` - // Name used internally to store and retrieve this field + // Name used internally to store and retrieve this field. Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - // Label is the text shown to the user when they need to input this field + // Label is the text shown to the user when they need to input this field. Label string `protobuf:"bytes,3,opt,name=label,proto3" json:"label,omitempty"` // True if the value of the field must not be shown when typing, for example - // when the user inputs a network password + // when the user inputs a network password. Secret bool `protobuf:"varint,4,opt,name=secret,proto3" json:"secret,omitempty"` } diff --git a/rpc/cc/arduino/cli/commands/v1/upload.proto b/rpc/cc/arduino/cli/commands/v1/upload.proto index edeb3907249..b23da77f4cf 100644 --- a/rpc/cc/arduino/cli/commands/v1/upload.proto +++ b/rpc/cc/arduino/cli/commands/v1/upload.proto @@ -18,11 +18,11 @@ syntax = "proto3"; package cc.arduino.cli.commands.v1; -option go_package = "github.com/arduino/arduino-cli/rpc/cc/arduino/cli/commands/v1;commands"; - import "cc/arduino/cli/commands/v1/common.proto"; import "cc/arduino/cli/commands/v1/port.proto"; +option go_package = "github.com/arduino/arduino-cli/rpc/cc/arduino/cli/commands/v1;commands"; + message UploadRequest { // Arduino Core Service instance from the `Init` response. Instance instance = 1; @@ -70,7 +70,7 @@ message UploadResponse { bytes out_stream = 1; // The error output of the upload process. bytes err_stream = 2; - // The upload result + // The upload result. UploadResult result = 3; } } @@ -168,16 +168,21 @@ message BurnBootloaderResponse { } message ListProgrammersAvailableForUploadRequest { + // Arduino Core Service instance from the `Init` response. Instance instance = 1; + // Fully qualified board name of the target board (e.g., `arduino:avr:uno`). string fqbn = 2; } message ListProgrammersAvailableForUploadResponse { + // List of programmers supported by the board. repeated Programmer programmers = 1; } message SupportedUserFieldsRequest { + // Arduino Core Service instance from the `Init` response. Instance instance = 1; + // Fully qualified board name of the target board (e.g., `arduino:avr:uno`). string fqbn = 2; // Protocol that will be used to upload, this information is // necessary to pick the right upload tool for the board specified @@ -186,14 +191,14 @@ message SupportedUserFieldsRequest { } message UserField { - // Id of the tool that supports this field + // Id of the tool that supports this field. string tool_id = 1; - // Name used internally to store and retrieve this field + // Name used internally to store and retrieve this field. string name = 2; - // Label is the text shown to the user when they need to input this field + // Label is the text shown to the user when they need to input this field. string label = 3; // True if the value of the field must not be shown when typing, for example - // when the user inputs a network password + // when the user inputs a network password. bool secret = 4; } diff --git a/rpc/google/rpc/status.proto b/rpc/google/rpc/status.proto deleted file mode 100644 index e3411d03a64..00000000000 --- a/rpc/google/rpc/status.proto +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.rpc; - -import "google/protobuf/any.proto"; - -option cc_enable_arenas = true; -option go_package = "google.golang.org/genproto/googleapis/rpc/status;status"; -option java_multiple_files = true; -option java_outer_classname = "StatusProto"; -option java_package = "com.google.rpc"; -option objc_class_prefix = "RPC"; - -// The `Status` type defines a logical error model that is suitable for -// different programming environments, including REST APIs and RPC APIs. It is -// used by [gRPC](https://github.com/grpc). Each `Status` message contains -// three pieces of data: error code, error message, and error details. -// -// You can find out more about this error model and how to work with it in the -// [API Design Guide](https://cloud.google.com/apis/design/errors). -message Status { - // The status code, which should be an enum value of - // [google.rpc.Code][google.rpc.Code]. - int32 code = 1; - - // A developer-facing error message, which should be in English. Any - // user-facing error message should be localized and sent in the - // [google.rpc.Status.details][google.rpc.Status.details] field, or localized - // by the client. - string message = 2; - - // A list of messages that carry the error details. There is a common set of - // message types for APIs to use. - repeated google.protobuf.Any details = 3; -}