Unverified Commit 39d9b69e authored by Silvano Cerza's avatar Silvano Cerza Committed by GitHub

Add gRPC interface function to request user fields supported by a...

Add gRPC interface function to request user fields supported by a board/protocol combination (#1503)
parent 385d93ac
......@@ -353,6 +353,12 @@ func (s *ArduinoCoreServerImpl) UploadUsingProgrammer(req *rpc.UploadUsingProgra
return stream.Send(resp)
}
// SupportedUserFields FIXMEDOC
func (s *ArduinoCoreServerImpl) SupportedUserFields(ctx context.Context, req *rpc.SupportedUserFieldsRequest) (*rpc.SupportedUserFieldsResponse, error) {
res, err := upload.SupportedUserFields(ctx, req)
return res, convertErrorToRPCStatus(err)
}
// BurnBootloader FIXMEDOC
func (s *ArduinoCoreServerImpl) BurnBootloader(req *rpc.BurnBootloaderRequest, stream rpc.ArduinoCoreService_BurnBootloaderServer) error {
resp, err := upload.BurnBootloader(
......
......@@ -16,7 +16,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.26.0
// protoc v3.16.0
// protoc v3.17.3
// source: cc/arduino/cli/commands/v1/board.proto
package commands
......
......@@ -121,6 +121,11 @@ service ArduinoCoreService {
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);
// List programmers available for a board.
rpc ListProgrammersAvailableForUpload(
ListProgrammersAvailableForUploadRequest)
......
......@@ -16,7 +16,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.26.0
// protoc v3.16.0
// protoc v3.17.3
// source: cc/arduino/cli/commands/v1/common.proto
package commands
......
......@@ -16,7 +16,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.26.0
// protoc v3.16.0
// protoc v3.17.3
// source: cc/arduino/cli/commands/v1/compile.proto
package commands
......
......@@ -16,7 +16,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.26.0
// protoc v3.16.0
// protoc v3.17.3
// source: cc/arduino/cli/commands/v1/core.proto
package commands
......
......@@ -16,7 +16,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.26.0
// protoc v3.16.0
// protoc v3.17.3
// source: cc/arduino/cli/commands/v1/lib.proto
package commands
......
......@@ -16,7 +16,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.26.0
// protoc v3.16.0
// protoc v3.17.3
// source: cc/arduino/cli/commands/v1/monitor.proto
package commands
......@@ -299,7 +299,7 @@ type EnumerateMonitorPortSettingsRequest struct {
// Arduino Core Service instance from the `Init` response.
Instance *Instance `protobuf:"bytes,1,opt,name=instance,proto3" json:"instance,omitempty"`
// The port protoco to enumerate settings.
// The port protocol to enumerate settings.
PortProtocol string `protobuf:"bytes,2,opt,name=port_protocol,json=portProtocol,proto3" json:"port_protocol,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
......
......@@ -16,7 +16,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.26.0
// protoc v3.16.0
// protoc v3.17.3
// source: cc/arduino/cli/commands/v1/port.proto
package commands
......
......@@ -16,7 +16,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.26.0
// protoc v3.16.0
// protoc v3.17.3
// source: cc/arduino/cli/commands/v1/upload.proto
package commands
......
......@@ -16,7 +16,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.26.0
// protoc v3.16.0
// protoc v3.17.3
// source: cc/arduino/cli/debug/v1/debug.proto
package debug
......
......@@ -11,7 +11,6 @@ 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
// DebugServiceClient is the client API for DebugService service.
......@@ -32,7 +31,7 @@ func NewDebugServiceClient(cc grpc.ClientConnInterface) DebugServiceClient {
}
func (c *debugServiceClient) Debug(ctx context.Context, opts ...grpc.CallOption) (DebugService_DebugClient, error) {
stream, err := c.cc.NewStream(ctx, &DebugService_ServiceDesc.Streams[0], "/cc.arduino.cli.debug.v1.DebugService/Debug", opts...)
stream, err := c.cc.NewStream(ctx, &_DebugService_serviceDesc.Streams[0], "/cc.arduino.cli.debug.v1.DebugService/Debug", opts...)
if err != nil {
return nil, err
}
......@@ -100,8 +99,8 @@ type UnsafeDebugServiceServer interface {
mustEmbedUnimplementedDebugServiceServer()
}
func RegisterDebugServiceServer(s grpc.ServiceRegistrar, srv DebugServiceServer) {
s.RegisterService(&DebugService_ServiceDesc, srv)
func RegisterDebugServiceServer(s *grpc.Server, srv DebugServiceServer) {
s.RegisterService(&_DebugService_serviceDesc, srv)
}
func _DebugService_Debug_Handler(srv interface{}, stream grpc.ServerStream) error {
......@@ -148,10 +147,7 @@ func _DebugService_GetDebugConfig_Handler(srv interface{}, ctx context.Context,
return interceptor(ctx, in, info, handler)
}
// DebugService_ServiceDesc is the grpc.ServiceDesc for DebugService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var DebugService_ServiceDesc = grpc.ServiceDesc{
var _DebugService_serviceDesc = grpc.ServiceDesc{
ServiceName: "cc.arduino.cli.debug.v1.DebugService",
HandlerType: (*DebugServiceServer)(nil),
Methods: []grpc.MethodDesc{
......
......@@ -16,7 +16,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.26.0
// protoc v3.16.0
// protoc v3.17.3
// source: cc/arduino/cli/monitor/v1/monitor.proto
package monitor
......
......@@ -11,7 +11,6 @@ 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
// MonitorServiceClient is the client API for MonitorService service.
......@@ -32,7 +31,7 @@ func NewMonitorServiceClient(cc grpc.ClientConnInterface) MonitorServiceClient {
}
func (c *monitorServiceClient) StreamingOpen(ctx context.Context, opts ...grpc.CallOption) (MonitorService_StreamingOpenClient, error) {
stream, err := c.cc.NewStream(ctx, &MonitorService_ServiceDesc.Streams[0], "/cc.arduino.cli.monitor.v1.MonitorService/StreamingOpen", opts...)
stream, err := c.cc.NewStream(ctx, &_MonitorService_serviceDesc.Streams[0], "/cc.arduino.cli.monitor.v1.MonitorService/StreamingOpen", opts...)
if err != nil {
return nil, err
}
......@@ -88,8 +87,8 @@ type UnsafeMonitorServiceServer interface {
mustEmbedUnimplementedMonitorServiceServer()
}
func RegisterMonitorServiceServer(s grpc.ServiceRegistrar, srv MonitorServiceServer) {
s.RegisterService(&MonitorService_ServiceDesc, srv)
func RegisterMonitorServiceServer(s *grpc.Server, srv MonitorServiceServer) {
s.RegisterService(&_MonitorService_serviceDesc, srv)
}
func _MonitorService_StreamingOpen_Handler(srv interface{}, stream grpc.ServerStream) error {
......@@ -118,10 +117,7 @@ func (x *monitorServiceStreamingOpenServer) Recv() (*StreamingOpenRequest, error
return m, nil
}
// MonitorService_ServiceDesc is the grpc.ServiceDesc for MonitorService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var MonitorService_ServiceDesc = grpc.ServiceDesc{
var _MonitorService_serviceDesc = grpc.ServiceDesc{
ServiceName: "cc.arduino.cli.monitor.v1.MonitorService",
HandlerType: (*MonitorServiceServer)(nil),
Methods: []grpc.MethodDesc{},
......
......@@ -16,7 +16,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.26.0
// protoc v3.16.0
// protoc v3.17.3
// source: cc/arduino/cli/settings/v1/settings.proto
package settings
......
......@@ -11,7 +11,6 @@ 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
// SettingsServiceClient is the client API for SettingsService service.
......@@ -128,8 +127,8 @@ type UnsafeSettingsServiceServer interface {
mustEmbedUnimplementedSettingsServiceServer()
}
func RegisterSettingsServiceServer(s grpc.ServiceRegistrar, srv SettingsServiceServer) {
s.RegisterService(&SettingsService_ServiceDesc, srv)
func RegisterSettingsServiceServer(s *grpc.Server, srv SettingsServiceServer) {
s.RegisterService(&_SettingsService_serviceDesc, srv)
}
func _SettingsService_GetAll_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
......@@ -222,10 +221,7 @@ func _SettingsService_Write_Handler(srv interface{}, ctx context.Context, dec fu
return interceptor(ctx, in, info, handler)
}
// SettingsService_ServiceDesc is the grpc.ServiceDesc for SettingsService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var SettingsService_ServiceDesc = grpc.ServiceDesc{
var _SettingsService_serviceDesc = grpc.ServiceDesc{
ServiceName: "cc.arduino.cli.settings.v1.SettingsService",
HandlerType: (*SettingsServiceServer)(nil),
Methods: []grpc.MethodDesc{
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment