From 5ad5bdbb4d1193a5c3864cd9bf5997674c92e3ab Mon Sep 17 00:00:00 2001 From: Silvano Cerza Date: Fri, 7 May 2021 11:03:00 +0200 Subject: [PATCH 01/22] [breaking] Split rpc Init and remove Rescan function --- rpc/buf.yaml | 2 + rpc/cc/arduino/cli/commands/v1/commands.pb.go | 3500 +++++++++++++---- rpc/cc/arduino/cli/commands/v1/commands.proto | 59 +- rpc/google/rpc/status.proto | 49 + 4 files changed, 2869 insertions(+), 741 deletions(-) create mode 100644 rpc/google/rpc/status.proto diff --git a/rpc/buf.yaml b/rpc/buf.yaml index 8f15e954ca1..4b09bf3fd42 100644 --- a/rpc/buf.yaml +++ b/rpc/buf.yaml @@ -1,5 +1,7 @@ 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/commands.pb.go b/rpc/cc/arduino/cli/commands/v1/commands.pb.go index 2bbfe2ac536..cf5578dd63e 100644 --- a/rpc/cc/arduino/cli/commands/v1/commands.pb.go +++ b/rpc/cc/arduino/cli/commands/v1/commands.pb.go @@ -22,6 +22,11 @@ package commands import ( + context "context" + status "google.golang.org/genproto/googleapis/rpc/status" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status1 "google.golang.org/grpc/status" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -35,18 +40,14 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -type InitRequest struct { +type CreateRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - - // Start a Arduino Core Service instance that will provide only Library - // Manager functionality. - LibraryManagerOnly bool `protobuf:"varint,2,opt,name=library_manager_only,json=libraryManagerOnly,proto3" json:"library_manager_only,omitempty"` } -func (x *InitRequest) Reset() { - *x = InitRequest{} +func (x *CreateRequest) Reset() { + *x = CreateRequest{} if protoimpl.UnsafeEnabled { mi := &file_cc_arduino_cli_commands_v1_commands_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -54,13 +55,13 @@ func (x *InitRequest) Reset() { } } -func (x *InitRequest) String() string { +func (x *CreateRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*InitRequest) ProtoMessage() {} +func (*CreateRequest) ProtoMessage() {} -func (x *InitRequest) ProtoReflect() protoreflect.Message { +func (x *CreateRequest) ProtoReflect() protoreflect.Message { mi := &file_cc_arduino_cli_commands_v1_commands_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -72,39 +73,22 @@ func (x *InitRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use InitRequest.ProtoReflect.Descriptor instead. -func (*InitRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use CreateRequest.ProtoReflect.Descriptor instead. +func (*CreateRequest) Descriptor() ([]byte, []int) { return file_cc_arduino_cli_commands_v1_commands_proto_rawDescGZIP(), []int{0} } -func (x *InitRequest) GetLibraryManagerOnly() bool { - if x != nil { - return x.LibraryManagerOnly - } - return false -} - -type InitResponse struct { +type CreateResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // An Arduino Core Service instance. + // An Arduino Core instance. Instance *Instance `protobuf:"bytes,1,opt,name=instance,proto3" json:"instance,omitempty"` - // Error messages related to any problems encountered while parsing the - // platforms index files. - PlatformsIndexErrors []string `protobuf:"bytes,2,rep,name=platforms_index_errors,json=platformsIndexErrors,proto3" json:"platforms_index_errors,omitempty"` - // Error message if a problem was encountered while parsing the libraries - // index file. - LibrariesIndexError string `protobuf:"bytes,3,opt,name=libraries_index_error,json=librariesIndexError,proto3" json:"libraries_index_error,omitempty"` - // Progress of the downloads of platforms and libraries index files. - DownloadProgress *DownloadProgress `protobuf:"bytes,4,opt,name=download_progress,json=downloadProgress,proto3" json:"download_progress,omitempty"` - // Describes the current stage of the initialization. - TaskProgress *TaskProgress `protobuf:"bytes,5,opt,name=task_progress,json=taskProgress,proto3" json:"task_progress,omitempty"` } -func (x *InitResponse) Reset() { - *x = InitResponse{} +func (x *CreateResponse) Reset() { + *x = CreateResponse{} if protoimpl.UnsafeEnabled { mi := &file_cc_arduino_cli_commands_v1_commands_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -112,13 +96,13 @@ func (x *InitResponse) Reset() { } } -func (x *InitResponse) String() string { +func (x *CreateResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*InitResponse) ProtoMessage() {} +func (*CreateResponse) ProtoMessage() {} -func (x *InitResponse) ProtoReflect() protoreflect.Message { +func (x *CreateResponse) ProtoReflect() protoreflect.Message { mi := &file_cc_arduino_cli_commands_v1_commands_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -130,57 +114,29 @@ func (x *InitResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use InitResponse.ProtoReflect.Descriptor instead. -func (*InitResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use CreateResponse.ProtoReflect.Descriptor instead. +func (*CreateResponse) Descriptor() ([]byte, []int) { return file_cc_arduino_cli_commands_v1_commands_proto_rawDescGZIP(), []int{1} } -func (x *InitResponse) GetInstance() *Instance { +func (x *CreateResponse) GetInstance() *Instance { if x != nil { return x.Instance } return nil } -func (x *InitResponse) GetPlatformsIndexErrors() []string { - if x != nil { - return x.PlatformsIndexErrors - } - return nil -} - -func (x *InitResponse) GetLibrariesIndexError() string { - if x != nil { - return x.LibrariesIndexError - } - return "" -} - -func (x *InitResponse) GetDownloadProgress() *DownloadProgress { - if x != nil { - return x.DownloadProgress - } - return nil -} - -func (x *InitResponse) GetTaskProgress() *TaskProgress { - if x != nil { - return x.TaskProgress - } - return nil -} - -type DestroyRequest struct { +type InitRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The Arduino Core Service instance to destroy. + // An Arduino Core instance. Instance *Instance `protobuf:"bytes,1,opt,name=instance,proto3" json:"instance,omitempty"` } -func (x *DestroyRequest) Reset() { - *x = DestroyRequest{} +func (x *InitRequest) Reset() { + *x = InitRequest{} if protoimpl.UnsafeEnabled { mi := &file_cc_arduino_cli_commands_v1_commands_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -188,13 +144,13 @@ func (x *DestroyRequest) Reset() { } } -func (x *DestroyRequest) String() string { +func (x *InitRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*DestroyRequest) ProtoMessage() {} +func (*InitRequest) ProtoMessage() {} -func (x *DestroyRequest) ProtoReflect() protoreflect.Message { +func (x *InitRequest) ProtoReflect() protoreflect.Message { mi := &file_cc_arduino_cli_commands_v1_commands_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -206,26 +162,31 @@ func (x *DestroyRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use DestroyRequest.ProtoReflect.Descriptor instead. -func (*DestroyRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use InitRequest.ProtoReflect.Descriptor instead. +func (*InitRequest) Descriptor() ([]byte, []int) { return file_cc_arduino_cli_commands_v1_commands_proto_rawDescGZIP(), []int{2} } -func (x *DestroyRequest) GetInstance() *Instance { +func (x *InitRequest) GetInstance() *Instance { if x != nil { return x.Instance } return nil } -type DestroyResponse struct { +type InitResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Types that are assignable to Message: + // *InitResponse_InitProgress + // *InitResponse_Error + Message isInitResponse_Message `protobuf_oneof:"message"` } -func (x *DestroyResponse) Reset() { - *x = DestroyResponse{} +func (x *InitResponse) Reset() { + *x = InitResponse{} if protoimpl.UnsafeEnabled { mi := &file_cc_arduino_cli_commands_v1_commands_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -233,13 +194,13 @@ func (x *DestroyResponse) Reset() { } } -func (x *DestroyResponse) String() string { +func (x *InitResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*DestroyResponse) ProtoMessage() {} +func (*InitResponse) ProtoMessage() {} -func (x *DestroyResponse) ProtoReflect() protoreflect.Message { +func (x *InitResponse) ProtoReflect() protoreflect.Message { mi := &file_cc_arduino_cli_commands_v1_commands_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -251,22 +212,59 @@ func (x *DestroyResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use DestroyResponse.ProtoReflect.Descriptor instead. -func (*DestroyResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use InitResponse.ProtoReflect.Descriptor instead. +func (*InitResponse) Descriptor() ([]byte, []int) { return file_cc_arduino_cli_commands_v1_commands_proto_rawDescGZIP(), []int{3} } -type RescanRequest struct { +func (m *InitResponse) GetMessage() isInitResponse_Message { + if m != nil { + return m.Message + } + return nil +} + +func (x *InitResponse) GetInitProgress() *InitResponse_Progress { + if x, ok := x.GetMessage().(*InitResponse_InitProgress); ok { + return x.InitProgress + } + return nil +} + +func (x *InitResponse) GetError() *status.Status { + if x, ok := x.GetMessage().(*InitResponse_Error); ok { + return x.Error + } + return nil +} + +type isInitResponse_Message interface { + isInitResponse_Message() +} + +type InitResponse_InitProgress struct { + InitProgress *InitResponse_Progress `protobuf:"bytes,1,opt,name=init_progress,json=initProgress,proto3,oneof"` +} + +type InitResponse_Error struct { + Error *status.Status `protobuf:"bytes,2,opt,name=error,proto3,oneof"` +} + +func (*InitResponse_InitProgress) isInitResponse_Message() {} + +func (*InitResponse_Error) isInitResponse_Message() {} + +type DestroyRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Arduino Core Service instance from the Init response. + // The Arduino Core Service instance to destroy. Instance *Instance `protobuf:"bytes,1,opt,name=instance,proto3" json:"instance,omitempty"` } -func (x *RescanRequest) Reset() { - *x = RescanRequest{} +func (x *DestroyRequest) Reset() { + *x = DestroyRequest{} if protoimpl.UnsafeEnabled { mi := &file_cc_arduino_cli_commands_v1_commands_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -274,13 +272,13 @@ func (x *RescanRequest) Reset() { } } -func (x *RescanRequest) String() string { +func (x *DestroyRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*RescanRequest) ProtoMessage() {} +func (*DestroyRequest) ProtoMessage() {} -func (x *RescanRequest) ProtoReflect() protoreflect.Message { +func (x *DestroyRequest) ProtoReflect() protoreflect.Message { mi := &file_cc_arduino_cli_commands_v1_commands_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -292,33 +290,26 @@ func (x *RescanRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use RescanRequest.ProtoReflect.Descriptor instead. -func (*RescanRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use DestroyRequest.ProtoReflect.Descriptor instead. +func (*DestroyRequest) Descriptor() ([]byte, []int) { return file_cc_arduino_cli_commands_v1_commands_proto_rawDescGZIP(), []int{4} } -func (x *RescanRequest) GetInstance() *Instance { +func (x *DestroyRequest) GetInstance() *Instance { if x != nil { return x.Instance } return nil } -type RescanResponse struct { +type DestroyResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - - // Error messages related to any problems encountered while parsing the - // platforms index file. - PlatformsIndexErrors []string `protobuf:"bytes,1,rep,name=platforms_index_errors,json=platformsIndexErrors,proto3" json:"platforms_index_errors,omitempty"` - // Error message if a problem was encountered while parsing the libraries - // index file. - LibrariesIndexError string `protobuf:"bytes,2,opt,name=libraries_index_error,json=librariesIndexError,proto3" json:"libraries_index_error,omitempty"` } -func (x *RescanResponse) Reset() { - *x = RescanResponse{} +func (x *DestroyResponse) Reset() { + *x = DestroyResponse{} if protoimpl.UnsafeEnabled { mi := &file_cc_arduino_cli_commands_v1_commands_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -326,13 +317,13 @@ func (x *RescanResponse) Reset() { } } -func (x *RescanResponse) String() string { +func (x *DestroyResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*RescanResponse) ProtoMessage() {} +func (*DestroyResponse) ProtoMessage() {} -func (x *RescanResponse) ProtoReflect() protoreflect.Message { +func (x *DestroyResponse) ProtoReflect() protoreflect.Message { mi := &file_cc_arduino_cli_commands_v1_commands_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -344,25 +335,11 @@ func (x *RescanResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use RescanResponse.ProtoReflect.Descriptor instead. -func (*RescanResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use DestroyResponse.ProtoReflect.Descriptor instead. +func (*DestroyResponse) Descriptor() ([]byte, []int) { return file_cc_arduino_cli_commands_v1_commands_proto_rawDescGZIP(), []int{5} } -func (x *RescanResponse) GetPlatformsIndexErrors() []string { - if x != nil { - return x.PlatformsIndexErrors - } - return nil -} - -func (x *RescanResponse) GetLibrariesIndexError() string { - if x != nil { - return x.LibrariesIndexError - } - return "" -} - type UpdateIndexRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1203,6 +1180,63 @@ func (*ArchiveSketchResponse) Descriptor() ([]byte, []int) { return file_cc_arduino_cli_commands_v1_commands_proto_rawDescGZIP(), []int{21} } +type InitResponse_Progress struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Progress of the downloads of platforms and libraries index files. + DownloadProgress *DownloadProgress `protobuf:"bytes,1,opt,name=download_progress,json=downloadProgress,proto3" json:"download_progress,omitempty"` + // Describes the current stage of the initialization. + TaskProgress *TaskProgress `protobuf:"bytes,2,opt,name=task_progress,json=taskProgress,proto3" json:"task_progress,omitempty"` +} + +func (x *InitResponse_Progress) Reset() { + *x = InitResponse_Progress{} + if protoimpl.UnsafeEnabled { + mi := &file_cc_arduino_cli_commands_v1_commands_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *InitResponse_Progress) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InitResponse_Progress) ProtoMessage() {} + +func (x *InitResponse_Progress) ProtoReflect() protoreflect.Message { + mi := &file_cc_arduino_cli_commands_v1_commands_proto_msgTypes[22] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use InitResponse_Progress.ProtoReflect.Descriptor instead. +func (*InitResponse_Progress) Descriptor() ([]byte, []int) { + return file_cc_arduino_cli_commands_v1_commands_proto_rawDescGZIP(), []int{3, 0} +} + +func (x *InitResponse_Progress) GetDownloadProgress() *DownloadProgress { + if x != nil { + return x.DownloadProgress + } + return nil +} + +func (x *InitResponse_Progress) GetTaskProgress() *TaskProgress { + if x != nil { + return x.TaskProgress + } + return nil +} + var File_cc_arduino_cli_commands_v1_commands_proto protoreflect.FileDescriptor var file_cc_arduino_cli_commands_v1_commands_proto_rawDesc = []byte{ @@ -1210,469 +1244,464 @@ 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, 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, 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, 0x27, 0x63, 0x63, 0x2f, 0x61, 0x72, + 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, 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, 0x22, 0x3f, 0x0a, 0x0b, 0x49, 0x6e, 0x69, 0x74, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x30, 0x0a, 0x14, 0x6c, 0x69, 0x62, 0x72, 0x61, - 0x72, 0x79, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x5f, 0x6f, 0x6e, 0x6c, 0x79, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x12, 0x6c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x4d, 0x61, - 0x6e, 0x61, 0x67, 0x65, 0x72, 0x4f, 0x6e, 0x6c, 0x79, 0x22, 0xe4, 0x02, 0x0a, 0x0c, 0x49, 0x6e, - 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x08, 0x69, 0x6e, - 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 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, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, - 0x63, 0x65, 0x52, 0x08, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x34, 0x0a, 0x16, - 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x5f, - 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x14, 0x70, 0x6c, - 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x45, 0x72, 0x72, 0x6f, - 0x72, 0x73, 0x12, 0x32, 0x0a, 0x15, 0x6c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x69, 0x65, 0x73, 0x5f, - 0x69, 0x6e, 0x64, 0x65, 0x78, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x13, 0x6c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x69, 0x65, 0x73, 0x49, 0x6e, 0x64, 0x65, - 0x78, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x59, 0x0a, 0x11, 0x64, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, - 0x61, 0x64, 0x5f, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x2c, 0x2e, 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, 0x2e, 0x44, - 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x52, - 0x10, 0x64, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, - 0x73, 0x12, 0x4d, 0x0a, 0x0d, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x65, - 0x73, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 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, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x65, - 0x73, 0x73, 0x52, 0x0c, 0x74, 0x61, 0x73, 0x6b, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, + 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, 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, 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, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 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, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x08, 0x69, 0x6e, + 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x22, 0x4f, 0x0a, 0x0b, 0x49, 0x6e, 0x69, 0x74, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x40, 0x0a, 0x08, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 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, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x08, 0x69, + 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x22, 0xd6, 0x02, 0x0a, 0x0c, 0x49, 0x6e, 0x69, 0x74, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x58, 0x0a, 0x0d, 0x69, 0x6e, 0x69, 0x74, + 0x5f, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x31, 0x2e, 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, 0x2e, 0x49, 0x6e, 0x69, + 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x65, + 0x73, 0x73, 0x48, 0x00, 0x52, 0x0c, 0x69, 0x6e, 0x69, 0x74, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x65, + 0x73, 0x73, 0x12, 0x2a, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x48, 0x00, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x1a, 0xb4, + 0x01, 0x0a, 0x08, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x12, 0x59, 0x0a, 0x11, 0x64, + 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 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, 0x2e, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x50, 0x72, 0x6f, 0x67, + 0x72, 0x65, 0x73, 0x73, 0x52, 0x10, 0x64, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x50, 0x72, + 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x12, 0x4d, 0x0a, 0x0d, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x70, + 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, + 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, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x50, + 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x52, 0x0c, 0x74, 0x61, 0x73, 0x6b, 0x50, 0x72, 0x6f, + 0x67, 0x72, 0x65, 0x73, 0x73, 0x42, 0x09, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x52, 0x0a, 0x0e, 0x44, 0x65, 0x73, 0x74, 0x72, 0x6f, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x40, 0x0a, 0x08, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 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, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x08, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x22, 0x11, 0x0a, 0x0f, 0x44, 0x65, 0x73, 0x74, 0x72, 0x6f, 0x79, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x51, 0x0a, 0x0d, 0x52, 0x65, 0x73, 0x63, 0x61, - 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x40, 0x0a, 0x08, 0x69, 0x6e, 0x73, 0x74, - 0x61, 0x6e, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 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, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, - 0x52, 0x08, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x22, 0x7a, 0x0a, 0x0e, 0x52, 0x65, - 0x73, 0x63, 0x61, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, 0x16, - 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x5f, - 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x14, 0x70, 0x6c, - 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x45, 0x72, 0x72, 0x6f, - 0x72, 0x73, 0x12, 0x32, 0x0a, 0x15, 0x6c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x69, 0x65, 0x73, 0x5f, - 0x69, 0x6e, 0x64, 0x65, 0x78, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x13, 0x6c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x69, 0x65, 0x73, 0x49, 0x6e, 0x64, 0x65, - 0x78, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x56, 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x40, 0x0a, 0x08, - 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, - 0x2e, 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, 0x2e, 0x49, 0x6e, 0x73, 0x74, - 0x61, 0x6e, 0x63, 0x65, 0x52, 0x08, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x22, 0x70, - 0x0a, 0x13, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x59, 0x0a, 0x11, 0x64, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, - 0x64, 0x5f, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x2c, 0x2e, 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, 0x2e, 0x44, 0x6f, - 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x52, 0x10, - 0x64, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, - 0x22, 0x5f, 0x0a, 0x1b, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, - 0x69, 0x65, 0x73, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x40, 0x0a, 0x08, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x24, 0x2e, 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, 0x2e, 0x49, - 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x08, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, - 0x65, 0x22, 0x79, 0x0a, 0x1c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x62, 0x72, 0x61, - 0x72, 0x69, 0x65, 0x73, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x59, 0x0a, 0x11, 0x64, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x70, 0x72, - 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 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, 0x2e, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, - 0x61, 0x64, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x52, 0x10, 0x64, 0x6f, 0x77, 0x6e, - 0x6c, 0x6f, 0x61, 0x64, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x22, 0x63, 0x0a, 0x1f, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x72, 0x65, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, - 0x69, 0x65, 0x73, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x56, 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x40, 0x0a, + 0x08, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x24, 0x2e, 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, 0x2e, 0x49, 0x6e, 0x73, + 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x08, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x22, + 0x70, 0x0a, 0x13, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x59, 0x0a, 0x11, 0x64, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, + 0x61, 0x64, 0x5f, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x2c, 0x2e, 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, 0x2e, 0x44, + 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x52, + 0x10, 0x64, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, + 0x73, 0x22, 0x5f, 0x0a, 0x1b, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x62, 0x72, 0x61, + 0x72, 0x69, 0x65, 0x73, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x40, 0x0a, 0x08, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x24, 0x2e, 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, 0x2e, + 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x08, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, + 0x63, 0x65, 0x22, 0x79, 0x0a, 0x1c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x62, 0x72, + 0x61, 0x72, 0x69, 0x65, 0x73, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x59, 0x0a, 0x11, 0x64, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x70, + 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, + 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, 0x2e, 0x44, 0x6f, 0x77, 0x6e, 0x6c, + 0x6f, 0x61, 0x64, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x52, 0x10, 0x64, 0x6f, 0x77, + 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x22, 0x63, 0x0a, + 0x1f, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x72, 0x65, 0x4c, 0x69, 0x62, 0x72, 0x61, + 0x72, 0x69, 0x65, 0x73, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x40, 0x0a, 0x08, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x24, 0x2e, 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, 0x2e, + 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x08, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, + 0x63, 0x65, 0x22, 0x7d, 0x0a, 0x20, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x72, 0x65, + 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x69, 0x65, 0x73, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x59, 0x0a, 0x11, 0x64, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, + 0x61, 0x64, 0x5f, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x2c, 0x2e, 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, 0x2e, 0x44, + 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x52, + 0x10, 0x64, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, + 0x73, 0x22, 0x53, 0x0a, 0x0f, 0x4f, 0x75, 0x74, 0x64, 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x40, 0x0a, 0x08, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 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, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x08, 0x69, 0x6e, + 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x22, 0xc4, 0x01, 0x0a, 0x10, 0x4f, 0x75, 0x74, 0x64, 0x61, + 0x74, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5b, 0x0a, 0x12, 0x6f, + 0x75, 0x74, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x6c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x69, 0x65, + 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 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, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x65, 0x64, 0x4c, 0x69, + 0x62, 0x72, 0x61, 0x72, 0x79, 0x52, 0x11, 0x6f, 0x75, 0x74, 0x64, 0x61, 0x74, 0x65, 0x64, 0x4c, + 0x69, 0x62, 0x72, 0x61, 0x72, 0x69, 0x65, 0x73, 0x12, 0x53, 0x0a, 0x12, 0x6f, 0x75, 0x74, 0x64, + 0x61, 0x74, 0x65, 0x64, 0x5f, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x18, 0x02, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 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, 0x2e, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x52, 0x11, 0x6f, 0x75, 0x74, 0x64, + 0x61, 0x74, 0x65, 0x64, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x22, 0x7e, 0x0a, + 0x0e, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x40, 0x0a, 0x08, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 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, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x08, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, - 0x65, 0x22, 0x7d, 0x0a, 0x20, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x72, 0x65, 0x4c, - 0x69, 0x62, 0x72, 0x61, 0x72, 0x69, 0x65, 0x73, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x59, 0x0a, 0x11, 0x64, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, - 0x64, 0x5f, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x2c, 0x2e, 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, 0x2e, 0x44, 0x6f, - 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x52, 0x10, - 0x64, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, - 0x22, 0x53, 0x0a, 0x0f, 0x4f, 0x75, 0x74, 0x64, 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x40, 0x0a, 0x08, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 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, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x08, 0x69, 0x6e, 0x73, - 0x74, 0x61, 0x6e, 0x63, 0x65, 0x22, 0xc4, 0x01, 0x0a, 0x10, 0x4f, 0x75, 0x74, 0x64, 0x61, 0x74, - 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5b, 0x0a, 0x12, 0x6f, 0x75, - 0x74, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x6c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x69, 0x65, 0x73, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 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, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x65, 0x64, 0x4c, 0x69, 0x62, - 0x72, 0x61, 0x72, 0x79, 0x52, 0x11, 0x6f, 0x75, 0x74, 0x64, 0x61, 0x74, 0x65, 0x64, 0x4c, 0x69, - 0x62, 0x72, 0x61, 0x72, 0x69, 0x65, 0x73, 0x12, 0x53, 0x0a, 0x12, 0x6f, 0x75, 0x74, 0x64, 0x61, - 0x74, 0x65, 0x64, 0x5f, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x18, 0x02, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x63, 0x63, 0x2e, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, + 0x65, 0x12, 0x2a, 0x0a, 0x11, 0x73, 0x6b, 0x69, 0x70, 0x5f, 0x70, 0x6f, 0x73, 0x74, 0x5f, 0x69, + 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x73, 0x6b, + 0x69, 0x70, 0x50, 0x6f, 0x73, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x22, 0xaa, 0x01, + 0x0a, 0x0f, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x48, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 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, - 0x2e, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x52, 0x11, 0x6f, 0x75, 0x74, 0x64, 0x61, - 0x74, 0x65, 0x64, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x22, 0x7e, 0x0a, 0x0e, - 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x40, + 0x2e, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, + 0x73, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x12, 0x4d, 0x0a, 0x0d, 0x74, + 0x61, 0x73, 0x6b, 0x5f, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x28, 0x2e, 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, 0x2e, + 0x54, 0x61, 0x73, 0x6b, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x52, 0x0c, 0x74, 0x61, + 0x73, 0x6b, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x22, 0x10, 0x0a, 0x0e, 0x56, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x2b, 0x0a, 0x0f, + 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x76, 0x0a, 0x11, 0x4c, 0x6f, 0x61, + 0x64, 0x53, 0x6b, 0x65, 0x74, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x40, 0x0a, 0x08, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 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, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x08, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, - 0x12, 0x2a, 0x0a, 0x11, 0x73, 0x6b, 0x69, 0x70, 0x5f, 0x70, 0x6f, 0x73, 0x74, 0x5f, 0x69, 0x6e, - 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x73, 0x6b, 0x69, - 0x70, 0x50, 0x6f, 0x73, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x22, 0xaa, 0x01, 0x0a, - 0x0f, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x48, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x63, 0x63, 0x2e, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2e, + 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x6b, 0x65, 0x74, 0x63, 0x68, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x6b, 0x65, 0x74, 0x63, 0x68, 0x50, 0x61, 0x74, + 0x68, 0x22, 0xdb, 0x01, 0x0a, 0x12, 0x4c, 0x6f, 0x61, 0x64, 0x53, 0x6b, 0x65, 0x74, 0x63, 0x68, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x69, 0x6e, + 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x69, + 0x6e, 0x46, 0x69, 0x6c, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6c, 0x6f, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x74, 0x68, 0x12, 0x2c, 0x0a, 0x12, 0x6f, 0x74, + 0x68, 0x65, 0x72, 0x5f, 0x73, 0x6b, 0x65, 0x74, 0x63, 0x68, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x73, + 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x10, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x53, 0x6b, 0x65, + 0x74, 0x63, 0x68, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x12, 0x29, 0x0a, 0x10, 0x61, 0x64, 0x64, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, + 0x28, 0x09, 0x52, 0x0f, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x46, 0x69, + 0x6c, 0x65, 0x73, 0x12, 0x2a, 0x0a, 0x11, 0x72, 0x6f, 0x6f, 0x74, 0x5f, 0x66, 0x6f, 0x6c, 0x64, + 0x65, 0x72, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0f, + 0x72, 0x6f, 0x6f, 0x74, 0x46, 0x6f, 0x6c, 0x64, 0x65, 0x72, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x22, + 0x86, 0x01, 0x0a, 0x14, 0x41, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x53, 0x6b, 0x65, 0x74, 0x63, + 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x6b, 0x65, 0x74, + 0x63, 0x68, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, + 0x6b, 0x65, 0x74, 0x63, 0x68, 0x50, 0x61, 0x74, 0x68, 0x12, 0x21, 0x0a, 0x0c, 0x61, 0x72, 0x63, + 0x68, 0x69, 0x76, 0x65, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0b, 0x61, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x50, 0x61, 0x74, 0x68, 0x12, 0x2a, 0x0a, 0x11, + 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x64, 0x69, + 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, + 0x42, 0x75, 0x69, 0x6c, 0x64, 0x44, 0x69, 0x72, 0x22, 0x17, 0x0a, 0x15, 0x41, 0x72, 0x63, 0x68, + 0x69, 0x76, 0x65, 0x53, 0x6b, 0x65, 0x74, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x32, 0xac, 0x23, 0x0a, 0x12, 0x41, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x43, 0x6f, 0x72, + 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x61, 0x0a, 0x06, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x12, 0x29, 0x2e, 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, 0x2e, - 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, - 0x52, 0x08, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x12, 0x4d, 0x0a, 0x0d, 0x74, 0x61, - 0x73, 0x6b, 0x5f, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x28, 0x2e, 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, 0x2e, 0x54, - 0x61, 0x73, 0x6b, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x52, 0x0c, 0x74, 0x61, 0x73, - 0x6b, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x22, 0x10, 0x0a, 0x0e, 0x56, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x2b, 0x0a, 0x0f, 0x56, - 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, - 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x76, 0x0a, 0x11, 0x4c, 0x6f, 0x61, 0x64, - 0x53, 0x6b, 0x65, 0x74, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x40, 0x0a, - 0x08, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x24, 0x2e, 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, 0x2e, 0x49, 0x6e, 0x73, - 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x08, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, - 0x1f, 0x0a, 0x0b, 0x73, 0x6b, 0x65, 0x74, 0x63, 0x68, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x6b, 0x65, 0x74, 0x63, 0x68, 0x50, 0x61, 0x74, 0x68, - 0x22, 0xdb, 0x01, 0x0a, 0x12, 0x4c, 0x6f, 0x61, 0x64, 0x53, 0x6b, 0x65, 0x74, 0x63, 0x68, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x69, 0x6e, 0x5f, - 0x66, 0x69, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x69, 0x6e, - 0x46, 0x69, 0x6c, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6c, 0x6f, 0x63, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x74, 0x68, 0x12, 0x2c, 0x0a, 0x12, 0x6f, 0x74, 0x68, - 0x65, 0x72, 0x5f, 0x73, 0x6b, 0x65, 0x74, 0x63, 0x68, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x18, - 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x10, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x53, 0x6b, 0x65, 0x74, - 0x63, 0x68, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x12, 0x29, 0x0a, 0x10, 0x61, 0x64, 0x64, 0x69, 0x74, - 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, - 0x09, 0x52, 0x0f, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x46, 0x69, 0x6c, - 0x65, 0x73, 0x12, 0x2a, 0x0a, 0x11, 0x72, 0x6f, 0x6f, 0x74, 0x5f, 0x66, 0x6f, 0x6c, 0x64, 0x65, - 0x72, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0f, 0x72, - 0x6f, 0x6f, 0x74, 0x46, 0x6f, 0x6c, 0x64, 0x65, 0x72, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x22, 0x86, - 0x01, 0x0a, 0x14, 0x41, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x53, 0x6b, 0x65, 0x74, 0x63, 0x68, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x6b, 0x65, 0x74, 0x63, - 0x68, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x6b, - 0x65, 0x74, 0x63, 0x68, 0x50, 0x61, 0x74, 0x68, 0x12, 0x21, 0x0a, 0x0c, 0x61, 0x72, 0x63, 0x68, - 0x69, 0x76, 0x65, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, - 0x61, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x50, 0x61, 0x74, 0x68, 0x12, 0x2a, 0x0a, 0x11, 0x69, - 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x64, 0x69, 0x72, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x42, - 0x75, 0x69, 0x6c, 0x64, 0x44, 0x69, 0x72, 0x22, 0x17, 0x0a, 0x15, 0x41, 0x72, 0x63, 0x68, 0x69, - 0x76, 0x65, 0x53, 0x6b, 0x65, 0x74, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x32, 0xac, 0x23, 0x0a, 0x12, 0x41, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x43, 0x6f, 0x72, 0x65, - 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x5d, 0x0a, 0x04, 0x49, 0x6e, 0x69, 0x74, 0x12, - 0x27, 0x2e, 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, 0x2e, 0x49, 0x6e, 0x69, - 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 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, 0x2e, 0x49, 0x6e, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x00, 0x30, 0x01, 0x12, 0x64, 0x0a, 0x07, 0x44, 0x65, 0x73, 0x74, 0x72, 0x6f, - 0x79, 0x12, 0x2a, 0x2e, 0x63, 0x63, 0x2e, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2e, 0x63, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, + 0x63, 0x63, 0x2e, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6c, 0x69, 0x2e, 0x63, + 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x5d, 0x0a, 0x04, 0x49, + 0x6e, 0x69, 0x74, 0x12, 0x27, 0x2e, 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, + 0x2e, 0x49, 0x6e, 0x69, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 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, 0x2e, 0x49, 0x6e, 0x69, 0x74, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, 0x01, 0x12, 0x64, 0x0a, 0x07, 0x44, 0x65, + 0x73, 0x74, 0x72, 0x6f, 0x79, 0x12, 0x2a, 0x2e, 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, 0x2e, 0x44, 0x65, 0x73, 0x74, 0x72, 0x6f, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x2b, 0x2e, 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, 0x2e, 0x44, - 0x65, 0x73, 0x74, 0x72, 0x6f, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, + 0x65, 0x73, 0x74, 0x72, 0x6f, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, + 0x12, 0x72, 0x0a, 0x0b, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, + 0x2e, 0x2e, 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, 0x2e, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x2f, 0x2e, 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, 0x2e, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x00, 0x30, 0x01, 0x12, 0x8d, 0x01, 0x0a, 0x14, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4c, + 0x69, 0x62, 0x72, 0x61, 0x72, 0x69, 0x65, 0x73, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x37, 0x2e, 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, 0x2e, 0x44, 0x65, 0x73, 0x74, 0x72, - 0x6f, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x61, 0x0a, 0x06, - 0x52, 0x65, 0x73, 0x63, 0x61, 0x6e, 0x12, 0x29, 0x2e, 0x63, 0x63, 0x2e, 0x61, 0x72, 0x64, 0x75, + 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x69, 0x65, 0x73, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x38, 0x2e, 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, 0x2e, 0x52, 0x65, 0x73, 0x63, 0x61, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x2a, 0x2e, 0x63, 0x63, 0x2e, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2e, 0x63, - 0x6c, 0x69, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x52, - 0x65, 0x73, 0x63, 0x61, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, - 0x72, 0x0a, 0x0b, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x2e, - 0x2e, 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, 0x2e, 0x55, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, + 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, + 0x69, 0x65, 0x73, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x00, 0x30, 0x01, 0x12, 0x99, 0x01, 0x0a, 0x18, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, + 0x6f, 0x72, 0x65, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x69, 0x65, 0x73, 0x49, 0x6e, 0x64, 0x65, + 0x78, 0x12, 0x3b, 0x2e, 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, 0x2e, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x72, 0x65, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x69, + 0x65, 0x73, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3c, 0x2e, 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, 0x2e, 0x55, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x00, 0x30, 0x01, 0x12, 0x8d, 0x01, 0x0a, 0x14, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4c, 0x69, - 0x62, 0x72, 0x61, 0x72, 0x69, 0x65, 0x73, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x37, 0x2e, 0x63, + 0x74, 0x65, 0x43, 0x6f, 0x72, 0x65, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x69, 0x65, 0x73, 0x49, + 0x6e, 0x64, 0x65, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, 0x01, + 0x12, 0x67, 0x0a, 0x08, 0x4f, 0x75, 0x74, 0x64, 0x61, 0x74, 0x65, 0x64, 0x12, 0x2b, 0x2e, 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, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x69, 0x65, 0x73, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x38, 0x2e, 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, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x69, - 0x65, 0x73, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x00, 0x30, 0x01, 0x12, 0x99, 0x01, 0x0a, 0x18, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6f, - 0x72, 0x65, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x69, 0x65, 0x73, 0x49, 0x6e, 0x64, 0x65, 0x78, - 0x12, 0x3b, 0x2e, 0x63, 0x63, 0x2e, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6c, + 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x75, 0x74, 0x64, 0x61, 0x74, + 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x63, 0x63, 0x2e, 0x61, + 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6c, 0x69, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, + 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x75, 0x74, 0x64, 0x61, 0x74, 0x65, 0x64, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x66, 0x0a, 0x07, 0x55, 0x70, 0x67, + 0x72, 0x61, 0x64, 0x65, 0x12, 0x2a, 0x2e, 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, 0x2e, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x2b, 0x2e, 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, 0x2e, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x72, 0x65, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x69, 0x65, - 0x73, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3c, 0x2e, - 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, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x43, 0x6f, 0x72, 0x65, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x69, 0x65, 0x73, 0x49, 0x6e, - 0x64, 0x65, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, 0x01, 0x12, - 0x67, 0x0a, 0x08, 0x4f, 0x75, 0x74, 0x64, 0x61, 0x74, 0x65, 0x64, 0x12, 0x2b, 0x2e, 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, 0x2e, 0x4f, 0x75, 0x74, 0x64, 0x61, 0x74, 0x65, - 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x63, 0x63, 0x2e, 0x61, 0x72, + 0x67, 0x72, 0x61, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, + 0x01, 0x12, 0x64, 0x0a, 0x07, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x2a, 0x2e, 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, 0x2e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, + 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 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, 0x2e, 0x4f, 0x75, 0x74, 0x64, 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x66, 0x0a, 0x07, 0x55, 0x70, 0x67, 0x72, - 0x61, 0x64, 0x65, 0x12, 0x2a, 0x2e, 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, - 0x2e, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x2b, 0x2e, 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, 0x2e, 0x55, 0x70, 0x67, - 0x72, 0x61, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, 0x01, - 0x12, 0x64, 0x0a, 0x07, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x2a, 0x2e, 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, 0x2e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 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, 0x2e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x6d, 0x0a, 0x0a, 0x4c, 0x6f, 0x61, 0x64, 0x53, 0x6b, - 0x65, 0x74, 0x63, 0x68, 0x12, 0x2d, 0x2e, 0x63, 0x63, 0x2e, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, + 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x6d, 0x0a, 0x0a, 0x4c, 0x6f, 0x61, 0x64, 0x53, + 0x6b, 0x65, 0x74, 0x63, 0x68, 0x12, 0x2d, 0x2e, 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, 0x2e, 0x4c, 0x6f, 0x61, 0x64, 0x53, 0x6b, 0x65, 0x74, 0x63, 0x68, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 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, 0x2e, 0x4c, 0x6f, 0x61, 0x64, 0x53, 0x6b, 0x65, 0x74, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 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, - 0x2e, 0x4c, 0x6f, 0x61, 0x64, 0x53, 0x6b, 0x65, 0x74, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x76, 0x0a, 0x0d, 0x41, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, - 0x53, 0x6b, 0x65, 0x74, 0x63, 0x68, 0x12, 0x30, 0x2e, 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, 0x2e, 0x41, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x53, 0x6b, 0x65, 0x74, 0x63, - 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 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, 0x2e, 0x41, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x53, 0x6b, 0x65, - 0x74, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x71, 0x0a, - 0x0c, 0x42, 0x6f, 0x61, 0x72, 0x64, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x2f, 0x2e, + 0x31, 0x2e, 0x4c, 0x6f, 0x61, 0x64, 0x53, 0x6b, 0x65, 0x74, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x76, 0x0a, 0x0d, 0x41, 0x72, 0x63, 0x68, 0x69, 0x76, + 0x65, 0x53, 0x6b, 0x65, 0x74, 0x63, 0x68, 0x12, 0x30, 0x2e, 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, 0x2e, 0x41, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x53, 0x6b, 0x65, 0x74, + 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 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, 0x2e, 0x41, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x53, 0x6b, + 0x65, 0x74, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x71, + 0x0a, 0x0c, 0x42, 0x6f, 0x61, 0x72, 0x64, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x2f, + 0x2e, 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, 0x2e, 0x42, 0x6f, 0x61, 0x72, + 0x64, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x30, 0x2e, 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, 0x2e, 0x42, 0x6f, 0x61, + 0x72, 0x64, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x70, 0x0a, 0x0b, 0x42, 0x6f, 0x61, 0x72, 0x64, 0x41, 0x74, 0x74, 0x61, 0x63, 0x68, + 0x12, 0x2e, 0x2e, 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, 0x2e, 0x42, 0x6f, + 0x61, 0x72, 0x64, 0x41, 0x74, 0x74, 0x61, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x2f, 0x2e, 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, 0x2e, 0x42, 0x6f, + 0x61, 0x72, 0x64, 0x41, 0x74, 0x74, 0x61, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x30, 0x01, 0x12, 0x68, 0x0a, 0x09, 0x42, 0x6f, 0x61, 0x72, 0x64, 0x4c, 0x69, 0x73, 0x74, + 0x12, 0x2c, 0x2e, 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, 0x2e, 0x42, 0x6f, + 0x61, 0x72, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, + 0x2e, 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, 0x2e, 0x42, 0x6f, 0x61, 0x72, + 0x64, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x71, 0x0a, + 0x0c, 0x42, 0x6f, 0x61, 0x72, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x12, 0x2f, 0x2e, 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, 0x2e, 0x42, 0x6f, 0x61, 0x72, 0x64, - 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, + 0x4c, 0x69, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 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, 0x2e, 0x42, 0x6f, 0x61, 0x72, - 0x64, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x70, 0x0a, 0x0b, 0x42, 0x6f, 0x61, 0x72, 0x64, 0x41, 0x74, 0x74, 0x61, 0x63, 0x68, 0x12, + 0x64, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x6e, 0x0a, 0x0b, 0x42, 0x6f, 0x61, 0x72, 0x64, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x12, 0x2e, 0x2e, 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, 0x2e, 0x42, 0x6f, 0x61, - 0x72, 0x64, 0x41, 0x74, 0x74, 0x61, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x72, 0x64, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 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, 0x2e, 0x42, 0x6f, 0x61, - 0x72, 0x64, 0x41, 0x74, 0x74, 0x61, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x30, 0x01, 0x12, 0x68, 0x0a, 0x09, 0x42, 0x6f, 0x61, 0x72, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x12, - 0x2c, 0x2e, 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, 0x2e, 0x42, 0x6f, 0x61, - 0x72, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, - 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, 0x2e, 0x42, 0x6f, 0x61, 0x72, 0x64, - 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x71, 0x0a, 0x0c, - 0x42, 0x6f, 0x61, 0x72, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x12, 0x2f, 0x2e, 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, 0x2e, 0x42, 0x6f, 0x61, 0x72, 0x64, 0x4c, - 0x69, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, - 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, 0x2e, 0x42, 0x6f, 0x61, 0x72, 0x64, - 0x4c, 0x69, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x6e, 0x0a, 0x0b, 0x42, 0x6f, 0x61, 0x72, 0x64, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x12, 0x2e, + 0x72, 0x64, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x7b, 0x0a, 0x0e, 0x42, 0x6f, 0x61, 0x72, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x61, 0x74, + 0x63, 0x68, 0x12, 0x31, 0x2e, 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, 0x2e, + 0x42, 0x6f, 0x61, 0x72, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, 0x2e, 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, 0x2e, 0x42, 0x6f, 0x61, 0x72, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x61, 0x74, 0x63, + 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x01, 0x30, 0x01, 0x12, 0x64, 0x0a, + 0x07, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x12, 0x2a, 0x2e, 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, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 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, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x30, 0x01, 0x12, 0x7c, 0x0a, 0x0f, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x49, + 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x12, 0x32, 0x2e, 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, 0x2e, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x49, 0x6e, 0x73, 0x74, + 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x33, 0x2e, 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, 0x2e, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, + 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, + 0x01, 0x12, 0x7f, 0x0a, 0x10, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x44, 0x6f, 0x77, + 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x33, 0x2e, 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, 0x2e, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x44, 0x6f, 0x77, 0x6e, 0x6c, + 0x6f, 0x61, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x34, 0x2e, 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, 0x2e, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, + 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x30, 0x01, 0x12, 0x82, 0x01, 0x0a, 0x11, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x55, + 0x6e, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x12, 0x34, 0x2e, 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, 0x2e, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x55, 0x6e, + 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x35, 0x2e, 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, 0x2e, 0x42, 0x6f, 0x61, 0x72, - 0x64, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, + 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6c, 0x61, 0x74, + 0x66, 0x6f, 0x72, 0x6d, 0x55, 0x6e, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, 0x12, 0x7c, 0x0a, 0x0f, 0x50, 0x6c, 0x61, 0x74, 0x66, + 0x6f, 0x72, 0x6d, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x12, 0x32, 0x2e, 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, 0x2e, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, + 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x33, 0x2e, 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, 0x2e, 0x42, 0x6f, 0x61, 0x72, - 0x64, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x7b, 0x0a, 0x0e, 0x42, 0x6f, 0x61, 0x72, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x61, 0x74, 0x63, - 0x68, 0x12, 0x31, 0x2e, 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, 0x2e, 0x42, - 0x6f, 0x61, 0x72, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, 0x2e, 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, 0x2e, 0x42, 0x6f, 0x61, 0x72, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x61, 0x74, 0x63, 0x68, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x01, 0x30, 0x01, 0x12, 0x64, 0x0a, 0x07, - 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x12, 0x2a, 0x2e, 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, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 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, - 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x30, 0x01, 0x12, 0x7c, 0x0a, 0x0f, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x49, 0x6e, - 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x12, 0x32, 0x2e, 0x63, 0x63, 0x2e, 0x61, 0x72, 0x64, 0x75, 0x69, + 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6c, 0x61, 0x74, + 0x66, 0x6f, 0x72, 0x6d, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x30, 0x01, 0x12, 0x61, 0x0a, 0x06, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x12, + 0x29, 0x2e, 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, 0x2e, 0x55, 0x70, 0x6c, + 0x6f, 0x61, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x63, 0x63, 0x2e, + 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6c, 0x69, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, + 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, 0x12, 0x8e, 0x01, 0x0a, 0x15, 0x55, 0x70, 0x6c, + 0x6f, 0x61, 0x64, 0x55, 0x73, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, + 0x65, 0x72, 0x12, 0x38, 0x2e, 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, 0x2e, + 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x55, 0x73, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x6f, 0x67, 0x72, + 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x39, 0x2e, 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, 0x2e, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, + 0x55, 0x73, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, 0x12, 0xb0, 0x01, 0x0a, 0x21, 0x4c, 0x69, + 0x73, 0x74, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x73, 0x41, 0x76, 0x61, + 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x46, 0x6f, 0x72, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x12, + 0x44, 0x2e, 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, 0x2e, 0x4c, 0x69, 0x73, + 0x74, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x73, 0x41, 0x76, 0x61, 0x69, + 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x46, 0x6f, 0x72, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x45, 0x2e, 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, 0x2e, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x49, 0x6e, 0x73, 0x74, 0x61, - 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x33, 0x2e, 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, 0x2e, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x49, - 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, - 0x12, 0x7f, 0x0a, 0x10, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x44, 0x6f, 0x77, 0x6e, - 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x33, 0x2e, 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, 0x2e, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, - 0x61, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x34, 0x2e, 0x63, 0x63, 0x2e, 0x61, + 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, + 0x72, 0x73, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x46, 0x6f, 0x72, 0x55, 0x70, + 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x79, 0x0a, 0x0e, + 0x42, 0x75, 0x72, 0x6e, 0x42, 0x6f, 0x6f, 0x74, 0x6c, 0x6f, 0x61, 0x64, 0x65, 0x72, 0x12, 0x31, + 0x2e, 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, 0x2e, 0x42, 0x75, 0x72, 0x6e, + 0x42, 0x6f, 0x6f, 0x74, 0x6c, 0x6f, 0x61, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x32, 0x2e, 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, 0x2e, 0x42, + 0x75, 0x72, 0x6e, 0x42, 0x6f, 0x6f, 0x74, 0x6c, 0x6f, 0x61, 0x64, 0x65, 0x72, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, 0x12, 0x77, 0x0a, 0x0e, 0x50, 0x6c, 0x61, 0x74, 0x66, + 0x6f, 0x72, 0x6d, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x12, 0x31, 0x2e, 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, 0x2e, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x44, + 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x53, + 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, 0x2e, 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, 0x2e, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, + 0x72, 0x6d, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x71, 0x0a, 0x0c, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x4c, 0x69, 0x73, 0x74, + 0x12, 0x2f, 0x2e, 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, 0x2e, 0x50, 0x6c, + 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x30, 0x2e, 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, 0x2e, 0x50, + 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x7c, 0x0a, 0x0f, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x44, 0x6f, + 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x32, 0x2e, 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, 0x2e, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x44, 0x6f, 0x77, 0x6e, 0x6c, + 0x6f, 0x61, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x33, 0x2e, 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, 0x2e, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, - 0x01, 0x12, 0x82, 0x01, 0x0a, 0x11, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x55, 0x6e, - 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x12, 0x34, 0x2e, 0x63, 0x63, 0x2e, 0x61, 0x72, 0x64, + 0x01, 0x12, 0x79, 0x0a, 0x0e, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x49, 0x6e, 0x73, 0x74, + 0x61, 0x6c, 0x6c, 0x12, 0x31, 0x2e, 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, + 0x2e, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, 0x2e, 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, 0x2e, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x49, 0x6e, 0x73, 0x74, 0x61, + 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, 0x12, 0x82, 0x01, 0x0a, + 0x11, 0x5a, 0x69, 0x70, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x49, 0x6e, 0x73, 0x74, 0x61, + 0x6c, 0x6c, 0x12, 0x34, 0x2e, 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, 0x2e, + 0x5a, 0x69, 0x70, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, + 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x35, 0x2e, 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, 0x2e, 0x5a, 0x69, 0x70, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, + 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, + 0x01, 0x12, 0x82, 0x01, 0x0a, 0x11, 0x47, 0x69, 0x74, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, + 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x12, 0x34, 0x2e, 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, 0x2e, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x55, 0x6e, 0x69, + 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x69, 0x74, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x35, 0x2e, 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, 0x2e, 0x50, 0x6c, 0x61, 0x74, 0x66, - 0x6f, 0x72, 0x6d, 0x55, 0x6e, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, 0x12, 0x7c, 0x0a, 0x0f, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, - 0x72, 0x6d, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x12, 0x32, 0x2e, 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, 0x2e, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x55, - 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x33, 0x2e, - 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, 0x2e, 0x50, 0x6c, 0x61, 0x74, 0x66, - 0x6f, 0x72, 0x6d, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x30, 0x01, 0x12, 0x61, 0x0a, 0x06, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x29, - 0x2e, 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, 0x2e, 0x55, 0x70, 0x6c, 0x6f, - 0x61, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x63, 0x63, 0x2e, 0x61, - 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6c, 0x69, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, - 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, 0x12, 0x8e, 0x01, 0x0a, 0x15, 0x55, 0x70, 0x6c, 0x6f, - 0x61, 0x64, 0x55, 0x73, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, - 0x72, 0x12, 0x38, 0x2e, 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, 0x2e, 0x55, - 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x55, 0x73, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, - 0x6d, 0x6d, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x39, 0x2e, 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, 0x2e, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x55, - 0x73, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, 0x12, 0xb0, 0x01, 0x0a, 0x21, 0x4c, 0x69, 0x73, - 0x74, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x73, 0x41, 0x76, 0x61, 0x69, - 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x46, 0x6f, 0x72, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x44, - 0x2e, 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, 0x2e, 0x4c, 0x69, 0x73, 0x74, - 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x73, 0x41, 0x76, 0x61, 0x69, 0x6c, - 0x61, 0x62, 0x6c, 0x65, 0x46, 0x6f, 0x72, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x45, 0x2e, 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, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, - 0x73, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x46, 0x6f, 0x72, 0x55, 0x70, 0x6c, - 0x6f, 0x61, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x79, 0x0a, 0x0e, 0x42, - 0x75, 0x72, 0x6e, 0x42, 0x6f, 0x6f, 0x74, 0x6c, 0x6f, 0x61, 0x64, 0x65, 0x72, 0x12, 0x31, 0x2e, + 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x69, 0x74, 0x4c, 0x69, + 0x62, 0x72, 0x61, 0x72, 0x79, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, 0x12, 0x7f, 0x0a, 0x10, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, + 0x79, 0x55, 0x6e, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x12, 0x33, 0x2e, 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, 0x2e, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x55, + 0x6e, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x34, 0x2e, 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, 0x2e, 0x4c, 0x69, 0x62, + 0x72, 0x61, 0x72, 0x79, 0x55, 0x6e, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, 0x12, 0x82, 0x01, 0x0a, 0x11, 0x4c, 0x69, 0x62, 0x72, + 0x61, 0x72, 0x79, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x41, 0x6c, 0x6c, 0x12, 0x34, 0x2e, 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, 0x2e, 0x42, 0x75, 0x72, 0x6e, 0x42, - 0x6f, 0x6f, 0x74, 0x6c, 0x6f, 0x61, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x32, 0x2e, 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, 0x2e, 0x42, 0x75, - 0x72, 0x6e, 0x42, 0x6f, 0x6f, 0x74, 0x6c, 0x6f, 0x61, 0x64, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, 0x12, 0x77, 0x0a, 0x0e, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, - 0x72, 0x6d, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x12, 0x31, 0x2e, 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, 0x2e, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x53, 0x65, - 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x63, 0x63, + 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x62, 0x72, 0x61, + 0x72, 0x79, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x41, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x35, 0x2e, 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, + 0x2e, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x41, + 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, 0x12, 0x9b, 0x01, 0x0a, + 0x1a, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x44, + 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x69, 0x65, 0x73, 0x12, 0x3d, 0x2e, 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, 0x2e, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, - 0x6d, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x71, 0x0a, 0x0c, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x4c, 0x69, 0x73, 0x74, 0x12, - 0x2f, 0x2e, 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, 0x2e, 0x50, 0x6c, 0x61, - 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x30, 0x2e, 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, 0x2e, 0x50, 0x6c, - 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x7c, 0x0a, 0x0f, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x44, 0x6f, 0x77, - 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x32, 0x2e, 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, 0x2e, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, - 0x61, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x33, 0x2e, 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, 0x2e, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x44, 0x6f, - 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, - 0x12, 0x79, 0x0a, 0x0e, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x49, 0x6e, 0x73, 0x74, 0x61, - 0x6c, 0x6c, 0x12, 0x31, 0x2e, 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, 0x2e, - 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, 0x2e, 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, 0x2e, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, - 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, 0x12, 0x82, 0x01, 0x0a, 0x11, - 0x5a, 0x69, 0x70, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, - 0x6c, 0x12, 0x34, 0x2e, 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, 0x2e, 0x5a, - 0x69, 0x70, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x35, 0x2e, 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, 0x2e, 0x5a, 0x69, 0x70, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x49, - 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, - 0x12, 0x82, 0x01, 0x0a, 0x11, 0x47, 0x69, 0x74, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x49, - 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x12, 0x34, 0x2e, 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, 0x2e, 0x47, 0x69, 0x74, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x49, 0x6e, - 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x35, 0x2e, 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, 0x2e, 0x47, 0x69, 0x74, 0x4c, 0x69, 0x62, - 0x72, 0x61, 0x72, 0x79, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x30, 0x01, 0x12, 0x7f, 0x0a, 0x10, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, - 0x55, 0x6e, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x12, 0x33, 0x2e, 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, 0x2e, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x55, 0x6e, - 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x34, - 0x2e, 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, 0x2e, 0x4c, 0x69, 0x62, 0x72, - 0x61, 0x72, 0x79, 0x55, 0x6e, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, 0x12, 0x82, 0x01, 0x0a, 0x11, 0x4c, 0x69, 0x62, 0x72, 0x61, - 0x72, 0x79, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x41, 0x6c, 0x6c, 0x12, 0x34, 0x2e, 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, 0x2e, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, - 0x79, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x41, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x35, 0x2e, 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, 0x2e, - 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x41, 0x6c, - 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, 0x12, 0x9b, 0x01, 0x0a, 0x1a, - 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x44, 0x65, - 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x69, 0x65, 0x73, 0x12, 0x3d, 0x2e, 0x63, 0x63, 0x2e, + 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, + 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, + 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3e, 0x2e, 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, 0x2e, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x69, - 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3e, 0x2e, 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, 0x2e, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x52, 0x65, - 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x69, 0x65, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x74, 0x0a, 0x0d, 0x4c, 0x69, 0x62, - 0x72, 0x61, 0x72, 0x79, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x12, 0x30, 0x2e, 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, 0x2e, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x53, - 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 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, 0x2e, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, - 0x79, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x6e, 0x0a, 0x0b, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x2e, - 0x2e, 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, 0x2e, 0x4c, 0x69, 0x62, 0x72, - 0x61, 0x72, 0x79, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, - 0x2e, 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, 0x2e, 0x4c, 0x69, 0x62, 0x72, - 0x61, 0x72, 0x79, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, - 0x48, 0x5a, 0x46, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x72, - 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2f, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2d, 0x63, 0x6c, - 0x69, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x63, 0x63, 0x2f, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, - 0x2f, 0x63, 0x6c, 0x69, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2f, 0x76, 0x31, - 0x3b, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x74, 0x0a, 0x0d, 0x4c, 0x69, + 0x62, 0x72, 0x61, 0x72, 0x79, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x12, 0x30, 0x2e, 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, 0x2e, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, + 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, + 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, 0x2e, 0x4c, 0x69, 0x62, 0x72, 0x61, + 0x72, 0x79, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x6e, 0x0a, 0x0b, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x4c, 0x69, 0x73, 0x74, 0x12, + 0x2e, 0x2e, 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, 0x2e, 0x4c, 0x69, 0x62, + 0x72, 0x61, 0x72, 0x79, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x2f, 0x2e, 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, 0x2e, 0x4c, 0x69, 0x62, + 0x72, 0x61, 0x72, 0x79, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x42, 0x48, 0x5a, 0x46, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, + 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2f, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2d, 0x63, + 0x6c, 0x69, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x63, 0x63, 0x2f, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, + 0x6f, 0x2f, 0x63, 0x6c, 0x69, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2f, 0x76, + 0x31, 0x3b, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var ( @@ -1687,14 +1716,14 @@ func file_cc_arduino_cli_commands_v1_commands_proto_rawDescGZIP() []byte { return file_cc_arduino_cli_commands_v1_commands_proto_rawDescData } -var file_cc_arduino_cli_commands_v1_commands_proto_msgTypes = make([]protoimpl.MessageInfo, 22) +var file_cc_arduino_cli_commands_v1_commands_proto_msgTypes = make([]protoimpl.MessageInfo, 23) var file_cc_arduino_cli_commands_v1_commands_proto_goTypes = []interface{}{ - (*InitRequest)(nil), // 0: cc.arduino.cli.commands.v1.InitRequest - (*InitResponse)(nil), // 1: cc.arduino.cli.commands.v1.InitResponse - (*DestroyRequest)(nil), // 2: cc.arduino.cli.commands.v1.DestroyRequest - (*DestroyResponse)(nil), // 3: cc.arduino.cli.commands.v1.DestroyResponse - (*RescanRequest)(nil), // 4: cc.arduino.cli.commands.v1.RescanRequest - (*RescanResponse)(nil), // 5: cc.arduino.cli.commands.v1.RescanResponse + (*CreateRequest)(nil), // 0: cc.arduino.cli.commands.v1.CreateRequest + (*CreateResponse)(nil), // 1: cc.arduino.cli.commands.v1.CreateResponse + (*InitRequest)(nil), // 2: cc.arduino.cli.commands.v1.InitRequest + (*InitResponse)(nil), // 3: cc.arduino.cli.commands.v1.InitResponse + (*DestroyRequest)(nil), // 4: cc.arduino.cli.commands.v1.DestroyRequest + (*DestroyResponse)(nil), // 5: cc.arduino.cli.commands.v1.DestroyResponse (*UpdateIndexRequest)(nil), // 6: cc.arduino.cli.commands.v1.UpdateIndexRequest (*UpdateIndexResponse)(nil), // 7: cc.arduino.cli.commands.v1.UpdateIndexResponse (*UpdateLibrariesIndexRequest)(nil), // 8: cc.arduino.cli.commands.v1.UpdateLibrariesIndexRequest @@ -1711,162 +1740,166 @@ var file_cc_arduino_cli_commands_v1_commands_proto_goTypes = []interface{}{ (*LoadSketchResponse)(nil), // 19: cc.arduino.cli.commands.v1.LoadSketchResponse (*ArchiveSketchRequest)(nil), // 20: cc.arduino.cli.commands.v1.ArchiveSketchRequest (*ArchiveSketchResponse)(nil), // 21: cc.arduino.cli.commands.v1.ArchiveSketchResponse - (*Instance)(nil), // 22: cc.arduino.cli.commands.v1.Instance - (*DownloadProgress)(nil), // 23: cc.arduino.cli.commands.v1.DownloadProgress - (*TaskProgress)(nil), // 24: cc.arduino.cli.commands.v1.TaskProgress - (*InstalledLibrary)(nil), // 25: cc.arduino.cli.commands.v1.InstalledLibrary - (*Platform)(nil), // 26: cc.arduino.cli.commands.v1.Platform - (*BoardDetailsRequest)(nil), // 27: cc.arduino.cli.commands.v1.BoardDetailsRequest - (*BoardAttachRequest)(nil), // 28: cc.arduino.cli.commands.v1.BoardAttachRequest - (*BoardListRequest)(nil), // 29: cc.arduino.cli.commands.v1.BoardListRequest - (*BoardListAllRequest)(nil), // 30: cc.arduino.cli.commands.v1.BoardListAllRequest - (*BoardSearchRequest)(nil), // 31: cc.arduino.cli.commands.v1.BoardSearchRequest - (*BoardListWatchRequest)(nil), // 32: cc.arduino.cli.commands.v1.BoardListWatchRequest - (*CompileRequest)(nil), // 33: cc.arduino.cli.commands.v1.CompileRequest - (*PlatformInstallRequest)(nil), // 34: cc.arduino.cli.commands.v1.PlatformInstallRequest - (*PlatformDownloadRequest)(nil), // 35: cc.arduino.cli.commands.v1.PlatformDownloadRequest - (*PlatformUninstallRequest)(nil), // 36: cc.arduino.cli.commands.v1.PlatformUninstallRequest - (*PlatformUpgradeRequest)(nil), // 37: cc.arduino.cli.commands.v1.PlatformUpgradeRequest - (*UploadRequest)(nil), // 38: cc.arduino.cli.commands.v1.UploadRequest - (*UploadUsingProgrammerRequest)(nil), // 39: cc.arduino.cli.commands.v1.UploadUsingProgrammerRequest - (*ListProgrammersAvailableForUploadRequest)(nil), // 40: cc.arduino.cli.commands.v1.ListProgrammersAvailableForUploadRequest - (*BurnBootloaderRequest)(nil), // 41: cc.arduino.cli.commands.v1.BurnBootloaderRequest - (*PlatformSearchRequest)(nil), // 42: cc.arduino.cli.commands.v1.PlatformSearchRequest - (*PlatformListRequest)(nil), // 43: cc.arduino.cli.commands.v1.PlatformListRequest - (*LibraryDownloadRequest)(nil), // 44: cc.arduino.cli.commands.v1.LibraryDownloadRequest - (*LibraryInstallRequest)(nil), // 45: cc.arduino.cli.commands.v1.LibraryInstallRequest - (*ZipLibraryInstallRequest)(nil), // 46: cc.arduino.cli.commands.v1.ZipLibraryInstallRequest - (*GitLibraryInstallRequest)(nil), // 47: cc.arduino.cli.commands.v1.GitLibraryInstallRequest - (*LibraryUninstallRequest)(nil), // 48: cc.arduino.cli.commands.v1.LibraryUninstallRequest - (*LibraryUpgradeAllRequest)(nil), // 49: cc.arduino.cli.commands.v1.LibraryUpgradeAllRequest - (*LibraryResolveDependenciesRequest)(nil), // 50: cc.arduino.cli.commands.v1.LibraryResolveDependenciesRequest - (*LibrarySearchRequest)(nil), // 51: cc.arduino.cli.commands.v1.LibrarySearchRequest - (*LibraryListRequest)(nil), // 52: cc.arduino.cli.commands.v1.LibraryListRequest - (*BoardDetailsResponse)(nil), // 53: cc.arduino.cli.commands.v1.BoardDetailsResponse - (*BoardAttachResponse)(nil), // 54: cc.arduino.cli.commands.v1.BoardAttachResponse - (*BoardListResponse)(nil), // 55: cc.arduino.cli.commands.v1.BoardListResponse - (*BoardListAllResponse)(nil), // 56: cc.arduino.cli.commands.v1.BoardListAllResponse - (*BoardSearchResponse)(nil), // 57: cc.arduino.cli.commands.v1.BoardSearchResponse - (*BoardListWatchResponse)(nil), // 58: cc.arduino.cli.commands.v1.BoardListWatchResponse - (*CompileResponse)(nil), // 59: cc.arduino.cli.commands.v1.CompileResponse - (*PlatformInstallResponse)(nil), // 60: cc.arduino.cli.commands.v1.PlatformInstallResponse - (*PlatformDownloadResponse)(nil), // 61: cc.arduino.cli.commands.v1.PlatformDownloadResponse - (*PlatformUninstallResponse)(nil), // 62: cc.arduino.cli.commands.v1.PlatformUninstallResponse - (*PlatformUpgradeResponse)(nil), // 63: cc.arduino.cli.commands.v1.PlatformUpgradeResponse - (*UploadResponse)(nil), // 64: cc.arduino.cli.commands.v1.UploadResponse - (*UploadUsingProgrammerResponse)(nil), // 65: cc.arduino.cli.commands.v1.UploadUsingProgrammerResponse - (*ListProgrammersAvailableForUploadResponse)(nil), // 66: cc.arduino.cli.commands.v1.ListProgrammersAvailableForUploadResponse - (*BurnBootloaderResponse)(nil), // 67: cc.arduino.cli.commands.v1.BurnBootloaderResponse - (*PlatformSearchResponse)(nil), // 68: cc.arduino.cli.commands.v1.PlatformSearchResponse - (*PlatformListResponse)(nil), // 69: cc.arduino.cli.commands.v1.PlatformListResponse - (*LibraryDownloadResponse)(nil), // 70: cc.arduino.cli.commands.v1.LibraryDownloadResponse - (*LibraryInstallResponse)(nil), // 71: cc.arduino.cli.commands.v1.LibraryInstallResponse - (*ZipLibraryInstallResponse)(nil), // 72: cc.arduino.cli.commands.v1.ZipLibraryInstallResponse - (*GitLibraryInstallResponse)(nil), // 73: cc.arduino.cli.commands.v1.GitLibraryInstallResponse - (*LibraryUninstallResponse)(nil), // 74: cc.arduino.cli.commands.v1.LibraryUninstallResponse - (*LibraryUpgradeAllResponse)(nil), // 75: cc.arduino.cli.commands.v1.LibraryUpgradeAllResponse - (*LibraryResolveDependenciesResponse)(nil), // 76: cc.arduino.cli.commands.v1.LibraryResolveDependenciesResponse - (*LibrarySearchResponse)(nil), // 77: cc.arduino.cli.commands.v1.LibrarySearchResponse - (*LibraryListResponse)(nil), // 78: cc.arduino.cli.commands.v1.LibraryListResponse + (*InitResponse_Progress)(nil), // 22: cc.arduino.cli.commands.v1.InitResponse.Progress + (*Instance)(nil), // 23: cc.arduino.cli.commands.v1.Instance + (*status.Status)(nil), // 24: google.rpc.Status + (*DownloadProgress)(nil), // 25: cc.arduino.cli.commands.v1.DownloadProgress + (*InstalledLibrary)(nil), // 26: cc.arduino.cli.commands.v1.InstalledLibrary + (*Platform)(nil), // 27: cc.arduino.cli.commands.v1.Platform + (*TaskProgress)(nil), // 28: cc.arduino.cli.commands.v1.TaskProgress + (*BoardDetailsRequest)(nil), // 29: cc.arduino.cli.commands.v1.BoardDetailsRequest + (*BoardAttachRequest)(nil), // 30: cc.arduino.cli.commands.v1.BoardAttachRequest + (*BoardListRequest)(nil), // 31: cc.arduino.cli.commands.v1.BoardListRequest + (*BoardListAllRequest)(nil), // 32: cc.arduino.cli.commands.v1.BoardListAllRequest + (*BoardSearchRequest)(nil), // 33: cc.arduino.cli.commands.v1.BoardSearchRequest + (*BoardListWatchRequest)(nil), // 34: cc.arduino.cli.commands.v1.BoardListWatchRequest + (*CompileRequest)(nil), // 35: cc.arduino.cli.commands.v1.CompileRequest + (*PlatformInstallRequest)(nil), // 36: cc.arduino.cli.commands.v1.PlatformInstallRequest + (*PlatformDownloadRequest)(nil), // 37: cc.arduino.cli.commands.v1.PlatformDownloadRequest + (*PlatformUninstallRequest)(nil), // 38: cc.arduino.cli.commands.v1.PlatformUninstallRequest + (*PlatformUpgradeRequest)(nil), // 39: cc.arduino.cli.commands.v1.PlatformUpgradeRequest + (*UploadRequest)(nil), // 40: cc.arduino.cli.commands.v1.UploadRequest + (*UploadUsingProgrammerRequest)(nil), // 41: cc.arduino.cli.commands.v1.UploadUsingProgrammerRequest + (*ListProgrammersAvailableForUploadRequest)(nil), // 42: cc.arduino.cli.commands.v1.ListProgrammersAvailableForUploadRequest + (*BurnBootloaderRequest)(nil), // 43: cc.arduino.cli.commands.v1.BurnBootloaderRequest + (*PlatformSearchRequest)(nil), // 44: cc.arduino.cli.commands.v1.PlatformSearchRequest + (*PlatformListRequest)(nil), // 45: cc.arduino.cli.commands.v1.PlatformListRequest + (*LibraryDownloadRequest)(nil), // 46: cc.arduino.cli.commands.v1.LibraryDownloadRequest + (*LibraryInstallRequest)(nil), // 47: cc.arduino.cli.commands.v1.LibraryInstallRequest + (*ZipLibraryInstallRequest)(nil), // 48: cc.arduino.cli.commands.v1.ZipLibraryInstallRequest + (*GitLibraryInstallRequest)(nil), // 49: cc.arduino.cli.commands.v1.GitLibraryInstallRequest + (*LibraryUninstallRequest)(nil), // 50: cc.arduino.cli.commands.v1.LibraryUninstallRequest + (*LibraryUpgradeAllRequest)(nil), // 51: cc.arduino.cli.commands.v1.LibraryUpgradeAllRequest + (*LibraryResolveDependenciesRequest)(nil), // 52: cc.arduino.cli.commands.v1.LibraryResolveDependenciesRequest + (*LibrarySearchRequest)(nil), // 53: cc.arduino.cli.commands.v1.LibrarySearchRequest + (*LibraryListRequest)(nil), // 54: cc.arduino.cli.commands.v1.LibraryListRequest + (*BoardDetailsResponse)(nil), // 55: cc.arduino.cli.commands.v1.BoardDetailsResponse + (*BoardAttachResponse)(nil), // 56: cc.arduino.cli.commands.v1.BoardAttachResponse + (*BoardListResponse)(nil), // 57: cc.arduino.cli.commands.v1.BoardListResponse + (*BoardListAllResponse)(nil), // 58: cc.arduino.cli.commands.v1.BoardListAllResponse + (*BoardSearchResponse)(nil), // 59: cc.arduino.cli.commands.v1.BoardSearchResponse + (*BoardListWatchResponse)(nil), // 60: cc.arduino.cli.commands.v1.BoardListWatchResponse + (*CompileResponse)(nil), // 61: cc.arduino.cli.commands.v1.CompileResponse + (*PlatformInstallResponse)(nil), // 62: cc.arduino.cli.commands.v1.PlatformInstallResponse + (*PlatformDownloadResponse)(nil), // 63: cc.arduino.cli.commands.v1.PlatformDownloadResponse + (*PlatformUninstallResponse)(nil), // 64: cc.arduino.cli.commands.v1.PlatformUninstallResponse + (*PlatformUpgradeResponse)(nil), // 65: cc.arduino.cli.commands.v1.PlatformUpgradeResponse + (*UploadResponse)(nil), // 66: cc.arduino.cli.commands.v1.UploadResponse + (*UploadUsingProgrammerResponse)(nil), // 67: cc.arduino.cli.commands.v1.UploadUsingProgrammerResponse + (*ListProgrammersAvailableForUploadResponse)(nil), // 68: cc.arduino.cli.commands.v1.ListProgrammersAvailableForUploadResponse + (*BurnBootloaderResponse)(nil), // 69: cc.arduino.cli.commands.v1.BurnBootloaderResponse + (*PlatformSearchResponse)(nil), // 70: cc.arduino.cli.commands.v1.PlatformSearchResponse + (*PlatformListResponse)(nil), // 71: cc.arduino.cli.commands.v1.PlatformListResponse + (*LibraryDownloadResponse)(nil), // 72: cc.arduino.cli.commands.v1.LibraryDownloadResponse + (*LibraryInstallResponse)(nil), // 73: cc.arduino.cli.commands.v1.LibraryInstallResponse + (*ZipLibraryInstallResponse)(nil), // 74: cc.arduino.cli.commands.v1.ZipLibraryInstallResponse + (*GitLibraryInstallResponse)(nil), // 75: cc.arduino.cli.commands.v1.GitLibraryInstallResponse + (*LibraryUninstallResponse)(nil), // 76: cc.arduino.cli.commands.v1.LibraryUninstallResponse + (*LibraryUpgradeAllResponse)(nil), // 77: cc.arduino.cli.commands.v1.LibraryUpgradeAllResponse + (*LibraryResolveDependenciesResponse)(nil), // 78: cc.arduino.cli.commands.v1.LibraryResolveDependenciesResponse + (*LibrarySearchResponse)(nil), // 79: cc.arduino.cli.commands.v1.LibrarySearchResponse + (*LibraryListResponse)(nil), // 80: cc.arduino.cli.commands.v1.LibraryListResponse } var file_cc_arduino_cli_commands_v1_commands_proto_depIdxs = []int32{ - 22, // 0: cc.arduino.cli.commands.v1.InitResponse.instance:type_name -> cc.arduino.cli.commands.v1.Instance - 23, // 1: cc.arduino.cli.commands.v1.InitResponse.download_progress:type_name -> cc.arduino.cli.commands.v1.DownloadProgress - 24, // 2: cc.arduino.cli.commands.v1.InitResponse.task_progress:type_name -> cc.arduino.cli.commands.v1.TaskProgress - 22, // 3: cc.arduino.cli.commands.v1.DestroyRequest.instance:type_name -> cc.arduino.cli.commands.v1.Instance - 22, // 4: cc.arduino.cli.commands.v1.RescanRequest.instance:type_name -> cc.arduino.cli.commands.v1.Instance - 22, // 5: cc.arduino.cli.commands.v1.UpdateIndexRequest.instance:type_name -> cc.arduino.cli.commands.v1.Instance - 23, // 6: cc.arduino.cli.commands.v1.UpdateIndexResponse.download_progress:type_name -> cc.arduino.cli.commands.v1.DownloadProgress - 22, // 7: cc.arduino.cli.commands.v1.UpdateLibrariesIndexRequest.instance:type_name -> cc.arduino.cli.commands.v1.Instance - 23, // 8: cc.arduino.cli.commands.v1.UpdateLibrariesIndexResponse.download_progress:type_name -> cc.arduino.cli.commands.v1.DownloadProgress - 22, // 9: cc.arduino.cli.commands.v1.UpdateCoreLibrariesIndexRequest.instance:type_name -> cc.arduino.cli.commands.v1.Instance - 23, // 10: cc.arduino.cli.commands.v1.UpdateCoreLibrariesIndexResponse.download_progress:type_name -> cc.arduino.cli.commands.v1.DownloadProgress - 22, // 11: cc.arduino.cli.commands.v1.OutdatedRequest.instance:type_name -> cc.arduino.cli.commands.v1.Instance - 25, // 12: cc.arduino.cli.commands.v1.OutdatedResponse.outdated_libraries:type_name -> cc.arduino.cli.commands.v1.InstalledLibrary - 26, // 13: cc.arduino.cli.commands.v1.OutdatedResponse.outdated_platforms:type_name -> cc.arduino.cli.commands.v1.Platform - 22, // 14: cc.arduino.cli.commands.v1.UpgradeRequest.instance:type_name -> cc.arduino.cli.commands.v1.Instance - 23, // 15: cc.arduino.cli.commands.v1.UpgradeResponse.progress:type_name -> cc.arduino.cli.commands.v1.DownloadProgress - 24, // 16: cc.arduino.cli.commands.v1.UpgradeResponse.task_progress:type_name -> cc.arduino.cli.commands.v1.TaskProgress - 22, // 17: cc.arduino.cli.commands.v1.LoadSketchRequest.instance:type_name -> cc.arduino.cli.commands.v1.Instance - 0, // 18: cc.arduino.cli.commands.v1.ArduinoCoreService.Init:input_type -> cc.arduino.cli.commands.v1.InitRequest - 2, // 19: cc.arduino.cli.commands.v1.ArduinoCoreService.Destroy:input_type -> cc.arduino.cli.commands.v1.DestroyRequest - 4, // 20: cc.arduino.cli.commands.v1.ArduinoCoreService.Rescan:input_type -> cc.arduino.cli.commands.v1.RescanRequest - 6, // 21: cc.arduino.cli.commands.v1.ArduinoCoreService.UpdateIndex:input_type -> cc.arduino.cli.commands.v1.UpdateIndexRequest - 8, // 22: cc.arduino.cli.commands.v1.ArduinoCoreService.UpdateLibrariesIndex:input_type -> cc.arduino.cli.commands.v1.UpdateLibrariesIndexRequest - 10, // 23: cc.arduino.cli.commands.v1.ArduinoCoreService.UpdateCoreLibrariesIndex:input_type -> cc.arduino.cli.commands.v1.UpdateCoreLibrariesIndexRequest - 12, // 24: cc.arduino.cli.commands.v1.ArduinoCoreService.Outdated:input_type -> cc.arduino.cli.commands.v1.OutdatedRequest - 14, // 25: cc.arduino.cli.commands.v1.ArduinoCoreService.Upgrade:input_type -> cc.arduino.cli.commands.v1.UpgradeRequest - 16, // 26: cc.arduino.cli.commands.v1.ArduinoCoreService.Version:input_type -> cc.arduino.cli.commands.v1.VersionRequest - 18, // 27: cc.arduino.cli.commands.v1.ArduinoCoreService.LoadSketch:input_type -> cc.arduino.cli.commands.v1.LoadSketchRequest - 20, // 28: cc.arduino.cli.commands.v1.ArduinoCoreService.ArchiveSketch:input_type -> cc.arduino.cli.commands.v1.ArchiveSketchRequest - 27, // 29: cc.arduino.cli.commands.v1.ArduinoCoreService.BoardDetails:input_type -> cc.arduino.cli.commands.v1.BoardDetailsRequest - 28, // 30: cc.arduino.cli.commands.v1.ArduinoCoreService.BoardAttach:input_type -> cc.arduino.cli.commands.v1.BoardAttachRequest - 29, // 31: cc.arduino.cli.commands.v1.ArduinoCoreService.BoardList:input_type -> cc.arduino.cli.commands.v1.BoardListRequest - 30, // 32: cc.arduino.cli.commands.v1.ArduinoCoreService.BoardListAll:input_type -> cc.arduino.cli.commands.v1.BoardListAllRequest - 31, // 33: cc.arduino.cli.commands.v1.ArduinoCoreService.BoardSearch:input_type -> cc.arduino.cli.commands.v1.BoardSearchRequest - 32, // 34: cc.arduino.cli.commands.v1.ArduinoCoreService.BoardListWatch:input_type -> cc.arduino.cli.commands.v1.BoardListWatchRequest - 33, // 35: cc.arduino.cli.commands.v1.ArduinoCoreService.Compile:input_type -> cc.arduino.cli.commands.v1.CompileRequest - 34, // 36: cc.arduino.cli.commands.v1.ArduinoCoreService.PlatformInstall:input_type -> cc.arduino.cli.commands.v1.PlatformInstallRequest - 35, // 37: cc.arduino.cli.commands.v1.ArduinoCoreService.PlatformDownload:input_type -> cc.arduino.cli.commands.v1.PlatformDownloadRequest - 36, // 38: cc.arduino.cli.commands.v1.ArduinoCoreService.PlatformUninstall:input_type -> cc.arduino.cli.commands.v1.PlatformUninstallRequest - 37, // 39: cc.arduino.cli.commands.v1.ArduinoCoreService.PlatformUpgrade:input_type -> cc.arduino.cli.commands.v1.PlatformUpgradeRequest - 38, // 40: cc.arduino.cli.commands.v1.ArduinoCoreService.Upload:input_type -> cc.arduino.cli.commands.v1.UploadRequest - 39, // 41: cc.arduino.cli.commands.v1.ArduinoCoreService.UploadUsingProgrammer:input_type -> cc.arduino.cli.commands.v1.UploadUsingProgrammerRequest - 40, // 42: cc.arduino.cli.commands.v1.ArduinoCoreService.ListProgrammersAvailableForUpload:input_type -> cc.arduino.cli.commands.v1.ListProgrammersAvailableForUploadRequest - 41, // 43: cc.arduino.cli.commands.v1.ArduinoCoreService.BurnBootloader:input_type -> cc.arduino.cli.commands.v1.BurnBootloaderRequest - 42, // 44: cc.arduino.cli.commands.v1.ArduinoCoreService.PlatformSearch:input_type -> cc.arduino.cli.commands.v1.PlatformSearchRequest - 43, // 45: cc.arduino.cli.commands.v1.ArduinoCoreService.PlatformList:input_type -> cc.arduino.cli.commands.v1.PlatformListRequest - 44, // 46: cc.arduino.cli.commands.v1.ArduinoCoreService.LibraryDownload:input_type -> cc.arduino.cli.commands.v1.LibraryDownloadRequest - 45, // 47: cc.arduino.cli.commands.v1.ArduinoCoreService.LibraryInstall:input_type -> cc.arduino.cli.commands.v1.LibraryInstallRequest - 46, // 48: cc.arduino.cli.commands.v1.ArduinoCoreService.ZipLibraryInstall:input_type -> cc.arduino.cli.commands.v1.ZipLibraryInstallRequest - 47, // 49: cc.arduino.cli.commands.v1.ArduinoCoreService.GitLibraryInstall:input_type -> cc.arduino.cli.commands.v1.GitLibraryInstallRequest - 48, // 50: cc.arduino.cli.commands.v1.ArduinoCoreService.LibraryUninstall:input_type -> cc.arduino.cli.commands.v1.LibraryUninstallRequest - 49, // 51: cc.arduino.cli.commands.v1.ArduinoCoreService.LibraryUpgradeAll:input_type -> cc.arduino.cli.commands.v1.LibraryUpgradeAllRequest - 50, // 52: cc.arduino.cli.commands.v1.ArduinoCoreService.LibraryResolveDependencies:input_type -> cc.arduino.cli.commands.v1.LibraryResolveDependenciesRequest - 51, // 53: cc.arduino.cli.commands.v1.ArduinoCoreService.LibrarySearch:input_type -> cc.arduino.cli.commands.v1.LibrarySearchRequest - 52, // 54: cc.arduino.cli.commands.v1.ArduinoCoreService.LibraryList:input_type -> cc.arduino.cli.commands.v1.LibraryListRequest - 1, // 55: cc.arduino.cli.commands.v1.ArduinoCoreService.Init:output_type -> cc.arduino.cli.commands.v1.InitResponse - 3, // 56: cc.arduino.cli.commands.v1.ArduinoCoreService.Destroy:output_type -> cc.arduino.cli.commands.v1.DestroyResponse - 5, // 57: cc.arduino.cli.commands.v1.ArduinoCoreService.Rescan:output_type -> cc.arduino.cli.commands.v1.RescanResponse - 7, // 58: cc.arduino.cli.commands.v1.ArduinoCoreService.UpdateIndex:output_type -> cc.arduino.cli.commands.v1.UpdateIndexResponse - 9, // 59: cc.arduino.cli.commands.v1.ArduinoCoreService.UpdateLibrariesIndex:output_type -> cc.arduino.cli.commands.v1.UpdateLibrariesIndexResponse - 11, // 60: cc.arduino.cli.commands.v1.ArduinoCoreService.UpdateCoreLibrariesIndex:output_type -> cc.arduino.cli.commands.v1.UpdateCoreLibrariesIndexResponse - 13, // 61: cc.arduino.cli.commands.v1.ArduinoCoreService.Outdated:output_type -> cc.arduino.cli.commands.v1.OutdatedResponse - 15, // 62: cc.arduino.cli.commands.v1.ArduinoCoreService.Upgrade:output_type -> cc.arduino.cli.commands.v1.UpgradeResponse - 17, // 63: cc.arduino.cli.commands.v1.ArduinoCoreService.Version:output_type -> cc.arduino.cli.commands.v1.VersionResponse - 19, // 64: cc.arduino.cli.commands.v1.ArduinoCoreService.LoadSketch:output_type -> cc.arduino.cli.commands.v1.LoadSketchResponse - 21, // 65: cc.arduino.cli.commands.v1.ArduinoCoreService.ArchiveSketch:output_type -> cc.arduino.cli.commands.v1.ArchiveSketchResponse - 53, // 66: cc.arduino.cli.commands.v1.ArduinoCoreService.BoardDetails:output_type -> cc.arduino.cli.commands.v1.BoardDetailsResponse - 54, // 67: cc.arduino.cli.commands.v1.ArduinoCoreService.BoardAttach:output_type -> cc.arduino.cli.commands.v1.BoardAttachResponse - 55, // 68: cc.arduino.cli.commands.v1.ArduinoCoreService.BoardList:output_type -> cc.arduino.cli.commands.v1.BoardListResponse - 56, // 69: cc.arduino.cli.commands.v1.ArduinoCoreService.BoardListAll:output_type -> cc.arduino.cli.commands.v1.BoardListAllResponse - 57, // 70: cc.arduino.cli.commands.v1.ArduinoCoreService.BoardSearch:output_type -> cc.arduino.cli.commands.v1.BoardSearchResponse - 58, // 71: cc.arduino.cli.commands.v1.ArduinoCoreService.BoardListWatch:output_type -> cc.arduino.cli.commands.v1.BoardListWatchResponse - 59, // 72: cc.arduino.cli.commands.v1.ArduinoCoreService.Compile:output_type -> cc.arduino.cli.commands.v1.CompileResponse - 60, // 73: cc.arduino.cli.commands.v1.ArduinoCoreService.PlatformInstall:output_type -> cc.arduino.cli.commands.v1.PlatformInstallResponse - 61, // 74: cc.arduino.cli.commands.v1.ArduinoCoreService.PlatformDownload:output_type -> cc.arduino.cli.commands.v1.PlatformDownloadResponse - 62, // 75: cc.arduino.cli.commands.v1.ArduinoCoreService.PlatformUninstall:output_type -> cc.arduino.cli.commands.v1.PlatformUninstallResponse - 63, // 76: cc.arduino.cli.commands.v1.ArduinoCoreService.PlatformUpgrade:output_type -> cc.arduino.cli.commands.v1.PlatformUpgradeResponse - 64, // 77: cc.arduino.cli.commands.v1.ArduinoCoreService.Upload:output_type -> cc.arduino.cli.commands.v1.UploadResponse - 65, // 78: cc.arduino.cli.commands.v1.ArduinoCoreService.UploadUsingProgrammer:output_type -> cc.arduino.cli.commands.v1.UploadUsingProgrammerResponse - 66, // 79: cc.arduino.cli.commands.v1.ArduinoCoreService.ListProgrammersAvailableForUpload:output_type -> cc.arduino.cli.commands.v1.ListProgrammersAvailableForUploadResponse - 67, // 80: cc.arduino.cli.commands.v1.ArduinoCoreService.BurnBootloader:output_type -> cc.arduino.cli.commands.v1.BurnBootloaderResponse - 68, // 81: cc.arduino.cli.commands.v1.ArduinoCoreService.PlatformSearch:output_type -> cc.arduino.cli.commands.v1.PlatformSearchResponse - 69, // 82: cc.arduino.cli.commands.v1.ArduinoCoreService.PlatformList:output_type -> cc.arduino.cli.commands.v1.PlatformListResponse - 70, // 83: cc.arduino.cli.commands.v1.ArduinoCoreService.LibraryDownload:output_type -> cc.arduino.cli.commands.v1.LibraryDownloadResponse - 71, // 84: cc.arduino.cli.commands.v1.ArduinoCoreService.LibraryInstall:output_type -> cc.arduino.cli.commands.v1.LibraryInstallResponse - 72, // 85: cc.arduino.cli.commands.v1.ArduinoCoreService.ZipLibraryInstall:output_type -> cc.arduino.cli.commands.v1.ZipLibraryInstallResponse - 73, // 86: cc.arduino.cli.commands.v1.ArduinoCoreService.GitLibraryInstall:output_type -> cc.arduino.cli.commands.v1.GitLibraryInstallResponse - 74, // 87: cc.arduino.cli.commands.v1.ArduinoCoreService.LibraryUninstall:output_type -> cc.arduino.cli.commands.v1.LibraryUninstallResponse - 75, // 88: cc.arduino.cli.commands.v1.ArduinoCoreService.LibraryUpgradeAll:output_type -> cc.arduino.cli.commands.v1.LibraryUpgradeAllResponse - 76, // 89: cc.arduino.cli.commands.v1.ArduinoCoreService.LibraryResolveDependencies:output_type -> cc.arduino.cli.commands.v1.LibraryResolveDependenciesResponse - 77, // 90: cc.arduino.cli.commands.v1.ArduinoCoreService.LibrarySearch:output_type -> cc.arduino.cli.commands.v1.LibrarySearchResponse - 78, // 91: cc.arduino.cli.commands.v1.ArduinoCoreService.LibraryList:output_type -> cc.arduino.cli.commands.v1.LibraryListResponse - 55, // [55:92] is the sub-list for method output_type - 18, // [18:55] is the sub-list for method input_type - 18, // [18:18] is the sub-list for extension type_name - 18, // [18:18] is the sub-list for extension extendee - 0, // [0:18] is the sub-list for field type_name + 23, // 0: cc.arduino.cli.commands.v1.CreateResponse.instance:type_name -> cc.arduino.cli.commands.v1.Instance + 23, // 1: cc.arduino.cli.commands.v1.InitRequest.instance:type_name -> cc.arduino.cli.commands.v1.Instance + 22, // 2: cc.arduino.cli.commands.v1.InitResponse.init_progress:type_name -> cc.arduino.cli.commands.v1.InitResponse.Progress + 24, // 3: cc.arduino.cli.commands.v1.InitResponse.error:type_name -> google.rpc.Status + 23, // 4: cc.arduino.cli.commands.v1.DestroyRequest.instance:type_name -> cc.arduino.cli.commands.v1.Instance + 23, // 5: cc.arduino.cli.commands.v1.UpdateIndexRequest.instance:type_name -> cc.arduino.cli.commands.v1.Instance + 25, // 6: cc.arduino.cli.commands.v1.UpdateIndexResponse.download_progress:type_name -> cc.arduino.cli.commands.v1.DownloadProgress + 23, // 7: cc.arduino.cli.commands.v1.UpdateLibrariesIndexRequest.instance:type_name -> cc.arduino.cli.commands.v1.Instance + 25, // 8: cc.arduino.cli.commands.v1.UpdateLibrariesIndexResponse.download_progress:type_name -> cc.arduino.cli.commands.v1.DownloadProgress + 23, // 9: cc.arduino.cli.commands.v1.UpdateCoreLibrariesIndexRequest.instance:type_name -> cc.arduino.cli.commands.v1.Instance + 25, // 10: cc.arduino.cli.commands.v1.UpdateCoreLibrariesIndexResponse.download_progress:type_name -> cc.arduino.cli.commands.v1.DownloadProgress + 23, // 11: cc.arduino.cli.commands.v1.OutdatedRequest.instance:type_name -> cc.arduino.cli.commands.v1.Instance + 26, // 12: cc.arduino.cli.commands.v1.OutdatedResponse.outdated_libraries:type_name -> cc.arduino.cli.commands.v1.InstalledLibrary + 27, // 13: cc.arduino.cli.commands.v1.OutdatedResponse.outdated_platforms:type_name -> cc.arduino.cli.commands.v1.Platform + 23, // 14: cc.arduino.cli.commands.v1.UpgradeRequest.instance:type_name -> cc.arduino.cli.commands.v1.Instance + 25, // 15: cc.arduino.cli.commands.v1.UpgradeResponse.progress:type_name -> cc.arduino.cli.commands.v1.DownloadProgress + 28, // 16: cc.arduino.cli.commands.v1.UpgradeResponse.task_progress:type_name -> cc.arduino.cli.commands.v1.TaskProgress + 23, // 17: cc.arduino.cli.commands.v1.LoadSketchRequest.instance:type_name -> cc.arduino.cli.commands.v1.Instance + 25, // 18: cc.arduino.cli.commands.v1.InitResponse.Progress.download_progress:type_name -> cc.arduino.cli.commands.v1.DownloadProgress + 28, // 19: cc.arduino.cli.commands.v1.InitResponse.Progress.task_progress:type_name -> cc.arduino.cli.commands.v1.TaskProgress + 0, // 20: cc.arduino.cli.commands.v1.ArduinoCoreService.Create:input_type -> cc.arduino.cli.commands.v1.CreateRequest + 2, // 21: cc.arduino.cli.commands.v1.ArduinoCoreService.Init:input_type -> cc.arduino.cli.commands.v1.InitRequest + 4, // 22: cc.arduino.cli.commands.v1.ArduinoCoreService.Destroy:input_type -> cc.arduino.cli.commands.v1.DestroyRequest + 6, // 23: cc.arduino.cli.commands.v1.ArduinoCoreService.UpdateIndex:input_type -> cc.arduino.cli.commands.v1.UpdateIndexRequest + 8, // 24: cc.arduino.cli.commands.v1.ArduinoCoreService.UpdateLibrariesIndex:input_type -> cc.arduino.cli.commands.v1.UpdateLibrariesIndexRequest + 10, // 25: cc.arduino.cli.commands.v1.ArduinoCoreService.UpdateCoreLibrariesIndex:input_type -> cc.arduino.cli.commands.v1.UpdateCoreLibrariesIndexRequest + 12, // 26: cc.arduino.cli.commands.v1.ArduinoCoreService.Outdated:input_type -> cc.arduino.cli.commands.v1.OutdatedRequest + 14, // 27: cc.arduino.cli.commands.v1.ArduinoCoreService.Upgrade:input_type -> cc.arduino.cli.commands.v1.UpgradeRequest + 16, // 28: cc.arduino.cli.commands.v1.ArduinoCoreService.Version:input_type -> cc.arduino.cli.commands.v1.VersionRequest + 18, // 29: cc.arduino.cli.commands.v1.ArduinoCoreService.LoadSketch:input_type -> cc.arduino.cli.commands.v1.LoadSketchRequest + 20, // 30: cc.arduino.cli.commands.v1.ArduinoCoreService.ArchiveSketch:input_type -> cc.arduino.cli.commands.v1.ArchiveSketchRequest + 29, // 31: cc.arduino.cli.commands.v1.ArduinoCoreService.BoardDetails:input_type -> cc.arduino.cli.commands.v1.BoardDetailsRequest + 30, // 32: cc.arduino.cli.commands.v1.ArduinoCoreService.BoardAttach:input_type -> cc.arduino.cli.commands.v1.BoardAttachRequest + 31, // 33: cc.arduino.cli.commands.v1.ArduinoCoreService.BoardList:input_type -> cc.arduino.cli.commands.v1.BoardListRequest + 32, // 34: cc.arduino.cli.commands.v1.ArduinoCoreService.BoardListAll:input_type -> cc.arduino.cli.commands.v1.BoardListAllRequest + 33, // 35: cc.arduino.cli.commands.v1.ArduinoCoreService.BoardSearch:input_type -> cc.arduino.cli.commands.v1.BoardSearchRequest + 34, // 36: cc.arduino.cli.commands.v1.ArduinoCoreService.BoardListWatch:input_type -> cc.arduino.cli.commands.v1.BoardListWatchRequest + 35, // 37: cc.arduino.cli.commands.v1.ArduinoCoreService.Compile:input_type -> cc.arduino.cli.commands.v1.CompileRequest + 36, // 38: cc.arduino.cli.commands.v1.ArduinoCoreService.PlatformInstall:input_type -> cc.arduino.cli.commands.v1.PlatformInstallRequest + 37, // 39: cc.arduino.cli.commands.v1.ArduinoCoreService.PlatformDownload:input_type -> cc.arduino.cli.commands.v1.PlatformDownloadRequest + 38, // 40: cc.arduino.cli.commands.v1.ArduinoCoreService.PlatformUninstall:input_type -> cc.arduino.cli.commands.v1.PlatformUninstallRequest + 39, // 41: cc.arduino.cli.commands.v1.ArduinoCoreService.PlatformUpgrade:input_type -> cc.arduino.cli.commands.v1.PlatformUpgradeRequest + 40, // 42: cc.arduino.cli.commands.v1.ArduinoCoreService.Upload:input_type -> cc.arduino.cli.commands.v1.UploadRequest + 41, // 43: cc.arduino.cli.commands.v1.ArduinoCoreService.UploadUsingProgrammer:input_type -> cc.arduino.cli.commands.v1.UploadUsingProgrammerRequest + 42, // 44: cc.arduino.cli.commands.v1.ArduinoCoreService.ListProgrammersAvailableForUpload:input_type -> cc.arduino.cli.commands.v1.ListProgrammersAvailableForUploadRequest + 43, // 45: cc.arduino.cli.commands.v1.ArduinoCoreService.BurnBootloader:input_type -> cc.arduino.cli.commands.v1.BurnBootloaderRequest + 44, // 46: cc.arduino.cli.commands.v1.ArduinoCoreService.PlatformSearch:input_type -> cc.arduino.cli.commands.v1.PlatformSearchRequest + 45, // 47: cc.arduino.cli.commands.v1.ArduinoCoreService.PlatformList:input_type -> cc.arduino.cli.commands.v1.PlatformListRequest + 46, // 48: cc.arduino.cli.commands.v1.ArduinoCoreService.LibraryDownload:input_type -> cc.arduino.cli.commands.v1.LibraryDownloadRequest + 47, // 49: cc.arduino.cli.commands.v1.ArduinoCoreService.LibraryInstall:input_type -> cc.arduino.cli.commands.v1.LibraryInstallRequest + 48, // 50: cc.arduino.cli.commands.v1.ArduinoCoreService.ZipLibraryInstall:input_type -> cc.arduino.cli.commands.v1.ZipLibraryInstallRequest + 49, // 51: cc.arduino.cli.commands.v1.ArduinoCoreService.GitLibraryInstall:input_type -> cc.arduino.cli.commands.v1.GitLibraryInstallRequest + 50, // 52: cc.arduino.cli.commands.v1.ArduinoCoreService.LibraryUninstall:input_type -> cc.arduino.cli.commands.v1.LibraryUninstallRequest + 51, // 53: cc.arduino.cli.commands.v1.ArduinoCoreService.LibraryUpgradeAll:input_type -> cc.arduino.cli.commands.v1.LibraryUpgradeAllRequest + 52, // 54: cc.arduino.cli.commands.v1.ArduinoCoreService.LibraryResolveDependencies:input_type -> cc.arduino.cli.commands.v1.LibraryResolveDependenciesRequest + 53, // 55: cc.arduino.cli.commands.v1.ArduinoCoreService.LibrarySearch:input_type -> cc.arduino.cli.commands.v1.LibrarySearchRequest + 54, // 56: cc.arduino.cli.commands.v1.ArduinoCoreService.LibraryList:input_type -> cc.arduino.cli.commands.v1.LibraryListRequest + 1, // 57: cc.arduino.cli.commands.v1.ArduinoCoreService.Create:output_type -> cc.arduino.cli.commands.v1.CreateResponse + 3, // 58: cc.arduino.cli.commands.v1.ArduinoCoreService.Init:output_type -> cc.arduino.cli.commands.v1.InitResponse + 5, // 59: cc.arduino.cli.commands.v1.ArduinoCoreService.Destroy:output_type -> cc.arduino.cli.commands.v1.DestroyResponse + 7, // 60: cc.arduino.cli.commands.v1.ArduinoCoreService.UpdateIndex:output_type -> cc.arduino.cli.commands.v1.UpdateIndexResponse + 9, // 61: cc.arduino.cli.commands.v1.ArduinoCoreService.UpdateLibrariesIndex:output_type -> cc.arduino.cli.commands.v1.UpdateLibrariesIndexResponse + 11, // 62: cc.arduino.cli.commands.v1.ArduinoCoreService.UpdateCoreLibrariesIndex:output_type -> cc.arduino.cli.commands.v1.UpdateCoreLibrariesIndexResponse + 13, // 63: cc.arduino.cli.commands.v1.ArduinoCoreService.Outdated:output_type -> cc.arduino.cli.commands.v1.OutdatedResponse + 15, // 64: cc.arduino.cli.commands.v1.ArduinoCoreService.Upgrade:output_type -> cc.arduino.cli.commands.v1.UpgradeResponse + 17, // 65: cc.arduino.cli.commands.v1.ArduinoCoreService.Version:output_type -> cc.arduino.cli.commands.v1.VersionResponse + 19, // 66: cc.arduino.cli.commands.v1.ArduinoCoreService.LoadSketch:output_type -> cc.arduino.cli.commands.v1.LoadSketchResponse + 21, // 67: cc.arduino.cli.commands.v1.ArduinoCoreService.ArchiveSketch:output_type -> cc.arduino.cli.commands.v1.ArchiveSketchResponse + 55, // 68: cc.arduino.cli.commands.v1.ArduinoCoreService.BoardDetails:output_type -> cc.arduino.cli.commands.v1.BoardDetailsResponse + 56, // 69: cc.arduino.cli.commands.v1.ArduinoCoreService.BoardAttach:output_type -> cc.arduino.cli.commands.v1.BoardAttachResponse + 57, // 70: cc.arduino.cli.commands.v1.ArduinoCoreService.BoardList:output_type -> cc.arduino.cli.commands.v1.BoardListResponse + 58, // 71: cc.arduino.cli.commands.v1.ArduinoCoreService.BoardListAll:output_type -> cc.arduino.cli.commands.v1.BoardListAllResponse + 59, // 72: cc.arduino.cli.commands.v1.ArduinoCoreService.BoardSearch:output_type -> cc.arduino.cli.commands.v1.BoardSearchResponse + 60, // 73: cc.arduino.cli.commands.v1.ArduinoCoreService.BoardListWatch:output_type -> cc.arduino.cli.commands.v1.BoardListWatchResponse + 61, // 74: cc.arduino.cli.commands.v1.ArduinoCoreService.Compile:output_type -> cc.arduino.cli.commands.v1.CompileResponse + 62, // 75: cc.arduino.cli.commands.v1.ArduinoCoreService.PlatformInstall:output_type -> cc.arduino.cli.commands.v1.PlatformInstallResponse + 63, // 76: cc.arduino.cli.commands.v1.ArduinoCoreService.PlatformDownload:output_type -> cc.arduino.cli.commands.v1.PlatformDownloadResponse + 64, // 77: cc.arduino.cli.commands.v1.ArduinoCoreService.PlatformUninstall:output_type -> cc.arduino.cli.commands.v1.PlatformUninstallResponse + 65, // 78: cc.arduino.cli.commands.v1.ArduinoCoreService.PlatformUpgrade:output_type -> cc.arduino.cli.commands.v1.PlatformUpgradeResponse + 66, // 79: cc.arduino.cli.commands.v1.ArduinoCoreService.Upload:output_type -> cc.arduino.cli.commands.v1.UploadResponse + 67, // 80: cc.arduino.cli.commands.v1.ArduinoCoreService.UploadUsingProgrammer:output_type -> cc.arduino.cli.commands.v1.UploadUsingProgrammerResponse + 68, // 81: cc.arduino.cli.commands.v1.ArduinoCoreService.ListProgrammersAvailableForUpload:output_type -> cc.arduino.cli.commands.v1.ListProgrammersAvailableForUploadResponse + 69, // 82: cc.arduino.cli.commands.v1.ArduinoCoreService.BurnBootloader:output_type -> cc.arduino.cli.commands.v1.BurnBootloaderResponse + 70, // 83: cc.arduino.cli.commands.v1.ArduinoCoreService.PlatformSearch:output_type -> cc.arduino.cli.commands.v1.PlatformSearchResponse + 71, // 84: cc.arduino.cli.commands.v1.ArduinoCoreService.PlatformList:output_type -> cc.arduino.cli.commands.v1.PlatformListResponse + 72, // 85: cc.arduino.cli.commands.v1.ArduinoCoreService.LibraryDownload:output_type -> cc.arduino.cli.commands.v1.LibraryDownloadResponse + 73, // 86: cc.arduino.cli.commands.v1.ArduinoCoreService.LibraryInstall:output_type -> cc.arduino.cli.commands.v1.LibraryInstallResponse + 74, // 87: cc.arduino.cli.commands.v1.ArduinoCoreService.ZipLibraryInstall:output_type -> cc.arduino.cli.commands.v1.ZipLibraryInstallResponse + 75, // 88: cc.arduino.cli.commands.v1.ArduinoCoreService.GitLibraryInstall:output_type -> cc.arduino.cli.commands.v1.GitLibraryInstallResponse + 76, // 89: cc.arduino.cli.commands.v1.ArduinoCoreService.LibraryUninstall:output_type -> cc.arduino.cli.commands.v1.LibraryUninstallResponse + 77, // 90: cc.arduino.cli.commands.v1.ArduinoCoreService.LibraryUpgradeAll:output_type -> cc.arduino.cli.commands.v1.LibraryUpgradeAllResponse + 78, // 91: cc.arduino.cli.commands.v1.ArduinoCoreService.LibraryResolveDependencies:output_type -> cc.arduino.cli.commands.v1.LibraryResolveDependenciesResponse + 79, // 92: cc.arduino.cli.commands.v1.ArduinoCoreService.LibrarySearch:output_type -> cc.arduino.cli.commands.v1.LibrarySearchResponse + 80, // 93: cc.arduino.cli.commands.v1.ArduinoCoreService.LibraryList:output_type -> cc.arduino.cli.commands.v1.LibraryListResponse + 57, // [57:94] is the sub-list for method output_type + 20, // [20:57] is the sub-list for method input_type + 20, // [20:20] is the sub-list for extension type_name + 20, // [20:20] is the sub-list for extension extendee + 0, // [0:20] is the sub-list for field type_name } func init() { file_cc_arduino_cli_commands_v1_commands_proto_init() } @@ -1882,7 +1915,7 @@ func file_cc_arduino_cli_commands_v1_commands_proto_init() { file_cc_arduino_cli_commands_v1_lib_proto_init() if !protoimpl.UnsafeEnabled { file_cc_arduino_cli_commands_v1_commands_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*InitRequest); i { + switch v := v.(*CreateRequest); i { case 0: return &v.state case 1: @@ -1894,7 +1927,7 @@ func file_cc_arduino_cli_commands_v1_commands_proto_init() { } } file_cc_arduino_cli_commands_v1_commands_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*InitResponse); i { + switch v := v.(*CreateResponse); i { case 0: return &v.state case 1: @@ -1906,7 +1939,7 @@ func file_cc_arduino_cli_commands_v1_commands_proto_init() { } } file_cc_arduino_cli_commands_v1_commands_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DestroyRequest); i { + switch v := v.(*InitRequest); i { case 0: return &v.state case 1: @@ -1918,7 +1951,7 @@ func file_cc_arduino_cli_commands_v1_commands_proto_init() { } } file_cc_arduino_cli_commands_v1_commands_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DestroyResponse); i { + switch v := v.(*InitResponse); i { case 0: return &v.state case 1: @@ -1930,7 +1963,7 @@ func file_cc_arduino_cli_commands_v1_commands_proto_init() { } } file_cc_arduino_cli_commands_v1_commands_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RescanRequest); i { + switch v := v.(*DestroyRequest); i { case 0: return &v.state case 1: @@ -1942,7 +1975,7 @@ func file_cc_arduino_cli_commands_v1_commands_proto_init() { } } file_cc_arduino_cli_commands_v1_commands_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RescanResponse); i { + switch v := v.(*DestroyResponse); i { case 0: return &v.state case 1: @@ -2145,6 +2178,22 @@ func file_cc_arduino_cli_commands_v1_commands_proto_init() { return nil } } + file_cc_arduino_cli_commands_v1_commands_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*InitResponse_Progress); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_cc_arduino_cli_commands_v1_commands_proto_msgTypes[3].OneofWrappers = []interface{}{ + (*InitResponse_InitProgress)(nil), + (*InitResponse_Error)(nil), } type x struct{} out := protoimpl.TypeBuilder{ @@ -2152,7 +2201,7 @@ func file_cc_arduino_cli_commands_v1_commands_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_cc_arduino_cli_commands_v1_commands_proto_rawDesc, NumEnums: 0, - NumMessages: 22, + NumMessages: 23, NumExtensions: 0, NumServices: 1, }, @@ -2165,3 +2214,2038 @@ func file_cc_arduino_cli_commands_v1_commands_proto_init() { file_cc_arduino_cli_commands_v1_commands_proto_goTypes = nil file_cc_arduino_cli_commands_v1_commands_proto_depIdxs = nil } + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConnInterface + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion6 + +// ArduinoCoreServiceClient is the client API for ArduinoCoreService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type ArduinoCoreServiceClient interface { + // 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 + 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 packages indexes for both Cores and Libraries + UpdateCoreLibrariesIndex(ctx context.Context, in *UpdateCoreLibrariesIndexRequest, opts ...grpc.CallOption) (ArduinoCoreService_UpdateCoreLibrariesIndexClient, error) + // Outdated returns a message with a list of outdated Cores and Libraries + Outdated(ctx context.Context, in *OutdatedRequest, opts ...grpc.CallOption) (*OutdatedResponse, error) + // Upgrade both Cores and Libraries + Upgrade(ctx context.Context, in *UpgradeRequest, opts ...grpc.CallOption) (ArduinoCoreService_UpgradeClient, error) + // Get the version of Arduino CLI in use. + Version(ctx context.Context, in *VersionRequest, opts ...grpc.CallOption) (*VersionResponse, error) + // 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 + ArchiveSketch(ctx context.Context, in *ArchiveSketchRequest, opts ...grpc.CallOption) (*ArchiveSketchResponse, error) + // Requests details about a board + BoardDetails(ctx context.Context, in *BoardDetailsRequest, opts ...grpc.CallOption) (*BoardDetailsResponse, error) + // Attach a board to a sketch. When the `fqbn` field of a request is not + // provided, the FQBN of the attached board will be used. + BoardAttach(ctx context.Context, in *BoardAttachRequest, opts ...grpc.CallOption) (ArduinoCoreService_BoardAttachClient, error) + // List the boards currently connected to the computer. + BoardList(ctx context.Context, in *BoardListRequest, opts ...grpc.CallOption) (*BoardListResponse, error) + // List all the boards provided by installed platforms. + BoardListAll(ctx context.Context, in *BoardListAllRequest, opts ...grpc.CallOption) (*BoardListAllResponse, error) + // 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, opts ...grpc.CallOption) (ArduinoCoreService_BoardListWatchClient, error) + // Compile an Arduino sketch. + Compile(ctx context.Context, in *CompileRequest, opts ...grpc.CallOption) (ArduinoCoreService_CompileClient, error) + // Download and install a platform and its tool dependencies. + PlatformInstall(ctx context.Context, in *PlatformInstallRequest, opts ...grpc.CallOption) (ArduinoCoreService_PlatformInstallClient, 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) + // 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) + // Upgrade an installed platform to the latest version. + PlatformUpgrade(ctx context.Context, in *PlatformUpgradeRequest, opts ...grpc.CallOption) (ArduinoCoreService_PlatformUpgradeClient, error) + // Upload a compiled sketch to a board. + Upload(ctx context.Context, in *UploadRequest, opts ...grpc.CallOption) (ArduinoCoreService_UploadClient, error) + // Upload a compiled sketch to a board using a programmer. + UploadUsingProgrammer(ctx context.Context, in *UploadUsingProgrammerRequest, opts ...grpc.CallOption) (ArduinoCoreService_UploadUsingProgrammerClient, 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) + // Search for a platform in the platforms indexes. + PlatformSearch(ctx context.Context, in *PlatformSearchRequest, opts ...grpc.CallOption) (*PlatformSearchResponse, error) + // List all installed platforms. + PlatformList(ctx context.Context, in *PlatformListRequest, opts ...grpc.CallOption) (*PlatformListResponse, 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) + // Download and install an Arduino library from the libraries index. + LibraryInstall(ctx context.Context, in *LibraryInstallRequest, opts ...grpc.CallOption) (ArduinoCoreService_LibraryInstallClient, 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) + // Uninstall an Arduino library. + LibraryUninstall(ctx context.Context, in *LibraryUninstallRequest, opts ...grpc.CallOption) (ArduinoCoreService_LibraryUninstallClient, error) + // Upgrade all installed Arduino libraries to the newest version available. + LibraryUpgradeAll(ctx context.Context, in *LibraryUpgradeAllRequest, opts ...grpc.CallOption) (ArduinoCoreService_LibraryUpgradeAllClient, 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) + // Search the Arduino libraries index for libraries. + 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) +} + +type arduinoCoreServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewArduinoCoreServiceClient(cc grpc.ClientConnInterface) ArduinoCoreServiceClient { + return &arduinoCoreServiceClient{cc} +} + +func (c *arduinoCoreServiceClient) Create(ctx context.Context, in *CreateRequest, opts ...grpc.CallOption) (*CreateResponse, error) { + out := new(CreateResponse) + err := c.cc.Invoke(ctx, "/cc.arduino.cli.commands.v1.ArduinoCoreService/Create", in, out, opts...) + 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], "/cc.arduino.cli.commands.v1.ArduinoCoreService/Init", opts...) + if err != nil { + return nil, err + } + x := &arduinoCoreServiceInitClient{stream} + if err := x.ClientStream.SendMsg(in); err != nil { + return nil, err + } + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + 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 +} + +func (c *arduinoCoreServiceClient) Destroy(ctx context.Context, in *DestroyRequest, opts ...grpc.CallOption) (*DestroyResponse, error) { + out := new(DestroyResponse) + err := c.cc.Invoke(ctx, "/cc.arduino.cli.commands.v1.ArduinoCoreService/Destroy", in, out, opts...) + 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], "/cc.arduino.cli.commands.v1.ArduinoCoreService/UpdateIndex", opts...) + if err != nil { + return nil, err + } + x := &arduinoCoreServiceUpdateIndexClient{stream} + if err := x.ClientStream.SendMsg(in); err != nil { + return nil, err + } + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + return x, nil +} + +type ArduinoCoreService_UpdateIndexClient interface { + Recv() (*UpdateIndexResponse, error) + grpc.ClientStream +} + +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], "/cc.arduino.cli.commands.v1.ArduinoCoreService/UpdateLibrariesIndex", opts...) + if err != nil { + return nil, err + } + x := &arduinoCoreServiceUpdateLibrariesIndexClient{stream} + if err := x.ClientStream.SendMsg(in); err != nil { + return nil, err + } + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + 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 +} + +func (c *arduinoCoreServiceClient) UpdateCoreLibrariesIndex(ctx context.Context, in *UpdateCoreLibrariesIndexRequest, opts ...grpc.CallOption) (ArduinoCoreService_UpdateCoreLibrariesIndexClient, error) { + stream, err := c.cc.NewStream(ctx, &_ArduinoCoreService_serviceDesc.Streams[3], "/cc.arduino.cli.commands.v1.ArduinoCoreService/UpdateCoreLibrariesIndex", opts...) + if err != nil { + return nil, err + } + x := &arduinoCoreServiceUpdateCoreLibrariesIndexClient{stream} + if err := x.ClientStream.SendMsg(in); err != nil { + return nil, err + } + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + return x, nil +} + +type ArduinoCoreService_UpdateCoreLibrariesIndexClient interface { + Recv() (*UpdateCoreLibrariesIndexResponse, error) + grpc.ClientStream +} + +type arduinoCoreServiceUpdateCoreLibrariesIndexClient struct { + grpc.ClientStream +} + +func (x *arduinoCoreServiceUpdateCoreLibrariesIndexClient) Recv() (*UpdateCoreLibrariesIndexResponse, error) { + m := new(UpdateCoreLibrariesIndexResponse) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func (c *arduinoCoreServiceClient) Outdated(ctx context.Context, in *OutdatedRequest, opts ...grpc.CallOption) (*OutdatedResponse, error) { + out := new(OutdatedResponse) + err := c.cc.Invoke(ctx, "/cc.arduino.cli.commands.v1.ArduinoCoreService/Outdated", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *arduinoCoreServiceClient) Upgrade(ctx context.Context, in *UpgradeRequest, opts ...grpc.CallOption) (ArduinoCoreService_UpgradeClient, error) { + stream, err := c.cc.NewStream(ctx, &_ArduinoCoreService_serviceDesc.Streams[4], "/cc.arduino.cli.commands.v1.ArduinoCoreService/Upgrade", opts...) + if err != nil { + return nil, err + } + x := &arduinoCoreServiceUpgradeClient{stream} + if err := x.ClientStream.SendMsg(in); err != nil { + return nil, err + } + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + return x, nil +} + +type ArduinoCoreService_UpgradeClient interface { + Recv() (*UpgradeResponse, error) + grpc.ClientStream +} + +type arduinoCoreServiceUpgradeClient struct { + grpc.ClientStream +} + +func (x *arduinoCoreServiceUpgradeClient) Recv() (*UpgradeResponse, error) { + m := new(UpgradeResponse) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func (c *arduinoCoreServiceClient) Version(ctx context.Context, in *VersionRequest, opts ...grpc.CallOption) (*VersionResponse, error) { + out := new(VersionResponse) + err := c.cc.Invoke(ctx, "/cc.arduino.cli.commands.v1.ArduinoCoreService/Version", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *arduinoCoreServiceClient) LoadSketch(ctx context.Context, in *LoadSketchRequest, opts ...grpc.CallOption) (*LoadSketchResponse, error) { + out := new(LoadSketchResponse) + err := c.cc.Invoke(ctx, "/cc.arduino.cli.commands.v1.ArduinoCoreService/LoadSketch", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *arduinoCoreServiceClient) ArchiveSketch(ctx context.Context, in *ArchiveSketchRequest, opts ...grpc.CallOption) (*ArchiveSketchResponse, error) { + out := new(ArchiveSketchResponse) + err := c.cc.Invoke(ctx, "/cc.arduino.cli.commands.v1.ArduinoCoreService/ArchiveSketch", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *arduinoCoreServiceClient) BoardDetails(ctx context.Context, in *BoardDetailsRequest, opts ...grpc.CallOption) (*BoardDetailsResponse, error) { + out := new(BoardDetailsResponse) + err := c.cc.Invoke(ctx, "/cc.arduino.cli.commands.v1.ArduinoCoreService/BoardDetails", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *arduinoCoreServiceClient) BoardAttach(ctx context.Context, in *BoardAttachRequest, opts ...grpc.CallOption) (ArduinoCoreService_BoardAttachClient, error) { + stream, err := c.cc.NewStream(ctx, &_ArduinoCoreService_serviceDesc.Streams[5], "/cc.arduino.cli.commands.v1.ArduinoCoreService/BoardAttach", opts...) + if err != nil { + return nil, err + } + x := &arduinoCoreServiceBoardAttachClient{stream} + if err := x.ClientStream.SendMsg(in); err != nil { + return nil, err + } + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + return x, nil +} + +type ArduinoCoreService_BoardAttachClient interface { + Recv() (*BoardAttachResponse, error) + grpc.ClientStream +} + +type arduinoCoreServiceBoardAttachClient struct { + grpc.ClientStream +} + +func (x *arduinoCoreServiceBoardAttachClient) Recv() (*BoardAttachResponse, error) { + m := new(BoardAttachResponse) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func (c *arduinoCoreServiceClient) BoardList(ctx context.Context, in *BoardListRequest, opts ...grpc.CallOption) (*BoardListResponse, error) { + out := new(BoardListResponse) + err := c.cc.Invoke(ctx, "/cc.arduino.cli.commands.v1.ArduinoCoreService/BoardList", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *arduinoCoreServiceClient) BoardListAll(ctx context.Context, in *BoardListAllRequest, opts ...grpc.CallOption) (*BoardListAllResponse, error) { + out := new(BoardListAllResponse) + err := c.cc.Invoke(ctx, "/cc.arduino.cli.commands.v1.ArduinoCoreService/BoardListAll", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *arduinoCoreServiceClient) BoardSearch(ctx context.Context, in *BoardSearchRequest, opts ...grpc.CallOption) (*BoardSearchResponse, error) { + out := new(BoardSearchResponse) + err := c.cc.Invoke(ctx, "/cc.arduino.cli.commands.v1.ArduinoCoreService/BoardSearch", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *arduinoCoreServiceClient) BoardListWatch(ctx context.Context, opts ...grpc.CallOption) (ArduinoCoreService_BoardListWatchClient, error) { + stream, err := c.cc.NewStream(ctx, &_ArduinoCoreService_serviceDesc.Streams[6], "/cc.arduino.cli.commands.v1.ArduinoCoreService/BoardListWatch", opts...) + if err != nil { + return nil, err + } + x := &arduinoCoreServiceBoardListWatchClient{stream} + return x, nil +} + +type ArduinoCoreService_BoardListWatchClient interface { + Send(*BoardListWatchRequest) error + Recv() (*BoardListWatchResponse, error) + grpc.ClientStream +} + +type arduinoCoreServiceBoardListWatchClient struct { + grpc.ClientStream +} + +func (x *arduinoCoreServiceBoardListWatchClient) Send(m *BoardListWatchRequest) error { + return x.ClientStream.SendMsg(m) +} + +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[7], "/cc.arduino.cli.commands.v1.ArduinoCoreService/Compile", opts...) + if err != nil { + return nil, err + } + x := &arduinoCoreServiceCompileClient{stream} + if err := x.ClientStream.SendMsg(in); err != nil { + return nil, err + } + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + 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 +} + +func (c *arduinoCoreServiceClient) PlatformInstall(ctx context.Context, in *PlatformInstallRequest, opts ...grpc.CallOption) (ArduinoCoreService_PlatformInstallClient, error) { + stream, err := c.cc.NewStream(ctx, &_ArduinoCoreService_serviceDesc.Streams[8], "/cc.arduino.cli.commands.v1.ArduinoCoreService/PlatformInstall", opts...) + if err != nil { + return nil, err + } + x := &arduinoCoreServicePlatformInstallClient{stream} + if err := x.ClientStream.SendMsg(in); err != nil { + return nil, err + } + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + 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 +} + +func (c *arduinoCoreServiceClient) PlatformDownload(ctx context.Context, in *PlatformDownloadRequest, opts ...grpc.CallOption) (ArduinoCoreService_PlatformDownloadClient, error) { + stream, err := c.cc.NewStream(ctx, &_ArduinoCoreService_serviceDesc.Streams[9], "/cc.arduino.cli.commands.v1.ArduinoCoreService/PlatformDownload", opts...) + if err != nil { + return nil, err + } + x := &arduinoCoreServicePlatformDownloadClient{stream} + if err := x.ClientStream.SendMsg(in); err != nil { + return nil, err + } + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + 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 +} + +func (c *arduinoCoreServiceClient) PlatformUninstall(ctx context.Context, in *PlatformUninstallRequest, opts ...grpc.CallOption) (ArduinoCoreService_PlatformUninstallClient, error) { + stream, err := c.cc.NewStream(ctx, &_ArduinoCoreService_serviceDesc.Streams[10], "/cc.arduino.cli.commands.v1.ArduinoCoreService/PlatformUninstall", opts...) + if err != nil { + return nil, err + } + x := &arduinoCoreServicePlatformUninstallClient{stream} + if err := x.ClientStream.SendMsg(in); err != nil { + return nil, err + } + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + return x, nil +} + +type ArduinoCoreService_PlatformUninstallClient interface { + Recv() (*PlatformUninstallResponse, error) + grpc.ClientStream +} + +type arduinoCoreServicePlatformUninstallClient struct { + grpc.ClientStream +} + +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[11], "/cc.arduino.cli.commands.v1.ArduinoCoreService/PlatformUpgrade", opts...) + if err != nil { + return nil, err + } + x := &arduinoCoreServicePlatformUpgradeClient{stream} + if err := x.ClientStream.SendMsg(in); err != nil { + return nil, err + } + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + return x, nil +} + +type ArduinoCoreService_PlatformUpgradeClient interface { + Recv() (*PlatformUpgradeResponse, error) + grpc.ClientStream +} + +type arduinoCoreServicePlatformUpgradeClient struct { + grpc.ClientStream +} + +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[12], "/cc.arduino.cli.commands.v1.ArduinoCoreService/Upload", opts...) + if err != nil { + return nil, err + } + x := &arduinoCoreServiceUploadClient{stream} + if err := x.ClientStream.SendMsg(in); err != nil { + return nil, err + } + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + return x, nil +} + +type ArduinoCoreService_UploadClient interface { + Recv() (*UploadResponse, error) + grpc.ClientStream +} + +type arduinoCoreServiceUploadClient struct { + grpc.ClientStream +} + +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[13], "/cc.arduino.cli.commands.v1.ArduinoCoreService/UploadUsingProgrammer", opts...) + if err != nil { + return nil, err + } + x := &arduinoCoreServiceUploadUsingProgrammerClient{stream} + if err := x.ClientStream.SendMsg(in); err != nil { + return nil, err + } + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + 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 +} + +func (c *arduinoCoreServiceClient) ListProgrammersAvailableForUpload(ctx context.Context, in *ListProgrammersAvailableForUploadRequest, opts ...grpc.CallOption) (*ListProgrammersAvailableForUploadResponse, error) { + out := new(ListProgrammersAvailableForUploadResponse) + err := c.cc.Invoke(ctx, "/cc.arduino.cli.commands.v1.ArduinoCoreService/ListProgrammersAvailableForUpload", in, out, opts...) + 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[14], "/cc.arduino.cli.commands.v1.ArduinoCoreService/BurnBootloader", opts...) + if err != nil { + return nil, err + } + x := &arduinoCoreServiceBurnBootloaderClient{stream} + if err := x.ClientStream.SendMsg(in); err != nil { + return nil, err + } + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + 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 +} + +func (c *arduinoCoreServiceClient) PlatformSearch(ctx context.Context, in *PlatformSearchRequest, opts ...grpc.CallOption) (*PlatformSearchResponse, error) { + out := new(PlatformSearchResponse) + err := c.cc.Invoke(ctx, "/cc.arduino.cli.commands.v1.ArduinoCoreService/PlatformSearch", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *arduinoCoreServiceClient) PlatformList(ctx context.Context, in *PlatformListRequest, opts ...grpc.CallOption) (*PlatformListResponse, error) { + out := new(PlatformListResponse) + err := c.cc.Invoke(ctx, "/cc.arduino.cli.commands.v1.ArduinoCoreService/PlatformList", in, out, opts...) + 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[15], "/cc.arduino.cli.commands.v1.ArduinoCoreService/LibraryDownload", opts...) + if err != nil { + return nil, err + } + x := &arduinoCoreServiceLibraryDownloadClient{stream} + if err := x.ClientStream.SendMsg(in); err != nil { + return nil, err + } + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + return x, nil +} + +type ArduinoCoreService_LibraryDownloadClient interface { + Recv() (*LibraryDownloadResponse, error) + grpc.ClientStream +} + +type arduinoCoreServiceLibraryDownloadClient struct { + grpc.ClientStream +} + +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[16], "/cc.arduino.cli.commands.v1.ArduinoCoreService/LibraryInstall", opts...) + if err != nil { + return nil, err + } + x := &arduinoCoreServiceLibraryInstallClient{stream} + if err := x.ClientStream.SendMsg(in); err != nil { + return nil, err + } + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + return x, nil +} + +type ArduinoCoreService_LibraryInstallClient interface { + Recv() (*LibraryInstallResponse, error) + grpc.ClientStream +} + +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) ZipLibraryInstall(ctx context.Context, in *ZipLibraryInstallRequest, opts ...grpc.CallOption) (ArduinoCoreService_ZipLibraryInstallClient, error) { + stream, err := c.cc.NewStream(ctx, &_ArduinoCoreService_serviceDesc.Streams[17], "/cc.arduino.cli.commands.v1.ArduinoCoreService/ZipLibraryInstall", opts...) + if err != nil { + return nil, err + } + x := &arduinoCoreServiceZipLibraryInstallClient{stream} + if err := x.ClientStream.SendMsg(in); err != nil { + return nil, err + } + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + return x, nil +} + +type ArduinoCoreService_ZipLibraryInstallClient interface { + Recv() (*ZipLibraryInstallResponse, error) + grpc.ClientStream +} + +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[18], "/cc.arduino.cli.commands.v1.ArduinoCoreService/GitLibraryInstall", opts...) + if err != nil { + return nil, err + } + x := &arduinoCoreServiceGitLibraryInstallClient{stream} + if err := x.ClientStream.SendMsg(in); err != nil { + return nil, err + } + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + return x, nil +} + +type ArduinoCoreService_GitLibraryInstallClient interface { + Recv() (*GitLibraryInstallResponse, error) + grpc.ClientStream +} + +type arduinoCoreServiceGitLibraryInstallClient struct { + grpc.ClientStream +} + +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[19], "/cc.arduino.cli.commands.v1.ArduinoCoreService/LibraryUninstall", opts...) + if err != nil { + return nil, err + } + x := &arduinoCoreServiceLibraryUninstallClient{stream} + if err := x.ClientStream.SendMsg(in); err != nil { + return nil, err + } + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + 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 +} + +func (c *arduinoCoreServiceClient) LibraryUpgradeAll(ctx context.Context, in *LibraryUpgradeAllRequest, opts ...grpc.CallOption) (ArduinoCoreService_LibraryUpgradeAllClient, error) { + stream, err := c.cc.NewStream(ctx, &_ArduinoCoreService_serviceDesc.Streams[20], "/cc.arduino.cli.commands.v1.ArduinoCoreService/LibraryUpgradeAll", opts...) + if err != nil { + return nil, err + } + x := &arduinoCoreServiceLibraryUpgradeAllClient{stream} + if err := x.ClientStream.SendMsg(in); err != nil { + return nil, err + } + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + 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 +} + +func (c *arduinoCoreServiceClient) LibraryResolveDependencies(ctx context.Context, in *LibraryResolveDependenciesRequest, opts ...grpc.CallOption) (*LibraryResolveDependenciesResponse, error) { + out := new(LibraryResolveDependenciesResponse) + err := c.cc.Invoke(ctx, "/cc.arduino.cli.commands.v1.ArduinoCoreService/LibraryResolveDependencies", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *arduinoCoreServiceClient) LibrarySearch(ctx context.Context, in *LibrarySearchRequest, opts ...grpc.CallOption) (*LibrarySearchResponse, error) { + out := new(LibrarySearchResponse) + err := c.cc.Invoke(ctx, "/cc.arduino.cli.commands.v1.ArduinoCoreService/LibrarySearch", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *arduinoCoreServiceClient) LibraryList(ctx context.Context, in *LibraryListRequest, opts ...grpc.CallOption) (*LibraryListResponse, error) { + out := new(LibraryListResponse) + err := c.cc.Invoke(ctx, "/cc.arduino.cli.commands.v1.ArduinoCoreService/LibraryList", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// ArduinoCoreServiceServer is the server API for ArduinoCoreService service. +type ArduinoCoreServiceServer interface { + // 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 + 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 packages indexes for both Cores and Libraries + UpdateCoreLibrariesIndex(*UpdateCoreLibrariesIndexRequest, ArduinoCoreService_UpdateCoreLibrariesIndexServer) error + // Outdated returns a message with a list of outdated Cores and Libraries + Outdated(context.Context, *OutdatedRequest) (*OutdatedResponse, error) + // Upgrade both Cores and Libraries + Upgrade(*UpgradeRequest, ArduinoCoreService_UpgradeServer) error + // Get the version of Arduino CLI in use. + Version(context.Context, *VersionRequest) (*VersionResponse, error) + // Returns all files composing a Sketch + LoadSketch(context.Context, *LoadSketchRequest) (*LoadSketchResponse, error) + // Creates a zip file containing all files of specified Sketch + ArchiveSketch(context.Context, *ArchiveSketchRequest) (*ArchiveSketchResponse, error) + // Requests details about a board + BoardDetails(context.Context, *BoardDetailsRequest) (*BoardDetailsResponse, error) + // Attach a board to a sketch. When the `fqbn` field of a request is not + // provided, the FQBN of the attached board will be used. + BoardAttach(*BoardAttachRequest, ArduinoCoreService_BoardAttachServer) error + // List the boards currently connected to the computer. + BoardList(context.Context, *BoardListRequest) (*BoardListResponse, error) + // List all the boards provided by installed platforms. + BoardListAll(context.Context, *BoardListAllRequest) (*BoardListAllResponse, error) + // Search boards in installed and not installed Platforms. + BoardSearch(context.Context, *BoardSearchRequest) (*BoardSearchResponse, error) + // List boards connection and disconnected events. + BoardListWatch(ArduinoCoreService_BoardListWatchServer) error + // Compile an Arduino sketch. + Compile(*CompileRequest, ArduinoCoreService_CompileServer) error + // Download and install a platform and its tool dependencies. + PlatformInstall(*PlatformInstallRequest, ArduinoCoreService_PlatformInstallServer) error + // Download a platform and its tool dependencies to the `staging/packages` + // subdirectory of the data directory. + PlatformDownload(*PlatformDownloadRequest, ArduinoCoreService_PlatformDownloadServer) error + // Uninstall a platform as well as its tool dependencies that are not used by + // other installed platforms. + PlatformUninstall(*PlatformUninstallRequest, ArduinoCoreService_PlatformUninstallServer) error + // Upgrade an installed platform to the latest version. + PlatformUpgrade(*PlatformUpgradeRequest, ArduinoCoreService_PlatformUpgradeServer) error + // Upload a compiled sketch to a board. + Upload(*UploadRequest, ArduinoCoreService_UploadServer) error + // Upload a compiled sketch to a board using a programmer. + UploadUsingProgrammer(*UploadUsingProgrammerRequest, ArduinoCoreService_UploadUsingProgrammerServer) error + // List programmers available for a board. + ListProgrammersAvailableForUpload(context.Context, *ListProgrammersAvailableForUploadRequest) (*ListProgrammersAvailableForUploadResponse, error) + // Burn bootloader to a board. + BurnBootloader(*BurnBootloaderRequest, ArduinoCoreService_BurnBootloaderServer) error + // Search for a platform in the platforms indexes. + PlatformSearch(context.Context, *PlatformSearchRequest) (*PlatformSearchResponse, error) + // List all installed platforms. + PlatformList(context.Context, *PlatformListRequest) (*PlatformListResponse, error) + // Download the archive file of an Arduino library in the libraries index to + // the staging directory. + LibraryDownload(*LibraryDownloadRequest, ArduinoCoreService_LibraryDownloadServer) error + // Download and install an Arduino library from the libraries index. + LibraryInstall(*LibraryInstallRequest, ArduinoCoreService_LibraryInstallServer) 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 + // Uninstall an Arduino library. + LibraryUninstall(*LibraryUninstallRequest, ArduinoCoreService_LibraryUninstallServer) error + // Upgrade all installed Arduino libraries to the newest version available. + LibraryUpgradeAll(*LibraryUpgradeAllRequest, ArduinoCoreService_LibraryUpgradeAllServer) 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) + // Search the Arduino libraries index for libraries. + LibrarySearch(context.Context, *LibrarySearchRequest) (*LibrarySearchResponse, error) + // List the installed libraries. + LibraryList(context.Context, *LibraryListRequest) (*LibraryListResponse, error) +} + +// UnimplementedArduinoCoreServiceServer can be embedded to have forward compatible implementations. +type UnimplementedArduinoCoreServiceServer struct { +} + +func (*UnimplementedArduinoCoreServiceServer) Create(context.Context, *CreateRequest) (*CreateResponse, error) { + return nil, status1.Errorf(codes.Unimplemented, "method Create not implemented") +} +func (*UnimplementedArduinoCoreServiceServer) Init(*InitRequest, ArduinoCoreService_InitServer) error { + return status1.Errorf(codes.Unimplemented, "method Init not implemented") +} +func (*UnimplementedArduinoCoreServiceServer) Destroy(context.Context, *DestroyRequest) (*DestroyResponse, error) { + return nil, status1.Errorf(codes.Unimplemented, "method Destroy not implemented") +} +func (*UnimplementedArduinoCoreServiceServer) UpdateIndex(*UpdateIndexRequest, ArduinoCoreService_UpdateIndexServer) error { + return status1.Errorf(codes.Unimplemented, "method UpdateIndex not implemented") +} +func (*UnimplementedArduinoCoreServiceServer) UpdateLibrariesIndex(*UpdateLibrariesIndexRequest, ArduinoCoreService_UpdateLibrariesIndexServer) error { + return status1.Errorf(codes.Unimplemented, "method UpdateLibrariesIndex not implemented") +} +func (*UnimplementedArduinoCoreServiceServer) UpdateCoreLibrariesIndex(*UpdateCoreLibrariesIndexRequest, ArduinoCoreService_UpdateCoreLibrariesIndexServer) error { + return status1.Errorf(codes.Unimplemented, "method UpdateCoreLibrariesIndex not implemented") +} +func (*UnimplementedArduinoCoreServiceServer) Outdated(context.Context, *OutdatedRequest) (*OutdatedResponse, error) { + return nil, status1.Errorf(codes.Unimplemented, "method Outdated not implemented") +} +func (*UnimplementedArduinoCoreServiceServer) Upgrade(*UpgradeRequest, ArduinoCoreService_UpgradeServer) error { + return status1.Errorf(codes.Unimplemented, "method Upgrade not implemented") +} +func (*UnimplementedArduinoCoreServiceServer) Version(context.Context, *VersionRequest) (*VersionResponse, error) { + return nil, status1.Errorf(codes.Unimplemented, "method Version not implemented") +} +func (*UnimplementedArduinoCoreServiceServer) LoadSketch(context.Context, *LoadSketchRequest) (*LoadSketchResponse, error) { + return nil, status1.Errorf(codes.Unimplemented, "method LoadSketch not implemented") +} +func (*UnimplementedArduinoCoreServiceServer) ArchiveSketch(context.Context, *ArchiveSketchRequest) (*ArchiveSketchResponse, error) { + return nil, status1.Errorf(codes.Unimplemented, "method ArchiveSketch not implemented") +} +func (*UnimplementedArduinoCoreServiceServer) BoardDetails(context.Context, *BoardDetailsRequest) (*BoardDetailsResponse, error) { + return nil, status1.Errorf(codes.Unimplemented, "method BoardDetails not implemented") +} +func (*UnimplementedArduinoCoreServiceServer) BoardAttach(*BoardAttachRequest, ArduinoCoreService_BoardAttachServer) error { + return status1.Errorf(codes.Unimplemented, "method BoardAttach not implemented") +} +func (*UnimplementedArduinoCoreServiceServer) BoardList(context.Context, *BoardListRequest) (*BoardListResponse, error) { + return nil, status1.Errorf(codes.Unimplemented, "method BoardList not implemented") +} +func (*UnimplementedArduinoCoreServiceServer) BoardListAll(context.Context, *BoardListAllRequest) (*BoardListAllResponse, error) { + return nil, status1.Errorf(codes.Unimplemented, "method BoardListAll not implemented") +} +func (*UnimplementedArduinoCoreServiceServer) BoardSearch(context.Context, *BoardSearchRequest) (*BoardSearchResponse, error) { + return nil, status1.Errorf(codes.Unimplemented, "method BoardSearch not implemented") +} +func (*UnimplementedArduinoCoreServiceServer) BoardListWatch(ArduinoCoreService_BoardListWatchServer) error { + return status1.Errorf(codes.Unimplemented, "method BoardListWatch not implemented") +} +func (*UnimplementedArduinoCoreServiceServer) Compile(*CompileRequest, ArduinoCoreService_CompileServer) error { + return status1.Errorf(codes.Unimplemented, "method Compile not implemented") +} +func (*UnimplementedArduinoCoreServiceServer) PlatformInstall(*PlatformInstallRequest, ArduinoCoreService_PlatformInstallServer) error { + return status1.Errorf(codes.Unimplemented, "method PlatformInstall not implemented") +} +func (*UnimplementedArduinoCoreServiceServer) PlatformDownload(*PlatformDownloadRequest, ArduinoCoreService_PlatformDownloadServer) error { + return status1.Errorf(codes.Unimplemented, "method PlatformDownload not implemented") +} +func (*UnimplementedArduinoCoreServiceServer) PlatformUninstall(*PlatformUninstallRequest, ArduinoCoreService_PlatformUninstallServer) error { + return status1.Errorf(codes.Unimplemented, "method PlatformUninstall not implemented") +} +func (*UnimplementedArduinoCoreServiceServer) PlatformUpgrade(*PlatformUpgradeRequest, ArduinoCoreService_PlatformUpgradeServer) error { + return status1.Errorf(codes.Unimplemented, "method PlatformUpgrade not implemented") +} +func (*UnimplementedArduinoCoreServiceServer) Upload(*UploadRequest, ArduinoCoreService_UploadServer) error { + return status1.Errorf(codes.Unimplemented, "method Upload not implemented") +} +func (*UnimplementedArduinoCoreServiceServer) UploadUsingProgrammer(*UploadUsingProgrammerRequest, ArduinoCoreService_UploadUsingProgrammerServer) error { + return status1.Errorf(codes.Unimplemented, "method UploadUsingProgrammer not implemented") +} +func (*UnimplementedArduinoCoreServiceServer) ListProgrammersAvailableForUpload(context.Context, *ListProgrammersAvailableForUploadRequest) (*ListProgrammersAvailableForUploadResponse, error) { + return nil, status1.Errorf(codes.Unimplemented, "method ListProgrammersAvailableForUpload not implemented") +} +func (*UnimplementedArduinoCoreServiceServer) BurnBootloader(*BurnBootloaderRequest, ArduinoCoreService_BurnBootloaderServer) error { + return status1.Errorf(codes.Unimplemented, "method BurnBootloader not implemented") +} +func (*UnimplementedArduinoCoreServiceServer) PlatformSearch(context.Context, *PlatformSearchRequest) (*PlatformSearchResponse, error) { + return nil, status1.Errorf(codes.Unimplemented, "method PlatformSearch not implemented") +} +func (*UnimplementedArduinoCoreServiceServer) PlatformList(context.Context, *PlatformListRequest) (*PlatformListResponse, error) { + return nil, status1.Errorf(codes.Unimplemented, "method PlatformList not implemented") +} +func (*UnimplementedArduinoCoreServiceServer) LibraryDownload(*LibraryDownloadRequest, ArduinoCoreService_LibraryDownloadServer) error { + return status1.Errorf(codes.Unimplemented, "method LibraryDownload not implemented") +} +func (*UnimplementedArduinoCoreServiceServer) LibraryInstall(*LibraryInstallRequest, ArduinoCoreService_LibraryInstallServer) error { + return status1.Errorf(codes.Unimplemented, "method LibraryInstall not implemented") +} +func (*UnimplementedArduinoCoreServiceServer) ZipLibraryInstall(*ZipLibraryInstallRequest, ArduinoCoreService_ZipLibraryInstallServer) error { + return status1.Errorf(codes.Unimplemented, "method ZipLibraryInstall not implemented") +} +func (*UnimplementedArduinoCoreServiceServer) GitLibraryInstall(*GitLibraryInstallRequest, ArduinoCoreService_GitLibraryInstallServer) error { + return status1.Errorf(codes.Unimplemented, "method GitLibraryInstall not implemented") +} +func (*UnimplementedArduinoCoreServiceServer) LibraryUninstall(*LibraryUninstallRequest, ArduinoCoreService_LibraryUninstallServer) error { + return status1.Errorf(codes.Unimplemented, "method LibraryUninstall not implemented") +} +func (*UnimplementedArduinoCoreServiceServer) LibraryUpgradeAll(*LibraryUpgradeAllRequest, ArduinoCoreService_LibraryUpgradeAllServer) error { + return status1.Errorf(codes.Unimplemented, "method LibraryUpgradeAll not implemented") +} +func (*UnimplementedArduinoCoreServiceServer) LibraryResolveDependencies(context.Context, *LibraryResolveDependenciesRequest) (*LibraryResolveDependenciesResponse, error) { + return nil, status1.Errorf(codes.Unimplemented, "method LibraryResolveDependencies not implemented") +} +func (*UnimplementedArduinoCoreServiceServer) LibrarySearch(context.Context, *LibrarySearchRequest) (*LibrarySearchResponse, error) { + return nil, status1.Errorf(codes.Unimplemented, "method LibrarySearch not implemented") +} +func (*UnimplementedArduinoCoreServiceServer) LibraryList(context.Context, *LibraryListRequest) (*LibraryListResponse, error) { + return nil, status1.Errorf(codes.Unimplemented, "method LibraryList not implemented") +} + +func RegisterArduinoCoreServiceServer(s *grpc.Server, srv ArduinoCoreServiceServer) { + s.RegisterService(&_ArduinoCoreService_serviceDesc, srv) +} + +func _ArduinoCoreService_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ArduinoCoreServiceServer).Create(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cc.arduino.cli.commands.v1.ArduinoCoreService/Create", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ArduinoCoreServiceServer).Create(ctx, req.(*CreateRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ArduinoCoreService_Init_Handler(srv interface{}, stream grpc.ServerStream) error { + m := new(InitRequest) + if err := stream.RecvMsg(m); err != nil { + return err + } + return srv.(ArduinoCoreServiceServer).Init(m, &arduinoCoreServiceInitServer{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) +} + +func _ArduinoCoreService_Destroy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DestroyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ArduinoCoreServiceServer).Destroy(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cc.arduino.cli.commands.v1.ArduinoCoreService/Destroy", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ArduinoCoreServiceServer).Destroy(ctx, req.(*DestroyRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ArduinoCoreService_UpdateIndex_Handler(srv interface{}, stream grpc.ServerStream) error { + m := new(UpdateIndexRequest) + if err := stream.RecvMsg(m); err != nil { + return err + } + return srv.(ArduinoCoreServiceServer).UpdateIndex(m, &arduinoCoreServiceUpdateIndexServer{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) +} + +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 +} + +type arduinoCoreServiceUpdateLibrariesIndexServer struct { + grpc.ServerStream +} + +func (x *arduinoCoreServiceUpdateLibrariesIndexServer) Send(m *UpdateLibrariesIndexResponse) error { + return x.ServerStream.SendMsg(m) +} + +func _ArduinoCoreService_UpdateCoreLibrariesIndex_Handler(srv interface{}, stream grpc.ServerStream) error { + m := new(UpdateCoreLibrariesIndexRequest) + if err := stream.RecvMsg(m); err != nil { + return err + } + return srv.(ArduinoCoreServiceServer).UpdateCoreLibrariesIndex(m, &arduinoCoreServiceUpdateCoreLibrariesIndexServer{stream}) +} + +type ArduinoCoreService_UpdateCoreLibrariesIndexServer interface { + Send(*UpdateCoreLibrariesIndexResponse) error + grpc.ServerStream +} + +type arduinoCoreServiceUpdateCoreLibrariesIndexServer struct { + grpc.ServerStream +} + +func (x *arduinoCoreServiceUpdateCoreLibrariesIndexServer) Send(m *UpdateCoreLibrariesIndexResponse) error { + return x.ServerStream.SendMsg(m) +} + +func _ArduinoCoreService_Outdated_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(OutdatedRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ArduinoCoreServiceServer).Outdated(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cc.arduino.cli.commands.v1.ArduinoCoreService/Outdated", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ArduinoCoreServiceServer).Outdated(ctx, req.(*OutdatedRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ArduinoCoreService_Upgrade_Handler(srv interface{}, stream grpc.ServerStream) error { + m := new(UpgradeRequest) + if err := stream.RecvMsg(m); err != nil { + return err + } + return srv.(ArduinoCoreServiceServer).Upgrade(m, &arduinoCoreServiceUpgradeServer{stream}) +} + +type ArduinoCoreService_UpgradeServer interface { + Send(*UpgradeResponse) error + grpc.ServerStream +} + +type arduinoCoreServiceUpgradeServer struct { + grpc.ServerStream +} + +func (x *arduinoCoreServiceUpgradeServer) Send(m *UpgradeResponse) error { + return x.ServerStream.SendMsg(m) +} + +func _ArduinoCoreService_Version_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(VersionRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ArduinoCoreServiceServer).Version(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cc.arduino.cli.commands.v1.ArduinoCoreService/Version", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ArduinoCoreServiceServer).Version(ctx, req.(*VersionRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ArduinoCoreService_LoadSketch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(LoadSketchRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ArduinoCoreServiceServer).LoadSketch(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cc.arduino.cli.commands.v1.ArduinoCoreService/LoadSketch", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ArduinoCoreServiceServer).LoadSketch(ctx, req.(*LoadSketchRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ArduinoCoreService_ArchiveSketch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ArchiveSketchRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ArduinoCoreServiceServer).ArchiveSketch(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cc.arduino.cli.commands.v1.ArduinoCoreService/ArchiveSketch", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ArduinoCoreServiceServer).ArchiveSketch(ctx, req.(*ArchiveSketchRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ArduinoCoreService_BoardDetails_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(BoardDetailsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ArduinoCoreServiceServer).BoardDetails(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cc.arduino.cli.commands.v1.ArduinoCoreService/BoardDetails", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ArduinoCoreServiceServer).BoardDetails(ctx, req.(*BoardDetailsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ArduinoCoreService_BoardAttach_Handler(srv interface{}, stream grpc.ServerStream) error { + m := new(BoardAttachRequest) + if err := stream.RecvMsg(m); err != nil { + return err + } + return srv.(ArduinoCoreServiceServer).BoardAttach(m, &arduinoCoreServiceBoardAttachServer{stream}) +} + +type ArduinoCoreService_BoardAttachServer interface { + Send(*BoardAttachResponse) error + grpc.ServerStream +} + +type arduinoCoreServiceBoardAttachServer struct { + grpc.ServerStream +} + +func (x *arduinoCoreServiceBoardAttachServer) Send(m *BoardAttachResponse) error { + return x.ServerStream.SendMsg(m) +} + +func _ArduinoCoreService_BoardList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(BoardListRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ArduinoCoreServiceServer).BoardList(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cc.arduino.cli.commands.v1.ArduinoCoreService/BoardList", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ArduinoCoreServiceServer).BoardList(ctx, req.(*BoardListRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ArduinoCoreService_BoardListAll_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(BoardListAllRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ArduinoCoreServiceServer).BoardListAll(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cc.arduino.cli.commands.v1.ArduinoCoreService/BoardListAll", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ArduinoCoreServiceServer).BoardListAll(ctx, req.(*BoardListAllRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ArduinoCoreService_BoardSearch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(BoardSearchRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ArduinoCoreServiceServer).BoardSearch(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cc.arduino.cli.commands.v1.ArduinoCoreService/BoardSearch", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ArduinoCoreServiceServer).BoardSearch(ctx, req.(*BoardSearchRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ArduinoCoreService_BoardListWatch_Handler(srv interface{}, stream grpc.ServerStream) error { + return srv.(ArduinoCoreServiceServer).BoardListWatch(&arduinoCoreServiceBoardListWatchServer{stream}) +} + +type ArduinoCoreService_BoardListWatchServer interface { + Send(*BoardListWatchResponse) error + Recv() (*BoardListWatchRequest, error) + grpc.ServerStream +} + +type arduinoCoreServiceBoardListWatchServer struct { + grpc.ServerStream +} + +func (x *arduinoCoreServiceBoardListWatchServer) Send(m *BoardListWatchResponse) error { + return x.ServerStream.SendMsg(m) +} + +func (x *arduinoCoreServiceBoardListWatchServer) Recv() (*BoardListWatchRequest, error) { + m := new(BoardListWatchRequest) + if err := x.ServerStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +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}) +} + +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) +} + +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 +} + +func (x *arduinoCoreServicePlatformInstallServer) Send(m *PlatformInstallResponse) error { + return x.ServerStream.SendMsg(m) +} + +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}) +} + +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) +} + +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 +} + +func (x *arduinoCoreServicePlatformUninstallServer) Send(m *PlatformUninstallResponse) error { + return x.ServerStream.SendMsg(m) +} + +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 +} + +type arduinoCoreServicePlatformUpgradeServer struct { + grpc.ServerStream +} + +func (x *arduinoCoreServicePlatformUpgradeServer) Send(m *PlatformUpgradeResponse) error { + return x.ServerStream.SendMsg(m) +} + +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 +} + +type arduinoCoreServiceUploadServer struct { + grpc.ServerStream +} + +func (x *arduinoCoreServiceUploadServer) Send(m *UploadResponse) error { + return x.ServerStream.SendMsg(m) +} + +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}) +} + +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) +} + +func _ArduinoCoreService_ListProgrammersAvailableForUpload_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListProgrammersAvailableForUploadRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ArduinoCoreServiceServer).ListProgrammersAvailableForUpload(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cc.arduino.cli.commands.v1.ArduinoCoreService/ListProgrammersAvailableForUpload", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ArduinoCoreServiceServer).ListProgrammersAvailableForUpload(ctx, req.(*ListProgrammersAvailableForUploadRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ArduinoCoreService_BurnBootloader_Handler(srv interface{}, stream grpc.ServerStream) error { + m := new(BurnBootloaderRequest) + if err := stream.RecvMsg(m); err != nil { + return err + } + return srv.(ArduinoCoreServiceServer).BurnBootloader(m, &arduinoCoreServiceBurnBootloaderServer{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) +} + +func _ArduinoCoreService_PlatformSearch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(PlatformSearchRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ArduinoCoreServiceServer).PlatformSearch(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cc.arduino.cli.commands.v1.ArduinoCoreService/PlatformSearch", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ArduinoCoreServiceServer).PlatformSearch(ctx, req.(*PlatformSearchRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ArduinoCoreService_PlatformList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(PlatformListRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ArduinoCoreServiceServer).PlatformList(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cc.arduino.cli.commands.v1.ArduinoCoreService/PlatformList", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ArduinoCoreServiceServer).PlatformList(ctx, req.(*PlatformListRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ArduinoCoreService_LibraryDownload_Handler(srv interface{}, stream grpc.ServerStream) error { + m := new(LibraryDownloadRequest) + 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 +} + +func (x *arduinoCoreServiceLibraryDownloadServer) Send(m *LibraryDownloadResponse) error { + return x.ServerStream.SendMsg(m) +} + +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}) +} + +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) +} + +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 +} + +func (x *arduinoCoreServiceZipLibraryInstallServer) Send(m *ZipLibraryInstallResponse) error { + return x.ServerStream.SendMsg(m) +} + +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}) +} + +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) +} + +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}) +} + +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) +} + +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 +} + +func (x *arduinoCoreServiceLibraryUpgradeAllServer) Send(m *LibraryUpgradeAllResponse) error { + return x.ServerStream.SendMsg(m) +} + +func _ArduinoCoreService_LibraryResolveDependencies_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(LibraryResolveDependenciesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ArduinoCoreServiceServer).LibraryResolveDependencies(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cc.arduino.cli.commands.v1.ArduinoCoreService/LibraryResolveDependencies", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ArduinoCoreServiceServer).LibraryResolveDependencies(ctx, req.(*LibraryResolveDependenciesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ArduinoCoreService_LibrarySearch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(LibrarySearchRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ArduinoCoreServiceServer).LibrarySearch(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cc.arduino.cli.commands.v1.ArduinoCoreService/LibrarySearch", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ArduinoCoreServiceServer).LibrarySearch(ctx, req.(*LibrarySearchRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ArduinoCoreService_LibraryList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(LibraryListRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ArduinoCoreServiceServer).LibraryList(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cc.arduino.cli.commands.v1.ArduinoCoreService/LibraryList", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ArduinoCoreServiceServer).LibraryList(ctx, req.(*LibraryListRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _ArduinoCoreService_serviceDesc = grpc.ServiceDesc{ + ServiceName: "cc.arduino.cli.commands.v1.ArduinoCoreService", + HandlerType: (*ArduinoCoreServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Create", + Handler: _ArduinoCoreService_Create_Handler, + }, + { + MethodName: "Destroy", + Handler: _ArduinoCoreService_Destroy_Handler, + }, + { + MethodName: "Outdated", + Handler: _ArduinoCoreService_Outdated_Handler, + }, + { + MethodName: "Version", + Handler: _ArduinoCoreService_Version_Handler, + }, + { + MethodName: "LoadSketch", + Handler: _ArduinoCoreService_LoadSketch_Handler, + }, + { + MethodName: "ArchiveSketch", + Handler: _ArduinoCoreService_ArchiveSketch_Handler, + }, + { + MethodName: "BoardDetails", + Handler: _ArduinoCoreService_BoardDetails_Handler, + }, + { + MethodName: "BoardList", + Handler: _ArduinoCoreService_BoardList_Handler, + }, + { + MethodName: "BoardListAll", + Handler: _ArduinoCoreService_BoardListAll_Handler, + }, + { + MethodName: "BoardSearch", + Handler: _ArduinoCoreService_BoardSearch_Handler, + }, + { + MethodName: "ListProgrammersAvailableForUpload", + Handler: _ArduinoCoreService_ListProgrammersAvailableForUpload_Handler, + }, + { + MethodName: "PlatformSearch", + Handler: _ArduinoCoreService_PlatformSearch_Handler, + }, + { + MethodName: "PlatformList", + Handler: _ArduinoCoreService_PlatformList_Handler, + }, + { + MethodName: "LibraryResolveDependencies", + Handler: _ArduinoCoreService_LibraryResolveDependencies_Handler, + }, + { + MethodName: "LibrarySearch", + Handler: _ArduinoCoreService_LibrarySearch_Handler, + }, + { + MethodName: "LibraryList", + Handler: _ArduinoCoreService_LibraryList_Handler, + }, + }, + Streams: []grpc.StreamDesc{ + { + StreamName: "Init", + Handler: _ArduinoCoreService_Init_Handler, + ServerStreams: true, + }, + { + StreamName: "UpdateIndex", + Handler: _ArduinoCoreService_UpdateIndex_Handler, + ServerStreams: true, + }, + { + StreamName: "UpdateLibrariesIndex", + Handler: _ArduinoCoreService_UpdateLibrariesIndex_Handler, + ServerStreams: true, + }, + { + StreamName: "UpdateCoreLibrariesIndex", + Handler: _ArduinoCoreService_UpdateCoreLibrariesIndex_Handler, + ServerStreams: true, + }, + { + StreamName: "Upgrade", + Handler: _ArduinoCoreService_Upgrade_Handler, + ServerStreams: true, + }, + { + StreamName: "BoardAttach", + Handler: _ArduinoCoreService_BoardAttach_Handler, + ServerStreams: true, + }, + { + StreamName: "BoardListWatch", + Handler: _ArduinoCoreService_BoardListWatch_Handler, + ServerStreams: true, + ClientStreams: true, + }, + { + StreamName: "Compile", + Handler: _ArduinoCoreService_Compile_Handler, + ServerStreams: true, + }, + { + StreamName: "PlatformInstall", + Handler: _ArduinoCoreService_PlatformInstall_Handler, + ServerStreams: true, + }, + { + StreamName: "PlatformDownload", + Handler: _ArduinoCoreService_PlatformDownload_Handler, + ServerStreams: true, + }, + { + StreamName: "PlatformUninstall", + Handler: _ArduinoCoreService_PlatformUninstall_Handler, + ServerStreams: true, + }, + { + StreamName: "PlatformUpgrade", + Handler: _ArduinoCoreService_PlatformUpgrade_Handler, + ServerStreams: true, + }, + { + StreamName: "Upload", + Handler: _ArduinoCoreService_Upload_Handler, + ServerStreams: true, + }, + { + StreamName: "UploadUsingProgrammer", + Handler: _ArduinoCoreService_UploadUsingProgrammer_Handler, + ServerStreams: true, + }, + { + StreamName: "BurnBootloader", + Handler: _ArduinoCoreService_BurnBootloader_Handler, + ServerStreams: true, + }, + { + StreamName: "LibraryDownload", + Handler: _ArduinoCoreService_LibraryDownload_Handler, + ServerStreams: true, + }, + { + StreamName: "LibraryInstall", + Handler: _ArduinoCoreService_LibraryInstall_Handler, + ServerStreams: true, + }, + { + StreamName: "ZipLibraryInstall", + Handler: _ArduinoCoreService_ZipLibraryInstall_Handler, + ServerStreams: true, + }, + { + StreamName: "GitLibraryInstall", + Handler: _ArduinoCoreService_GitLibraryInstall_Handler, + ServerStreams: true, + }, + { + StreamName: "LibraryUninstall", + Handler: _ArduinoCoreService_LibraryUninstall_Handler, + ServerStreams: true, + }, + { + StreamName: "LibraryUpgradeAll", + Handler: _ArduinoCoreService_LibraryUpgradeAll_Handler, + ServerStreams: true, + }, + }, + Metadata: "cc/arduino/cli/commands/v1/commands.proto", +} diff --git a/rpc/cc/arduino/cli/commands/v1/commands.proto b/rpc/cc/arduino/cli/commands/v1/commands.proto index f79ea7bfff8..a5eaee9c067 100644 --- a/rpc/cc/arduino/cli/commands/v1/commands.proto +++ b/rpc/cc/arduino/cli/commands/v1/commands.proto @@ -19,6 +19,8 @@ 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/compile.proto"; @@ -31,15 +33,16 @@ service ArduinoCoreService { // BOOTSTRAP COMMANDS //------------------- - // Start a new instance of the Arduino Core Service + // Create a new Arduino Core instance + rpc Create(CreateRequest) returns (CreateResponse) {} + + // Initializes an existing Arduino Core instance by loading platforms and + // libraries rpc Init(InitRequest) returns (stream InitResponse) {} // Destroy an instance of the Arduino Core Service rpc Destroy(DestroyRequest) returns (DestroyResponse) {} - // Rescan instance of the Arduino Core Service - rpc Rescan(RescanRequest) returns (RescanResponse) {} - // Update package index of the Arduino Core Service rpc UpdateIndex(UpdateIndexRequest) returns (stream UpdateIndexResponse) {} @@ -169,25 +172,29 @@ service ArduinoCoreService { rpc LibraryList(LibraryListRequest) returns (LibraryListResponse); } +message CreateRequest {} + +message CreateResponse { + // An Arduino Core instance. + Instance instance = 1; +} + message InitRequest { - // Start a Arduino Core Service instance that will provide only Library - // Manager functionality. - bool library_manager_only = 2; + // An Arduino Core instance. + Instance instance = 1; } message InitResponse { - // An Arduino Core Service instance. - Instance instance = 1; - // Error messages related to any problems encountered while parsing the - // platforms index files. - repeated string platforms_index_errors = 2; - // Error message if a problem was encountered while parsing the libraries - // index file. - string libraries_index_error = 3; - // Progress of the downloads of platforms and libraries index files. - DownloadProgress download_progress = 4; - // Describes the current stage of the initialization. - TaskProgress task_progress = 5; + message Progress { + // Progress of the downloads of platforms and libraries index files. + DownloadProgress download_progress = 1; + // Describes the current stage of the initialization. + TaskProgress task_progress = 2; + } + oneof message { + Progress init_progress = 1; + google.rpc.Status error = 2; + } } message DestroyRequest { @@ -197,20 +204,6 @@ message DestroyRequest { message DestroyResponse {} -message RescanRequest { - // Arduino Core Service instance from the Init response. - Instance instance = 1; -} - -message RescanResponse { - // Error messages related to any problems encountered while parsing the - // platforms index file. - repeated string platforms_index_errors = 1; - // Error message if a problem was encountered while parsing the libraries - // index file. - string libraries_index_error = 2; -} - message UpdateIndexRequest { // Arduino Core Service instance from the Init response. Instance instance = 1; diff --git a/rpc/google/rpc/status.proto b/rpc/google/rpc/status.proto new file mode 100644 index 00000000000..e3411d03a64 --- /dev/null +++ b/rpc/google/rpc/status.proto @@ -0,0 +1,49 @@ +// 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; +} From dbad881eb8a7f56a2953a332ecadee3b60cbfac7 Mon Sep 17 00:00:00 2001 From: Silvano Cerza Date: Mon, 7 Jun 2021 12:38:17 +0200 Subject: [PATCH 02/22] [breaking] Refactored commands package to reflect gRPC changes --- arduino/cores/packagemanager/loader.go | 308 ++++++++------ .../librariesmanager/librariesmanager.go | 26 +- commands/core/install.go | 6 +- commands/core/uninstall.go | 7 +- commands/core/upgrade.go | 5 +- commands/daemon/daemon.go | 33 +- commands/instances.go | 389 ++++++++++-------- commands/lib/install.go | 5 +- commands/lib/upgrade.go | 6 +- legacy/builder/hardware_loader.go | 10 +- legacy/builder/libraries_loader.go | 10 +- 11 files changed, 464 insertions(+), 341 deletions(-) diff --git a/arduino/cores/packagemanager/loader.go b/arduino/cores/packagemanager/loader.go index f2ccc77b8a5..e31cca323da 100644 --- a/arduino/cores/packagemanager/loader.go +++ b/arduino/cores/packagemanager/loader.go @@ -26,62 +26,75 @@ import ( "github.com/arduino/go-paths-helper" properties "github.com/arduino/go-properties-orderedmap" semver "go.bug.st/relaxed-semver" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" ) // LoadHardware read all plaforms from the configured paths -func (pm *PackageManager) LoadHardware() error { +func (pm *PackageManager) LoadHardware() []*status.Status { + statuses := []*status.Status{} dirs := configuration.HardwareDirectories(configuration.Settings) - if err := pm.LoadHardwareFromDirectories(dirs); err != nil { - return err + if errs := pm.LoadHardwareFromDirectories(dirs); len(errs) > 0 { + statuses = append(statuses, errs...) } dirs = configuration.BundleToolsDirectories(configuration.Settings) - return pm.LoadToolsFromBundleDirectories(dirs) + if errs := pm.LoadToolsFromBundleDirectories(dirs); len(errs) > 0 { + statuses = append(statuses, errs...) + } + return statuses } // LoadHardwareFromDirectories load plaforms from a set of directories -func (pm *PackageManager) LoadHardwareFromDirectories(hardwarePaths paths.PathList) error { +func (pm *PackageManager) LoadHardwareFromDirectories(hardwarePaths paths.PathList) []*status.Status { + statuses := []*status.Status{} for _, path := range hardwarePaths { - if err := pm.LoadHardwareFromDirectory(path); err != nil { - return fmt.Errorf("loading hardware from %s: %s", path, err) + if errs := pm.LoadHardwareFromDirectory(path); len(errs) > 0 { + statuses = append(statuses, errs...) } } - return nil + return statuses } // LoadHardwareFromDirectory read a plaform from the path passed as parameter -func (pm *PackageManager) LoadHardwareFromDirectory(path *paths.Path) error { +func (pm *PackageManager) LoadHardwareFromDirectory(path *paths.Path) []*status.Status { pm.Log.Infof("Loading hardware from: %s", path) + statuses := []*status.Status{} if err := path.ToAbs(); err != nil { - return fmt.Errorf("find abs path: %s", err) + s := status.Newf(codes.FailedPrecondition, "find abs path: %s", err) + return append(statuses, s) } - // TODO: IS THIS CHECK NEEDED? can we ignore and let it fail at next ReadDir? - if !path.IsDir() { - return fmt.Errorf("%s is not a directory", path) + if path.IsNotDir() { + s := status.Newf(codes.FailedPrecondition, "%s is not a directory", path) + return append(statuses, s) } // Scan subdirs - files, err := path.ReadDir() + packagersPaths, err := path.ReadDir() if err != nil { - return fmt.Errorf("reading %s directory: %s", path, err) + s := status.Newf(codes.FailedPrecondition, "reading %s directory: %s", path, err) + return append(statuses, s) } - files.FilterOutHiddenFiles() - for _, packagerPath := range files { - packager := packagerPath.Base() - - // Load custom platform properties if available - if packager == "platform.txt" { - pm.Log.Infof("Loading custom platform properties: %s", packagerPath) - if p, err := properties.LoadFromPath(packagerPath); err != nil { - pm.Log.WithError(err).Errorf("Error loading properties.") - } else { - pm.CustomGlobalProperties.Merge(p) - } - continue + packagersPaths.FilterOutHiddenFiles() + packagersPaths.FilterDirs() + + // Load custom platform properties if available + // "Global" platform.txt used by the Java IDE to overwrite all installed platforms. + // For more info: https://arduino.github.io/arduino-cli/latest/platform-specification/#global-platformtxt + if globalPlatformTxt := path.Join("platform.txt"); globalPlatformTxt.Exist() { + pm.Log.Infof("Loading custom platform properties: %s", globalPlatformTxt) + if p, err := properties.LoadFromPath(globalPlatformTxt); err != nil { + pm.Log.WithError(err).Errorf("Error loading properties.") + } else { + pm.CustomGlobalProperties.Merge(p) } + } - // First exclude all "tools" directory + for _, packagerPath := range packagersPaths { + packager := packagerPath.Base() + + // Skip tools, they're not packages and don't contain Platforms if packager == "tools" { pm.Log.Infof("Excluding directory: %s", packagerPath) continue @@ -90,7 +103,9 @@ func (pm *PackageManager) LoadHardwareFromDirectory(path *paths.Path) error { // Follow symlinks err := packagerPath.FollowSymLink() // ex: .arduino15/packages/arduino/ if err != nil { - return fmt.Errorf("following possible symlink %s: %s", path, err) + s := status.Newf(codes.Internal, "following possible symlink %s: %s", path, err) + statuses = append(statuses, s) + continue } // There are two possible package directory structures: @@ -108,17 +123,14 @@ func (pm *PackageManager) LoadHardwareFromDirectory(path *paths.Path) error { if hardwareSubdirPath.IsDir() { // we found the "hardware" directory move down into that architectureParentPath = hardwareSubdirPath // ex: .arduino15/packages/arduino/ - } else if packagerPath.IsDir() { + } else { // we are already at the correct level architectureParentPath = packagerPath - } else { - // error: do nothing - continue } targetPackage := pm.Packages.GetOrCreatePackage(packager) - if err := pm.loadPlatforms(targetPackage, architectureParentPath); err != nil { - return fmt.Errorf("loading package %s: %s", packager, err) + if errs := pm.loadPlatforms(targetPackage, architectureParentPath); len(errs) > 0 { + statuses = append(statuses, errs...) } // Check if we have tools to load, the directory structure is as follows: @@ -126,128 +138,148 @@ func (pm *PackageManager) LoadHardwareFromDirectory(path *paths.Path) error { toolsSubdirPath := packagerPath.Join("tools") if toolsSubdirPath.IsDir() { pm.Log.Infof("Checking existence of 'tools' path: %s", toolsSubdirPath) - if err := pm.loadToolsFromPackage(targetPackage, toolsSubdirPath); err != nil { - return fmt.Errorf("loading tools from %s: %s", toolsSubdirPath, err) + if errs := pm.loadToolsFromPackage(targetPackage, toolsSubdirPath); len(errs) > 0 { + statuses = append(statuses, errs...) } } } - return nil + return statuses } // loadPlatforms load plaftorms from the specified directory assuming that they belongs // to the targetPackage object passed as parameter. -func (pm *PackageManager) loadPlatforms(targetPackage *cores.Package, packageDir *paths.Path) error { +// A list of gRPC Status error is returned for each Platform failed to load. +func (pm *PackageManager) loadPlatforms(targetPackage *cores.Package, packageDir *paths.Path) []*status.Status { pm.Log.Infof("Loading package %s from: %s", targetPackage.Name, packageDir) - files, err := packageDir.ReadDir() + statuses := []*status.Status{} + + platformsDirs, err := packageDir.ReadDir() if err != nil { - return fmt.Errorf("reading directory %s: %s", packageDir, err) + s := status.Newf(codes.FailedPrecondition, "reading directory %s: %s", packageDir, err) + return append(statuses, s) } - for _, file := range files { - architecture := file.Base() - if strings.HasPrefix(architecture, ".") || architecture == "tools" || - architecture == "platform.txt" { // TODO: Check if this "platform.txt" condition should be here.... - continue + // A platform can only be inside a directory, thus we skip everything else. + platformsDirs.FilterDirs() + for _, platformPath := range platformsDirs { + if err := pm.loadPlatform(targetPackage, platformPath); err != nil { + statuses = append(statuses, err) } - platformPath := packageDir.Join(architecture) - if !platformPath.IsDir() { - continue + } + + return statuses +} + +// loadPlatform loads a single platform and all its installed releases given a platformPath. +// platformPath must be a directory. +// Returns a gRPC Status error in case of failures. +func (pm *PackageManager) loadPlatform(targetPackage *cores.Package, platformPath *paths.Path) *status.Status { + // This is not a platform + if platformPath.IsNotDir() { + return nil + } + + architecture := platformPath.Base() + if strings.HasPrefix(architecture, ".") || architecture == "tools" { + return nil + } + + // There are two possible platform directory structures: + // - ARCHITECTURE/boards.txt + // - ARCHITECTURE/VERSION/boards.txt + // We identify them by checking where is the bords.txt file + possibleBoardTxtPath := platformPath.Join("boards.txt") + if exist, err := possibleBoardTxtPath.ExistCheck(); err != nil { + return status.Newf(codes.FailedPrecondition, "looking for boards.txt in %s: %s", possibleBoardTxtPath, err) + } else if exist { + // case: ARCHITECTURE/boards.txt + + platformTxtPath := platformPath.Join("platform.txt") + platformProperties, err := properties.SafeLoad(platformTxtPath.String()) + if err != nil { + return status.Newf(codes.FailedPrecondition, "loading platform.txt: %w", err) } - // There are two possible platform directory structures: - // - ARCHITECTURE/boards.txt - // - ARCHITECTURE/VERSION/boards.txt - // We identify them by checking where is the bords.txt file - possibleBoardTxtPath := platformPath.Join("boards.txt") - if exist, err := possibleBoardTxtPath.ExistCheck(); err != nil { + version := semver.MustParse(platformProperties.Get("version")) + + // Check if package_bundled_index.json exists. + // This is used indirectly by the Java IDE since it's necessary for the arduino-builder + // to find cores bundled with that version of the IDE. + // TODO: This piece of logic MUST be removed as soon as the Java IDE stops using the arduino-builder. + isIDEBundled := false + packageBundledIndexPath := platformPath.Parent().Parent().Join("package_index_bundled.json") + if packageBundledIndexPath.Exist() { + // particular case: ARCHITECTURE/boards.txt with package_bundled_index.json - return fmt.Errorf("looking for boards.txt in %s: %s", possibleBoardTxtPath, err) + // this is an unversioned Platform with a package_index_bundled.json that + // gives information about the version and tools needed - } else if exist { - platformTxtPath := platformPath.Join("platform.txt") - platformProperties, err := properties.SafeLoad(platformTxtPath.String()) + // Parse the bundled index and merge to the general index + index, err := pm.LoadPackageIndexFromFile(packageBundledIndexPath) if err != nil { - return fmt.Errorf("loading platform.txt: %w", err) + return status.Newf(codes.FailedPrecondition, "parsing IDE bundled index: %s", err) } - version := semver.MustParse(platformProperties.Get("version")) - - // check if package_bundled_index.json exists - isIDEBundled := false - packageBundledIndexPath := packageDir.Parent().Join("package_index_bundled.json") - if packageBundledIndexPath.Exist() { - // particular case: ARCHITECTURE/boards.txt with package_bundled_index.json - - // this is an unversioned Platform with a package_index_bundled.json that - // gives information about the version and tools needed - - // Parse the bundled index and merge to the general index - index, err := pm.LoadPackageIndexFromFile(packageBundledIndexPath) - if err != nil { - return fmt.Errorf("parsing IDE bundled index: %s", err) - } - - // Now export the bundled index in a temporary core.Packages to retrieve the bundled package version - tmp := cores.NewPackages() - index.MergeIntoPackages(tmp) - if tmpPackage := tmp.GetOrCreatePackage(targetPackage.Name); tmpPackage == nil { - pm.Log.Warnf("Can't determine bundle platform version for %s", targetPackage.Name) - } else if tmpPlatform := tmpPackage.GetOrCreatePlatform(architecture); tmpPlatform == nil { - pm.Log.Warnf("Can't determine bundle platform version for %s:%s", targetPackage.Name, architecture) - } else if tmpPlatformRelease := tmpPlatform.GetLatestRelease(); tmpPlatformRelease == nil { - pm.Log.Warnf("Can't determine bundle platform version for %s:%s, no valid release found", targetPackage.Name, architecture) - } else { - version = tmpPlatformRelease.Version - } - - isIDEBundled = true + // Now export the bundled index in a temporary core.Packages to retrieve the bundled package version + tmp := cores.NewPackages() + index.MergeIntoPackages(tmp) + if tmpPackage := tmp.GetOrCreatePackage(targetPackage.Name); tmpPackage == nil { + pm.Log.Warnf("Can't determine bundle platform version for %s", targetPackage.Name) + } else if tmpPlatform := tmpPackage.GetOrCreatePlatform(architecture); tmpPlatform == nil { + pm.Log.Warnf("Can't determine bundle platform version for %s:%s", targetPackage.Name, architecture) + } else if tmpPlatformRelease := tmpPlatform.GetLatestRelease(); tmpPlatformRelease == nil { + pm.Log.Warnf("Can't determine bundle platform version for %s:%s, no valid release found", targetPackage.Name, architecture) + } else { + version = tmpPlatformRelease.Version } - platform := targetPackage.GetOrCreatePlatform(architecture) - if !isIDEBundled { - platform.ManuallyInstalled = true - } - release := platform.GetOrCreateRelease(version) - release.IsIDEBundled = isIDEBundled - if isIDEBundled { - pm.Log.Infof("Package is built-in") - } - if err := pm.loadPlatformRelease(release, platformPath); err != nil { - return fmt.Errorf("loading platform release: %s", err) - } - pm.Log.WithField("platform", release).Infof("Loaded platform") + isIDEBundled = true + } - } else /* !exist */ { + platform := targetPackage.GetOrCreatePlatform(architecture) + if !isIDEBundled { + platform.ManuallyInstalled = true + } + release := platform.GetOrCreateRelease(version) + release.IsIDEBundled = isIDEBundled + if isIDEBundled { + pm.Log.Infof("Package is built-in") + } + if err := pm.loadPlatformRelease(release, platformPath); err != nil { + return status.Newf(codes.FailedPrecondition, "loading platform release: %s", err) - // case: ARCHITECTURE/VERSION/boards.txt - // let's dive into VERSION directories + } + pm.Log.WithField("platform", release).Infof("Loaded platform") - platform := targetPackage.GetOrCreatePlatform(architecture) - versionDirs, err := platformPath.ReadDir() + } else { + // case: ARCHITECTURE/VERSION/boards.txt + // let's dive into VERSION directories + + platform := targetPackage.GetOrCreatePlatform(architecture) + versionDirs, err := platformPath.ReadDir() + if err != nil { + return status.Newf(codes.FailedPrecondition, "reading dir %s: %s", platformPath, err) + } + versionDirs.FilterDirs() + versionDirs.FilterOutHiddenFiles() + for _, versionDir := range versionDirs { + if exist, err := versionDir.Join("boards.txt").ExistCheck(); err != nil { + return status.Newf(codes.FailedPrecondition, "opening boards.txt: %s", err) + } else if !exist { + continue + } + + version, err := semver.Parse(versionDir.Base()) if err != nil { - return fmt.Errorf("reading dir %s: %s", platformPath, err) + return status.Newf(codes.FailedPrecondition, "invalid version dir %s: %s", versionDir, err) } - versionDirs.FilterDirs() - versionDirs.FilterOutHiddenFiles() - for _, versionDir := range versionDirs { - if exist, err := versionDir.Join("boards.txt").ExistCheck(); err != nil { - return fmt.Errorf("opening boards.txt: %s", err) - } else if !exist { - continue - } - - version, err := semver.Parse(versionDir.Base()) - if err != nil { - return fmt.Errorf("invalid version dir %s: %s", versionDir, err) - } - release := platform.GetOrCreateRelease(version) - if err := pm.loadPlatformRelease(release, versionDir); err != nil { - return fmt.Errorf("loading platform release %s: %s", versionDir, err) - } - pm.Log.WithField("platform", release).Infof("Loaded platform") + release := platform.GetOrCreateRelease(version) + if err := pm.loadPlatformRelease(release, versionDir); err != nil { + return status.Newf(codes.FailedPrecondition, "loading platform release: %s", err) } + pm.Log.WithField("platform", release).Infof("Loaded platform") } } @@ -346,12 +378,14 @@ func (pm *PackageManager) loadBoards(platform *cores.PlatformRelease) error { return nil } -func (pm *PackageManager) loadToolsFromPackage(targetPackage *cores.Package, toolsPath *paths.Path) error { +func (pm *PackageManager) loadToolsFromPackage(targetPackage *cores.Package, toolsPath *paths.Path) []*status.Status { pm.Log.Infof("Loading tools from dir: %s", toolsPath) + statuses := []*status.Status{} toolsPaths, err := toolsPath.ReadDir() if err != nil { - return fmt.Errorf("reading directory %s: %s", toolsPath, err) + s := status.Newf(codes.FailedPrecondition, "reading directory %s: %s", toolsPath, err) + return append(statuses, s) } toolsPaths.FilterDirs() toolsPaths.FilterOutHiddenFiles() @@ -359,10 +393,11 @@ func (pm *PackageManager) loadToolsFromPackage(targetPackage *cores.Package, too name := toolPath.Base() tool := targetPackage.GetOrCreateTool(name) if err = pm.loadToolReleasesFromTool(tool, toolPath); err != nil { - return fmt.Errorf("loading tool release in %s: %s", toolPath, err) + s := status.Newf(codes.FailedPrecondition, "loading tool release in %s: %s", toolPath, err) + statuses = append(statuses, s) } } - return nil + return statuses } func (pm *PackageManager) loadToolReleasesFromTool(tool *cores.Tool, toolPath *paths.Path) error { @@ -387,13 +422,14 @@ func (pm *PackageManager) loadToolReleasesFromTool(tool *cores.Tool, toolPath *p } // LoadToolsFromBundleDirectories FIXMEDOC -func (pm *PackageManager) LoadToolsFromBundleDirectories(dirs paths.PathList) error { +func (pm *PackageManager) LoadToolsFromBundleDirectories(dirs paths.PathList) []*status.Status { + statuses := []*status.Status{} for _, dir := range dirs { if err := pm.LoadToolsFromBundleDirectory(dir); err != nil { - return fmt.Errorf("loading bundled tools from %s: %s", dir, err) + statuses = append(statuses, status.Newf(codes.FailedPrecondition, "loading bundled tools from %s: %s", dir, err)) } } - return nil + return statuses } // LoadToolsFromBundleDirectory FIXMEDOC diff --git a/arduino/libraries/librariesmanager/librariesmanager.go b/arduino/libraries/librariesmanager/librariesmanager.go index 06496c4a449..63da765f0cc 100644 --- a/arduino/libraries/librariesmanager/librariesmanager.go +++ b/arduino/libraries/librariesmanager/librariesmanager.go @@ -27,6 +27,8 @@ import ( "github.com/pmylund/sortutil" "github.com/sirupsen/logrus" semver "go.bug.st/relaxed-semver" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" ) // LibrariesManager keeps the current status of the libraries in the system @@ -160,13 +162,14 @@ func (lm *LibrariesManager) AddPlatformReleaseLibrariesDir(plaftormRelease *core } // RescanLibraries reload all installed libraries in the system. -func (lm *LibrariesManager) RescanLibraries() error { +func (lm *LibrariesManager) RescanLibraries() []*status.Status { + statuses := []*status.Status{} for _, dir := range lm.LibrariesDir { - if err := lm.LoadLibrariesFromDir(dir); err != nil { - return fmt.Errorf("loading libs from %s: %s", dir.Path, err) + if errs := lm.LoadLibrariesFromDir(dir); len(errs) > 0 { + statuses = append(statuses, errs...) } } - return nil + return statuses } func (lm *LibrariesManager) getUserLibrariesDir() *paths.Path { @@ -180,13 +183,15 @@ func (lm *LibrariesManager) getUserLibrariesDir() *paths.Path { // LoadLibrariesFromDir loads all libraries in the given directory. Returns // nil if the directory doesn't exists. -func (lm *LibrariesManager) LoadLibrariesFromDir(librariesDir *LibrariesDir) error { +func (lm *LibrariesManager) LoadLibrariesFromDir(librariesDir *LibrariesDir) []*status.Status { + statuses := []*status.Status{} subDirs, err := librariesDir.Path.ReadDir() if os.IsNotExist(err) { - return nil + return statuses } if err != nil { - return fmt.Errorf("reading dir %s: %s", librariesDir.Path, err) + s := status.Newf(codes.FailedPrecondition, "reading dir %s: %s", librariesDir.Path, err) + return append(statuses, s) } subDirs.FilterDirs() subDirs.FilterOutHiddenFiles() @@ -194,7 +199,9 @@ func (lm *LibrariesManager) LoadLibrariesFromDir(librariesDir *LibrariesDir) err for _, subDir := range subDirs { library, err := libraries.Load(subDir, librariesDir.Location) if err != nil { - return fmt.Errorf("loading library from %s: %s", subDir, err) + s := status.Newf(codes.Internal, "loading library from %s: %s", subDir, err) + statuses = append(statuses, s) + continue } library.ContainerPlatform = librariesDir.PlatformRelease alternatives, ok := lm.Libraries[library.Name] @@ -204,7 +211,8 @@ func (lm *LibrariesManager) LoadLibrariesFromDir(librariesDir *LibrariesDir) err } alternatives.Add(library) } - return nil + + return statuses } // LoadLibraryFromDir loads one single library from the libRootDir. diff --git a/commands/core/install.go b/commands/core/install.go index 82a3955b51a..63ae0e6c17a 100644 --- a/commands/core/install.go +++ b/commands/core/install.go @@ -54,9 +54,9 @@ func PlatformInstall(ctx context.Context, req *rpc.PlatformInstallRequest, return nil, err } - _, err = commands.Rescan(req.GetInstance().GetId()) - if err != nil { - return nil, err + _, status := commands.Init(&rpc.InitRequest{Instance: &rpc.Instance{Id: req.Instance.Id}}) + if status != nil { + return nil, status.Err() } return &rpc.PlatformInstallResponse{}, nil diff --git a/commands/core/uninstall.go b/commands/core/uninstall.go index 307301351e0..4534d57e5bc 100644 --- a/commands/core/uninstall.go +++ b/commands/core/uninstall.go @@ -67,10 +67,11 @@ func PlatformUninstall(ctx context.Context, req *rpc.PlatformUninstallRequest, t } } - _, err = commands.Rescan(req.GetInstance().GetId()) - if err != nil { - return nil, err + _, status := commands.Init(&rpc.InitRequest{Instance: &rpc.Instance{Id: req.Instance.Id}}) + if status != nil { + return nil, status.Err() } + return &rpc.PlatformUninstallResponse{}, nil } diff --git a/commands/core/upgrade.go b/commands/core/upgrade.go index e7c5e9a92dc..bd7b03a012a 100644 --- a/commands/core/upgrade.go +++ b/commands/core/upgrade.go @@ -49,8 +49,9 @@ func PlatformUpgrade(ctx context.Context, req *rpc.PlatformUpgradeRequest, return nil, err } - if _, err := commands.Rescan(req.GetInstance().GetId()); err != nil { - return nil, err + _, status := commands.Init(&rpc.InitRequest{Instance: &rpc.Instance{Id: req.Instance.Id}}) + if status != nil { + return nil, status.Err() } return &rpc.PlatformUpgradeResponse{}, nil diff --git a/commands/daemon/daemon.go b/commands/daemon/daemon.go index 2ddee9951ea..f4eec655020 100644 --- a/commands/daemon/daemon.go +++ b/commands/daemon/daemon.go @@ -115,11 +115,6 @@ func (s *ArduinoCoreServerImpl) Destroy(ctx context.Context, req *rpc.DestroyReq return commands.Destroy(ctx, req) } -// Rescan FIXMEDOC -func (s *ArduinoCoreServerImpl) Rescan(ctx context.Context, req *rpc.RescanRequest) (*rpc.RescanResponse, error) { - return commands.Rescan(req.GetInstance().GetId()) -} - // UpdateIndex FIXMEDOC func (s *ArduinoCoreServerImpl) UpdateIndex(req *rpc.UpdateIndexRequest, stream rpc.ArduinoCoreService_UpdateIndexServer) error { resp, err := commands.UpdateIndex(stream.Context(), req, @@ -178,16 +173,32 @@ func (s *ArduinoCoreServerImpl) Upgrade(req *rpc.UpgradeRequest, stream rpc.Ardu return stream.Send(&rpc.UpgradeResponse{}) } +func (s *ArduinoCoreServerImpl) Create(_ context.Context, req *rpc.CreateRequest) (*rpc.CreateResponse, error) { + res, status := commands.Create(req) + if status != nil { + return nil, status.Err() + } + return res, nil +} + // Init FIXMEDOC func (s *ArduinoCoreServerImpl) Init(req *rpc.InitRequest, stream rpc.ArduinoCoreService_InitServer) error { - resp, err := commands.Init(stream.Context(), req, - func(p *rpc.DownloadProgress) { stream.Send(&rpc.InitResponse{DownloadProgress: p}) }, - func(p *rpc.TaskProgress) { stream.Send(&rpc.InitResponse{TaskProgress: p}) }, - ) + messageChan, err := commands.Init(req) if err != nil { - return err + return stream.Send(&rpc.InitResponse{ + Message: &rpc.InitResponse_Error{ + Error: err.Proto(), + }, + }) } - return stream.Send(resp) + + for message := range messageChan { + if err := stream.Send(message); err != nil { + return err + } + } + + return nil } // Version FIXMEDOC diff --git a/commands/instances.go b/commands/instances.go index 63c4f7acf1e..5d0dccae57c 100644 --- a/commands/instances.go +++ b/commands/instances.go @@ -17,6 +17,7 @@ package commands import ( "context" + "errors" "fmt" "io/ioutil" "net/url" @@ -36,9 +37,10 @@ import ( "github.com/arduino/arduino-cli/configuration" rpc "github.com/arduino/arduino-cli/rpc/cc/arduino/cli/commands/v1" paths "github.com/arduino/go-paths-helper" - "github.com/pkg/errors" "github.com/sirupsen/logrus" "go.bug.st/downloader/v2" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" ) // this map contains all the running Arduino Core Services instances @@ -52,7 +54,6 @@ var instancesCount int32 = 1 type CoreInstance struct { PackageManager *packagemanager.PackageManager lm *librariesmanager.LibrariesManager - getLibOnly bool } // InstanceContainer FIXMEDOC @@ -60,13 +61,6 @@ type InstanceContainer interface { GetInstance() *rpc.Instance } -type createInstanceResult struct { - Pm *packagemanager.PackageManager - Lm *librariesmanager.LibrariesManager - PlatformIndexErrors []string - LibrariesIndexError string -} - // GetInstance returns a CoreInstance for the given ID, or nil if ID // doesn't exist func GetInstance(id int32) *CoreInstance { @@ -107,54 +101,204 @@ func (instance *CoreInstance) installToolIfMissing(tool *cores.ToolRelease, down return true, nil } -func (instance *CoreInstance) checkForBuiltinTools(downloadCB DownloadProgressCB, taskCB TaskProgressCB) error { - // Check for ctags tool - ctags, _ := getBuiltinCtagsTool(instance.PackageManager) - ctagsInstalled, err := instance.installToolIfMissing(ctags, downloadCB, taskCB) - if err != nil { - return err - } +// Create a new CoreInstance ready to be initialized, supporting directories are also created. +func Create(req *rpc.CreateRequest) (*rpc.CreateResponse, *status.Status) { + instance := &CoreInstance{} - // Check for builtin serial-discovery tool - serialDiscoveryTool, _ := getBuiltinSerialDiscoveryTool(instance.PackageManager) - serialDiscoveryInstalled, err := instance.installToolIfMissing(serialDiscoveryTool, downloadCB, taskCB) - if err != nil { - return err + // Setup downloads directory + downloadsDir := paths.New(configuration.Settings.GetString("directories.Downloads")) + if downloadsDir.NotExist() { + err := downloadsDir.MkdirAll() + if err != nil { + s := status.Newf(codes.FailedPrecondition, err.Error()) + return nil, s + } } - if ctagsInstalled || serialDiscoveryInstalled { - if err := instance.PackageManager.LoadHardware(); err != nil { - return fmt.Errorf("could not load hardware packages: %s", err) + // Setup data directory + dataDir := paths.New(configuration.Settings.GetString("directories.Data")) + packagesDir := configuration.PackagesDir(configuration.Settings) + if packagesDir.NotExist() { + err := packagesDir.MkdirAll() + if err != nil { + s := status.Newf(codes.FailedPrecondition, err.Error()) + return nil, s } } - return nil -} -// Init FIXMEDOC -func Init(ctx context.Context, req *rpc.InitRequest, downloadCB DownloadProgressCB, taskCB TaskProgressCB) (*rpc.InitResponse, error) { - res, err := createInstance(ctx, req.GetLibraryManagerOnly()) - if err != nil { - return nil, fmt.Errorf("cannot initialize package manager: %s", err) - } + // Create package manager + instance.PackageManager = packagemanager.NewPackageManager( + dataDir, + configuration.PackagesDir(configuration.Settings), + downloadsDir, + dataDir.Join("tmp"), + ) + + // Create library manager and add libraries directories + instance.lm = librariesmanager.NewLibraryManager( + dataDir, + downloadsDir, + ) - instance := &CoreInstance{ - PackageManager: res.Pm, - lm: res.Lm, - getLibOnly: req.GetLibraryManagerOnly(), + // Add directories of libraries bundled with IDE + if bundledLibsDir := configuration.IDEBundledLibrariesDir(configuration.Settings); bundledLibsDir != nil { + instance.lm.AddLibrariesDir(bundledLibsDir, libraries.IDEBuiltIn) } - handle := instancesCount + + // Add libraries directory from config file + instance.lm.AddLibrariesDir( + configuration.LibrariesDir(configuration.Settings), + libraries.User, + ) + + // Save instance + instanceId := instancesCount + instances[instanceId] = instance instancesCount++ - instances[handle] = instance - if err := instance.checkForBuiltinTools(downloadCB, taskCB); err != nil { - return nil, err + return &rpc.CreateResponse{ + Instance: &rpc.Instance{Id: instanceId}, + }, nil +} + +// Init loads installed libraries and Platforms in CoreInstance with specified ID, +// an gRPC status error is returned if the CoreInstance doesn't exist. +// Failures don't stop the loading process, in case of loading failure the Platform or library +// is simply skipped and an error gRPC status is sent in the returned channel. +// Channel is closed when loading is finished. +func Init(req *rpc.InitRequest) (<-chan *rpc.InitResponse, *status.Status) { + instance := instances[req.Instance.Id] + if instance == nil { + return nil, status.Newf(codes.InvalidArgument, "Invalid instance ID") } - return &rpc.InitResponse{ - Instance: &rpc.Instance{Id: handle}, - PlatformsIndexErrors: res.PlatformIndexErrors, - LibrariesIndexError: res.LibrariesIndexError, - }, nil + outChan := make(chan *rpc.InitResponse) + go func() { + defer close(outChan) + + // Load Platforms + urls := []string{globals.DefaultIndexURL} + urls = append(urls, configuration.Settings.GetStringSlice("board_manager.additional_urls")...) + for _, u := range urls { + URL, err := utils.URLParse(u) + if err != nil { + s := status.Newf(codes.InvalidArgument, "Invalid additional URL: %v", err) + outChan <- &rpc.InitResponse{ + Message: &rpc.InitResponse_Error{ + Error: s.Proto(), + }, + } + continue + } + + if URL.Scheme == "file" { + indexFile := paths.New(URL.Path) + + _, err := instance.PackageManager.LoadPackageIndexFromFile(indexFile) + if err != nil { + s := status.Newf(codes.FailedPrecondition, "Loading index file: %v", err) + outChan <- &rpc.InitResponse{ + Message: &rpc.InitResponse_Error{ + Error: s.Proto(), + }, + } + } + continue + } + + if err := instance.PackageManager.LoadPackageIndex(URL); err != nil { + s := status.Newf(codes.FailedPrecondition, "Loading index file: %v", err) + outChan <- &rpc.InitResponse{ + Message: &rpc.InitResponse_Error{ + Error: s.Proto(), + }, + } + } + } + + taskCallback := func(msg *rpc.TaskProgress) { + outChan <- &rpc.InitResponse{ + Message: &rpc.InitResponse_InitProgress{ + InitProgress: &rpc.InitResponse_Progress{ + TaskProgress: msg, + }, + }, + } + } + + downloadCallback := func(msg *rpc.DownloadProgress) { + outChan <- &rpc.InitResponse{ + Message: &rpc.InitResponse_InitProgress{ + InitProgress: &rpc.InitResponse_Progress{ + DownloadProgress: msg, + }, + }, + } + } + + // Install tools if necessary + ctagsTool, _ := getBuiltinCtagsTool(instance.PackageManager) + if ctagsTool == nil { + if _, err := instance.installToolIfMissing(ctagsTool, downloadCallback, taskCallback); err != nil { + s := status.Newf(codes.Internal, err.Error()) + outChan <- &rpc.InitResponse{ + Message: &rpc.InitResponse_Error{ + Error: s.Proto(), + }, + } + } + } + + serialDiscoveryTool, _ := getBuiltinSerialDiscoveryTool(instance.PackageManager) + if serialDiscoveryTool == nil { + if _, err := instance.installToolIfMissing(serialDiscoveryTool, downloadCallback, taskCallback); err != nil { + s := status.Newf(codes.Internal, err.Error()) + outChan <- &rpc.InitResponse{ + Message: &rpc.InitResponse_Error{ + Error: s.Proto(), + }, + } + } + } + + // Load hardware only after tools have been installed + for _, err := range instance.PackageManager.LoadHardware() { + outChan <- &rpc.InitResponse{ + Message: &rpc.InitResponse_Error{ + Error: err.Proto(), + }, + } + } + + // Load libraries + for _, pack := range instance.PackageManager.Packages { + for _, platform := range pack.Platforms { + if platformRelease := instance.PackageManager.GetInstalledPlatformRelease(platform); platformRelease != nil { + instance.lm.AddPlatformReleaseLibrariesDir(platformRelease, libraries.PlatformBuiltIn) + } + } + } + + if err := instance.lm.LoadIndex(); err != nil { + s := status.Newf(codes.FailedPrecondition, "Loading index file: %v", err) + outChan <- &rpc.InitResponse{ + Message: &rpc.InitResponse_Error{ + Error: s.Proto(), + }, + } + } + + for _, err := range instance.lm.RescanLibraries() { + s := status.Newf(codes.FailedPrecondition, "Loading libraries: %v", err) + outChan <- &rpc.InitResponse{ + Message: &rpc.InitResponse_Error{ + Error: s.Proto(), + }, + } + } + }() + + return outChan, nil } // Destroy FIXMEDOC @@ -234,9 +378,21 @@ func UpdateLibrariesIndex(ctx context.Context, req *rpc.UpdateLibrariesIndexRequ return errors.Wrap(err, "writing library_index.json.sig") } - // Rescan libraries - if _, err := Rescan(req.GetInstance().GetId()); err != nil { - return fmt.Errorf("rescanning filesystem: %s", err) + // Reinitializes an existing instance + initChan, status := Init(&rpc.InitRequest{Instance: &rpc.Instance{Id: req.Instance.Id}}) + if status != nil { + return status.Err() + } + + // Handle responses + for response := range initChan { + if err := response.GetError(); err != nil { + // We return right away without iterating all the errors, the chance + // of failure in this case is slim but it would be great in the future + // to handle errors when updating the libraries indexes much like we + // do when initializing an instance. + return fmt.Errorf("rescanning filesystem: %s", err) + } } return nil } @@ -358,9 +514,23 @@ func UpdateIndex(ctx context.Context, req *rpc.UpdateIndexRequest, downloadCB Do } } } - if _, err := Rescan(id); err != nil { - return nil, fmt.Errorf("rescanning filesystem: %s", err) + + // Reinitializes an existing instance + initChan, status := Init(&rpc.InitRequest{Instance: &rpc.Instance{Id: req.Instance.Id}}) + if status != nil { + return nil, status.Err() + } + // Handle responses + for response := range initChan { + if err := response.GetError(); err != nil { + // We return right away without iterating all the errors, the chance + // of failure in this case is slim but it would be great in the future + // to handle errors when updating the platforms indexes much like we + // do when initializing an instance. + return nil, fmt.Errorf("rescanning filesystem: %s", err) + } } + return &rpc.UpdateIndexResponse{}, nil } @@ -685,125 +855,6 @@ func Upgrade(ctx context.Context, req *rpc.UpgradeRequest, downloadCB DownloadPr return nil } -// Rescan restart discoveries for the given instance -func Rescan(instanceID int32) (*rpc.RescanResponse, error) { - coreInstance, ok := instances[instanceID] - if !ok { - return nil, fmt.Errorf("invalid handle") - } - - res, err := createInstance(context.Background(), coreInstance.getLibOnly) - if err != nil { - return nil, fmt.Errorf("rescanning filesystem: %s", err) - } - coreInstance.PackageManager = res.Pm - coreInstance.lm = res.Lm - - return &rpc.RescanResponse{ - PlatformsIndexErrors: res.PlatformIndexErrors, - LibrariesIndexError: res.LibrariesIndexError, - }, nil -} - -func createInstance(ctx context.Context, getLibOnly bool) (*createInstanceResult, error) { - res := &createInstanceResult{} - - // setup downloads directory - downloadsDir := paths.New(configuration.Settings.GetString("directories.Downloads")) - if downloadsDir.NotExist() { - err := downloadsDir.MkdirAll() - if err != nil { - return nil, err - } - } - - // setup data directory - dataDir := paths.New(configuration.Settings.GetString("directories.Data")) - packagesDir := configuration.PackagesDir(configuration.Settings) - if packagesDir.NotExist() { - err := packagesDir.MkdirAll() - if err != nil { - return nil, err - } - } - - if !getLibOnly { - res.Pm = packagemanager.NewPackageManager(dataDir, configuration.PackagesDir(configuration.Settings), - downloadsDir, dataDir.Join("tmp")) - - urls := []string{globals.DefaultIndexURL} - urls = append(urls, configuration.Settings.GetStringSlice("board_manager.additional_urls")...) - for _, u := range urls { - URL, err := utils.URLParse(u) - if err != nil { - logrus.Warnf("Unable to parse index URL: %s, skip...", u) - continue - } - - if URL.Scheme == "file" { - path := paths.New(URL.Path) - if err != nil { - return nil, fmt.Errorf("can't get absolute path of %v: %w", path, err) - } - - _, err = res.Pm.LoadPackageIndexFromFile(path) - if err != nil { - res.PlatformIndexErrors = append(res.PlatformIndexErrors, err.Error()) - } - continue - } - - if err := res.Pm.LoadPackageIndex(URL); err != nil { - res.PlatformIndexErrors = append(res.PlatformIndexErrors, err.Error()) - } - } - - if err := res.Pm.LoadHardware(); err != nil { - return res, fmt.Errorf("error loading hardware packages: %s", err) - } - } - - if len(res.PlatformIndexErrors) == 0 { - res.PlatformIndexErrors = nil - } - - // Initialize library manager - // -------------------------- - res.Lm = librariesmanager.NewLibraryManager(dataDir, downloadsDir) - - // Add IDE builtin libraries dir - if bundledLibsDir := configuration.IDEBundledLibrariesDir(configuration.Settings); bundledLibsDir != nil { - res.Lm.AddLibrariesDir(bundledLibsDir, libraries.IDEBuiltIn) - } - - // Add user libraries dir - libDir := configuration.LibrariesDir(configuration.Settings) - res.Lm.AddLibrariesDir(libDir, libraries.User) - - // Add libraries dirs from installed platforms - if res.Pm != nil { - for _, targetPackage := range res.Pm.Packages { - for _, platform := range targetPackage.Platforms { - if platformRelease := res.Pm.GetInstalledPlatformRelease(platform); platformRelease != nil { - res.Lm.AddPlatformReleaseLibrariesDir(platformRelease, libraries.PlatformBuiltIn) - } - } - } - } - - // Load index and auto-update it if needed - if err := res.Lm.LoadIndex(); err != nil { - res.LibrariesIndexError = err.Error() - } - - // Scan for libraries - if err := res.Lm.RescanLibraries(); err != nil { - return res, fmt.Errorf("libraries rescan: %s", err) - } - - return res, nil -} - // LoadSketch collects and returns all files composing a sketch func LoadSketch(ctx context.Context, req *rpc.LoadSketchRequest) (*rpc.LoadSketchResponse, error) { sketch, err := builder.SketchLoad(req.SketchPath, "") diff --git a/commands/lib/install.go b/commands/lib/install.go index 4d37388ce69..614efd6006b 100644 --- a/commands/lib/install.go +++ b/commands/lib/install.go @@ -77,8 +77,9 @@ func LibraryInstall(ctx context.Context, req *rpc.LibraryInstallRequest, } } - if _, err := commands.Rescan(req.GetInstance().GetId()); err != nil { - return fmt.Errorf("rescanning libraries: %s", err) + _, status := commands.Init(&rpc.InitRequest{Instance: &rpc.Instance{Id: req.Instance.Id}}) + if status != nil { + return fmt.Errorf("rescanning libraries: %s", status.Err()) } return nil } diff --git a/commands/lib/upgrade.go b/commands/lib/upgrade.go index d85526a5fab..22072eda67e 100644 --- a/commands/lib/upgrade.go +++ b/commands/lib/upgrade.go @@ -20,6 +20,7 @@ import ( "github.com/arduino/arduino-cli/arduino/libraries/librariesmanager" "github.com/arduino/arduino-cli/commands" + rpc "github.com/arduino/arduino-cli/rpc/cc/arduino/cli/commands/v1" ) // LibraryUpgradeAll upgrades all the available libraries @@ -32,8 +33,9 @@ func LibraryUpgradeAll(instanceID int32, downloadCB commands.DownloadProgressCB, return err } - if _, err := commands.Rescan(instanceID); err != nil { - return fmt.Errorf("rescanning libraries: %s", err) + _, status := commands.Init(&rpc.InitRequest{Instance: &rpc.Instance{Id: instanceID}}) + if status != nil { + return fmt.Errorf("rescanning libraries: %s", status.Err()) } return nil diff --git a/legacy/builder/hardware_loader.go b/legacy/builder/hardware_loader.go index 7d4c8a94627..1d0dc72b695 100644 --- a/legacy/builder/hardware_loader.go +++ b/legacy/builder/hardware_loader.go @@ -26,8 +26,14 @@ type HardwareLoader struct{} func (s *HardwareLoader) Run(ctx *types.Context) error { if ctx.PackageManager == nil { pm := packagemanager.NewPackageManager(nil, nil, nil, nil) - if err := pm.LoadHardwareFromDirectories(ctx.HardwareDirs); err != nil { - return errors.WithStack(err) + if errs := pm.LoadHardwareFromDirectories(ctx.HardwareDirs); len(errs) > 0 { + // With the refactoring of the initialization step of the CLI we changed how + // errors are returned when loading platforms and libraries, that meant returning a list of + // errors instead of a single one to enhance the experience for the user. + // I have no intention right now to start a refactoring of the legacy package too, so + // here's this shitty solution for now. + // When we're gonna refactor the legacy package this will be gone. + return errors.WithStack(errs[0].Err()) } ctx.PackageManager = pm } diff --git a/legacy/builder/libraries_loader.go b/legacy/builder/libraries_loader.go index 690aa4c13c7..d486febe95e 100644 --- a/legacy/builder/libraries_loader.go +++ b/legacy/builder/libraries_loader.go @@ -57,8 +57,14 @@ func (s *LibrariesLoader) Run(ctx *types.Context) error { lm.AddLibrariesDir(folder, libraries.User) } - if err := lm.RescanLibraries(); err != nil { - return errors.WithStack(err) + if errs := lm.RescanLibraries(); len(errs) > 0 { + // With the refactoring of the initialization step of the CLI we changed how + // errors are returned when loading platforms and libraries, that meant returning a list of + // errors instead of a single one to enhance the experience for the user. + // I have no intention right now to start a refactoring of the legacy package too, so + // here's this shitty solution for now. + // When we're gonna refactor the legacy package this will be gone. + return errors.WithStack(errs[0].Err()) } for _, dir := range ctx.LibraryDirs { From 1e8764fc9f3d59557a4add2f009ecf604a7e4a57 Mon Sep 17 00:00:00 2001 From: Silvano Cerza Date: Fri, 23 Apr 2021 16:01:51 +0200 Subject: [PATCH 03/22] [breaking] Refactored cli package to reflect commands changes --- cli/board/attach.go | 8 +- cli/board/details.go | 6 +- cli/board/list.go | 13 +-- cli/board/listall.go | 6 +- cli/board/search.go | 6 +- cli/burnbootloader/burnbootloader.go | 35 +----- cli/compile/compile.go | 7 +- cli/core/download.go | 6 +- cli/core/install.go | 7 +- cli/core/list.go | 7 +- cli/core/search.go | 8 +- cli/core/uninstall.go | 7 +- cli/core/update_index.go | 2 +- cli/core/upgrade.go | 7 +- cli/debug/debug.go | 6 +- cli/instance/instance.go | 157 ++++++++++++++------------- cli/lib/check_deps.go | 2 +- cli/lib/download.go | 2 +- cli/lib/examples.go | 2 +- cli/lib/install.go | 2 +- cli/lib/list.go | 2 +- cli/lib/search.go | 2 +- cli/lib/uninstall.go | 2 +- cli/lib/update_index.go | 2 +- cli/lib/upgrade.go | 2 +- cli/outdated/outdated.go | 8 +- cli/update/update.go | 2 +- cli/upgrade/upgrade.go | 10 +- cli/upload/upload.go | 6 +- 29 files changed, 120 insertions(+), 212 deletions(-) diff --git a/cli/board/attach.go b/cli/board/attach.go index df310dd1fd3..bde7b975911 100644 --- a/cli/board/attach.go +++ b/cli/board/attach.go @@ -51,11 +51,7 @@ var attachFlags struct { } func runAttachCommand(cmd *cobra.Command, args []string) { - instance, err := instance.CreateInstance() - if err != nil { - feedback.Errorf("Attach board error: %v", err) - os.Exit(errorcodes.ErrGeneric) - } + instance := instance.CreateAndInit() var path *paths.Path if len(args) > 1 { @@ -64,7 +60,7 @@ func runAttachCommand(cmd *cobra.Command, args []string) { path = initSketchPath(path) } - if _, err = board.Attach(context.Background(), &rpc.BoardAttachRequest{ + if _, err := board.Attach(context.Background(), &rpc.BoardAttachRequest{ Instance: instance, BoardUri: args[0], SketchPath: path.String(), diff --git a/cli/board/details.go b/cli/board/details.go index 10937def929..cc8f1169b0e 100644 --- a/cli/board/details.go +++ b/cli/board/details.go @@ -55,11 +55,7 @@ func initDetailsCommand() *cobra.Command { } func runDetailsCommand(cmd *cobra.Command, args []string) { - inst, err := instance.CreateInstance() - if err != nil { - feedback.Errorf(tr("Error getting board details: %v"), err) - os.Exit(errorcodes.ErrGeneric) - } + inst := instance.CreateAndInit() // remove once `board details ` is removed if fqbn == "" && len(args) > 0 { diff --git a/cli/board/list.go b/cli/board/list.go index 27f2a8fb70e..02623bb6127 100644 --- a/cli/board/list.go +++ b/cli/board/list.go @@ -57,11 +57,7 @@ var listFlags struct { // runListCommand detects and lists the connected arduino boards func runListCommand(cmd *cobra.Command, args []string) { if listFlags.watch { - inst, err := instance.CreateInstance() - if err != nil { - feedback.Errorf("Error detecting boards: %v", err) - os.Exit(errorcodes.ErrGeneric) - } + inst := instance.CreateAndInit() watchList(cmd, inst) os.Exit(0) } @@ -73,12 +69,7 @@ func runListCommand(cmd *cobra.Command, args []string) { time.Sleep(timeout) } - inst, err := instance.CreateInstance() - if err != nil { - feedback.Errorf("Error detecting boards: %v", err) - os.Exit(errorcodes.ErrGeneric) - } - + inst := instance.CreateAndInit() ports, err := board.List(inst.GetId()) if err != nil { feedback.Errorf("Error detecting boards: %v", err) diff --git a/cli/board/listall.go b/cli/board/listall.go index 1d4f4971391..e21e03e1f80 100644 --- a/cli/board/listall.go +++ b/cli/board/listall.go @@ -50,11 +50,7 @@ var showHiddenBoard bool // runListAllCommand list all installed boards func runListAllCommand(cmd *cobra.Command, args []string) { - inst, err := instance.CreateInstance() - if err != nil { - feedback.Errorf("Error listing boards: %v", err) - os.Exit(errorcodes.ErrGeneric) - } + inst := instance.CreateAndInit() list, err := board.ListAll(context.Background(), &rpc.BoardListAllRequest{ Instance: inst, diff --git a/cli/board/search.go b/cli/board/search.go index 76cdd181ef0..67db7b22110 100644 --- a/cli/board/search.go +++ b/cli/board/search.go @@ -52,11 +52,7 @@ var searchFlags struct { } func runSearchCommand(cmd *cobra.Command, args []string) { - inst, err := instance.CreateInstance() - if err != nil { - feedback.Errorf("Error searching boards: %v", err) - os.Exit(errorcodes.ErrGeneric) - } + inst := instance.CreateAndInit() res, err := board.Search(context.Background(), &rpc.BoardSearchRequest{ Instance: inst, diff --git a/cli/burnbootloader/burnbootloader.go b/cli/burnbootloader/burnbootloader.go index d0a0ad75f04..7f760cc9261 100644 --- a/cli/burnbootloader/burnbootloader.go +++ b/cli/burnbootloader/burnbootloader.go @@ -24,19 +24,15 @@ import ( "github.com/arduino/arduino-cli/cli/instance" "github.com/arduino/arduino-cli/commands/upload" rpc "github.com/arduino/arduino-cli/rpc/cc/arduino/cli/commands/v1" - "github.com/arduino/go-paths-helper" - "github.com/sirupsen/logrus" "github.com/spf13/cobra" ) var ( - fqbn string - port string - verbose bool - verify bool - importDir string - programmer string - burnBootloader bool + fqbn string + port string + verbose bool + verify bool + programmer string ) // NewCommand created a new `burn-bootloader` command @@ -60,11 +56,7 @@ func NewCommand() *cobra.Command { } func run(command *cobra.Command, args []string) { - instance, err := instance.CreateInstance() - if err != nil { - feedback.Errorf("Error during Upload: %v", err) - os.Exit(errorcodes.ErrGeneric) - } + instance := instance.CreateAndInit() if _, err := upload.BurnBootloader(context.Background(), &rpc.BurnBootloaderRequest{ Instance: instance, @@ -79,18 +71,3 @@ func run(command *cobra.Command, args []string) { } os.Exit(0) } - -// initSketchPath returns the current working directory -func initSketchPath(sketchPath *paths.Path) *paths.Path { - if sketchPath != nil { - return sketchPath - } - - wd, err := paths.Getwd() - if err != nil { - feedback.Errorf("Couldn't get current working directory: %v", err) - os.Exit(errorcodes.ErrGeneric) - } - logrus.Infof("Reading sketch from dir: %s", wd) - return wd -} diff --git a/cli/compile/compile.go b/cli/compile/compile.go index f6cd7627350..73f479507be 100644 --- a/cli/compile/compile.go +++ b/cli/compile/compile.go @@ -120,11 +120,7 @@ func NewCommand() *cobra.Command { } func run(cmd *cobra.Command, args []string) { - inst, err := instance.CreateInstance() - if err != nil { - feedback.Errorf("Error creating instance: %v", err) - os.Exit(errorcodes.ErrGeneric) - } + inst := instance.CreateAndInit() var path *paths.Path if len(args) > 0 { @@ -183,6 +179,7 @@ func run(cmd *cobra.Command, args []string) { compileErr := new(bytes.Buffer) verboseCompile := configuration.Settings.GetString("logging.level") == "debug" var compileRes *rpc.CompileResponse + var err error if output.OutputFormat == "json" { compileRes, err = compile.Compile(context.Background(), compileRequest, compileOut, compileErr, verboseCompile) } else { diff --git a/cli/core/download.go b/cli/core/download.go index 8f941d9c926..e55b23d06eb 100644 --- a/cli/core/download.go +++ b/cli/core/download.go @@ -45,11 +45,7 @@ func initDownloadCommand() *cobra.Command { } func runDownloadCommand(cmd *cobra.Command, args []string) { - inst, err := instance.CreateInstance() - if err != nil { - feedback.Errorf("Error downloading: %v", err) - os.Exit(errorcodes.ErrGeneric) - } + inst := instance.CreateAndInit() logrus.Info("Executing `arduino core download`") diff --git a/cli/core/install.go b/cli/core/install.go index 1cc138bc7d4..69790d4c243 100644 --- a/cli/core/install.go +++ b/cli/core/install.go @@ -83,12 +83,7 @@ func DetectSkipPostInstallValue() bool { } func runInstallCommand(cmd *cobra.Command, args []string) { - inst, err := instance.CreateInstance() - if err != nil { - feedback.Errorf("Error installing: %v", err) - os.Exit(errorcodes.ErrGeneric) - } - + inst := instance.CreateAndInit() logrus.Info("Executing `arduino core install`") platformsRefs, err := globals.ParseReferenceArgs(args, true) diff --git a/cli/core/list.go b/cli/core/list.go index 2d2d2b34465..e111c426ce8 100644 --- a/cli/core/list.go +++ b/cli/core/list.go @@ -49,12 +49,7 @@ var listFlags struct { } func runListCommand(cmd *cobra.Command, args []string) { - inst, err := instance.CreateInstance() - if err != nil { - feedback.Errorf("Error listing platforms: %v", err) - os.Exit(errorcodes.ErrGeneric) - } - + inst := instance.CreateAndInit() logrus.Info("Executing `arduino core list`") platforms, err := core.GetPlatforms(&rpc.PlatformListRequest{ diff --git a/cli/core/search.go b/cli/core/search.go index 0084bbfd9c6..f995393771e 100644 --- a/cli/core/search.go +++ b/cli/core/search.go @@ -61,14 +61,10 @@ func initSearchCommand() *cobra.Command { const indexUpdateInterval = "24h" func runSearchCommand(cmd *cobra.Command, args []string) { - inst, err := instance.CreateInstance() - if err != nil { - feedback.Errorf("Error searching for platforms: %v", err) - os.Exit(errorcodes.ErrGeneric) - } + inst := instance.CreateAndInit() if indexesNeedUpdating(indexUpdateInterval) { - _, err = commands.UpdateIndex(context.Background(), &rpc.UpdateIndexRequest{ + _, err := commands.UpdateIndex(context.Background(), &rpc.UpdateIndexRequest{ Instance: inst, }, output.ProgressBar()) if err != nil { diff --git a/cli/core/uninstall.go b/cli/core/uninstall.go index 7cd3cec2955..8a92d4aa29b 100644 --- a/cli/core/uninstall.go +++ b/cli/core/uninstall.go @@ -42,12 +42,7 @@ func initUninstallCommand() *cobra.Command { } func runUninstallCommand(cmd *cobra.Command, args []string) { - inst, err := instance.CreateInstance() - if err != nil { - feedback.Errorf("Error uninstalling: %v", err) - os.Exit(errorcodes.ErrGeneric) - } - + inst := instance.CreateAndInit() logrus.Info("Executing `arduino core uninstall`") platformsRefs, err := globals.ParseReferenceArgs(args, true) diff --git a/cli/core/update_index.go b/cli/core/update_index.go index da413393ee9..f3f6f4252ee 100644 --- a/cli/core/update_index.go +++ b/cli/core/update_index.go @@ -42,7 +42,7 @@ func initUpdateIndexCommand() *cobra.Command { } func runUpdateIndexCommand(cmd *cobra.Command, args []string) { - instance := instance.CreateInstanceIgnorePlatformIndexErrors() + instance := instance.CreateAndInit() logrus.Info("Executing `arduino core update-index`") _, err := commands.UpdateIndex(context.Background(), &rpc.UpdateIndexRequest{ diff --git a/cli/core/upgrade.go b/cli/core/upgrade.go index db27f1eb0fa..f9467bc4126 100644 --- a/cli/core/upgrade.go +++ b/cli/core/upgrade.go @@ -47,12 +47,7 @@ func initUpgradeCommand() *cobra.Command { } func runUpgradeCommand(cmd *cobra.Command, args []string) { - inst, err := instance.CreateInstance() - if err != nil { - feedback.Errorf("Error upgrading: %v", err) - os.Exit(errorcodes.ErrGeneric) - } - + inst := instance.CreateAndInit() logrus.Info("Executing `arduino core upgrade`") // if no platform was passed, upgrade allthethings diff --git a/cli/debug/debug.go b/cli/debug/debug.go index fc4d1a4ee38..a3fb3953a59 100644 --- a/cli/debug/debug.go +++ b/cli/debug/debug.go @@ -69,11 +69,7 @@ func NewCommand() *cobra.Command { } func run(command *cobra.Command, args []string) { - instance, err := instance.CreateInstance() - if err != nil { - feedback.Errorf("Error during Debug: %v", err) - os.Exit(errorcodes.ErrGeneric) - } + instance := instance.CreateAndInit() var path *paths.Path if len(args) > 0 { diff --git a/cli/instance/instance.go b/cli/instance/instance.go index 6850ffb0164..6f683867b5a 100644 --- a/cli/instance/instance.go +++ b/cli/instance/instance.go @@ -17,118 +17,125 @@ package instance import ( "context" - "fmt" - "strings" + "os" + "github.com/arduino/arduino-cli/cli/errorcodes" + "github.com/arduino/arduino-cli/cli/feedback" "github.com/arduino/arduino-cli/cli/output" "github.com/arduino/arduino-cli/commands" "github.com/arduino/arduino-cli/configuration" rpc "github.com/arduino/arduino-cli/rpc/cc/arduino/cli/commands/v1" "github.com/arduino/go-paths-helper" - "github.com/pkg/errors" - "github.com/sirupsen/logrus" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" ) -// CreateInstanceIgnorePlatformIndexErrors creates and return an instance of the -// Arduino Core Engine, but won't stop on platforms index loading errors. -func CreateInstanceIgnorePlatformIndexErrors() *rpc.Instance { - i, _ := getInitResponse() - return i.GetInstance() +// CreateAndInit return a new initialized instance. +// If Create fails the CLI prints an error and exits since +// to execute further operations a valid Instance is mandatory. +// If Init returns errors they're printed only. +func CreateAndInit() *rpc.Instance { + instance, err := Create() + if err != nil { + feedback.Errorf("Error creating instance: %v", err) + os.Exit(errorcodes.ErrGeneric) + } + for _, err := range Init(instance) { + feedback.Errorf("Error initializing instance: %v", err) + } + return instance } -// CreateInstance creates and return an instance of the Arduino Core engine -func CreateInstance() (*rpc.Instance, error) { - resp, err := getInitResponse() +// Create and return a new Instance. +func Create() (*rpc.Instance, *status.Status) { + res, err := commands.Create(&rpc.CreateRequest{}) if err != nil { return nil, err } - - return resp.GetInstance(), checkPlatformErrors(resp) + return res.Instance, nil } -func getInitResponse() (*rpc.InitResponse, error) { - // invoke Init() - resp, err := commands.Init(context.Background(), &rpc.InitRequest{}, output.ProgressBar(), output.TaskProgress()) +// Init initializes instance by loading installed libraries and platforms. +// In case of loading failures return a list gRPC Status errors for each +// platform or library that we failed to load. +// Package and library indexes files are automatically updated if the +// CLI is run for the first time. +func Init(instance *rpc.Instance) []*status.Status { + errs := []*status.Status{} + + // In case the CLI is executed for the first time + if err := firstUpdate(instance); err != nil { + return append(errs, err) + } - // Init() failed + initChan, err := commands.Init(&rpc.InitRequest{ + Instance: instance, + }) if err != nil { - return nil, errors.Wrap(err, "creating instance") + return append(errs, err) } + downloadCallback := output.ProgressBar() + taskCallback := output.TaskProgress() + + for res := range initChan { + if err := res.GetError(); err != nil { + errs = append(errs, status.FromProto(err)) + } + + if progress := res.GetInitProgress(); progress != nil { + if progress.DownloadProgress != nil { + downloadCallback(progress.DownloadProgress) + } + if progress.TaskProgress != nil { + taskCallback(progress.TaskProgress) + } + } + } + + return errs +} + +// firstUpdate downloads libraries and packages indexes if they don't exist. +// This ideally is only executed the first time the CLI is run. +func firstUpdate(instance *rpc.Instance) *status.Status { // Gets the data directory to verify if library_index.json and package_index.json exist dataDir := paths.New(configuration.Settings.GetString("directories.data")) + libraryIndex := dataDir.Join("library_index.json") + packageIndex := dataDir.Join("package_index.json") + + if libraryIndex.Exist() && packageIndex.Exist() { + return nil + } + // The library_index.json file doesn't exists, that means the CLI is run for the first time // so we proceed with the first update that downloads the file - libraryIndex := dataDir.Join("library_index.json") if libraryIndex.NotExist() { - logrus.Warnf("There were errors loading the library index, trying again...") - - // update all indexes err := commands.UpdateLibrariesIndex(context.Background(), - &rpc.UpdateLibrariesIndexRequest{Instance: resp.GetInstance()}, output.ProgressBar()) + &rpc.UpdateLibrariesIndexRequest{ + Instance: instance, + }, + output.ProgressBar(), + ) if err != nil { - return nil, errors.Wrap(err, "updating the library index") - } - - // rescan libraries - rescanResp, err := commands.Rescan(resp.GetInstance().GetId()) - if err != nil { - return nil, errors.Wrap(err, "during rescan") - } - - // errors persist - if rescanResp.GetLibrariesIndexError() != "" { - return nil, errors.New("still errors after rescan: " + rescanResp.GetLibrariesIndexError()) + return status.Newf(codes.FailedPrecondition, err.Error()) } - - // succeeded, copy over PlatformsIndexErrors in case errors occurred - // during rescan - resp.LibrariesIndexError = "" - resp.PlatformsIndexErrors = rescanResp.PlatformsIndexErrors } // The package_index.json file doesn't exists, that means the CLI is run for the first time, // similarly to the library update we download that file and all the other package indexes // from additional_urls - packageIndex := dataDir.Join("package_index.json") if packageIndex.NotExist() { - // update platform index _, err := commands.UpdateIndex(context.Background(), - &rpc.UpdateIndexRequest{Instance: resp.GetInstance()}, output.ProgressBar()) - if err != nil { - return nil, errors.Wrap(err, "updating the core index") - } - - // rescan - rescanResp, err := commands.Rescan(resp.GetInstance().GetId()) + &rpc.UpdateIndexRequest{ + Instance: instance, + }, + output.ProgressBar(), + ) if err != nil { - return nil, errors.Wrap(err, "during rescan") - } - - // errors persist - if rescanResp.GetPlatformsIndexErrors() != nil { - for _, err := range rescanResp.GetPlatformsIndexErrors() { - logrus.Errorf("Still errors after rescan: %v", err) - } - } - - // succeeded, copy over PlatformsIndexErrors in case errors occurred - // during rescan - resp.PlatformsIndexErrors = rescanResp.PlatformsIndexErrors - } - - return resp, nil -} - -func checkPlatformErrors(resp *rpc.InitResponse) error { - // Init() and/or rescan succeeded, but there were errors loading platform indexes - if resp.GetPlatformsIndexErrors() != nil { - // log each error - for _, err := range resp.GetPlatformsIndexErrors() { - logrus.Errorf("Error loading platform index: %v", err) + return status.Newf(codes.FailedPrecondition, err.Error()) } - return fmt.Errorf("error loading platform index: \n%v", strings.Join(resp.GetPlatformsIndexErrors(), "\n")) } return nil diff --git a/cli/lib/check_deps.go b/cli/lib/check_deps.go index df6f9c9e8bd..1f19c5e58ca 100644 --- a/cli/lib/check_deps.go +++ b/cli/lib/check_deps.go @@ -44,7 +44,7 @@ func initDepsCommand() *cobra.Command { } func runDepsCommand(cmd *cobra.Command, args []string) { - instance := instance.CreateInstanceIgnorePlatformIndexErrors() + instance := instance.CreateAndInit() libRef, err := ParseLibraryReferenceArgAndAdjustCase(instance, args[0]) if err != nil { feedback.Errorf("Arguments error: %v", err) diff --git a/cli/lib/download.go b/cli/lib/download.go index 6f8a3b468cd..b65a4991b73 100644 --- a/cli/lib/download.go +++ b/cli/lib/download.go @@ -43,7 +43,7 @@ func initDownloadCommand() *cobra.Command { } func runDownloadCommand(cmd *cobra.Command, args []string) { - instance := instance.CreateInstanceIgnorePlatformIndexErrors() + instance := instance.CreateAndInit() refs, err := ParseLibraryReferenceArgsAndAdjustCase(instance, args) if err != nil { feedback.Errorf("Invalid argument passed: %v", err) diff --git a/cli/lib/examples.go b/cli/lib/examples.go index a1cebaea804..7a7ae76606c 100644 --- a/cli/lib/examples.go +++ b/cli/lib/examples.go @@ -51,7 +51,7 @@ var examplesFlags struct { } func runExamplesCommand(cmd *cobra.Command, args []string) { - instance := instance.CreateInstanceIgnorePlatformIndexErrors() + instance := instance.CreateAndInit() logrus.Info("Show examples for library") name := "" diff --git a/cli/lib/install.go b/cli/lib/install.go index 48d938effd6..db494c8b9a0 100644 --- a/cli/lib/install.go +++ b/cli/lib/install.go @@ -59,7 +59,7 @@ var installFlags struct { } func runInstallCommand(cmd *cobra.Command, args []string) { - instance := instance.CreateInstanceIgnorePlatformIndexErrors() + instance := instance.CreateAndInit() if installFlags.zipPath || installFlags.gitURL { if !configuration.Settings.GetBool("library.enable_unsafe_install") { diff --git a/cli/lib/list.go b/cli/lib/list.go index 3967ae4e8cd..edc34846bef 100644 --- a/cli/lib/list.go +++ b/cli/lib/list.go @@ -56,7 +56,7 @@ var listFlags struct { } func runListCommand(cmd *cobra.Command, args []string) { - instance := instance.CreateInstanceIgnorePlatformIndexErrors() + instance := instance.CreateAndInit() logrus.Info("Listing") name := "" diff --git a/cli/lib/search.go b/cli/lib/search.go index 621cafad1de..c19293f4241 100644 --- a/cli/lib/search.go +++ b/cli/lib/search.go @@ -52,7 +52,7 @@ var searchFlags struct { } func runSearchCommand(cmd *cobra.Command, args []string) { - instance := instance.CreateInstanceIgnorePlatformIndexErrors() + instance := instance.CreateAndInit() err := commands.UpdateLibrariesIndex(context.Background(), &rpc.UpdateLibrariesIndexRequest{ Instance: instance, diff --git a/cli/lib/uninstall.go b/cli/lib/uninstall.go index 0c6ee93c1f1..f904f06d000 100644 --- a/cli/lib/uninstall.go +++ b/cli/lib/uninstall.go @@ -44,7 +44,7 @@ func initUninstallCommand() *cobra.Command { func runUninstallCommand(cmd *cobra.Command, args []string) { logrus.Info("Executing `arduino lib uninstall`") - instance := instance.CreateInstanceIgnorePlatformIndexErrors() + instance := instance.CreateAndInit() refs, err := ParseLibraryReferenceArgsAndAdjustCase(instance, args) if err != nil { feedback.Errorf("Invalid argument passed: %v", err) diff --git a/cli/lib/update_index.go b/cli/lib/update_index.go index eefe5d5e287..dd14a58628a 100644 --- a/cli/lib/update_index.go +++ b/cli/lib/update_index.go @@ -36,7 +36,7 @@ func initUpdateIndexCommand() *cobra.Command { Example: " " + os.Args[0] + " lib update-index", Args: cobra.NoArgs, Run: func(cmd *cobra.Command, args []string) { - instance := instance.CreateInstanceIgnorePlatformIndexErrors() + instance := instance.CreateAndInit() err := commands.UpdateLibrariesIndex(context.Background(), &rpc.UpdateLibrariesIndexRequest{ Instance: instance, }, output.ProgressBar()) diff --git a/cli/lib/upgrade.go b/cli/lib/upgrade.go index 7da8fe87856..27f1827e751 100644 --- a/cli/lib/upgrade.go +++ b/cli/lib/upgrade.go @@ -44,7 +44,7 @@ func initUpgradeCommand() *cobra.Command { } func runUpgradeCommand(cmd *cobra.Command, args []string) { - instance := instance.CreateInstanceIgnorePlatformIndexErrors() + instance := instance.CreateAndInit() if len(args) == 0 { err := lib.LibraryUpgradeAll(instance.Id, output.ProgressBar(), output.TaskProgress()) diff --git a/cli/outdated/outdated.go b/cli/outdated/outdated.go index d07a4fa7753..20d8a50f94b 100644 --- a/cli/outdated/outdated.go +++ b/cli/outdated/outdated.go @@ -19,7 +19,6 @@ import ( "context" "os" - "github.com/arduino/arduino-cli/cli/errorcodes" "github.com/arduino/arduino-cli/cli/feedback" "github.com/arduino/arduino-cli/cli/instance" "github.com/arduino/arduino-cli/commands" @@ -45,12 +44,7 @@ func NewCommand() *cobra.Command { } func runOutdatedCommand(cmd *cobra.Command, args []string) { - inst, err := instance.CreateInstance() - if err != nil { - feedback.Errorf("Error running outdated command: %v", err) - os.Exit(errorcodes.ErrGeneric) - } - + inst := instance.CreateAndInit() logrus.Info("Executing `arduino outdated`") outdatedResp, err := commands.Outdated(context.Background(), &rpc.OutdatedRequest{ diff --git a/cli/update/update.go b/cli/update/update.go index e62ae711597..29dc290541c 100644 --- a/cli/update/update.go +++ b/cli/update/update.go @@ -49,7 +49,7 @@ var updateFlags struct { } func runUpdateCommand(cmd *cobra.Command, args []string) { - instance := instance.CreateInstanceIgnorePlatformIndexErrors() + instance := instance.CreateAndInit() logrus.Info("Executing `arduino update`") diff --git a/cli/upgrade/upgrade.go b/cli/upgrade/upgrade.go index 71ee63aa8c4..a9ee2e68d55 100644 --- a/cli/upgrade/upgrade.go +++ b/cli/upgrade/upgrade.go @@ -20,7 +20,6 @@ import ( "os" "github.com/arduino/arduino-cli/cli/core" - "github.com/arduino/arduino-cli/cli/errorcodes" "github.com/arduino/arduino-cli/cli/feedback" "github.com/arduino/arduino-cli/cli/instance" "github.com/arduino/arduino-cli/cli/output" @@ -46,15 +45,10 @@ func NewCommand() *cobra.Command { } func runUpgradeCommand(cmd *cobra.Command, args []string) { - inst, err := instance.CreateInstance() - if err != nil { - feedback.Errorf("Error upgrading: %v", err) - os.Exit(errorcodes.ErrGeneric) - } - + inst := instance.CreateAndInit() logrus.Info("Executing `arduino upgrade`") - err = commands.Upgrade(context.Background(), &rpc.UpgradeRequest{ + err := commands.Upgrade(context.Background(), &rpc.UpgradeRequest{ Instance: inst, SkipPostInstall: core.DetectSkipPostInstallValue(), }, output.NewDownloadProgressBarCB(), output.TaskProgress()) diff --git a/cli/upload/upload.go b/cli/upload/upload.go index 235e448a7b1..00c8d5d7f4a 100644 --- a/cli/upload/upload.go +++ b/cli/upload/upload.go @@ -71,11 +71,7 @@ func checkFlagsConflicts(command *cobra.Command, args []string) { } func run(command *cobra.Command, args []string) { - instance, err := instance.CreateInstance() - if err != nil { - feedback.Errorf("Error during Upload: %v", err) - os.Exit(errorcodes.ErrGeneric) - } + instance := instance.CreateAndInit() var path *paths.Path if len(args) > 0 { From 93655a467e97e6c2d40bf5ea9fddd0fa211ac212 Mon Sep 17 00:00:00 2001 From: Silvano Cerza Date: Fri, 23 Apr 2021 16:34:37 +0200 Subject: [PATCH 04/22] Fix instance creation for CLI commands that update indexes --- cli/core/update_index.go | 10 +++++++++- cli/lib/update_index.go | 10 +++++++++- cli/update/update.go | 11 +++++++++-- 3 files changed, 27 insertions(+), 4 deletions(-) diff --git a/cli/core/update_index.go b/cli/core/update_index.go index f3f6f4252ee..e4585d41c3e 100644 --- a/cli/core/update_index.go +++ b/cli/core/update_index.go @@ -42,8 +42,16 @@ func initUpdateIndexCommand() *cobra.Command { } func runUpdateIndexCommand(cmd *cobra.Command, args []string) { - instance := instance.CreateAndInit() logrus.Info("Executing `arduino core update-index`") + // We don't initialize any CoreInstance when updating indexes since we don't need to. + // Also meaningless errors might be returned when calling this command with --additional-urls + // since the CLI would be searching for a corresponding file for the additional urls set + // as argument but none would be obviously found. + instance, status := instance.Create() + if status != nil { + feedback.Errorf("Error creating instance: %v", status) + os.Exit(errorcodes.ErrGeneric) + } _, err := commands.UpdateIndex(context.Background(), &rpc.UpdateIndexRequest{ Instance: instance, diff --git a/cli/lib/update_index.go b/cli/lib/update_index.go index dd14a58628a..b8bd076bba4 100644 --- a/cli/lib/update_index.go +++ b/cli/lib/update_index.go @@ -36,7 +36,15 @@ func initUpdateIndexCommand() *cobra.Command { Example: " " + os.Args[0] + " lib update-index", Args: cobra.NoArgs, Run: func(cmd *cobra.Command, args []string) { - instance := instance.CreateAndInit() + // We don't initialize any CoreInstance when updating indexes since we don't need to. + // Also meaningless errors might be returned when calling this command with --additional-urls + // since the CLI would be searching for a corresponding file for the additional urls set + // as argument but none would be obviously found. + instance, status := instance.Create() + if status != nil { + feedback.Errorf("Error creating instance: %v", status) + os.Exit(errorcodes.ErrGeneric) + } err := commands.UpdateLibrariesIndex(context.Background(), &rpc.UpdateLibrariesIndexRequest{ Instance: instance, }, output.ProgressBar()) diff --git a/cli/update/update.go b/cli/update/update.go index 29dc290541c..66dd2066164 100644 --- a/cli/update/update.go +++ b/cli/update/update.go @@ -49,8 +49,15 @@ var updateFlags struct { } func runUpdateCommand(cmd *cobra.Command, args []string) { - instance := instance.CreateAndInit() - + // We don't initialize any CoreInstance when updating indexes since we don't need to. + // Also meaningless errors might be returned when calling this command with --additional-urls + // since the CLI would be searching for a corresponding file for the additional urls set + // as argument but none would be obviously found. + instance, status := instance.Create() + if status != nil { + feedback.Errorf("Error creating instance: %v", status) + os.Exit(errorcodes.ErrGeneric) + } logrus.Info("Executing `arduino update`") err := commands.UpdateCoreLibrariesIndex(context.Background(), &rpc.UpdateCoreLibrariesIndexRequest{ From 9adeb3f5b13a6cd5883a4f9773b677926cdd87c6 Mon Sep 17 00:00:00 2001 From: Silvano Cerza Date: Fri, 23 Apr 2021 16:34:55 +0200 Subject: [PATCH 05/22] Fix unit tests --- arduino/cores/packagemanager/loader.go | 2 +- arduino/cores/packagemanager/package_manager_test.go | 3 ++- commands/core/search_test.go | 3 +-- commands/upload/upload_test.go | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/arduino/cores/packagemanager/loader.go b/arduino/cores/packagemanager/loader.go index e31cca323da..ad39d4efb6e 100644 --- a/arduino/cores/packagemanager/loader.go +++ b/arduino/cores/packagemanager/loader.go @@ -199,7 +199,7 @@ func (pm *PackageManager) loadPlatform(targetPackage *cores.Package, platformPat platformTxtPath := platformPath.Join("platform.txt") platformProperties, err := properties.SafeLoad(platformTxtPath.String()) if err != nil { - return status.Newf(codes.FailedPrecondition, "loading platform.txt: %w", err) + return status.Newf(codes.FailedPrecondition, "loading platform.txt: %v", err) } version := semver.MustParse(platformProperties.Get("version")) diff --git a/arduino/cores/packagemanager/package_manager_test.go b/arduino/cores/packagemanager/package_manager_test.go index c4cb37db891..8e92482dae7 100644 --- a/arduino/cores/packagemanager/package_manager_test.go +++ b/arduino/cores/packagemanager/package_manager_test.go @@ -228,7 +228,8 @@ func TestFindToolsRequiredForBoard(t *testing.T) { loadIndex("https://dl.espressif.com/dl/package_esp32_index.json") loadIndex("http://arduino.esp8266.com/stable/package_esp8266com_index.json") loadIndex("https://adafruit.github.io/arduino-board-index/package_adafruit_index.json") - require.NoError(t, pm.LoadHardware()) + errs := pm.LoadHardware() + require.Len(t, errs, 0) esp32, err := pm.FindBoardWithFQBN("esp32:esp32:esp32") require.NoError(t, err) esptool231 := pm.FindToolDependency(&cores.ToolDependency{ diff --git a/commands/core/search_test.go b/commands/core/search_test.go index 091c7d63017..2e47423bdb8 100644 --- a/commands/core/search_test.go +++ b/commands/core/search_test.go @@ -41,8 +41,7 @@ func TestPlatformSearch(t *testing.T) { configuration.Settings = configuration.Init(paths.TempDir().Join("test", "arduino-cli.yaml").String()) - inst, err := instance.CreateInstance() - require.Nil(t, err) + inst := instance.CreateAndInit() require.NotNil(t, inst) res, err := PlatformSearch(&rpc.PlatformSearchRequest{ diff --git a/commands/upload/upload_test.go b/commands/upload/upload_test.go index df3658d81e6..f62a4ca7018 100644 --- a/commands/upload/upload_test.go +++ b/commands/upload/upload_test.go @@ -127,8 +127,8 @@ func TestDetermineBuildPathAndSketchName(t *testing.T) { func TestUploadPropertiesComposition(t *testing.T) { pm := packagemanager.NewPackageManager(nil, nil, nil, nil) - err := pm.LoadHardwareFromDirectory(paths.New("testdata", "hardware")) - require.NoError(t, err) + errs := pm.LoadHardwareFromDirectory(paths.New("testdata", "hardware")) + require.Len(t, errs, 0) buildPath1 := paths.New("testdata", "build_path_1") logrus.SetLevel(logrus.TraceLevel) type test struct { From 2079c0c16ca6b48f5e680c3dbcc330740cdc03a7 Mon Sep 17 00:00:00 2001 From: Silvano Cerza Date: Mon, 7 Jun 2021 12:38:37 +0200 Subject: [PATCH 06/22] Change update indexes commands to not reload instance after --- cli/core/search.go | 10 +++++++++- cli/core/update_index.go | 13 +++++++++++-- cli/instance/instance.go | 6 +++--- cli/lib/search.go | 14 +++++++++++--- cli/lib/update_index.go | 14 ++++++++++++-- cli/update/update.go | 17 +++++++++++++---- 6 files changed, 59 insertions(+), 15 deletions(-) diff --git a/cli/core/search.go b/cli/core/search.go index f995393771e..a41ba1b22b0 100644 --- a/cli/core/search.go +++ b/cli/core/search.go @@ -61,7 +61,11 @@ func initSearchCommand() *cobra.Command { const indexUpdateInterval = "24h" func runSearchCommand(cmd *cobra.Command, args []string) { - inst := instance.CreateAndInit() + inst, status := instance.Create() + if status != nil { + feedback.Errorf("Error creating instance: %v", status) + os.Exit(errorcodes.ErrGeneric) + } if indexesNeedUpdating(indexUpdateInterval) { _, err := commands.UpdateIndex(context.Background(), &rpc.UpdateIndexRequest{ @@ -73,6 +77,10 @@ func runSearchCommand(cmd *cobra.Command, args []string) { } } + for _, err := range instance.Init(inst) { + feedback.Errorf("Error initializing instance: %v", err) + } + arguments := strings.ToLower(strings.Join(args, " ")) logrus.Infof("Executing `arduino core search` with args: '%s'", arguments) diff --git a/cli/core/update_index.go b/cli/core/update_index.go index e4585d41c3e..16e177cec72 100644 --- a/cli/core/update_index.go +++ b/cli/core/update_index.go @@ -47,14 +47,23 @@ func runUpdateIndexCommand(cmd *cobra.Command, args []string) { // Also meaningless errors might be returned when calling this command with --additional-urls // since the CLI would be searching for a corresponding file for the additional urls set // as argument but none would be obviously found. - instance, status := instance.Create() + inst, status := instance.Create() if status != nil { feedback.Errorf("Error creating instance: %v", status) os.Exit(errorcodes.ErrGeneric) } + // In case this is the first time the CLI is run we need to update indexes + // to make it work correctly, we must do this explicitly in this command since + // we must use instance.Create instead of instance.CreateAndInit for the + // reason stated above. + if err := instance.FirstUpdate(inst); err != nil { + feedback.Errorf("Error updating indexes: %v", status) + os.Exit(errorcodes.ErrGeneric) + } + _, err := commands.UpdateIndex(context.Background(), &rpc.UpdateIndexRequest{ - Instance: instance, + Instance: inst, }, output.ProgressBar()) if err != nil { feedback.Errorf("Error updating index: %v", err) diff --git a/cli/instance/instance.go b/cli/instance/instance.go index 6f683867b5a..b7dcd50ea33 100644 --- a/cli/instance/instance.go +++ b/cli/instance/instance.go @@ -64,7 +64,7 @@ func Init(instance *rpc.Instance) []*status.Status { errs := []*status.Status{} // In case the CLI is executed for the first time - if err := firstUpdate(instance); err != nil { + if err := FirstUpdate(instance); err != nil { return append(errs, err) } @@ -96,9 +96,9 @@ func Init(instance *rpc.Instance) []*status.Status { return errs } -// firstUpdate downloads libraries and packages indexes if they don't exist. +// FirstUpdate downloads libraries and packages indexes if they don't exist. // This ideally is only executed the first time the CLI is run. -func firstUpdate(instance *rpc.Instance) *status.Status { +func FirstUpdate(instance *rpc.Instance) *status.Status { // Gets the data directory to verify if library_index.json and package_index.json exist dataDir := paths.New(configuration.Settings.GetString("directories.data")) diff --git a/cli/lib/search.go b/cli/lib/search.go index c19293f4241..fb6d240724e 100644 --- a/cli/lib/search.go +++ b/cli/lib/search.go @@ -52,19 +52,27 @@ var searchFlags struct { } func runSearchCommand(cmd *cobra.Command, args []string) { - instance := instance.CreateAndInit() + inst, status := instance.Create() + if status != nil { + feedback.Errorf("Error creating instance: %v", status) + os.Exit(errorcodes.ErrGeneric) + } err := commands.UpdateLibrariesIndex(context.Background(), &rpc.UpdateLibrariesIndexRequest{ - Instance: instance, + Instance: inst, }, output.ProgressBar()) if err != nil { feedback.Errorf("Error updating library index: %v", err) os.Exit(errorcodes.ErrGeneric) } + for _, err := range instance.Init(inst) { + feedback.Errorf("Error initializing instance: %v", err) + } + logrus.Info("Executing `arduino lib search`") searchResp, err := lib.LibrarySearch(context.Background(), &rpc.LibrarySearchRequest{ - Instance: instance, + Instance: inst, Query: (strings.Join(args, " ")), }) if err != nil { diff --git a/cli/lib/update_index.go b/cli/lib/update_index.go index b8bd076bba4..f92b13b5bd6 100644 --- a/cli/lib/update_index.go +++ b/cli/lib/update_index.go @@ -40,13 +40,23 @@ func initUpdateIndexCommand() *cobra.Command { // Also meaningless errors might be returned when calling this command with --additional-urls // since the CLI would be searching for a corresponding file for the additional urls set // as argument but none would be obviously found. - instance, status := instance.Create() + inst, status := instance.Create() if status != nil { feedback.Errorf("Error creating instance: %v", status) os.Exit(errorcodes.ErrGeneric) } + + // In case this is the first time the CLI is run we need to update indexes + // to make it work correctly, we must do this explicitly in this command since + // we must use instance.Create instead of instance.CreateAndInit for the + // reason stated above. + if err := instance.FirstUpdate(inst); err != nil { + feedback.Errorf("Error updating indexes: %v", status) + os.Exit(errorcodes.ErrGeneric) + } + err := commands.UpdateLibrariesIndex(context.Background(), &rpc.UpdateLibrariesIndexRequest{ - Instance: instance, + Instance: inst, }, output.ProgressBar()) if err != nil { feedback.Errorf("Error updating library index: %v", err) diff --git a/cli/update/update.go b/cli/update/update.go index 66dd2066164..1ce895c2393 100644 --- a/cli/update/update.go +++ b/cli/update/update.go @@ -49,19 +49,28 @@ var updateFlags struct { } func runUpdateCommand(cmd *cobra.Command, args []string) { + logrus.Info("Executing `arduino update`") // We don't initialize any CoreInstance when updating indexes since we don't need to. // Also meaningless errors might be returned when calling this command with --additional-urls // since the CLI would be searching for a corresponding file for the additional urls set // as argument but none would be obviously found. - instance, status := instance.Create() + inst, status := instance.Create() if status != nil { feedback.Errorf("Error creating instance: %v", status) os.Exit(errorcodes.ErrGeneric) } - logrus.Info("Executing `arduino update`") + + // In case this is the first time the CLI is run we need to update indexes + // to make it work correctly, we must do this explicitly in this command since + // we must use instance.Create instead of instance.CreateAndInit for the + // reason stated above. + if err := instance.FirstUpdate(inst); err != nil { + feedback.Errorf("Error updating indexes: %v", status) + os.Exit(errorcodes.ErrGeneric) + } err := commands.UpdateCoreLibrariesIndex(context.Background(), &rpc.UpdateCoreLibrariesIndexRequest{ - Instance: instance, + Instance: inst, }, output.ProgressBar()) if err != nil { feedback.Errorf("Error updating core and libraries index: %v", err) @@ -70,7 +79,7 @@ func runUpdateCommand(cmd *cobra.Command, args []string) { if updateFlags.showOutdated { outdatedResp, err := commands.Outdated(context.Background(), &rpc.OutdatedRequest{ - Instance: instance, + Instance: inst, }) if err != nil { feedback.Errorf("Error retrieving outdated cores and libraries: %v", err) From ced6b4889db46123dd9093a90246449e0361144e Mon Sep 17 00:00:00 2001 From: Silvano Cerza Date: Fri, 23 Apr 2021 17:28:56 +0200 Subject: [PATCH 07/22] Fix installation of builtin tools --- commands/instances.go | 55 ++++++++++++++++++++++++++++++++++--------- 1 file changed, 44 insertions(+), 11 deletions(-) diff --git a/commands/instances.go b/commands/instances.go index 5d0dccae57c..07143b5f185 100644 --- a/commands/instances.go +++ b/commands/instances.go @@ -216,6 +216,17 @@ func Init(req *rpc.InitRequest) (<-chan *rpc.InitResponse, *status.Status) { } } + // We load hardware before verifying builtin tools are installed + // otherwise we wouldn't find them and reinstall them each time + // and they would never get reloaded. + for _, err := range instance.PackageManager.LoadHardware() { + outChan <- &rpc.InitResponse{ + Message: &rpc.InitResponse_Error{ + Error: err.Proto(), + }, + } + } + taskCallback := func(msg *rpc.TaskProgress) { outChan <- &rpc.InitResponse{ Message: &rpc.InitResponse_InitProgress{ @@ -237,9 +248,19 @@ func Init(req *rpc.InitRequest) (<-chan *rpc.InitResponse, *status.Status) { } // Install tools if necessary - ctagsTool, _ := getBuiltinCtagsTool(instance.PackageManager) - if ctagsTool == nil { - if _, err := instance.installToolIfMissing(ctagsTool, downloadCallback, taskCallback); err != nil { + toolHasBeenInstalled := false + ctagsTool, err := getBuiltinCtagsTool(instance.PackageManager) + if err != nil { + s := status.Newf(codes.Internal, err.Error()) + outChan <- &rpc.InitResponse{ + Message: &rpc.InitResponse_Error{ + Error: s.Proto(), + }, + } + } else { + ctagsInstalled, err := instance.installToolIfMissing(ctagsTool, downloadCallback, taskCallback) + toolHasBeenInstalled = toolHasBeenInstalled || ctagsInstalled + if err != nil { s := status.Newf(codes.Internal, err.Error()) outChan <- &rpc.InitResponse{ Message: &rpc.InitResponse_Error{ @@ -250,8 +271,17 @@ func Init(req *rpc.InitRequest) (<-chan *rpc.InitResponse, *status.Status) { } serialDiscoveryTool, _ := getBuiltinSerialDiscoveryTool(instance.PackageManager) - if serialDiscoveryTool == nil { - if _, err := instance.installToolIfMissing(serialDiscoveryTool, downloadCallback, taskCallback); err != nil { + if err != nil { + s := status.Newf(codes.Internal, err.Error()) + outChan <- &rpc.InitResponse{ + Message: &rpc.InitResponse_Error{ + Error: s.Proto(), + }, + } + } else { + serialDiscoveryToolInstalled, err := instance.installToolIfMissing(serialDiscoveryTool, downloadCallback, taskCallback) + toolHasBeenInstalled = toolHasBeenInstalled || serialDiscoveryToolInstalled + if err != nil { s := status.Newf(codes.Internal, err.Error()) outChan <- &rpc.InitResponse{ Message: &rpc.InitResponse_Error{ @@ -261,12 +291,15 @@ func Init(req *rpc.InitRequest) (<-chan *rpc.InitResponse, *status.Status) { } } - // Load hardware only after tools have been installed - for _, err := range instance.PackageManager.LoadHardware() { - outChan <- &rpc.InitResponse{ - Message: &rpc.InitResponse_Error{ - Error: err.Proto(), - }, + if toolHasBeenInstalled { + // We installed at least one new tool after loading hardware + // so we must reload again otherwise we would never found them. + for _, err := range instance.PackageManager.LoadHardware() { + outChan <- &rpc.InitResponse{ + Message: &rpc.InitResponse_Error{ + Error: err.Proto(), + }, + } } } From a9141cfc660c9f557eab751ec8b72a4d10bdf9b2 Mon Sep 17 00:00:00 2001 From: Silvano Cerza Date: Fri, 23 Apr 2021 18:41:43 +0200 Subject: [PATCH 08/22] Fix integration tests --- cli/update/update.go | 6 ++++++ test/test_compile.py | 4 ++-- test/test_lib.py | 4 ++-- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/cli/update/update.go b/cli/update/update.go index 1ce895c2393..50fd04a6afe 100644 --- a/cli/update/update.go +++ b/cli/update/update.go @@ -78,6 +78,12 @@ func runUpdateCommand(cmd *cobra.Command, args []string) { } if updateFlags.showOutdated { + // To show outdated platforms and libraries we need to initialize our instance + // otherwise nothing would be shown + for _, err := range instance.Init(inst) { + feedback.Errorf("Error initializing instance: %v", err) + } + outdatedResp, err := commands.Outdated(context.Background(), &rpc.OutdatedRequest{ Instance: inst, }) diff --git a/test/test_compile.py b/test/test_compile.py index eebb47881b6..1bb84cd4d53 100644 --- a/test/test_compile.py +++ b/test/test_compile.py @@ -544,9 +544,9 @@ def test_compile_with_invalid_url(run_command, data_dir): # Verifies compilation fails cause of missing local index file res = run_command(f'compile -b {fqbn} "{sketch_path}"') - assert res.failed + assert res.ok lines = [l.strip() for l in res.stderr.splitlines()] - assert "Error creating instance: error loading platform index:" in lines + assert "Error initializing instance: Loading index file: loading json index file" in lines[0] expected_index_file = Path(data_dir, "package_example_index.json") assert f"loading json index file {expected_index_file}: " + f"open {expected_index_file}:" in lines[-1] diff --git a/test/test_lib.py b/test/test_lib.py index 8b8334a4fd0..a470ee8a50d 100644 --- a/test/test_lib.py +++ b/test/test_lib.py @@ -56,7 +56,7 @@ def test_list(run_command): result = run_command("lib list") assert result.ok assert "" == result.stderr - assert "No libraries installed." == result.stdout.strip() + assert "No libraries installed." in result.stdout.strip() result = run_command("lib list --format json") assert result.ok assert "" == result.stderr @@ -520,7 +520,7 @@ def test_lib_list_with_updatable_flag(run_command): result = run_command("lib list --updatable") assert result.ok assert "" == result.stderr - assert "No updates available." == result.stdout.strip() + assert "No updates available." in result.stdout.strip() # No library to update in json result = run_command("lib list --updatable --format json") assert result.ok From 58821fd522d88015038ba3b24429611ec67886a1 Mon Sep 17 00:00:00 2001 From: Silvano Cerza Date: Fri, 23 Apr 2021 20:37:42 +0200 Subject: [PATCH 09/22] Fix code for linting --- commands/daemon/daemon.go | 1 + commands/instances.go | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/commands/daemon/daemon.go b/commands/daemon/daemon.go index f4eec655020..deaec09ec22 100644 --- a/commands/daemon/daemon.go +++ b/commands/daemon/daemon.go @@ -173,6 +173,7 @@ func (s *ArduinoCoreServerImpl) Upgrade(req *rpc.UpgradeRequest, stream rpc.Ardu return stream.Send(&rpc.UpgradeResponse{}) } +// Create FIXMEDOC func (s *ArduinoCoreServerImpl) Create(_ context.Context, req *rpc.CreateRequest) (*rpc.CreateResponse, error) { res, status := commands.Create(req) if status != nil { diff --git a/commands/instances.go b/commands/instances.go index 07143b5f185..df2a3e044fe 100644 --- a/commands/instances.go +++ b/commands/instances.go @@ -152,12 +152,12 @@ func Create(req *rpc.CreateRequest) (*rpc.CreateResponse, *status.Status) { ) // Save instance - instanceId := instancesCount - instances[instanceId] = instance + instanceID := instancesCount + instances[instanceID] = instance instancesCount++ return &rpc.CreateResponse{ - Instance: &rpc.Instance{Id: instanceId}, + Instance: &rpc.Instance{Id: instanceID}, }, nil } From 61b40d2179f3c2a4b316f3866ef58d50590edbdc Mon Sep 17 00:00:00 2001 From: Silvano Cerza Date: Mon, 26 Apr 2021 09:19:25 +0200 Subject: [PATCH 10/22] Update i18n files --- i18n/data/en.po | 59 ++++++++++++++++++++++++------------------------- 1 file changed, 29 insertions(+), 30 deletions(-) diff --git a/i18n/data/en.po b/i18n/data/en.po index b5c6ec84f65..f72fd2c383a 100644 --- a/i18n/data/en.po +++ b/i18n/data/en.po @@ -13,24 +13,23 @@ msgstr "Aliases:" msgid "Available Commands:" msgstr "Available Commands:" -#: cli/board/details.go:124 +#: cli/board/details.go:120 msgid "Board name:" msgstr "Board name:" -#: cli/board/details.go:126 +#: cli/board/details.go:122 msgid "Board version:" msgstr "Board version:" -#: cli/board/details.go:172 +#: cli/board/details.go:168 msgid "Checksum:" msgstr "Checksum:" -#: cli/board/details.go:128 +#: cli/board/details.go:124 msgid "Debugging supported:" msgstr "Debugging supported:" -#: cli/board/details.go:60 -#: cli/board/details.go:75 +#: cli/board/details.go:71 msgid "Error getting board details: %v" msgstr "Error getting board details: %v" @@ -38,7 +37,7 @@ msgstr "Error getting board details: %v" msgid "Examples:" msgstr "Examples:" -#: cli/board/details.go:170 +#: cli/board/details.go:166 msgid "File:" msgstr "File:" @@ -50,76 +49,76 @@ msgstr "Flags:" msgid "Global Flags:" msgstr "Global Flags:" -#: cli/board/details.go:97 -#: cli/board/details.go:198 +#: cli/board/details.go:93 +#: cli/board/details.go:194 msgid "Id" msgstr "Id" -#: cli/board/details.go:140 +#: cli/board/details.go:136 msgid "Identification properties:" msgstr "Identification properties:" -#: cli/board/details.go:198 +#: cli/board/details.go:194 msgid "Name" msgstr "Name" -#: cli/board/details.go:169 +#: cli/board/details.go:165 msgid "OS:" msgstr "OS:" -#: cli/board/details.go:133 +#: cli/board/details.go:129 msgid "Official Arduino board:" msgstr "Official Arduino board:" -#: cli/board/details.go:181 +#: cli/board/details.go:177 msgid "Option:" msgstr "Option:" -#: cli/board/details.go:149 +#: cli/board/details.go:145 msgid "Package URL:" msgstr "Package URL:" -#: cli/board/details.go:148 +#: cli/board/details.go:144 msgid "Package maintainer:" msgstr "Package maintainer:" -#: cli/board/details.go:147 +#: cli/board/details.go:143 msgid "Package name:" msgstr "Package name:" -#: cli/board/details.go:151 +#: cli/board/details.go:147 msgid "Package online help:" msgstr "Package online help:" -#: cli/board/details.go:150 +#: cli/board/details.go:146 msgid "Package website:" msgstr "Package website:" -#: cli/board/details.go:157 +#: cli/board/details.go:153 msgid "Platform URL:" msgstr "Platform URL:" -#: cli/board/details.go:156 +#: cli/board/details.go:152 msgid "Platform architecture:" msgstr "Platform architecture:" -#: cli/board/details.go:155 +#: cli/board/details.go:151 msgid "Platform category:" msgstr "Platform category:" -#: cli/board/details.go:162 +#: cli/board/details.go:158 msgid "Platform checksum:" msgstr "Platform checksum:" -#: cli/board/details.go:158 +#: cli/board/details.go:154 msgid "Platform file name:" msgstr "Platform file name:" -#: cli/board/details.go:154 +#: cli/board/details.go:150 msgid "Platform name:" msgstr "Platform name:" -#: cli/board/details.go:160 +#: cli/board/details.go:156 msgid "Platform size (bytes):" msgstr "Platform size (bytes):" @@ -127,15 +126,15 @@ msgstr "Platform size (bytes):" msgid "Print details about a board." msgstr "Print details about a board." -#: cli/board/details.go:97 +#: cli/board/details.go:93 msgid "Programmer name" msgstr "Programmer name" -#: cli/board/details.go:198 +#: cli/board/details.go:194 msgid "Programmers:" msgstr "Programmers:" -#: cli/board/details.go:166 +#: cli/board/details.go:162 msgid "Required tool:" msgstr "Required tool:" @@ -151,7 +150,7 @@ msgstr "Show information about a board, in particular if the board has options t msgid "Show list of available programmers" msgstr "Show list of available programmers" -#: cli/board/details.go:171 +#: cli/board/details.go:167 msgid "Size (bytes):" msgstr "Size (bytes):" From e0b20df8663cd23ee5ad222ba4a4842d5f0091f8 Mon Sep 17 00:00:00 2001 From: Silvano Cerza Date: Mon, 7 Jun 2021 12:38:52 +0200 Subject: [PATCH 11/22] Update UPGRADING.md with breaking changes --- docs/UPGRADING.md | 96 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 96 insertions(+) diff --git a/docs/UPGRADING.md b/docs/UPGRADING.md index 46ccb8b390b..8d3d6cdbfa3 100644 --- a/docs/UPGRADING.md +++ b/docs/UPGRADING.md @@ -4,6 +4,102 @@ Here you can find a list of migration guides to handle breaking changes between ## Unreleased +### Change of behaviour of gRPC `Init` function + +Previously the `Init` function was used to both create a new `CoreInstance` and initialize it, so that the internal +package and library managers were already populated with all the information available from `*_index.json` files, +installed platforms and libraries and so on. + +Now the initialization phase is split into two, first the client must create a new `CoreInstance` with the `Create` +function, that does mainly two things: + +- create all folders necessary to correctly run the CLI if not already existing +- create and return a new `CoreInstance` + +The `Create` function will only fail if folders creation is not successful. + +The returned instance is relatively unusable since no library and no platform is loaded, some functions that don't need +that information can still be called though. + +The `Init` function has been greatly overhauled and it doesn't fail completely if one or more platforms or libraries +fail to load now. + +Also the option `library_manager_only` has been removed, the package manager is always initialized and platforms are +loaded. + +The `Init` was already a server-side streaming function but it would always return one and only one response, this has +been modified so that each response is either an error or a notification on the initialization process so that it works +more like an actual stream of information. + +Previously a client would call the function like so: + +```typescript +const initReq = new InitRequest() +initReq.setLibraryManagerOnly(false) +const initResp = await new Promise((resolve, reject) => { + let resp: InitResponse | undefined = undefined + const stream = client.init(initReq) + stream.on("data", (data: InitResponse) => (resp = data)) + stream.on("end", () => resolve(resp!)) + stream.on("error", (err) => reject(err)) +}) + +const instance = initResp.getInstance() +if (!instance) { + throw new Error("Could not retrieve instance from the initialize response.") +} +``` + +Now something similar should be done. + +```typescript +const createReq = new CreateRequest() +const instance = client.create(createReq) + +if (!instance) { + throw new Error("Could not retrieve instance from the initialize response.") +} + +const initReq = new InitRequest() +initReq.setInstance(instance) +const initResp = client.init(initReq) +initResp.on("data", (o: InitResponse) => { + const downloadProgress = o.getDownloadProgress() + if (downloadProgress) { + // Handle download progress + } + const taskProgress = o.getTaskProgress() + if (taskProgress) { + // Handle task progress + } + const err = o.getError() + if (err) { + // Handle error + } +}) + +await new Promise((resolve, reject) => { + initResp.on("error", (err) => reject(err)) + initResp.on("end", resolve) +}) +``` + +Previously if even one platform or library failed to load everything else would fail too, that doesn't happen anymore. +Now it's easier for both the CLI and the gRPC clients to handle gracefully platforms or libraries updates that might +break the initialization step and make everything unusable. + +### Removal of gRPC `Rescan` function + +The `Rescan` function has been removed, in its place the `Init` function must be used. + +### Change of behaviour of gRPC `UpdateIndex` and `UpdateLibrariesIndex` functions + +Previously both `UpdateIndex` and `UpdateLibrariesIndex` functions implicitly called `Rescan` so that the internal +`CoreInstance` was updated with the eventual new information obtained in the update. + +This behaviour is now removed and the internal `CoreInstance` must be explicitly updated by the gRPC client using the +`Init` function. + ### Removed rarely used golang API The following function from the `github.com/arduino/arduino-cli/arduino/libraries` module is no longer available: From 29aacd4976acc9b006100acea25930ab85c82de8 Mon Sep 17 00:00:00 2001 From: Silvano Cerza <3314350+silvanocerza@users.noreply.github.com> Date: Tue, 27 Apr 2021 11:10:51 +0200 Subject: [PATCH 12/22] Update comment with correct information Co-authored-by: per1234 --- arduino/cores/packagemanager/loader.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arduino/cores/packagemanager/loader.go b/arduino/cores/packagemanager/loader.go index ad39d4efb6e..b7d1ec56940 100644 --- a/arduino/cores/packagemanager/loader.go +++ b/arduino/cores/packagemanager/loader.go @@ -80,7 +80,7 @@ func (pm *PackageManager) LoadHardwareFromDirectory(path *paths.Path) []*status. packagersPaths.FilterDirs() // Load custom platform properties if available - // "Global" platform.txt used by the Java IDE to overwrite all installed platforms. + // "Global" platform.txt used to overwrite all installed platforms. // For more info: https://arduino.github.io/arduino-cli/latest/platform-specification/#global-platformtxt if globalPlatformTxt := path.Join("platform.txt"); globalPlatformTxt.Exist() { pm.Log.Infof("Loading custom platform properties: %s", globalPlatformTxt) From f4391fde202ea0700b7916716a94b2fb233340e6 Mon Sep 17 00:00:00 2001 From: Cristian Maglie Date: Tue, 27 Apr 2021 12:55:36 +0200 Subject: [PATCH 13/22] Using callback instead of channel+goroutine for Init --- cli/instance/instance.go | 14 +-- commands/core/install.go | 2 +- commands/core/uninstall.go | 2 +- commands/core/upgrade.go | 2 +- commands/daemon/daemon.go | 17 +-- commands/instances.go | 246 ++++++++++++++++++------------------- commands/lib/install.go | 2 +- commands/lib/upgrade.go | 2 +- 8 files changed, 137 insertions(+), 150 deletions(-) diff --git a/cli/instance/instance.go b/cli/instance/instance.go index b7dcd50ea33..9ce34b5e70f 100644 --- a/cli/instance/instance.go +++ b/cli/instance/instance.go @@ -68,17 +68,12 @@ func Init(instance *rpc.Instance) []*status.Status { return append(errs, err) } - initChan, err := commands.Init(&rpc.InitRequest{ - Instance: instance, - }) - if err != nil { - return append(errs, err) - } - downloadCallback := output.ProgressBar() taskCallback := output.TaskProgress() - for res := range initChan { + err := commands.Init(&rpc.InitRequest{ + Instance: instance, + }, func(res *rpc.InitResponse) { if err := res.GetError(); err != nil { errs = append(errs, status.FromProto(err)) } @@ -91,6 +86,9 @@ func Init(instance *rpc.Instance) []*status.Status { taskCallback(progress.TaskProgress) } } + }) + if err != nil { + return append(errs, err) } return errs diff --git a/commands/core/install.go b/commands/core/install.go index 63ae0e6c17a..e2cf4273575 100644 --- a/commands/core/install.go +++ b/commands/core/install.go @@ -54,7 +54,7 @@ func PlatformInstall(ctx context.Context, req *rpc.PlatformInstallRequest, return nil, err } - _, status := commands.Init(&rpc.InitRequest{Instance: &rpc.Instance{Id: req.Instance.Id}}) + status := commands.Init(&rpc.InitRequest{Instance: req.Instance}, nil) if status != nil { return nil, status.Err() } diff --git a/commands/core/uninstall.go b/commands/core/uninstall.go index 4534d57e5bc..7d7e3fe1b7b 100644 --- a/commands/core/uninstall.go +++ b/commands/core/uninstall.go @@ -67,7 +67,7 @@ func PlatformUninstall(ctx context.Context, req *rpc.PlatformUninstallRequest, t } } - _, status := commands.Init(&rpc.InitRequest{Instance: &rpc.Instance{Id: req.Instance.Id}}) + status := commands.Init(&rpc.InitRequest{Instance: req.Instance}, nil) if status != nil { return nil, status.Err() } diff --git a/commands/core/upgrade.go b/commands/core/upgrade.go index bd7b03a012a..e3aa68d7f21 100644 --- a/commands/core/upgrade.go +++ b/commands/core/upgrade.go @@ -49,7 +49,7 @@ func PlatformUpgrade(ctx context.Context, req *rpc.PlatformUpgradeRequest, return nil, err } - _, status := commands.Init(&rpc.InitRequest{Instance: &rpc.Instance{Id: req.Instance.Id}}) + status := commands.Init(&rpc.InitRequest{Instance: req.Instance}, nil) if status != nil { return nil, status.Err() } diff --git a/commands/daemon/daemon.go b/commands/daemon/daemon.go index deaec09ec22..1b74913af9e 100644 --- a/commands/daemon/daemon.go +++ b/commands/daemon/daemon.go @@ -184,21 +184,12 @@ func (s *ArduinoCoreServerImpl) Create(_ context.Context, req *rpc.CreateRequest // Init FIXMEDOC func (s *ArduinoCoreServerImpl) Init(req *rpc.InitRequest, stream rpc.ArduinoCoreService_InitServer) error { - messageChan, err := commands.Init(req) + err := commands.Init(req, func(message *rpc.InitResponse) { + stream.Send(message) + }) if err != nil { - return stream.Send(&rpc.InitResponse{ - Message: &rpc.InitResponse_Error{ - Error: err.Proto(), - }, - }) + return err.Err() } - - for message := range messageChan { - if err := stream.Send(message); err != nil { - return err - } - } - return nil } diff --git a/commands/instances.go b/commands/instances.go index df2a3e044fe..7afb394aa9f 100644 --- a/commands/instances.go +++ b/commands/instances.go @@ -166,172 +166,170 @@ func Create(req *rpc.CreateRequest) (*rpc.CreateResponse, *status.Status) { // Failures don't stop the loading process, in case of loading failure the Platform or library // is simply skipped and an error gRPC status is sent in the returned channel. // Channel is closed when loading is finished. -func Init(req *rpc.InitRequest) (<-chan *rpc.InitResponse, *status.Status) { +func Init(req *rpc.InitRequest, resp func(r *rpc.InitResponse)) *status.Status { + if resp == nil { + resp = func(r *rpc.InitResponse) {} + } instance := instances[req.Instance.Id] if instance == nil { - return nil, status.Newf(codes.InvalidArgument, "Invalid instance ID") + return status.Newf(codes.InvalidArgument, "Invalid instance ID") } - outChan := make(chan *rpc.InitResponse) - go func() { - defer close(outChan) - - // Load Platforms - urls := []string{globals.DefaultIndexURL} - urls = append(urls, configuration.Settings.GetStringSlice("board_manager.additional_urls")...) - for _, u := range urls { - URL, err := utils.URLParse(u) - if err != nil { - s := status.Newf(codes.InvalidArgument, "Invalid additional URL: %v", err) - outChan <- &rpc.InitResponse{ - Message: &rpc.InitResponse_Error{ - Error: s.Proto(), - }, - } - continue - } - - if URL.Scheme == "file" { - indexFile := paths.New(URL.Path) + // Load Platforms + urls := []string{globals.DefaultIndexURL} + urls = append(urls, configuration.Settings.GetStringSlice("board_manager.additional_urls")...) + for _, u := range urls { + URL, err := utils.URLParse(u) + if err != nil { + s := status.Newf(codes.InvalidArgument, "Invalid additional URL: %v", err) + resp(&rpc.InitResponse{ + Message: &rpc.InitResponse_Error{ + Error: s.Proto(), + }, + }) + continue + } - _, err := instance.PackageManager.LoadPackageIndexFromFile(indexFile) - if err != nil { - s := status.Newf(codes.FailedPrecondition, "Loading index file: %v", err) - outChan <- &rpc.InitResponse{ - Message: &rpc.InitResponse_Error{ - Error: s.Proto(), - }, - } - } - continue - } + if URL.Scheme == "file" { + indexFile := paths.New(URL.Path) - if err := instance.PackageManager.LoadPackageIndex(URL); err != nil { + _, err := instance.PackageManager.LoadPackageIndexFromFile(indexFile) + if err != nil { s := status.Newf(codes.FailedPrecondition, "Loading index file: %v", err) - outChan <- &rpc.InitResponse{ + resp(&rpc.InitResponse{ Message: &rpc.InitResponse_Error{ Error: s.Proto(), }, - } + }) } + continue } - // We load hardware before verifying builtin tools are installed - // otherwise we wouldn't find them and reinstall them each time - // and they would never get reloaded. - for _, err := range instance.PackageManager.LoadHardware() { - outChan <- &rpc.InitResponse{ + if err := instance.PackageManager.LoadPackageIndex(URL); err != nil { + s := status.Newf(codes.FailedPrecondition, "Loading index file: %v", err) + resp(&rpc.InitResponse{ Message: &rpc.InitResponse_Error{ - Error: err.Proto(), + Error: s.Proto(), }, - } + }) } + } - taskCallback := func(msg *rpc.TaskProgress) { - outChan <- &rpc.InitResponse{ - Message: &rpc.InitResponse_InitProgress{ - InitProgress: &rpc.InitResponse_Progress{ - TaskProgress: msg, - }, + // We load hardware before verifying builtin tools are installed + // otherwise we wouldn't find them and reinstall them each time + // and they would never get reloaded. + for _, err := range instance.PackageManager.LoadHardware() { + resp(&rpc.InitResponse{ + Message: &rpc.InitResponse_Error{ + Error: err.Proto(), + }, + }) + } + + taskCallback := func(msg *rpc.TaskProgress) { + resp(&rpc.InitResponse{ + Message: &rpc.InitResponse_InitProgress{ + InitProgress: &rpc.InitResponse_Progress{ + TaskProgress: msg, }, - } - } + }, + }) + } - downloadCallback := func(msg *rpc.DownloadProgress) { - outChan <- &rpc.InitResponse{ - Message: &rpc.InitResponse_InitProgress{ - InitProgress: &rpc.InitResponse_Progress{ - DownloadProgress: msg, - }, + downloadCallback := func(msg *rpc.DownloadProgress) { + resp(&rpc.InitResponse{ + Message: &rpc.InitResponse_InitProgress{ + InitProgress: &rpc.InitResponse_Progress{ + DownloadProgress: msg, }, - } - } + }, + }) + } - // Install tools if necessary - toolHasBeenInstalled := false - ctagsTool, err := getBuiltinCtagsTool(instance.PackageManager) + // Install tools if necessary + toolHasBeenInstalled := false + ctagsTool, err := getBuiltinCtagsTool(instance.PackageManager) + if err != nil { + s := status.Newf(codes.Internal, err.Error()) + resp(&rpc.InitResponse{ + Message: &rpc.InitResponse_Error{ + Error: s.Proto(), + }, + }) + } else { + ctagsInstalled, err := instance.installToolIfMissing(ctagsTool, downloadCallback, taskCallback) + toolHasBeenInstalled = toolHasBeenInstalled || ctagsInstalled if err != nil { s := status.Newf(codes.Internal, err.Error()) - outChan <- &rpc.InitResponse{ + resp(&rpc.InitResponse{ Message: &rpc.InitResponse_Error{ Error: s.Proto(), }, - } - } else { - ctagsInstalled, err := instance.installToolIfMissing(ctagsTool, downloadCallback, taskCallback) - toolHasBeenInstalled = toolHasBeenInstalled || ctagsInstalled - if err != nil { - s := status.Newf(codes.Internal, err.Error()) - outChan <- &rpc.InitResponse{ - Message: &rpc.InitResponse_Error{ - Error: s.Proto(), - }, - } - } + }) } + } - serialDiscoveryTool, _ := getBuiltinSerialDiscoveryTool(instance.PackageManager) + serialDiscoveryTool, _ := getBuiltinSerialDiscoveryTool(instance.PackageManager) + if err != nil { + s := status.Newf(codes.Internal, err.Error()) + resp(&rpc.InitResponse{ + Message: &rpc.InitResponse_Error{ + Error: s.Proto(), + }, + }) + } else { + serialDiscoveryToolInstalled, err := instance.installToolIfMissing(serialDiscoveryTool, downloadCallback, taskCallback) + toolHasBeenInstalled = toolHasBeenInstalled || serialDiscoveryToolInstalled if err != nil { s := status.Newf(codes.Internal, err.Error()) - outChan <- &rpc.InitResponse{ + resp(&rpc.InitResponse{ Message: &rpc.InitResponse_Error{ Error: s.Proto(), }, - } - } else { - serialDiscoveryToolInstalled, err := instance.installToolIfMissing(serialDiscoveryTool, downloadCallback, taskCallback) - toolHasBeenInstalled = toolHasBeenInstalled || serialDiscoveryToolInstalled - if err != nil { - s := status.Newf(codes.Internal, err.Error()) - outChan <- &rpc.InitResponse{ - Message: &rpc.InitResponse_Error{ - Error: s.Proto(), - }, - } - } - } - - if toolHasBeenInstalled { - // We installed at least one new tool after loading hardware - // so we must reload again otherwise we would never found them. - for _, err := range instance.PackageManager.LoadHardware() { - outChan <- &rpc.InitResponse{ - Message: &rpc.InitResponse_Error{ - Error: err.Proto(), - }, - } - } - } - - // Load libraries - for _, pack := range instance.PackageManager.Packages { - for _, platform := range pack.Platforms { - if platformRelease := instance.PackageManager.GetInstalledPlatformRelease(platform); platformRelease != nil { - instance.lm.AddPlatformReleaseLibrariesDir(platformRelease, libraries.PlatformBuiltIn) - } - } + }) } + } - if err := instance.lm.LoadIndex(); err != nil { - s := status.Newf(codes.FailedPrecondition, "Loading index file: %v", err) - outChan <- &rpc.InitResponse{ + if toolHasBeenInstalled { + // We installed at least one new tool after loading hardware + // so we must reload again otherwise we would never found them. + for _, err := range instance.PackageManager.LoadHardware() { + resp(&rpc.InitResponse{ Message: &rpc.InitResponse_Error{ - Error: s.Proto(), + Error: err.Proto(), }, - } + }) } + } - for _, err := range instance.lm.RescanLibraries() { - s := status.Newf(codes.FailedPrecondition, "Loading libraries: %v", err) - outChan <- &rpc.InitResponse{ - Message: &rpc.InitResponse_Error{ - Error: s.Proto(), - }, + // Load libraries + for _, pack := range instance.PackageManager.Packages { + for _, platform := range pack.Platforms { + if platformRelease := instance.PackageManager.GetInstalledPlatformRelease(platform); platformRelease != nil { + instance.lm.AddPlatformReleaseLibrariesDir(platformRelease, libraries.PlatformBuiltIn) } } - }() + } + + if err := instance.lm.LoadIndex(); err != nil { + s := status.Newf(codes.FailedPrecondition, "Loading index file: %v", err) + resp(&rpc.InitResponse{ + Message: &rpc.InitResponse_Error{ + Error: s.Proto(), + }, + }) + } - return outChan, nil + for _, err := range instance.lm.RescanLibraries() { + s := status.Newf(codes.FailedPrecondition, "Loading libraries: %v", err) + resp(&rpc.InitResponse{ + Message: &rpc.InitResponse_Error{ + Error: s.Proto(), + }, + }) + } + + return nil } // Destroy FIXMEDOC diff --git a/commands/lib/install.go b/commands/lib/install.go index 614efd6006b..b000146cf11 100644 --- a/commands/lib/install.go +++ b/commands/lib/install.go @@ -77,7 +77,7 @@ func LibraryInstall(ctx context.Context, req *rpc.LibraryInstallRequest, } } - _, status := commands.Init(&rpc.InitRequest{Instance: &rpc.Instance{Id: req.Instance.Id}}) + status := commands.Init(&rpc.InitRequest{Instance: req.Instance}, nil) if status != nil { return fmt.Errorf("rescanning libraries: %s", status.Err()) } diff --git a/commands/lib/upgrade.go b/commands/lib/upgrade.go index 22072eda67e..5c71a923f8c 100644 --- a/commands/lib/upgrade.go +++ b/commands/lib/upgrade.go @@ -33,7 +33,7 @@ func LibraryUpgradeAll(instanceID int32, downloadCB commands.DownloadProgressCB, return err } - _, status := commands.Init(&rpc.InitRequest{Instance: &rpc.Instance{Id: instanceID}}) + status := commands.Init(&rpc.InitRequest{Instance: &rpc.Instance{Id: instanceID}}, nil) if status != nil { return fmt.Errorf("rescanning libraries: %s", status.Err()) } From 0c0f8a55d9df63694f6556af00298352d77a485c Mon Sep 17 00:00:00 2001 From: Silvano Cerza Date: Tue, 27 Apr 2021 13:02:37 +0200 Subject: [PATCH 14/22] Enhance platform loading step --- arduino/cores/packagemanager/loader.go | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/arduino/cores/packagemanager/loader.go b/arduino/cores/packagemanager/loader.go index b7d1ec56940..7d20935936b 100644 --- a/arduino/cores/packagemanager/loader.go +++ b/arduino/cores/packagemanager/loader.go @@ -19,7 +19,6 @@ import ( "fmt" "os" "path/filepath" - "strings" "github.com/arduino/arduino-cli/arduino/cores" "github.com/arduino/arduino-cli/configuration" @@ -163,7 +162,13 @@ func (pm *PackageManager) loadPlatforms(targetPackage *cores.Package, packageDir // A platform can only be inside a directory, thus we skip everything else. platformsDirs.FilterDirs() + // Filter out directories like .git and similar things + platformsDirs.FilterOutPrefix(".") for _, platformPath := range platformsDirs { + // Tools are not a platform + if platformPath.Base() == "tools" { + continue + } if err := pm.loadPlatform(targetPackage, platformPath); err != nil { statuses = append(statuses, err) } @@ -178,13 +183,10 @@ func (pm *PackageManager) loadPlatforms(targetPackage *cores.Package, packageDir func (pm *PackageManager) loadPlatform(targetPackage *cores.Package, platformPath *paths.Path) *status.Status { // This is not a platform if platformPath.IsNotDir() { - return nil + return status.Newf(codes.NotFound, "path is not a platform directory: %s", platformPath) } architecture := platformPath.Base() - if strings.HasPrefix(architecture, ".") || architecture == "tools" { - return nil - } // There are two possible platform directory structures: // - ARCHITECTURE/boards.txt From 410ecd70ded2db59b31d2cfddcad73f974797df1 Mon Sep 17 00:00:00 2001 From: Silvano Cerza Date: Tue, 27 Apr 2021 14:46:30 +0200 Subject: [PATCH 15/22] Update client_example to reflect new gRPC changes --- client_example/main.go | 60 +++++++++++++++++++++++++----------------- 1 file changed, 36 insertions(+), 24 deletions(-) diff --git a/client_example/main.go b/client_example/main.go index 42450e760f5..4a53f2dabe7 100644 --- a/client_example/main.go +++ b/client_example/main.go @@ -113,8 +113,11 @@ func main() { // Before we can do anything with the CLI, an "instance" must be created. // We keep a reference to the created instance because we will need it to // run subsequent commands. + log.Println("calling Create") + instance := createInstance(client) + log.Println("calling Init") - instance := initInstance(client) + initInstance(client, instance) // We set up the proxy and then run the update to verify that the proxy settings are currently used log.Println("calling setProxy") @@ -129,6 +132,11 @@ func main() { log.Println("calling UpdateIndex") callUpdateIndex(client, instance) + // Indexes are not implicitly detected after an update + // so we must initialize again explicitly + log.Println("calling Init") + initInstance(client, instance) + // Let's search for a platform (also known as 'core') called 'samd'. log.Println("calling PlatformSearch(samd)") callPlatformSearch(client, instance) @@ -198,6 +206,11 @@ func main() { log.Println("calling UpdateLibrariesIndex()") callUpdateLibraryIndex(client, instance) + // Indexes are not implicitly detected after an update + // so we must initialize again explicitly + log.Println("calling Init") + initInstance(client, instance) + // Download a library log.Println("calling LibraryDownload(WiFi101@0.15.2)") callLibDownload(client, instance) @@ -326,47 +339,46 @@ func callWrite(client settings.SettingsServiceClient) { } } -func initInstance(client rpc.ArduinoCoreServiceClient) *rpc.Instance { - // The configuration for this example client only contains the path to - // the data folder. - initRespStream, err := client.Init(context.Background(), &rpc.InitRequest{}) +func createInstance(client rpc.ArduinoCoreServiceClient) *rpc.Instance { + res, err := client.Create(context.Background(), &rpc.CreateRequest{}) if err != nil { log.Fatalf("Error creating server instance: %s", err) + } + return res.Instance +} +func initInstance(client rpc.ArduinoCoreServiceClient, instance *rpc.Instance) { + stream, err := client.Init(context.Background(), &rpc.InitRequest{ + Instance: instance, + }) + if err != nil { + log.Fatalf("Error initializing server instance: %s", err) } - var instance *rpc.Instance - // Loop and consume the server stream until all the setup procedures are done. for { - initResp, err := initRespStream.Recv() - // The server is done. + res, err := stream.Recv() + // Server has finished sending if err == io.EOF { break } - // There was an error. if err != nil { log.Fatalf("Init error: %s", err) } - // The server sent us a valid instance, let's print its ID. - if initResp.GetInstance() != nil { - instance = initResp.GetInstance() - log.Printf("Got a new instance with ID: %v", instance.GetId()) - } - - // When a download is ongoing, log the progress - if initResp.GetDownloadProgress() != nil { - log.Printf("DOWNLOAD: %s", initResp.GetDownloadProgress()) + if status := res.GetError(); status != nil { + log.Printf("Init error %s", status.String()) } - // When an overall task is ongoing, log the progress - if initResp.GetTaskProgress() != nil { - log.Printf("TASK: %s", initResp.GetTaskProgress()) + if progress := res.GetInitProgress(); progress != nil { + if downloadProgress := progress.GetDownloadProgress(); downloadProgress != nil { + log.Printf("DOWNLOAD: %s", downloadProgress) + } + if taskProgress := progress.GetTaskProgress(); taskProgress != nil { + log.Printf("TASK: %s", taskProgress) + } } } - - return instance } func callUpdateIndex(client rpc.ArduinoCoreServiceClient, instance *rpc.Instance) { From 2e44c3ba754019ee855c28f1753299ad5318e0b2 Mon Sep 17 00:00:00 2001 From: Silvano Cerza Date: Thu, 29 Apr 2021 12:40:56 +0200 Subject: [PATCH 16/22] Enhance Init docstring --- commands/instances.go | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/commands/instances.go b/commands/instances.go index 7afb394aa9f..96888bf1505 100644 --- a/commands/instances.go +++ b/commands/instances.go @@ -162,13 +162,13 @@ func Create(req *rpc.CreateRequest) (*rpc.CreateResponse, *status.Status) { } // Init loads installed libraries and Platforms in CoreInstance with specified ID, -// an gRPC status error is returned if the CoreInstance doesn't exist. +// a gRPC status error is returned if the CoreInstance doesn't exist. +// All responses are sent through responseCallback, can be nil to ignore all responses. // Failures don't stop the loading process, in case of loading failure the Platform or library -// is simply skipped and an error gRPC status is sent in the returned channel. -// Channel is closed when loading is finished. -func Init(req *rpc.InitRequest, resp func(r *rpc.InitResponse)) *status.Status { - if resp == nil { - resp = func(r *rpc.InitResponse) {} +// is simply skipped and an error gRPC status is sent to responseCallback. +func Init(req *rpc.InitRequest, responseCallback func(r *rpc.InitResponse)) *status.Status { + if responseCallback == nil { + responseCallback = func(r *rpc.InitResponse) {} } instance := instances[req.Instance.Id] if instance == nil { @@ -182,7 +182,7 @@ func Init(req *rpc.InitRequest, resp func(r *rpc.InitResponse)) *status.Status { URL, err := utils.URLParse(u) if err != nil { s := status.Newf(codes.InvalidArgument, "Invalid additional URL: %v", err) - resp(&rpc.InitResponse{ + responseCallback(&rpc.InitResponse{ Message: &rpc.InitResponse_Error{ Error: s.Proto(), }, @@ -196,7 +196,7 @@ func Init(req *rpc.InitRequest, resp func(r *rpc.InitResponse)) *status.Status { _, err := instance.PackageManager.LoadPackageIndexFromFile(indexFile) if err != nil { s := status.Newf(codes.FailedPrecondition, "Loading index file: %v", err) - resp(&rpc.InitResponse{ + responseCallback(&rpc.InitResponse{ Message: &rpc.InitResponse_Error{ Error: s.Proto(), }, @@ -207,7 +207,7 @@ func Init(req *rpc.InitRequest, resp func(r *rpc.InitResponse)) *status.Status { if err := instance.PackageManager.LoadPackageIndex(URL); err != nil { s := status.Newf(codes.FailedPrecondition, "Loading index file: %v", err) - resp(&rpc.InitResponse{ + responseCallback(&rpc.InitResponse{ Message: &rpc.InitResponse_Error{ Error: s.Proto(), }, @@ -219,7 +219,7 @@ func Init(req *rpc.InitRequest, resp func(r *rpc.InitResponse)) *status.Status { // otherwise we wouldn't find them and reinstall them each time // and they would never get reloaded. for _, err := range instance.PackageManager.LoadHardware() { - resp(&rpc.InitResponse{ + responseCallback(&rpc.InitResponse{ Message: &rpc.InitResponse_Error{ Error: err.Proto(), }, @@ -227,7 +227,7 @@ func Init(req *rpc.InitRequest, resp func(r *rpc.InitResponse)) *status.Status { } taskCallback := func(msg *rpc.TaskProgress) { - resp(&rpc.InitResponse{ + responseCallback(&rpc.InitResponse{ Message: &rpc.InitResponse_InitProgress{ InitProgress: &rpc.InitResponse_Progress{ TaskProgress: msg, @@ -237,7 +237,7 @@ func Init(req *rpc.InitRequest, resp func(r *rpc.InitResponse)) *status.Status { } downloadCallback := func(msg *rpc.DownloadProgress) { - resp(&rpc.InitResponse{ + responseCallback(&rpc.InitResponse{ Message: &rpc.InitResponse_InitProgress{ InitProgress: &rpc.InitResponse_Progress{ DownloadProgress: msg, @@ -251,7 +251,7 @@ func Init(req *rpc.InitRequest, resp func(r *rpc.InitResponse)) *status.Status { ctagsTool, err := getBuiltinCtagsTool(instance.PackageManager) if err != nil { s := status.Newf(codes.Internal, err.Error()) - resp(&rpc.InitResponse{ + responseCallback(&rpc.InitResponse{ Message: &rpc.InitResponse_Error{ Error: s.Proto(), }, @@ -261,7 +261,7 @@ func Init(req *rpc.InitRequest, resp func(r *rpc.InitResponse)) *status.Status { toolHasBeenInstalled = toolHasBeenInstalled || ctagsInstalled if err != nil { s := status.Newf(codes.Internal, err.Error()) - resp(&rpc.InitResponse{ + responseCallback(&rpc.InitResponse{ Message: &rpc.InitResponse_Error{ Error: s.Proto(), }, @@ -272,7 +272,7 @@ func Init(req *rpc.InitRequest, resp func(r *rpc.InitResponse)) *status.Status { serialDiscoveryTool, _ := getBuiltinSerialDiscoveryTool(instance.PackageManager) if err != nil { s := status.Newf(codes.Internal, err.Error()) - resp(&rpc.InitResponse{ + responseCallback(&rpc.InitResponse{ Message: &rpc.InitResponse_Error{ Error: s.Proto(), }, @@ -282,7 +282,7 @@ func Init(req *rpc.InitRequest, resp func(r *rpc.InitResponse)) *status.Status { toolHasBeenInstalled = toolHasBeenInstalled || serialDiscoveryToolInstalled if err != nil { s := status.Newf(codes.Internal, err.Error()) - resp(&rpc.InitResponse{ + responseCallback(&rpc.InitResponse{ Message: &rpc.InitResponse_Error{ Error: s.Proto(), }, @@ -294,7 +294,7 @@ func Init(req *rpc.InitRequest, resp func(r *rpc.InitResponse)) *status.Status { // We installed at least one new tool after loading hardware // so we must reload again otherwise we would never found them. for _, err := range instance.PackageManager.LoadHardware() { - resp(&rpc.InitResponse{ + responseCallback(&rpc.InitResponse{ Message: &rpc.InitResponse_Error{ Error: err.Proto(), }, @@ -313,7 +313,7 @@ func Init(req *rpc.InitRequest, resp func(r *rpc.InitResponse)) *status.Status { if err := instance.lm.LoadIndex(); err != nil { s := status.Newf(codes.FailedPrecondition, "Loading index file: %v", err) - resp(&rpc.InitResponse{ + responseCallback(&rpc.InitResponse{ Message: &rpc.InitResponse_Error{ Error: s.Proto(), }, @@ -322,7 +322,7 @@ func Init(req *rpc.InitRequest, resp func(r *rpc.InitResponse)) *status.Status { for _, err := range instance.lm.RescanLibraries() { s := status.Newf(codes.FailedPrecondition, "Loading libraries: %v", err) - resp(&rpc.InitResponse{ + responseCallback(&rpc.InitResponse{ Message: &rpc.InitResponse_Error{ Error: s.Proto(), }, From 1193930333b4c62c01897d6a17a9ed722f641e3c Mon Sep 17 00:00:00 2001 From: Silvano Cerza Date: Thu, 29 Apr 2021 12:58:42 +0200 Subject: [PATCH 17/22] Enhance builtin tools installation during Init --- commands/instances.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/commands/instances.go b/commands/instances.go index 96888bf1505..b4190147765 100644 --- a/commands/instances.go +++ b/commands/instances.go @@ -257,8 +257,7 @@ func Init(req *rpc.InitRequest, responseCallback func(r *rpc.InitResponse)) *sta }, }) } else { - ctagsInstalled, err := instance.installToolIfMissing(ctagsTool, downloadCallback, taskCallback) - toolHasBeenInstalled = toolHasBeenInstalled || ctagsInstalled + toolHasBeenInstalled, err = instance.installToolIfMissing(ctagsTool, downloadCallback, taskCallback) if err != nil { s := status.Newf(codes.Internal, err.Error()) responseCallback(&rpc.InitResponse{ @@ -278,8 +277,7 @@ func Init(req *rpc.InitRequest, responseCallback func(r *rpc.InitResponse)) *sta }, }) } else { - serialDiscoveryToolInstalled, err := instance.installToolIfMissing(serialDiscoveryTool, downloadCallback, taskCallback) - toolHasBeenInstalled = toolHasBeenInstalled || serialDiscoveryToolInstalled + toolHasBeenInstalled, err = instance.installToolIfMissing(serialDiscoveryTool, downloadCallback, taskCallback) if err != nil { s := status.Newf(codes.Internal, err.Error()) responseCallback(&rpc.InitResponse{ From 68871fc21c2199ec26e09d0b5f6aa253e021c07d Mon Sep 17 00:00:00 2001 From: Silvano Cerza Date: Tue, 11 May 2021 12:57:51 +0200 Subject: [PATCH 18/22] Fix unit test --- commands/core/search_test.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/commands/core/search_test.go b/commands/core/search_test.go index 2e47423bdb8..cf51a05cb35 100644 --- a/commands/core/search_test.go +++ b/commands/core/search_test.go @@ -290,8 +290,7 @@ func TestPlatformSearchSorting(t *testing.T) { configuration.Settings = configuration.Init(paths.TempDir().Join("test", "arduino-cli.yaml").String()) - inst, err := instance.CreateInstance() - require.Nil(t, err) + inst := instance.CreateAndInit() require.NotNil(t, inst) res, err := PlatformSearch(&rpc.PlatformSearchRequest{ From 7b035d17f67962b516be88a2952903dc4ce22383 Mon Sep 17 00:00:00 2001 From: Silvano Cerza Date: Tue, 11 May 2021 14:06:14 +0200 Subject: [PATCH 19/22] Fix integration tests --- test/test_core.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/test_core.py b/test/test_core.py index 6500222ac6f..dbe353bd286 100644 --- a/test/test_core.py +++ b/test/test_core.py @@ -541,6 +541,11 @@ def test_core_search_sorted_results(run_command, httpserver): url = httpserver.url_for("/test_index.json") assert run_command(f"core update-index --additional-urls={url}") + # This is done only to avoid index update output when calling core search + # since it automatically updates them if they're outdated and it makes it + # harder to parse the list of cores + assert run_command("core search") + # list all with additional url specified result = run_command(f"core search --additional-urls={url}") assert result.ok From 30280c2faec08da2946395bb3f3b7ddd49e12680 Mon Sep 17 00:00:00 2001 From: Silvano Cerza Date: Mon, 7 Jun 2021 12:44:17 +0200 Subject: [PATCH 20/22] [skip changelog] Fix after botched rebase --- commands/instances.go | 34 +--------------------------------- 1 file changed, 1 insertion(+), 33 deletions(-) diff --git a/commands/instances.go b/commands/instances.go index b4190147765..ef927ec2e76 100644 --- a/commands/instances.go +++ b/commands/instances.go @@ -17,7 +17,6 @@ package commands import ( "context" - "errors" "fmt" "io/ioutil" "net/url" @@ -37,6 +36,7 @@ import ( "github.com/arduino/arduino-cli/configuration" rpc "github.com/arduino/arduino-cli/rpc/cc/arduino/cli/commands/v1" paths "github.com/arduino/go-paths-helper" + "github.com/pkg/errors" "github.com/sirupsen/logrus" "go.bug.st/downloader/v2" "google.golang.org/grpc/codes" @@ -407,22 +407,6 @@ func UpdateLibrariesIndex(ctx context.Context, req *rpc.UpdateLibrariesIndexRequ return errors.Wrap(err, "writing library_index.json.sig") } - // Reinitializes an existing instance - initChan, status := Init(&rpc.InitRequest{Instance: &rpc.Instance{Id: req.Instance.Id}}) - if status != nil { - return status.Err() - } - - // Handle responses - for response := range initChan { - if err := response.GetError(); err != nil { - // We return right away without iterating all the errors, the chance - // of failure in this case is slim but it would be great in the future - // to handle errors when updating the libraries indexes much like we - // do when initializing an instance. - return fmt.Errorf("rescanning filesystem: %s", err) - } - } return nil } @@ -544,22 +528,6 @@ func UpdateIndex(ctx context.Context, req *rpc.UpdateIndexRequest, downloadCB Do } } - // Reinitializes an existing instance - initChan, status := Init(&rpc.InitRequest{Instance: &rpc.Instance{Id: req.Instance.Id}}) - if status != nil { - return nil, status.Err() - } - // Handle responses - for response := range initChan { - if err := response.GetError(); err != nil { - // We return right away without iterating all the errors, the chance - // of failure in this case is slim but it would be great in the future - // to handle errors when updating the platforms indexes much like we - // do when initializing an instance. - return nil, fmt.Errorf("rescanning filesystem: %s", err) - } - } - return &rpc.UpdateIndexResponse{}, nil } From d6ed084bd7b6ca71ef667e77b0d3435097c28019 Mon Sep 17 00:00:00 2001 From: Silvano Cerza Date: Tue, 15 Jun 2021 16:23:19 +0200 Subject: [PATCH 21/22] Fix issue when using Init to rescan installed core on already initialized instance --- arduino/cores/packagemanager/package_manager.go | 6 ++++++ .../packagemanager/package_manager_test.go | 17 +++++++++++++++++ commands/instances.go | 7 +++++++ 3 files changed, 30 insertions(+) diff --git a/arduino/cores/packagemanager/package_manager.go b/arduino/cores/packagemanager/package_manager.go index 664c6ad493d..2442890e7ff 100644 --- a/arduino/cores/packagemanager/package_manager.go +++ b/arduino/cores/packagemanager/package_manager.go @@ -58,6 +58,12 @@ func NewPackageManager(indexDir, packagesDir, downloadDir, tempDir *paths.Path) } } +// Clear resets the PackageManager to its initial state +func (pm *PackageManager) Clear() { + pm.Packages = cores.NewPackages() + pm.CustomGlobalProperties = properties.NewMap() +} + // FindPlatformReleaseProvidingBoardsWithVidPid FIXMEDOC func (pm *PackageManager) FindPlatformReleaseProvidingBoardsWithVidPid(vid, pid string) []*cores.PlatformRelease { res := []*cores.PlatformRelease{} diff --git a/arduino/cores/packagemanager/package_manager_test.go b/arduino/cores/packagemanager/package_manager_test.go index 8e92482dae7..0c12edb506f 100644 --- a/arduino/cores/packagemanager/package_manager_test.go +++ b/arduino/cores/packagemanager/package_manager_test.go @@ -320,3 +320,20 @@ func TestIdentifyBoard(t *testing.T) { require.Equal(t, "[test:avr:e]", fmt.Sprintf("%v", identify("0xAB00", "0xcd00"))) require.Equal(t, "[test:avr:e]", fmt.Sprintf("%v", identify("0xab00", "0xCD00"))) } + +func TestPackageManagerClear(t *testing.T) { + // Create a PackageManager and load the harware + packageManager := packagemanager.NewPackageManager(customHardware, customHardware, customHardware, customHardware) + packageManager.LoadHardwareFromDirectory(customHardware) + + // Creates another PackageManager but don't load the hardware + emptyPackageManager := packagemanager.NewPackageManager(customHardware, customHardware, customHardware, customHardware) + + // Verifies they're not equal + require.NotEqual(t, &packageManager, &emptyPackageManager) + + // Clear the first PackageManager that contains loaded hardware + packageManager.Clear() + // Verifies both PackageManagers are now equal + require.Equal(t, &packageManager, &emptyPackageManager) +} diff --git a/commands/instances.go b/commands/instances.go index ef927ec2e76..b49ce58e1e4 100644 --- a/commands/instances.go +++ b/commands/instances.go @@ -175,6 +175,13 @@ func Init(req *rpc.InitRequest, responseCallback func(r *rpc.InitResponse)) *sta return status.Newf(codes.InvalidArgument, "Invalid instance ID") } + // We need to clear the PackageManager currently in use by this instance + // in case this is not the first Init on this instances, that might happen + // after reinitializing an instance after installing or uninstalling a core. + // If this is not done the information of the uninstall core is kept in memory, + // even if it should not. + instance.PackageManager.Clear() + // Load Platforms urls := []string{globals.DefaultIndexURL} urls = append(urls, configuration.Settings.GetStringSlice("board_manager.additional_urls")...) From bee0970ba99450bb0bc821435aa46344c8fe4a4c Mon Sep 17 00:00:00 2001 From: Silvano Cerza Date: Wed, 16 Jun 2021 16:46:15 +0200 Subject: [PATCH 22/22] Update generated file from .proto --- rpc/cc/arduino/cli/commands/v1/board.pb.go | 2 +- rpc/cc/arduino/cli/commands/v1/commands.pb.go | 2041 +---------------- .../cli/commands/v1/commands_grpc.pb.go | 134 +- rpc/cc/arduino/cli/commands/v1/common.pb.go | 2 +- rpc/cc/arduino/cli/commands/v1/compile.pb.go | 2 +- rpc/cc/arduino/cli/commands/v1/core.pb.go | 2 +- rpc/cc/arduino/cli/commands/v1/lib.pb.go | 2 +- rpc/cc/arduino/cli/commands/v1/upload.pb.go | 2 +- rpc/cc/arduino/cli/debug/v1/debug.pb.go | 2 +- rpc/cc/arduino/cli/debug/v1/debug_grpc.pb.go | 12 +- rpc/cc/arduino/cli/monitor/v1/monitor.pb.go | 2 +- .../arduino/cli/monitor/v1/monitor_grpc.pb.go | 12 +- rpc/cc/arduino/cli/settings/v1/settings.pb.go | 2 +- .../cli/settings/v1/settings_grpc.pb.go | 10 +- 14 files changed, 87 insertions(+), 2140 deletions(-) diff --git a/rpc/cc/arduino/cli/commands/v1/board.pb.go b/rpc/cc/arduino/cli/commands/v1/board.pb.go index fdbd791707c..d567258d030 100644 --- a/rpc/cc/arduino/cli/commands/v1/board.pb.go +++ b/rpc/cc/arduino/cli/commands/v1/board.pb.go @@ -16,7 +16,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.26.0 -// protoc v3.15.8 +// protoc v3.16.0 // source: cc/arduino/cli/commands/v1/board.proto package commands diff --git a/rpc/cc/arduino/cli/commands/v1/commands.pb.go b/rpc/cc/arduino/cli/commands/v1/commands.pb.go index cf5578dd63e..1ce280b35e9 100644 --- a/rpc/cc/arduino/cli/commands/v1/commands.pb.go +++ b/rpc/cc/arduino/cli/commands/v1/commands.pb.go @@ -16,17 +16,13 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.26.0 -// protoc v3.15.8 +// protoc v3.16.0 // source: cc/arduino/cli/commands/v1/commands.proto package commands import ( - context "context" status "google.golang.org/genproto/googleapis/rpc/status" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status1 "google.golang.org/grpc/status" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -2214,2038 +2210,3 @@ func file_cc_arduino_cli_commands_v1_commands_proto_init() { file_cc_arduino_cli_commands_v1_commands_proto_goTypes = nil file_cc_arduino_cli_commands_v1_commands_proto_depIdxs = nil } - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConnInterface - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion6 - -// ArduinoCoreServiceClient is the client API for ArduinoCoreService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type ArduinoCoreServiceClient interface { - // 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 - 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 packages indexes for both Cores and Libraries - UpdateCoreLibrariesIndex(ctx context.Context, in *UpdateCoreLibrariesIndexRequest, opts ...grpc.CallOption) (ArduinoCoreService_UpdateCoreLibrariesIndexClient, error) - // Outdated returns a message with a list of outdated Cores and Libraries - Outdated(ctx context.Context, in *OutdatedRequest, opts ...grpc.CallOption) (*OutdatedResponse, error) - // Upgrade both Cores and Libraries - Upgrade(ctx context.Context, in *UpgradeRequest, opts ...grpc.CallOption) (ArduinoCoreService_UpgradeClient, error) - // Get the version of Arduino CLI in use. - Version(ctx context.Context, in *VersionRequest, opts ...grpc.CallOption) (*VersionResponse, error) - // 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 - ArchiveSketch(ctx context.Context, in *ArchiveSketchRequest, opts ...grpc.CallOption) (*ArchiveSketchResponse, error) - // Requests details about a board - BoardDetails(ctx context.Context, in *BoardDetailsRequest, opts ...grpc.CallOption) (*BoardDetailsResponse, error) - // Attach a board to a sketch. When the `fqbn` field of a request is not - // provided, the FQBN of the attached board will be used. - BoardAttach(ctx context.Context, in *BoardAttachRequest, opts ...grpc.CallOption) (ArduinoCoreService_BoardAttachClient, error) - // List the boards currently connected to the computer. - BoardList(ctx context.Context, in *BoardListRequest, opts ...grpc.CallOption) (*BoardListResponse, error) - // List all the boards provided by installed platforms. - BoardListAll(ctx context.Context, in *BoardListAllRequest, opts ...grpc.CallOption) (*BoardListAllResponse, error) - // 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, opts ...grpc.CallOption) (ArduinoCoreService_BoardListWatchClient, error) - // Compile an Arduino sketch. - Compile(ctx context.Context, in *CompileRequest, opts ...grpc.CallOption) (ArduinoCoreService_CompileClient, error) - // Download and install a platform and its tool dependencies. - PlatformInstall(ctx context.Context, in *PlatformInstallRequest, opts ...grpc.CallOption) (ArduinoCoreService_PlatformInstallClient, 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) - // 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) - // Upgrade an installed platform to the latest version. - PlatformUpgrade(ctx context.Context, in *PlatformUpgradeRequest, opts ...grpc.CallOption) (ArduinoCoreService_PlatformUpgradeClient, error) - // Upload a compiled sketch to a board. - Upload(ctx context.Context, in *UploadRequest, opts ...grpc.CallOption) (ArduinoCoreService_UploadClient, error) - // Upload a compiled sketch to a board using a programmer. - UploadUsingProgrammer(ctx context.Context, in *UploadUsingProgrammerRequest, opts ...grpc.CallOption) (ArduinoCoreService_UploadUsingProgrammerClient, 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) - // Search for a platform in the platforms indexes. - PlatformSearch(ctx context.Context, in *PlatformSearchRequest, opts ...grpc.CallOption) (*PlatformSearchResponse, error) - // List all installed platforms. - PlatformList(ctx context.Context, in *PlatformListRequest, opts ...grpc.CallOption) (*PlatformListResponse, 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) - // Download and install an Arduino library from the libraries index. - LibraryInstall(ctx context.Context, in *LibraryInstallRequest, opts ...grpc.CallOption) (ArduinoCoreService_LibraryInstallClient, 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) - // Uninstall an Arduino library. - LibraryUninstall(ctx context.Context, in *LibraryUninstallRequest, opts ...grpc.CallOption) (ArduinoCoreService_LibraryUninstallClient, error) - // Upgrade all installed Arduino libraries to the newest version available. - LibraryUpgradeAll(ctx context.Context, in *LibraryUpgradeAllRequest, opts ...grpc.CallOption) (ArduinoCoreService_LibraryUpgradeAllClient, 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) - // Search the Arduino libraries index for libraries. - 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) -} - -type arduinoCoreServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewArduinoCoreServiceClient(cc grpc.ClientConnInterface) ArduinoCoreServiceClient { - return &arduinoCoreServiceClient{cc} -} - -func (c *arduinoCoreServiceClient) Create(ctx context.Context, in *CreateRequest, opts ...grpc.CallOption) (*CreateResponse, error) { - out := new(CreateResponse) - err := c.cc.Invoke(ctx, "/cc.arduino.cli.commands.v1.ArduinoCoreService/Create", in, out, opts...) - 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], "/cc.arduino.cli.commands.v1.ArduinoCoreService/Init", opts...) - if err != nil { - return nil, err - } - x := &arduinoCoreServiceInitClient{stream} - if err := x.ClientStream.SendMsg(in); err != nil { - return nil, err - } - if err := x.ClientStream.CloseSend(); err != nil { - return nil, err - } - 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 -} - -func (c *arduinoCoreServiceClient) Destroy(ctx context.Context, in *DestroyRequest, opts ...grpc.CallOption) (*DestroyResponse, error) { - out := new(DestroyResponse) - err := c.cc.Invoke(ctx, "/cc.arduino.cli.commands.v1.ArduinoCoreService/Destroy", in, out, opts...) - 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], "/cc.arduino.cli.commands.v1.ArduinoCoreService/UpdateIndex", opts...) - if err != nil { - return nil, err - } - x := &arduinoCoreServiceUpdateIndexClient{stream} - if err := x.ClientStream.SendMsg(in); err != nil { - return nil, err - } - if err := x.ClientStream.CloseSend(); err != nil { - return nil, err - } - return x, nil -} - -type ArduinoCoreService_UpdateIndexClient interface { - Recv() (*UpdateIndexResponse, error) - grpc.ClientStream -} - -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], "/cc.arduino.cli.commands.v1.ArduinoCoreService/UpdateLibrariesIndex", opts...) - if err != nil { - return nil, err - } - x := &arduinoCoreServiceUpdateLibrariesIndexClient{stream} - if err := x.ClientStream.SendMsg(in); err != nil { - return nil, err - } - if err := x.ClientStream.CloseSend(); err != nil { - return nil, err - } - 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 -} - -func (c *arduinoCoreServiceClient) UpdateCoreLibrariesIndex(ctx context.Context, in *UpdateCoreLibrariesIndexRequest, opts ...grpc.CallOption) (ArduinoCoreService_UpdateCoreLibrariesIndexClient, error) { - stream, err := c.cc.NewStream(ctx, &_ArduinoCoreService_serviceDesc.Streams[3], "/cc.arduino.cli.commands.v1.ArduinoCoreService/UpdateCoreLibrariesIndex", opts...) - if err != nil { - return nil, err - } - x := &arduinoCoreServiceUpdateCoreLibrariesIndexClient{stream} - if err := x.ClientStream.SendMsg(in); err != nil { - return nil, err - } - if err := x.ClientStream.CloseSend(); err != nil { - return nil, err - } - return x, nil -} - -type ArduinoCoreService_UpdateCoreLibrariesIndexClient interface { - Recv() (*UpdateCoreLibrariesIndexResponse, error) - grpc.ClientStream -} - -type arduinoCoreServiceUpdateCoreLibrariesIndexClient struct { - grpc.ClientStream -} - -func (x *arduinoCoreServiceUpdateCoreLibrariesIndexClient) Recv() (*UpdateCoreLibrariesIndexResponse, error) { - m := new(UpdateCoreLibrariesIndexResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func (c *arduinoCoreServiceClient) Outdated(ctx context.Context, in *OutdatedRequest, opts ...grpc.CallOption) (*OutdatedResponse, error) { - out := new(OutdatedResponse) - err := c.cc.Invoke(ctx, "/cc.arduino.cli.commands.v1.ArduinoCoreService/Outdated", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *arduinoCoreServiceClient) Upgrade(ctx context.Context, in *UpgradeRequest, opts ...grpc.CallOption) (ArduinoCoreService_UpgradeClient, error) { - stream, err := c.cc.NewStream(ctx, &_ArduinoCoreService_serviceDesc.Streams[4], "/cc.arduino.cli.commands.v1.ArduinoCoreService/Upgrade", opts...) - if err != nil { - return nil, err - } - x := &arduinoCoreServiceUpgradeClient{stream} - if err := x.ClientStream.SendMsg(in); err != nil { - return nil, err - } - if err := x.ClientStream.CloseSend(); err != nil { - return nil, err - } - return x, nil -} - -type ArduinoCoreService_UpgradeClient interface { - Recv() (*UpgradeResponse, error) - grpc.ClientStream -} - -type arduinoCoreServiceUpgradeClient struct { - grpc.ClientStream -} - -func (x *arduinoCoreServiceUpgradeClient) Recv() (*UpgradeResponse, error) { - m := new(UpgradeResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func (c *arduinoCoreServiceClient) Version(ctx context.Context, in *VersionRequest, opts ...grpc.CallOption) (*VersionResponse, error) { - out := new(VersionResponse) - err := c.cc.Invoke(ctx, "/cc.arduino.cli.commands.v1.ArduinoCoreService/Version", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *arduinoCoreServiceClient) LoadSketch(ctx context.Context, in *LoadSketchRequest, opts ...grpc.CallOption) (*LoadSketchResponse, error) { - out := new(LoadSketchResponse) - err := c.cc.Invoke(ctx, "/cc.arduino.cli.commands.v1.ArduinoCoreService/LoadSketch", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *arduinoCoreServiceClient) ArchiveSketch(ctx context.Context, in *ArchiveSketchRequest, opts ...grpc.CallOption) (*ArchiveSketchResponse, error) { - out := new(ArchiveSketchResponse) - err := c.cc.Invoke(ctx, "/cc.arduino.cli.commands.v1.ArduinoCoreService/ArchiveSketch", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *arduinoCoreServiceClient) BoardDetails(ctx context.Context, in *BoardDetailsRequest, opts ...grpc.CallOption) (*BoardDetailsResponse, error) { - out := new(BoardDetailsResponse) - err := c.cc.Invoke(ctx, "/cc.arduino.cli.commands.v1.ArduinoCoreService/BoardDetails", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *arduinoCoreServiceClient) BoardAttach(ctx context.Context, in *BoardAttachRequest, opts ...grpc.CallOption) (ArduinoCoreService_BoardAttachClient, error) { - stream, err := c.cc.NewStream(ctx, &_ArduinoCoreService_serviceDesc.Streams[5], "/cc.arduino.cli.commands.v1.ArduinoCoreService/BoardAttach", opts...) - if err != nil { - return nil, err - } - x := &arduinoCoreServiceBoardAttachClient{stream} - if err := x.ClientStream.SendMsg(in); err != nil { - return nil, err - } - if err := x.ClientStream.CloseSend(); err != nil { - return nil, err - } - return x, nil -} - -type ArduinoCoreService_BoardAttachClient interface { - Recv() (*BoardAttachResponse, error) - grpc.ClientStream -} - -type arduinoCoreServiceBoardAttachClient struct { - grpc.ClientStream -} - -func (x *arduinoCoreServiceBoardAttachClient) Recv() (*BoardAttachResponse, error) { - m := new(BoardAttachResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func (c *arduinoCoreServiceClient) BoardList(ctx context.Context, in *BoardListRequest, opts ...grpc.CallOption) (*BoardListResponse, error) { - out := new(BoardListResponse) - err := c.cc.Invoke(ctx, "/cc.arduino.cli.commands.v1.ArduinoCoreService/BoardList", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *arduinoCoreServiceClient) BoardListAll(ctx context.Context, in *BoardListAllRequest, opts ...grpc.CallOption) (*BoardListAllResponse, error) { - out := new(BoardListAllResponse) - err := c.cc.Invoke(ctx, "/cc.arduino.cli.commands.v1.ArduinoCoreService/BoardListAll", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *arduinoCoreServiceClient) BoardSearch(ctx context.Context, in *BoardSearchRequest, opts ...grpc.CallOption) (*BoardSearchResponse, error) { - out := new(BoardSearchResponse) - err := c.cc.Invoke(ctx, "/cc.arduino.cli.commands.v1.ArduinoCoreService/BoardSearch", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *arduinoCoreServiceClient) BoardListWatch(ctx context.Context, opts ...grpc.CallOption) (ArduinoCoreService_BoardListWatchClient, error) { - stream, err := c.cc.NewStream(ctx, &_ArduinoCoreService_serviceDesc.Streams[6], "/cc.arduino.cli.commands.v1.ArduinoCoreService/BoardListWatch", opts...) - if err != nil { - return nil, err - } - x := &arduinoCoreServiceBoardListWatchClient{stream} - return x, nil -} - -type ArduinoCoreService_BoardListWatchClient interface { - Send(*BoardListWatchRequest) error - Recv() (*BoardListWatchResponse, error) - grpc.ClientStream -} - -type arduinoCoreServiceBoardListWatchClient struct { - grpc.ClientStream -} - -func (x *arduinoCoreServiceBoardListWatchClient) Send(m *BoardListWatchRequest) error { - return x.ClientStream.SendMsg(m) -} - -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[7], "/cc.arduino.cli.commands.v1.ArduinoCoreService/Compile", opts...) - if err != nil { - return nil, err - } - x := &arduinoCoreServiceCompileClient{stream} - if err := x.ClientStream.SendMsg(in); err != nil { - return nil, err - } - if err := x.ClientStream.CloseSend(); err != nil { - return nil, err - } - 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 -} - -func (c *arduinoCoreServiceClient) PlatformInstall(ctx context.Context, in *PlatformInstallRequest, opts ...grpc.CallOption) (ArduinoCoreService_PlatformInstallClient, error) { - stream, err := c.cc.NewStream(ctx, &_ArduinoCoreService_serviceDesc.Streams[8], "/cc.arduino.cli.commands.v1.ArduinoCoreService/PlatformInstall", opts...) - if err != nil { - return nil, err - } - x := &arduinoCoreServicePlatformInstallClient{stream} - if err := x.ClientStream.SendMsg(in); err != nil { - return nil, err - } - if err := x.ClientStream.CloseSend(); err != nil { - return nil, err - } - 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 -} - -func (c *arduinoCoreServiceClient) PlatformDownload(ctx context.Context, in *PlatformDownloadRequest, opts ...grpc.CallOption) (ArduinoCoreService_PlatformDownloadClient, error) { - stream, err := c.cc.NewStream(ctx, &_ArduinoCoreService_serviceDesc.Streams[9], "/cc.arduino.cli.commands.v1.ArduinoCoreService/PlatformDownload", opts...) - if err != nil { - return nil, err - } - x := &arduinoCoreServicePlatformDownloadClient{stream} - if err := x.ClientStream.SendMsg(in); err != nil { - return nil, err - } - if err := x.ClientStream.CloseSend(); err != nil { - return nil, err - } - 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 -} - -func (c *arduinoCoreServiceClient) PlatformUninstall(ctx context.Context, in *PlatformUninstallRequest, opts ...grpc.CallOption) (ArduinoCoreService_PlatformUninstallClient, error) { - stream, err := c.cc.NewStream(ctx, &_ArduinoCoreService_serviceDesc.Streams[10], "/cc.arduino.cli.commands.v1.ArduinoCoreService/PlatformUninstall", opts...) - if err != nil { - return nil, err - } - x := &arduinoCoreServicePlatformUninstallClient{stream} - if err := x.ClientStream.SendMsg(in); err != nil { - return nil, err - } - if err := x.ClientStream.CloseSend(); err != nil { - return nil, err - } - return x, nil -} - -type ArduinoCoreService_PlatformUninstallClient interface { - Recv() (*PlatformUninstallResponse, error) - grpc.ClientStream -} - -type arduinoCoreServicePlatformUninstallClient struct { - grpc.ClientStream -} - -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[11], "/cc.arduino.cli.commands.v1.ArduinoCoreService/PlatformUpgrade", opts...) - if err != nil { - return nil, err - } - x := &arduinoCoreServicePlatformUpgradeClient{stream} - if err := x.ClientStream.SendMsg(in); err != nil { - return nil, err - } - if err := x.ClientStream.CloseSend(); err != nil { - return nil, err - } - return x, nil -} - -type ArduinoCoreService_PlatformUpgradeClient interface { - Recv() (*PlatformUpgradeResponse, error) - grpc.ClientStream -} - -type arduinoCoreServicePlatformUpgradeClient struct { - grpc.ClientStream -} - -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[12], "/cc.arduino.cli.commands.v1.ArduinoCoreService/Upload", opts...) - if err != nil { - return nil, err - } - x := &arduinoCoreServiceUploadClient{stream} - if err := x.ClientStream.SendMsg(in); err != nil { - return nil, err - } - if err := x.ClientStream.CloseSend(); err != nil { - return nil, err - } - return x, nil -} - -type ArduinoCoreService_UploadClient interface { - Recv() (*UploadResponse, error) - grpc.ClientStream -} - -type arduinoCoreServiceUploadClient struct { - grpc.ClientStream -} - -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[13], "/cc.arduino.cli.commands.v1.ArduinoCoreService/UploadUsingProgrammer", opts...) - if err != nil { - return nil, err - } - x := &arduinoCoreServiceUploadUsingProgrammerClient{stream} - if err := x.ClientStream.SendMsg(in); err != nil { - return nil, err - } - if err := x.ClientStream.CloseSend(); err != nil { - return nil, err - } - 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 -} - -func (c *arduinoCoreServiceClient) ListProgrammersAvailableForUpload(ctx context.Context, in *ListProgrammersAvailableForUploadRequest, opts ...grpc.CallOption) (*ListProgrammersAvailableForUploadResponse, error) { - out := new(ListProgrammersAvailableForUploadResponse) - err := c.cc.Invoke(ctx, "/cc.arduino.cli.commands.v1.ArduinoCoreService/ListProgrammersAvailableForUpload", in, out, opts...) - 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[14], "/cc.arduino.cli.commands.v1.ArduinoCoreService/BurnBootloader", opts...) - if err != nil { - return nil, err - } - x := &arduinoCoreServiceBurnBootloaderClient{stream} - if err := x.ClientStream.SendMsg(in); err != nil { - return nil, err - } - if err := x.ClientStream.CloseSend(); err != nil { - return nil, err - } - 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 -} - -func (c *arduinoCoreServiceClient) PlatformSearch(ctx context.Context, in *PlatformSearchRequest, opts ...grpc.CallOption) (*PlatformSearchResponse, error) { - out := new(PlatformSearchResponse) - err := c.cc.Invoke(ctx, "/cc.arduino.cli.commands.v1.ArduinoCoreService/PlatformSearch", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *arduinoCoreServiceClient) PlatformList(ctx context.Context, in *PlatformListRequest, opts ...grpc.CallOption) (*PlatformListResponse, error) { - out := new(PlatformListResponse) - err := c.cc.Invoke(ctx, "/cc.arduino.cli.commands.v1.ArduinoCoreService/PlatformList", in, out, opts...) - 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[15], "/cc.arduino.cli.commands.v1.ArduinoCoreService/LibraryDownload", opts...) - if err != nil { - return nil, err - } - x := &arduinoCoreServiceLibraryDownloadClient{stream} - if err := x.ClientStream.SendMsg(in); err != nil { - return nil, err - } - if err := x.ClientStream.CloseSend(); err != nil { - return nil, err - } - return x, nil -} - -type ArduinoCoreService_LibraryDownloadClient interface { - Recv() (*LibraryDownloadResponse, error) - grpc.ClientStream -} - -type arduinoCoreServiceLibraryDownloadClient struct { - grpc.ClientStream -} - -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[16], "/cc.arduino.cli.commands.v1.ArduinoCoreService/LibraryInstall", opts...) - if err != nil { - return nil, err - } - x := &arduinoCoreServiceLibraryInstallClient{stream} - if err := x.ClientStream.SendMsg(in); err != nil { - return nil, err - } - if err := x.ClientStream.CloseSend(); err != nil { - return nil, err - } - return x, nil -} - -type ArduinoCoreService_LibraryInstallClient interface { - Recv() (*LibraryInstallResponse, error) - grpc.ClientStream -} - -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) ZipLibraryInstall(ctx context.Context, in *ZipLibraryInstallRequest, opts ...grpc.CallOption) (ArduinoCoreService_ZipLibraryInstallClient, error) { - stream, err := c.cc.NewStream(ctx, &_ArduinoCoreService_serviceDesc.Streams[17], "/cc.arduino.cli.commands.v1.ArduinoCoreService/ZipLibraryInstall", opts...) - if err != nil { - return nil, err - } - x := &arduinoCoreServiceZipLibraryInstallClient{stream} - if err := x.ClientStream.SendMsg(in); err != nil { - return nil, err - } - if err := x.ClientStream.CloseSend(); err != nil { - return nil, err - } - return x, nil -} - -type ArduinoCoreService_ZipLibraryInstallClient interface { - Recv() (*ZipLibraryInstallResponse, error) - grpc.ClientStream -} - -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[18], "/cc.arduino.cli.commands.v1.ArduinoCoreService/GitLibraryInstall", opts...) - if err != nil { - return nil, err - } - x := &arduinoCoreServiceGitLibraryInstallClient{stream} - if err := x.ClientStream.SendMsg(in); err != nil { - return nil, err - } - if err := x.ClientStream.CloseSend(); err != nil { - return nil, err - } - return x, nil -} - -type ArduinoCoreService_GitLibraryInstallClient interface { - Recv() (*GitLibraryInstallResponse, error) - grpc.ClientStream -} - -type arduinoCoreServiceGitLibraryInstallClient struct { - grpc.ClientStream -} - -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[19], "/cc.arduino.cli.commands.v1.ArduinoCoreService/LibraryUninstall", opts...) - if err != nil { - return nil, err - } - x := &arduinoCoreServiceLibraryUninstallClient{stream} - if err := x.ClientStream.SendMsg(in); err != nil { - return nil, err - } - if err := x.ClientStream.CloseSend(); err != nil { - return nil, err - } - 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 -} - -func (c *arduinoCoreServiceClient) LibraryUpgradeAll(ctx context.Context, in *LibraryUpgradeAllRequest, opts ...grpc.CallOption) (ArduinoCoreService_LibraryUpgradeAllClient, error) { - stream, err := c.cc.NewStream(ctx, &_ArduinoCoreService_serviceDesc.Streams[20], "/cc.arduino.cli.commands.v1.ArduinoCoreService/LibraryUpgradeAll", opts...) - if err != nil { - return nil, err - } - x := &arduinoCoreServiceLibraryUpgradeAllClient{stream} - if err := x.ClientStream.SendMsg(in); err != nil { - return nil, err - } - if err := x.ClientStream.CloseSend(); err != nil { - return nil, err - } - 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 -} - -func (c *arduinoCoreServiceClient) LibraryResolveDependencies(ctx context.Context, in *LibraryResolveDependenciesRequest, opts ...grpc.CallOption) (*LibraryResolveDependenciesResponse, error) { - out := new(LibraryResolveDependenciesResponse) - err := c.cc.Invoke(ctx, "/cc.arduino.cli.commands.v1.ArduinoCoreService/LibraryResolveDependencies", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *arduinoCoreServiceClient) LibrarySearch(ctx context.Context, in *LibrarySearchRequest, opts ...grpc.CallOption) (*LibrarySearchResponse, error) { - out := new(LibrarySearchResponse) - err := c.cc.Invoke(ctx, "/cc.arduino.cli.commands.v1.ArduinoCoreService/LibrarySearch", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *arduinoCoreServiceClient) LibraryList(ctx context.Context, in *LibraryListRequest, opts ...grpc.CallOption) (*LibraryListResponse, error) { - out := new(LibraryListResponse) - err := c.cc.Invoke(ctx, "/cc.arduino.cli.commands.v1.ArduinoCoreService/LibraryList", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// ArduinoCoreServiceServer is the server API for ArduinoCoreService service. -type ArduinoCoreServiceServer interface { - // 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 - 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 packages indexes for both Cores and Libraries - UpdateCoreLibrariesIndex(*UpdateCoreLibrariesIndexRequest, ArduinoCoreService_UpdateCoreLibrariesIndexServer) error - // Outdated returns a message with a list of outdated Cores and Libraries - Outdated(context.Context, *OutdatedRequest) (*OutdatedResponse, error) - // Upgrade both Cores and Libraries - Upgrade(*UpgradeRequest, ArduinoCoreService_UpgradeServer) error - // Get the version of Arduino CLI in use. - Version(context.Context, *VersionRequest) (*VersionResponse, error) - // Returns all files composing a Sketch - LoadSketch(context.Context, *LoadSketchRequest) (*LoadSketchResponse, error) - // Creates a zip file containing all files of specified Sketch - ArchiveSketch(context.Context, *ArchiveSketchRequest) (*ArchiveSketchResponse, error) - // Requests details about a board - BoardDetails(context.Context, *BoardDetailsRequest) (*BoardDetailsResponse, error) - // Attach a board to a sketch. When the `fqbn` field of a request is not - // provided, the FQBN of the attached board will be used. - BoardAttach(*BoardAttachRequest, ArduinoCoreService_BoardAttachServer) error - // List the boards currently connected to the computer. - BoardList(context.Context, *BoardListRequest) (*BoardListResponse, error) - // List all the boards provided by installed platforms. - BoardListAll(context.Context, *BoardListAllRequest) (*BoardListAllResponse, error) - // Search boards in installed and not installed Platforms. - BoardSearch(context.Context, *BoardSearchRequest) (*BoardSearchResponse, error) - // List boards connection and disconnected events. - BoardListWatch(ArduinoCoreService_BoardListWatchServer) error - // Compile an Arduino sketch. - Compile(*CompileRequest, ArduinoCoreService_CompileServer) error - // Download and install a platform and its tool dependencies. - PlatformInstall(*PlatformInstallRequest, ArduinoCoreService_PlatformInstallServer) error - // Download a platform and its tool dependencies to the `staging/packages` - // subdirectory of the data directory. - PlatformDownload(*PlatformDownloadRequest, ArduinoCoreService_PlatformDownloadServer) error - // Uninstall a platform as well as its tool dependencies that are not used by - // other installed platforms. - PlatformUninstall(*PlatformUninstallRequest, ArduinoCoreService_PlatformUninstallServer) error - // Upgrade an installed platform to the latest version. - PlatformUpgrade(*PlatformUpgradeRequest, ArduinoCoreService_PlatformUpgradeServer) error - // Upload a compiled sketch to a board. - Upload(*UploadRequest, ArduinoCoreService_UploadServer) error - // Upload a compiled sketch to a board using a programmer. - UploadUsingProgrammer(*UploadUsingProgrammerRequest, ArduinoCoreService_UploadUsingProgrammerServer) error - // List programmers available for a board. - ListProgrammersAvailableForUpload(context.Context, *ListProgrammersAvailableForUploadRequest) (*ListProgrammersAvailableForUploadResponse, error) - // Burn bootloader to a board. - BurnBootloader(*BurnBootloaderRequest, ArduinoCoreService_BurnBootloaderServer) error - // Search for a platform in the platforms indexes. - PlatformSearch(context.Context, *PlatformSearchRequest) (*PlatformSearchResponse, error) - // List all installed platforms. - PlatformList(context.Context, *PlatformListRequest) (*PlatformListResponse, error) - // Download the archive file of an Arduino library in the libraries index to - // the staging directory. - LibraryDownload(*LibraryDownloadRequest, ArduinoCoreService_LibraryDownloadServer) error - // Download and install an Arduino library from the libraries index. - LibraryInstall(*LibraryInstallRequest, ArduinoCoreService_LibraryInstallServer) 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 - // Uninstall an Arduino library. - LibraryUninstall(*LibraryUninstallRequest, ArduinoCoreService_LibraryUninstallServer) error - // Upgrade all installed Arduino libraries to the newest version available. - LibraryUpgradeAll(*LibraryUpgradeAllRequest, ArduinoCoreService_LibraryUpgradeAllServer) 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) - // Search the Arduino libraries index for libraries. - LibrarySearch(context.Context, *LibrarySearchRequest) (*LibrarySearchResponse, error) - // List the installed libraries. - LibraryList(context.Context, *LibraryListRequest) (*LibraryListResponse, error) -} - -// UnimplementedArduinoCoreServiceServer can be embedded to have forward compatible implementations. -type UnimplementedArduinoCoreServiceServer struct { -} - -func (*UnimplementedArduinoCoreServiceServer) Create(context.Context, *CreateRequest) (*CreateResponse, error) { - return nil, status1.Errorf(codes.Unimplemented, "method Create not implemented") -} -func (*UnimplementedArduinoCoreServiceServer) Init(*InitRequest, ArduinoCoreService_InitServer) error { - return status1.Errorf(codes.Unimplemented, "method Init not implemented") -} -func (*UnimplementedArduinoCoreServiceServer) Destroy(context.Context, *DestroyRequest) (*DestroyResponse, error) { - return nil, status1.Errorf(codes.Unimplemented, "method Destroy not implemented") -} -func (*UnimplementedArduinoCoreServiceServer) UpdateIndex(*UpdateIndexRequest, ArduinoCoreService_UpdateIndexServer) error { - return status1.Errorf(codes.Unimplemented, "method UpdateIndex not implemented") -} -func (*UnimplementedArduinoCoreServiceServer) UpdateLibrariesIndex(*UpdateLibrariesIndexRequest, ArduinoCoreService_UpdateLibrariesIndexServer) error { - return status1.Errorf(codes.Unimplemented, "method UpdateLibrariesIndex not implemented") -} -func (*UnimplementedArduinoCoreServiceServer) UpdateCoreLibrariesIndex(*UpdateCoreLibrariesIndexRequest, ArduinoCoreService_UpdateCoreLibrariesIndexServer) error { - return status1.Errorf(codes.Unimplemented, "method UpdateCoreLibrariesIndex not implemented") -} -func (*UnimplementedArduinoCoreServiceServer) Outdated(context.Context, *OutdatedRequest) (*OutdatedResponse, error) { - return nil, status1.Errorf(codes.Unimplemented, "method Outdated not implemented") -} -func (*UnimplementedArduinoCoreServiceServer) Upgrade(*UpgradeRequest, ArduinoCoreService_UpgradeServer) error { - return status1.Errorf(codes.Unimplemented, "method Upgrade not implemented") -} -func (*UnimplementedArduinoCoreServiceServer) Version(context.Context, *VersionRequest) (*VersionResponse, error) { - return nil, status1.Errorf(codes.Unimplemented, "method Version not implemented") -} -func (*UnimplementedArduinoCoreServiceServer) LoadSketch(context.Context, *LoadSketchRequest) (*LoadSketchResponse, error) { - return nil, status1.Errorf(codes.Unimplemented, "method LoadSketch not implemented") -} -func (*UnimplementedArduinoCoreServiceServer) ArchiveSketch(context.Context, *ArchiveSketchRequest) (*ArchiveSketchResponse, error) { - return nil, status1.Errorf(codes.Unimplemented, "method ArchiveSketch not implemented") -} -func (*UnimplementedArduinoCoreServiceServer) BoardDetails(context.Context, *BoardDetailsRequest) (*BoardDetailsResponse, error) { - return nil, status1.Errorf(codes.Unimplemented, "method BoardDetails not implemented") -} -func (*UnimplementedArduinoCoreServiceServer) BoardAttach(*BoardAttachRequest, ArduinoCoreService_BoardAttachServer) error { - return status1.Errorf(codes.Unimplemented, "method BoardAttach not implemented") -} -func (*UnimplementedArduinoCoreServiceServer) BoardList(context.Context, *BoardListRequest) (*BoardListResponse, error) { - return nil, status1.Errorf(codes.Unimplemented, "method BoardList not implemented") -} -func (*UnimplementedArduinoCoreServiceServer) BoardListAll(context.Context, *BoardListAllRequest) (*BoardListAllResponse, error) { - return nil, status1.Errorf(codes.Unimplemented, "method BoardListAll not implemented") -} -func (*UnimplementedArduinoCoreServiceServer) BoardSearch(context.Context, *BoardSearchRequest) (*BoardSearchResponse, error) { - return nil, status1.Errorf(codes.Unimplemented, "method BoardSearch not implemented") -} -func (*UnimplementedArduinoCoreServiceServer) BoardListWatch(ArduinoCoreService_BoardListWatchServer) error { - return status1.Errorf(codes.Unimplemented, "method BoardListWatch not implemented") -} -func (*UnimplementedArduinoCoreServiceServer) Compile(*CompileRequest, ArduinoCoreService_CompileServer) error { - return status1.Errorf(codes.Unimplemented, "method Compile not implemented") -} -func (*UnimplementedArduinoCoreServiceServer) PlatformInstall(*PlatformInstallRequest, ArduinoCoreService_PlatformInstallServer) error { - return status1.Errorf(codes.Unimplemented, "method PlatformInstall not implemented") -} -func (*UnimplementedArduinoCoreServiceServer) PlatformDownload(*PlatformDownloadRequest, ArduinoCoreService_PlatformDownloadServer) error { - return status1.Errorf(codes.Unimplemented, "method PlatformDownload not implemented") -} -func (*UnimplementedArduinoCoreServiceServer) PlatformUninstall(*PlatformUninstallRequest, ArduinoCoreService_PlatformUninstallServer) error { - return status1.Errorf(codes.Unimplemented, "method PlatformUninstall not implemented") -} -func (*UnimplementedArduinoCoreServiceServer) PlatformUpgrade(*PlatformUpgradeRequest, ArduinoCoreService_PlatformUpgradeServer) error { - return status1.Errorf(codes.Unimplemented, "method PlatformUpgrade not implemented") -} -func (*UnimplementedArduinoCoreServiceServer) Upload(*UploadRequest, ArduinoCoreService_UploadServer) error { - return status1.Errorf(codes.Unimplemented, "method Upload not implemented") -} -func (*UnimplementedArduinoCoreServiceServer) UploadUsingProgrammer(*UploadUsingProgrammerRequest, ArduinoCoreService_UploadUsingProgrammerServer) error { - return status1.Errorf(codes.Unimplemented, "method UploadUsingProgrammer not implemented") -} -func (*UnimplementedArduinoCoreServiceServer) ListProgrammersAvailableForUpload(context.Context, *ListProgrammersAvailableForUploadRequest) (*ListProgrammersAvailableForUploadResponse, error) { - return nil, status1.Errorf(codes.Unimplemented, "method ListProgrammersAvailableForUpload not implemented") -} -func (*UnimplementedArduinoCoreServiceServer) BurnBootloader(*BurnBootloaderRequest, ArduinoCoreService_BurnBootloaderServer) error { - return status1.Errorf(codes.Unimplemented, "method BurnBootloader not implemented") -} -func (*UnimplementedArduinoCoreServiceServer) PlatformSearch(context.Context, *PlatformSearchRequest) (*PlatformSearchResponse, error) { - return nil, status1.Errorf(codes.Unimplemented, "method PlatformSearch not implemented") -} -func (*UnimplementedArduinoCoreServiceServer) PlatformList(context.Context, *PlatformListRequest) (*PlatformListResponse, error) { - return nil, status1.Errorf(codes.Unimplemented, "method PlatformList not implemented") -} -func (*UnimplementedArduinoCoreServiceServer) LibraryDownload(*LibraryDownloadRequest, ArduinoCoreService_LibraryDownloadServer) error { - return status1.Errorf(codes.Unimplemented, "method LibraryDownload not implemented") -} -func (*UnimplementedArduinoCoreServiceServer) LibraryInstall(*LibraryInstallRequest, ArduinoCoreService_LibraryInstallServer) error { - return status1.Errorf(codes.Unimplemented, "method LibraryInstall not implemented") -} -func (*UnimplementedArduinoCoreServiceServer) ZipLibraryInstall(*ZipLibraryInstallRequest, ArduinoCoreService_ZipLibraryInstallServer) error { - return status1.Errorf(codes.Unimplemented, "method ZipLibraryInstall not implemented") -} -func (*UnimplementedArduinoCoreServiceServer) GitLibraryInstall(*GitLibraryInstallRequest, ArduinoCoreService_GitLibraryInstallServer) error { - return status1.Errorf(codes.Unimplemented, "method GitLibraryInstall not implemented") -} -func (*UnimplementedArduinoCoreServiceServer) LibraryUninstall(*LibraryUninstallRequest, ArduinoCoreService_LibraryUninstallServer) error { - return status1.Errorf(codes.Unimplemented, "method LibraryUninstall not implemented") -} -func (*UnimplementedArduinoCoreServiceServer) LibraryUpgradeAll(*LibraryUpgradeAllRequest, ArduinoCoreService_LibraryUpgradeAllServer) error { - return status1.Errorf(codes.Unimplemented, "method LibraryUpgradeAll not implemented") -} -func (*UnimplementedArduinoCoreServiceServer) LibraryResolveDependencies(context.Context, *LibraryResolveDependenciesRequest) (*LibraryResolveDependenciesResponse, error) { - return nil, status1.Errorf(codes.Unimplemented, "method LibraryResolveDependencies not implemented") -} -func (*UnimplementedArduinoCoreServiceServer) LibrarySearch(context.Context, *LibrarySearchRequest) (*LibrarySearchResponse, error) { - return nil, status1.Errorf(codes.Unimplemented, "method LibrarySearch not implemented") -} -func (*UnimplementedArduinoCoreServiceServer) LibraryList(context.Context, *LibraryListRequest) (*LibraryListResponse, error) { - return nil, status1.Errorf(codes.Unimplemented, "method LibraryList not implemented") -} - -func RegisterArduinoCoreServiceServer(s *grpc.Server, srv ArduinoCoreServiceServer) { - s.RegisterService(&_ArduinoCoreService_serviceDesc, srv) -} - -func _ArduinoCoreService_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreateRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ArduinoCoreServiceServer).Create(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cc.arduino.cli.commands.v1.ArduinoCoreService/Create", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ArduinoCoreServiceServer).Create(ctx, req.(*CreateRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ArduinoCoreService_Init_Handler(srv interface{}, stream grpc.ServerStream) error { - m := new(InitRequest) - if err := stream.RecvMsg(m); err != nil { - return err - } - return srv.(ArduinoCoreServiceServer).Init(m, &arduinoCoreServiceInitServer{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) -} - -func _ArduinoCoreService_Destroy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DestroyRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ArduinoCoreServiceServer).Destroy(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cc.arduino.cli.commands.v1.ArduinoCoreService/Destroy", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ArduinoCoreServiceServer).Destroy(ctx, req.(*DestroyRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ArduinoCoreService_UpdateIndex_Handler(srv interface{}, stream grpc.ServerStream) error { - m := new(UpdateIndexRequest) - if err := stream.RecvMsg(m); err != nil { - return err - } - return srv.(ArduinoCoreServiceServer).UpdateIndex(m, &arduinoCoreServiceUpdateIndexServer{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) -} - -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 -} - -type arduinoCoreServiceUpdateLibrariesIndexServer struct { - grpc.ServerStream -} - -func (x *arduinoCoreServiceUpdateLibrariesIndexServer) Send(m *UpdateLibrariesIndexResponse) error { - return x.ServerStream.SendMsg(m) -} - -func _ArduinoCoreService_UpdateCoreLibrariesIndex_Handler(srv interface{}, stream grpc.ServerStream) error { - m := new(UpdateCoreLibrariesIndexRequest) - if err := stream.RecvMsg(m); err != nil { - return err - } - return srv.(ArduinoCoreServiceServer).UpdateCoreLibrariesIndex(m, &arduinoCoreServiceUpdateCoreLibrariesIndexServer{stream}) -} - -type ArduinoCoreService_UpdateCoreLibrariesIndexServer interface { - Send(*UpdateCoreLibrariesIndexResponse) error - grpc.ServerStream -} - -type arduinoCoreServiceUpdateCoreLibrariesIndexServer struct { - grpc.ServerStream -} - -func (x *arduinoCoreServiceUpdateCoreLibrariesIndexServer) Send(m *UpdateCoreLibrariesIndexResponse) error { - return x.ServerStream.SendMsg(m) -} - -func _ArduinoCoreService_Outdated_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(OutdatedRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ArduinoCoreServiceServer).Outdated(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cc.arduino.cli.commands.v1.ArduinoCoreService/Outdated", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ArduinoCoreServiceServer).Outdated(ctx, req.(*OutdatedRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ArduinoCoreService_Upgrade_Handler(srv interface{}, stream grpc.ServerStream) error { - m := new(UpgradeRequest) - if err := stream.RecvMsg(m); err != nil { - return err - } - return srv.(ArduinoCoreServiceServer).Upgrade(m, &arduinoCoreServiceUpgradeServer{stream}) -} - -type ArduinoCoreService_UpgradeServer interface { - Send(*UpgradeResponse) error - grpc.ServerStream -} - -type arduinoCoreServiceUpgradeServer struct { - grpc.ServerStream -} - -func (x *arduinoCoreServiceUpgradeServer) Send(m *UpgradeResponse) error { - return x.ServerStream.SendMsg(m) -} - -func _ArduinoCoreService_Version_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(VersionRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ArduinoCoreServiceServer).Version(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cc.arduino.cli.commands.v1.ArduinoCoreService/Version", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ArduinoCoreServiceServer).Version(ctx, req.(*VersionRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ArduinoCoreService_LoadSketch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(LoadSketchRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ArduinoCoreServiceServer).LoadSketch(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cc.arduino.cli.commands.v1.ArduinoCoreService/LoadSketch", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ArduinoCoreServiceServer).LoadSketch(ctx, req.(*LoadSketchRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ArduinoCoreService_ArchiveSketch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ArchiveSketchRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ArduinoCoreServiceServer).ArchiveSketch(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cc.arduino.cli.commands.v1.ArduinoCoreService/ArchiveSketch", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ArduinoCoreServiceServer).ArchiveSketch(ctx, req.(*ArchiveSketchRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ArduinoCoreService_BoardDetails_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(BoardDetailsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ArduinoCoreServiceServer).BoardDetails(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cc.arduino.cli.commands.v1.ArduinoCoreService/BoardDetails", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ArduinoCoreServiceServer).BoardDetails(ctx, req.(*BoardDetailsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ArduinoCoreService_BoardAttach_Handler(srv interface{}, stream grpc.ServerStream) error { - m := new(BoardAttachRequest) - if err := stream.RecvMsg(m); err != nil { - return err - } - return srv.(ArduinoCoreServiceServer).BoardAttach(m, &arduinoCoreServiceBoardAttachServer{stream}) -} - -type ArduinoCoreService_BoardAttachServer interface { - Send(*BoardAttachResponse) error - grpc.ServerStream -} - -type arduinoCoreServiceBoardAttachServer struct { - grpc.ServerStream -} - -func (x *arduinoCoreServiceBoardAttachServer) Send(m *BoardAttachResponse) error { - return x.ServerStream.SendMsg(m) -} - -func _ArduinoCoreService_BoardList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(BoardListRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ArduinoCoreServiceServer).BoardList(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cc.arduino.cli.commands.v1.ArduinoCoreService/BoardList", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ArduinoCoreServiceServer).BoardList(ctx, req.(*BoardListRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ArduinoCoreService_BoardListAll_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(BoardListAllRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ArduinoCoreServiceServer).BoardListAll(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cc.arduino.cli.commands.v1.ArduinoCoreService/BoardListAll", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ArduinoCoreServiceServer).BoardListAll(ctx, req.(*BoardListAllRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ArduinoCoreService_BoardSearch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(BoardSearchRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ArduinoCoreServiceServer).BoardSearch(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cc.arduino.cli.commands.v1.ArduinoCoreService/BoardSearch", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ArduinoCoreServiceServer).BoardSearch(ctx, req.(*BoardSearchRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ArduinoCoreService_BoardListWatch_Handler(srv interface{}, stream grpc.ServerStream) error { - return srv.(ArduinoCoreServiceServer).BoardListWatch(&arduinoCoreServiceBoardListWatchServer{stream}) -} - -type ArduinoCoreService_BoardListWatchServer interface { - Send(*BoardListWatchResponse) error - Recv() (*BoardListWatchRequest, error) - grpc.ServerStream -} - -type arduinoCoreServiceBoardListWatchServer struct { - grpc.ServerStream -} - -func (x *arduinoCoreServiceBoardListWatchServer) Send(m *BoardListWatchResponse) error { - return x.ServerStream.SendMsg(m) -} - -func (x *arduinoCoreServiceBoardListWatchServer) Recv() (*BoardListWatchRequest, error) { - m := new(BoardListWatchRequest) - if err := x.ServerStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -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}) -} - -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) -} - -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 -} - -func (x *arduinoCoreServicePlatformInstallServer) Send(m *PlatformInstallResponse) error { - return x.ServerStream.SendMsg(m) -} - -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}) -} - -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) -} - -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 -} - -func (x *arduinoCoreServicePlatformUninstallServer) Send(m *PlatformUninstallResponse) error { - return x.ServerStream.SendMsg(m) -} - -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 -} - -type arduinoCoreServicePlatformUpgradeServer struct { - grpc.ServerStream -} - -func (x *arduinoCoreServicePlatformUpgradeServer) Send(m *PlatformUpgradeResponse) error { - return x.ServerStream.SendMsg(m) -} - -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 -} - -type arduinoCoreServiceUploadServer struct { - grpc.ServerStream -} - -func (x *arduinoCoreServiceUploadServer) Send(m *UploadResponse) error { - return x.ServerStream.SendMsg(m) -} - -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}) -} - -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) -} - -func _ArduinoCoreService_ListProgrammersAvailableForUpload_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListProgrammersAvailableForUploadRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ArduinoCoreServiceServer).ListProgrammersAvailableForUpload(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cc.arduino.cli.commands.v1.ArduinoCoreService/ListProgrammersAvailableForUpload", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ArduinoCoreServiceServer).ListProgrammersAvailableForUpload(ctx, req.(*ListProgrammersAvailableForUploadRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ArduinoCoreService_BurnBootloader_Handler(srv interface{}, stream grpc.ServerStream) error { - m := new(BurnBootloaderRequest) - if err := stream.RecvMsg(m); err != nil { - return err - } - return srv.(ArduinoCoreServiceServer).BurnBootloader(m, &arduinoCoreServiceBurnBootloaderServer{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) -} - -func _ArduinoCoreService_PlatformSearch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(PlatformSearchRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ArduinoCoreServiceServer).PlatformSearch(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cc.arduino.cli.commands.v1.ArduinoCoreService/PlatformSearch", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ArduinoCoreServiceServer).PlatformSearch(ctx, req.(*PlatformSearchRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ArduinoCoreService_PlatformList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(PlatformListRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ArduinoCoreServiceServer).PlatformList(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cc.arduino.cli.commands.v1.ArduinoCoreService/PlatformList", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ArduinoCoreServiceServer).PlatformList(ctx, req.(*PlatformListRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ArduinoCoreService_LibraryDownload_Handler(srv interface{}, stream grpc.ServerStream) error { - m := new(LibraryDownloadRequest) - 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 -} - -func (x *arduinoCoreServiceLibraryDownloadServer) Send(m *LibraryDownloadResponse) error { - return x.ServerStream.SendMsg(m) -} - -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}) -} - -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) -} - -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 -} - -func (x *arduinoCoreServiceZipLibraryInstallServer) Send(m *ZipLibraryInstallResponse) error { - return x.ServerStream.SendMsg(m) -} - -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}) -} - -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) -} - -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}) -} - -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) -} - -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 -} - -func (x *arduinoCoreServiceLibraryUpgradeAllServer) Send(m *LibraryUpgradeAllResponse) error { - return x.ServerStream.SendMsg(m) -} - -func _ArduinoCoreService_LibraryResolveDependencies_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(LibraryResolveDependenciesRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ArduinoCoreServiceServer).LibraryResolveDependencies(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cc.arduino.cli.commands.v1.ArduinoCoreService/LibraryResolveDependencies", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ArduinoCoreServiceServer).LibraryResolveDependencies(ctx, req.(*LibraryResolveDependenciesRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ArduinoCoreService_LibrarySearch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(LibrarySearchRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ArduinoCoreServiceServer).LibrarySearch(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cc.arduino.cli.commands.v1.ArduinoCoreService/LibrarySearch", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ArduinoCoreServiceServer).LibrarySearch(ctx, req.(*LibrarySearchRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ArduinoCoreService_LibraryList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(LibraryListRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ArduinoCoreServiceServer).LibraryList(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cc.arduino.cli.commands.v1.ArduinoCoreService/LibraryList", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ArduinoCoreServiceServer).LibraryList(ctx, req.(*LibraryListRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _ArduinoCoreService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "cc.arduino.cli.commands.v1.ArduinoCoreService", - HandlerType: (*ArduinoCoreServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "Create", - Handler: _ArduinoCoreService_Create_Handler, - }, - { - MethodName: "Destroy", - Handler: _ArduinoCoreService_Destroy_Handler, - }, - { - MethodName: "Outdated", - Handler: _ArduinoCoreService_Outdated_Handler, - }, - { - MethodName: "Version", - Handler: _ArduinoCoreService_Version_Handler, - }, - { - MethodName: "LoadSketch", - Handler: _ArduinoCoreService_LoadSketch_Handler, - }, - { - MethodName: "ArchiveSketch", - Handler: _ArduinoCoreService_ArchiveSketch_Handler, - }, - { - MethodName: "BoardDetails", - Handler: _ArduinoCoreService_BoardDetails_Handler, - }, - { - MethodName: "BoardList", - Handler: _ArduinoCoreService_BoardList_Handler, - }, - { - MethodName: "BoardListAll", - Handler: _ArduinoCoreService_BoardListAll_Handler, - }, - { - MethodName: "BoardSearch", - Handler: _ArduinoCoreService_BoardSearch_Handler, - }, - { - MethodName: "ListProgrammersAvailableForUpload", - Handler: _ArduinoCoreService_ListProgrammersAvailableForUpload_Handler, - }, - { - MethodName: "PlatformSearch", - Handler: _ArduinoCoreService_PlatformSearch_Handler, - }, - { - MethodName: "PlatformList", - Handler: _ArduinoCoreService_PlatformList_Handler, - }, - { - MethodName: "LibraryResolveDependencies", - Handler: _ArduinoCoreService_LibraryResolveDependencies_Handler, - }, - { - MethodName: "LibrarySearch", - Handler: _ArduinoCoreService_LibrarySearch_Handler, - }, - { - MethodName: "LibraryList", - Handler: _ArduinoCoreService_LibraryList_Handler, - }, - }, - Streams: []grpc.StreamDesc{ - { - StreamName: "Init", - Handler: _ArduinoCoreService_Init_Handler, - ServerStreams: true, - }, - { - StreamName: "UpdateIndex", - Handler: _ArduinoCoreService_UpdateIndex_Handler, - ServerStreams: true, - }, - { - StreamName: "UpdateLibrariesIndex", - Handler: _ArduinoCoreService_UpdateLibrariesIndex_Handler, - ServerStreams: true, - }, - { - StreamName: "UpdateCoreLibrariesIndex", - Handler: _ArduinoCoreService_UpdateCoreLibrariesIndex_Handler, - ServerStreams: true, - }, - { - StreamName: "Upgrade", - Handler: _ArduinoCoreService_Upgrade_Handler, - ServerStreams: true, - }, - { - StreamName: "BoardAttach", - Handler: _ArduinoCoreService_BoardAttach_Handler, - ServerStreams: true, - }, - { - StreamName: "BoardListWatch", - Handler: _ArduinoCoreService_BoardListWatch_Handler, - ServerStreams: true, - ClientStreams: true, - }, - { - StreamName: "Compile", - Handler: _ArduinoCoreService_Compile_Handler, - ServerStreams: true, - }, - { - StreamName: "PlatformInstall", - Handler: _ArduinoCoreService_PlatformInstall_Handler, - ServerStreams: true, - }, - { - StreamName: "PlatformDownload", - Handler: _ArduinoCoreService_PlatformDownload_Handler, - ServerStreams: true, - }, - { - StreamName: "PlatformUninstall", - Handler: _ArduinoCoreService_PlatformUninstall_Handler, - ServerStreams: true, - }, - { - StreamName: "PlatformUpgrade", - Handler: _ArduinoCoreService_PlatformUpgrade_Handler, - ServerStreams: true, - }, - { - StreamName: "Upload", - Handler: _ArduinoCoreService_Upload_Handler, - ServerStreams: true, - }, - { - StreamName: "UploadUsingProgrammer", - Handler: _ArduinoCoreService_UploadUsingProgrammer_Handler, - ServerStreams: true, - }, - { - StreamName: "BurnBootloader", - Handler: _ArduinoCoreService_BurnBootloader_Handler, - ServerStreams: true, - }, - { - StreamName: "LibraryDownload", - Handler: _ArduinoCoreService_LibraryDownload_Handler, - ServerStreams: true, - }, - { - StreamName: "LibraryInstall", - Handler: _ArduinoCoreService_LibraryInstall_Handler, - ServerStreams: true, - }, - { - StreamName: "ZipLibraryInstall", - Handler: _ArduinoCoreService_ZipLibraryInstall_Handler, - ServerStreams: true, - }, - { - StreamName: "GitLibraryInstall", - Handler: _ArduinoCoreService_GitLibraryInstall_Handler, - ServerStreams: true, - }, - { - StreamName: "LibraryUninstall", - Handler: _ArduinoCoreService_LibraryUninstall_Handler, - ServerStreams: true, - }, - { - StreamName: "LibraryUpgradeAll", - Handler: _ArduinoCoreService_LibraryUpgradeAll_Handler, - ServerStreams: true, - }, - }, - Metadata: "cc/arduino/cli/commands/v1/commands.proto", -} 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 1cc9328f540..5bf4da6a263 100644 --- a/rpc/cc/arduino/cli/commands/v1/commands_grpc.pb.go +++ b/rpc/cc/arduino/cli/commands/v1/commands_grpc.pb.go @@ -11,19 +11,19 @@ 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 // 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. type ArduinoCoreServiceClient interface { - // Start a new instance of the Arduino Core Service + // 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 Destroy(ctx context.Context, in *DestroyRequest, opts ...grpc.CallOption) (*DestroyResponse, error) - // Rescan instance of the Arduino Core Service - Rescan(ctx context.Context, in *RescanRequest, opts ...grpc.CallOption) (*RescanResponse, error) // Update package index of the Arduino Core Service UpdateIndex(ctx context.Context, in *UpdateIndexRequest, opts ...grpc.CallOption) (ArduinoCoreService_UpdateIndexClient, error) // Update libraries index @@ -107,8 +107,17 @@ func NewArduinoCoreServiceClient(cc grpc.ClientConnInterface) ArduinoCoreService return &arduinoCoreServiceClient{cc} } +func (c *arduinoCoreServiceClient) Create(ctx context.Context, in *CreateRequest, opts ...grpc.CallOption) (*CreateResponse, error) { + out := new(CreateResponse) + err := c.cc.Invoke(ctx, "/cc.arduino.cli.commands.v1.ArduinoCoreService/Create", in, out, opts...) + 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], "/cc.arduino.cli.commands.v1.ArduinoCoreService/Init", opts...) + stream, err := c.cc.NewStream(ctx, &_ArduinoCoreService_serviceDesc.Streams[0], "/cc.arduino.cli.commands.v1.ArduinoCoreService/Init", opts...) if err != nil { return nil, err } @@ -148,17 +157,8 @@ func (c *arduinoCoreServiceClient) Destroy(ctx context.Context, in *DestroyReque return out, nil } -func (c *arduinoCoreServiceClient) Rescan(ctx context.Context, in *RescanRequest, opts ...grpc.CallOption) (*RescanResponse, error) { - out := new(RescanResponse) - err := c.cc.Invoke(ctx, "/cc.arduino.cli.commands.v1.ArduinoCoreService/Rescan", in, out, opts...) - 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], "/cc.arduino.cli.commands.v1.ArduinoCoreService/UpdateIndex", opts...) + stream, err := c.cc.NewStream(ctx, &_ArduinoCoreService_serviceDesc.Streams[1], "/cc.arduino.cli.commands.v1.ArduinoCoreService/UpdateIndex", opts...) if err != nil { return nil, err } @@ -190,7 +190,7 @@ func (x *arduinoCoreServiceUpdateIndexClient) Recv() (*UpdateIndexResponse, erro } 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], "/cc.arduino.cli.commands.v1.ArduinoCoreService/UpdateLibrariesIndex", opts...) + stream, err := c.cc.NewStream(ctx, &_ArduinoCoreService_serviceDesc.Streams[2], "/cc.arduino.cli.commands.v1.ArduinoCoreService/UpdateLibrariesIndex", opts...) if err != nil { return nil, err } @@ -222,7 +222,7 @@ func (x *arduinoCoreServiceUpdateLibrariesIndexClient) Recv() (*UpdateLibrariesI } func (c *arduinoCoreServiceClient) UpdateCoreLibrariesIndex(ctx context.Context, in *UpdateCoreLibrariesIndexRequest, opts ...grpc.CallOption) (ArduinoCoreService_UpdateCoreLibrariesIndexClient, error) { - stream, err := c.cc.NewStream(ctx, &ArduinoCoreService_ServiceDesc.Streams[3], "/cc.arduino.cli.commands.v1.ArduinoCoreService/UpdateCoreLibrariesIndex", opts...) + stream, err := c.cc.NewStream(ctx, &_ArduinoCoreService_serviceDesc.Streams[3], "/cc.arduino.cli.commands.v1.ArduinoCoreService/UpdateCoreLibrariesIndex", opts...) if err != nil { return nil, err } @@ -263,7 +263,7 @@ func (c *arduinoCoreServiceClient) Outdated(ctx context.Context, in *OutdatedReq } func (c *arduinoCoreServiceClient) Upgrade(ctx context.Context, in *UpgradeRequest, opts ...grpc.CallOption) (ArduinoCoreService_UpgradeClient, error) { - stream, err := c.cc.NewStream(ctx, &ArduinoCoreService_ServiceDesc.Streams[4], "/cc.arduino.cli.commands.v1.ArduinoCoreService/Upgrade", opts...) + stream, err := c.cc.NewStream(ctx, &_ArduinoCoreService_serviceDesc.Streams[4], "/cc.arduino.cli.commands.v1.ArduinoCoreService/Upgrade", opts...) if err != nil { return nil, err } @@ -331,7 +331,7 @@ func (c *arduinoCoreServiceClient) BoardDetails(ctx context.Context, in *BoardDe } func (c *arduinoCoreServiceClient) BoardAttach(ctx context.Context, in *BoardAttachRequest, opts ...grpc.CallOption) (ArduinoCoreService_BoardAttachClient, error) { - stream, err := c.cc.NewStream(ctx, &ArduinoCoreService_ServiceDesc.Streams[5], "/cc.arduino.cli.commands.v1.ArduinoCoreService/BoardAttach", opts...) + stream, err := c.cc.NewStream(ctx, &_ArduinoCoreService_serviceDesc.Streams[5], "/cc.arduino.cli.commands.v1.ArduinoCoreService/BoardAttach", opts...) if err != nil { return nil, err } @@ -390,7 +390,7 @@ func (c *arduinoCoreServiceClient) BoardSearch(ctx context.Context, in *BoardSea } func (c *arduinoCoreServiceClient) BoardListWatch(ctx context.Context, opts ...grpc.CallOption) (ArduinoCoreService_BoardListWatchClient, error) { - stream, err := c.cc.NewStream(ctx, &ArduinoCoreService_ServiceDesc.Streams[6], "/cc.arduino.cli.commands.v1.ArduinoCoreService/BoardListWatch", opts...) + stream, err := c.cc.NewStream(ctx, &_ArduinoCoreService_serviceDesc.Streams[6], "/cc.arduino.cli.commands.v1.ArduinoCoreService/BoardListWatch", opts...) if err != nil { return nil, err } @@ -421,7 +421,7 @@ func (x *arduinoCoreServiceBoardListWatchClient) Recv() (*BoardListWatchResponse } func (c *arduinoCoreServiceClient) Compile(ctx context.Context, in *CompileRequest, opts ...grpc.CallOption) (ArduinoCoreService_CompileClient, error) { - stream, err := c.cc.NewStream(ctx, &ArduinoCoreService_ServiceDesc.Streams[7], "/cc.arduino.cli.commands.v1.ArduinoCoreService/Compile", opts...) + stream, err := c.cc.NewStream(ctx, &_ArduinoCoreService_serviceDesc.Streams[7], "/cc.arduino.cli.commands.v1.ArduinoCoreService/Compile", opts...) if err != nil { return nil, err } @@ -453,7 +453,7 @@ func (x *arduinoCoreServiceCompileClient) Recv() (*CompileResponse, error) { } func (c *arduinoCoreServiceClient) PlatformInstall(ctx context.Context, in *PlatformInstallRequest, opts ...grpc.CallOption) (ArduinoCoreService_PlatformInstallClient, error) { - stream, err := c.cc.NewStream(ctx, &ArduinoCoreService_ServiceDesc.Streams[8], "/cc.arduino.cli.commands.v1.ArduinoCoreService/PlatformInstall", opts...) + stream, err := c.cc.NewStream(ctx, &_ArduinoCoreService_serviceDesc.Streams[8], "/cc.arduino.cli.commands.v1.ArduinoCoreService/PlatformInstall", opts...) if err != nil { return nil, err } @@ -485,7 +485,7 @@ func (x *arduinoCoreServicePlatformInstallClient) Recv() (*PlatformInstallRespon } func (c *arduinoCoreServiceClient) PlatformDownload(ctx context.Context, in *PlatformDownloadRequest, opts ...grpc.CallOption) (ArduinoCoreService_PlatformDownloadClient, error) { - stream, err := c.cc.NewStream(ctx, &ArduinoCoreService_ServiceDesc.Streams[9], "/cc.arduino.cli.commands.v1.ArduinoCoreService/PlatformDownload", opts...) + stream, err := c.cc.NewStream(ctx, &_ArduinoCoreService_serviceDesc.Streams[9], "/cc.arduino.cli.commands.v1.ArduinoCoreService/PlatformDownload", opts...) if err != nil { return nil, err } @@ -517,7 +517,7 @@ func (x *arduinoCoreServicePlatformDownloadClient) Recv() (*PlatformDownloadResp } func (c *arduinoCoreServiceClient) PlatformUninstall(ctx context.Context, in *PlatformUninstallRequest, opts ...grpc.CallOption) (ArduinoCoreService_PlatformUninstallClient, error) { - stream, err := c.cc.NewStream(ctx, &ArduinoCoreService_ServiceDesc.Streams[10], "/cc.arduino.cli.commands.v1.ArduinoCoreService/PlatformUninstall", opts...) + stream, err := c.cc.NewStream(ctx, &_ArduinoCoreService_serviceDesc.Streams[10], "/cc.arduino.cli.commands.v1.ArduinoCoreService/PlatformUninstall", opts...) if err != nil { return nil, err } @@ -549,7 +549,7 @@ func (x *arduinoCoreServicePlatformUninstallClient) Recv() (*PlatformUninstallRe } func (c *arduinoCoreServiceClient) PlatformUpgrade(ctx context.Context, in *PlatformUpgradeRequest, opts ...grpc.CallOption) (ArduinoCoreService_PlatformUpgradeClient, error) { - stream, err := c.cc.NewStream(ctx, &ArduinoCoreService_ServiceDesc.Streams[11], "/cc.arduino.cli.commands.v1.ArduinoCoreService/PlatformUpgrade", opts...) + stream, err := c.cc.NewStream(ctx, &_ArduinoCoreService_serviceDesc.Streams[11], "/cc.arduino.cli.commands.v1.ArduinoCoreService/PlatformUpgrade", opts...) if err != nil { return nil, err } @@ -581,7 +581,7 @@ func (x *arduinoCoreServicePlatformUpgradeClient) Recv() (*PlatformUpgradeRespon } func (c *arduinoCoreServiceClient) Upload(ctx context.Context, in *UploadRequest, opts ...grpc.CallOption) (ArduinoCoreService_UploadClient, error) { - stream, err := c.cc.NewStream(ctx, &ArduinoCoreService_ServiceDesc.Streams[12], "/cc.arduino.cli.commands.v1.ArduinoCoreService/Upload", opts...) + stream, err := c.cc.NewStream(ctx, &_ArduinoCoreService_serviceDesc.Streams[12], "/cc.arduino.cli.commands.v1.ArduinoCoreService/Upload", opts...) if err != nil { return nil, err } @@ -613,7 +613,7 @@ func (x *arduinoCoreServiceUploadClient) Recv() (*UploadResponse, error) { } func (c *arduinoCoreServiceClient) UploadUsingProgrammer(ctx context.Context, in *UploadUsingProgrammerRequest, opts ...grpc.CallOption) (ArduinoCoreService_UploadUsingProgrammerClient, error) { - stream, err := c.cc.NewStream(ctx, &ArduinoCoreService_ServiceDesc.Streams[13], "/cc.arduino.cli.commands.v1.ArduinoCoreService/UploadUsingProgrammer", opts...) + stream, err := c.cc.NewStream(ctx, &_ArduinoCoreService_serviceDesc.Streams[13], "/cc.arduino.cli.commands.v1.ArduinoCoreService/UploadUsingProgrammer", opts...) if err != nil { return nil, err } @@ -654,7 +654,7 @@ func (c *arduinoCoreServiceClient) ListProgrammersAvailableForUpload(ctx context } func (c *arduinoCoreServiceClient) BurnBootloader(ctx context.Context, in *BurnBootloaderRequest, opts ...grpc.CallOption) (ArduinoCoreService_BurnBootloaderClient, error) { - stream, err := c.cc.NewStream(ctx, &ArduinoCoreService_ServiceDesc.Streams[14], "/cc.arduino.cli.commands.v1.ArduinoCoreService/BurnBootloader", opts...) + stream, err := c.cc.NewStream(ctx, &_ArduinoCoreService_serviceDesc.Streams[14], "/cc.arduino.cli.commands.v1.ArduinoCoreService/BurnBootloader", opts...) if err != nil { return nil, err } @@ -704,7 +704,7 @@ func (c *arduinoCoreServiceClient) PlatformList(ctx context.Context, in *Platfor } func (c *arduinoCoreServiceClient) LibraryDownload(ctx context.Context, in *LibraryDownloadRequest, opts ...grpc.CallOption) (ArduinoCoreService_LibraryDownloadClient, error) { - stream, err := c.cc.NewStream(ctx, &ArduinoCoreService_ServiceDesc.Streams[15], "/cc.arduino.cli.commands.v1.ArduinoCoreService/LibraryDownload", opts...) + stream, err := c.cc.NewStream(ctx, &_ArduinoCoreService_serviceDesc.Streams[15], "/cc.arduino.cli.commands.v1.ArduinoCoreService/LibraryDownload", opts...) if err != nil { return nil, err } @@ -736,7 +736,7 @@ func (x *arduinoCoreServiceLibraryDownloadClient) Recv() (*LibraryDownloadRespon } func (c *arduinoCoreServiceClient) LibraryInstall(ctx context.Context, in *LibraryInstallRequest, opts ...grpc.CallOption) (ArduinoCoreService_LibraryInstallClient, error) { - stream, err := c.cc.NewStream(ctx, &ArduinoCoreService_ServiceDesc.Streams[16], "/cc.arduino.cli.commands.v1.ArduinoCoreService/LibraryInstall", opts...) + stream, err := c.cc.NewStream(ctx, &_ArduinoCoreService_serviceDesc.Streams[16], "/cc.arduino.cli.commands.v1.ArduinoCoreService/LibraryInstall", opts...) if err != nil { return nil, err } @@ -768,7 +768,7 @@ func (x *arduinoCoreServiceLibraryInstallClient) Recv() (*LibraryInstallResponse } func (c *arduinoCoreServiceClient) ZipLibraryInstall(ctx context.Context, in *ZipLibraryInstallRequest, opts ...grpc.CallOption) (ArduinoCoreService_ZipLibraryInstallClient, error) { - stream, err := c.cc.NewStream(ctx, &ArduinoCoreService_ServiceDesc.Streams[17], "/cc.arduino.cli.commands.v1.ArduinoCoreService/ZipLibraryInstall", opts...) + stream, err := c.cc.NewStream(ctx, &_ArduinoCoreService_serviceDesc.Streams[17], "/cc.arduino.cli.commands.v1.ArduinoCoreService/ZipLibraryInstall", opts...) if err != nil { return nil, err } @@ -800,7 +800,7 @@ func (x *arduinoCoreServiceZipLibraryInstallClient) Recv() (*ZipLibraryInstallRe } func (c *arduinoCoreServiceClient) GitLibraryInstall(ctx context.Context, in *GitLibraryInstallRequest, opts ...grpc.CallOption) (ArduinoCoreService_GitLibraryInstallClient, error) { - stream, err := c.cc.NewStream(ctx, &ArduinoCoreService_ServiceDesc.Streams[18], "/cc.arduino.cli.commands.v1.ArduinoCoreService/GitLibraryInstall", opts...) + stream, err := c.cc.NewStream(ctx, &_ArduinoCoreService_serviceDesc.Streams[18], "/cc.arduino.cli.commands.v1.ArduinoCoreService/GitLibraryInstall", opts...) if err != nil { return nil, err } @@ -832,7 +832,7 @@ func (x *arduinoCoreServiceGitLibraryInstallClient) Recv() (*GitLibraryInstallRe } func (c *arduinoCoreServiceClient) LibraryUninstall(ctx context.Context, in *LibraryUninstallRequest, opts ...grpc.CallOption) (ArduinoCoreService_LibraryUninstallClient, error) { - stream, err := c.cc.NewStream(ctx, &ArduinoCoreService_ServiceDesc.Streams[19], "/cc.arduino.cli.commands.v1.ArduinoCoreService/LibraryUninstall", opts...) + stream, err := c.cc.NewStream(ctx, &_ArduinoCoreService_serviceDesc.Streams[19], "/cc.arduino.cli.commands.v1.ArduinoCoreService/LibraryUninstall", opts...) if err != nil { return nil, err } @@ -864,7 +864,7 @@ func (x *arduinoCoreServiceLibraryUninstallClient) Recv() (*LibraryUninstallResp } func (c *arduinoCoreServiceClient) LibraryUpgradeAll(ctx context.Context, in *LibraryUpgradeAllRequest, opts ...grpc.CallOption) (ArduinoCoreService_LibraryUpgradeAllClient, error) { - stream, err := c.cc.NewStream(ctx, &ArduinoCoreService_ServiceDesc.Streams[20], "/cc.arduino.cli.commands.v1.ArduinoCoreService/LibraryUpgradeAll", opts...) + stream, err := c.cc.NewStream(ctx, &_ArduinoCoreService_serviceDesc.Streams[20], "/cc.arduino.cli.commands.v1.ArduinoCoreService/LibraryUpgradeAll", opts...) if err != nil { return nil, err } @@ -926,12 +926,13 @@ func (c *arduinoCoreServiceClient) LibraryList(ctx context.Context, in *LibraryL // All implementations must embed UnimplementedArduinoCoreServiceServer // for forward compatibility type ArduinoCoreServiceServer interface { - // Start a new instance of the Arduino Core Service + // 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 Destroy(context.Context, *DestroyRequest) (*DestroyResponse, error) - // Rescan instance of the Arduino Core Service - Rescan(context.Context, *RescanRequest) (*RescanResponse, error) // Update package index of the Arduino Core Service UpdateIndex(*UpdateIndexRequest, ArduinoCoreService_UpdateIndexServer) error // Update libraries index @@ -1012,15 +1013,15 @@ type ArduinoCoreServiceServer interface { 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 { 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) Rescan(context.Context, *RescanRequest) (*RescanResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Rescan not implemented") -} func (UnimplementedArduinoCoreServiceServer) UpdateIndex(*UpdateIndexRequest, ArduinoCoreService_UpdateIndexServer) error { return status.Errorf(codes.Unimplemented, "method UpdateIndex not implemented") } @@ -1132,8 +1133,26 @@ type UnsafeArduinoCoreServiceServer interface { mustEmbedUnimplementedArduinoCoreServiceServer() } -func RegisterArduinoCoreServiceServer(s grpc.ServiceRegistrar, srv ArduinoCoreServiceServer) { - s.RegisterService(&ArduinoCoreService_ServiceDesc, srv) +func RegisterArduinoCoreServiceServer(s *grpc.Server, srv ArduinoCoreServiceServer) { + s.RegisterService(&_ArduinoCoreService_serviceDesc, srv) +} + +func _ArduinoCoreService_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ArduinoCoreServiceServer).Create(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cc.arduino.cli.commands.v1.ArduinoCoreService/Create", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ArduinoCoreServiceServer).Create(ctx, req.(*CreateRequest)) + } + return interceptor(ctx, in, info, handler) } func _ArduinoCoreService_Init_Handler(srv interface{}, stream grpc.ServerStream) error { @@ -1175,24 +1194,6 @@ func _ArduinoCoreService_Destroy_Handler(srv interface{}, ctx context.Context, d return interceptor(ctx, in, info, handler) } -func _ArduinoCoreService_Rescan_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(RescanRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ArduinoCoreServiceServer).Rescan(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cc.arduino.cli.commands.v1.ArduinoCoreService/Rescan", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ArduinoCoreServiceServer).Rescan(ctx, req.(*RescanRequest)) - } - return interceptor(ctx, in, info, handler) -} - func _ArduinoCoreService_UpdateIndex_Handler(srv interface{}, stream grpc.ServerStream) error { m := new(UpdateIndexRequest) if err := stream.RecvMsg(m); err != nil { @@ -1870,20 +1871,17 @@ func _ArduinoCoreService_LibraryList_Handler(srv interface{}, ctx context.Contex return interceptor(ctx, in, info, handler) } -// ArduinoCoreService_ServiceDesc is the grpc.ServiceDesc for ArduinoCoreService service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var ArduinoCoreService_ServiceDesc = grpc.ServiceDesc{ +var _ArduinoCoreService_serviceDesc = grpc.ServiceDesc{ ServiceName: "cc.arduino.cli.commands.v1.ArduinoCoreService", HandlerType: (*ArduinoCoreServiceServer)(nil), Methods: []grpc.MethodDesc{ { - MethodName: "Destroy", - Handler: _ArduinoCoreService_Destroy_Handler, + MethodName: "Create", + Handler: _ArduinoCoreService_Create_Handler, }, { - MethodName: "Rescan", - Handler: _ArduinoCoreService_Rescan_Handler, + MethodName: "Destroy", + Handler: _ArduinoCoreService_Destroy_Handler, }, { MethodName: "Outdated", diff --git a/rpc/cc/arduino/cli/commands/v1/common.pb.go b/rpc/cc/arduino/cli/commands/v1/common.pb.go index 963d7575916..a798924a13c 100644 --- a/rpc/cc/arduino/cli/commands/v1/common.pb.go +++ b/rpc/cc/arduino/cli/commands/v1/common.pb.go @@ -16,7 +16,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.26.0 -// protoc v3.15.8 +// protoc v3.16.0 // source: cc/arduino/cli/commands/v1/common.proto package commands diff --git a/rpc/cc/arduino/cli/commands/v1/compile.pb.go b/rpc/cc/arduino/cli/commands/v1/compile.pb.go index 0a0f0c69f91..6f5a69cf332 100644 --- a/rpc/cc/arduino/cli/commands/v1/compile.pb.go +++ b/rpc/cc/arduino/cli/commands/v1/compile.pb.go @@ -16,7 +16,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.26.0 -// protoc v3.15.8 +// protoc v3.16.0 // source: cc/arduino/cli/commands/v1/compile.proto package commands diff --git a/rpc/cc/arduino/cli/commands/v1/core.pb.go b/rpc/cc/arduino/cli/commands/v1/core.pb.go index e1b6a221c71..c0ee99accb8 100644 --- a/rpc/cc/arduino/cli/commands/v1/core.pb.go +++ b/rpc/cc/arduino/cli/commands/v1/core.pb.go @@ -16,7 +16,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.26.0 -// protoc v3.15.8 +// protoc v3.16.0 // source: cc/arduino/cli/commands/v1/core.proto package commands diff --git a/rpc/cc/arduino/cli/commands/v1/lib.pb.go b/rpc/cc/arduino/cli/commands/v1/lib.pb.go index a85641f4d11..70e7918fc56 100644 --- a/rpc/cc/arduino/cli/commands/v1/lib.pb.go +++ b/rpc/cc/arduino/cli/commands/v1/lib.pb.go @@ -16,7 +16,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.26.0 -// protoc v3.15.8 +// protoc v3.16.0 // source: cc/arduino/cli/commands/v1/lib.proto package commands diff --git a/rpc/cc/arduino/cli/commands/v1/upload.pb.go b/rpc/cc/arduino/cli/commands/v1/upload.pb.go index d36d861ad08..f895909f0fc 100644 --- a/rpc/cc/arduino/cli/commands/v1/upload.pb.go +++ b/rpc/cc/arduino/cli/commands/v1/upload.pb.go @@ -16,7 +16,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.26.0 -// protoc v3.15.8 +// protoc v3.16.0 // source: cc/arduino/cli/commands/v1/upload.proto package commands diff --git a/rpc/cc/arduino/cli/debug/v1/debug.pb.go b/rpc/cc/arduino/cli/debug/v1/debug.pb.go index be90484b1dc..6a751b456a0 100644 --- a/rpc/cc/arduino/cli/debug/v1/debug.pb.go +++ b/rpc/cc/arduino/cli/debug/v1/debug.pb.go @@ -16,7 +16,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.26.0 -// protoc v3.15.8 +// protoc v3.16.0 // source: cc/arduino/cli/debug/v1/debug.proto package debug diff --git a/rpc/cc/arduino/cli/debug/v1/debug_grpc.pb.go b/rpc/cc/arduino/cli/debug/v1/debug_grpc.pb.go index 87ad365dd49..48d9ed99f38 100644 --- a/rpc/cc/arduino/cli/debug/v1/debug_grpc.pb.go +++ b/rpc/cc/arduino/cli/debug/v1/debug_grpc.pb.go @@ -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{ diff --git a/rpc/cc/arduino/cli/monitor/v1/monitor.pb.go b/rpc/cc/arduino/cli/monitor/v1/monitor.pb.go index ddbb366ec18..8f6d764fe7b 100644 --- a/rpc/cc/arduino/cli/monitor/v1/monitor.pb.go +++ b/rpc/cc/arduino/cli/monitor/v1/monitor.pb.go @@ -16,7 +16,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.26.0 -// protoc v3.15.8 +// protoc v3.16.0 // source: cc/arduino/cli/monitor/v1/monitor.proto package monitor diff --git a/rpc/cc/arduino/cli/monitor/v1/monitor_grpc.pb.go b/rpc/cc/arduino/cli/monitor/v1/monitor_grpc.pb.go index bd24416d142..923bd13c61f 100644 --- a/rpc/cc/arduino/cli/monitor/v1/monitor_grpc.pb.go +++ b/rpc/cc/arduino/cli/monitor/v1/monitor_grpc.pb.go @@ -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{}, diff --git a/rpc/cc/arduino/cli/settings/v1/settings.pb.go b/rpc/cc/arduino/cli/settings/v1/settings.pb.go index a97f3b53b46..6484a0a81d6 100644 --- a/rpc/cc/arduino/cli/settings/v1/settings.pb.go +++ b/rpc/cc/arduino/cli/settings/v1/settings.pb.go @@ -16,7 +16,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.26.0 -// protoc v3.15.8 +// protoc v3.16.0 // source: cc/arduino/cli/settings/v1/settings.proto package settings diff --git a/rpc/cc/arduino/cli/settings/v1/settings_grpc.pb.go b/rpc/cc/arduino/cli/settings/v1/settings_grpc.pb.go index 28ede224376..2a5c87c6536 100644 --- a/rpc/cc/arduino/cli/settings/v1/settings_grpc.pb.go +++ b/rpc/cc/arduino/cli/settings/v1/settings_grpc.pb.go @@ -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{