refactor: fixed dependency errors

This commit is contained in:
Marvin Zhang
2024-11-01 14:08:30 +08:00
parent 8ffba2944d
commit ca5bbe6c8f
56 changed files with 3753 additions and 3791 deletions

View File

@@ -1,29 +0,0 @@
BSD 3-Clause License
Copyright (c) 2021, Crawlab Team
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

View File

@@ -1,2 +0,0 @@
# crawlab-grpc
gRPC for Crawlab

View File

@@ -0,0 +1,564 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.34.2
// protoc v5.27.2
// source: services/dependency_service.proto
package grpc
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type DependencyServiceCode int32
const (
DependencyServiceCode_SYNC DependencyServiceCode = 0
DependencyServiceCode_INSTALL DependencyServiceCode = 1
DependencyServiceCode_UNINSTALL DependencyServiceCode = 2
)
// Enum value maps for DependencyServiceCode.
var (
DependencyServiceCode_name = map[int32]string{
0: "SYNC",
1: "INSTALL",
2: "UNINSTALL",
}
DependencyServiceCode_value = map[string]int32{
"SYNC": 0,
"INSTALL": 1,
"UNINSTALL": 2,
}
)
func (x DependencyServiceCode) Enum() *DependencyServiceCode {
p := new(DependencyServiceCode)
*p = x
return p
}
func (x DependencyServiceCode) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (DependencyServiceCode) Descriptor() protoreflect.EnumDescriptor {
return file_services_dependency_service_proto_enumTypes[0].Descriptor()
}
func (DependencyServiceCode) Type() protoreflect.EnumType {
return &file_services_dependency_service_proto_enumTypes[0]
}
func (x DependencyServiceCode) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use DependencyServiceCode.Descriptor instead.
func (DependencyServiceCode) EnumDescriptor() ([]byte, []int) {
return file_services_dependency_service_proto_rawDescGZIP(), []int{0}
}
type Dependency struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"`
}
func (x *Dependency) Reset() {
*x = Dependency{}
if protoimpl.UnsafeEnabled {
mi := &file_services_dependency_service_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Dependency) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Dependency) ProtoMessage() {}
func (x *Dependency) ProtoReflect() protoreflect.Message {
mi := &file_services_dependency_service_proto_msgTypes[0]
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 Dependency.ProtoReflect.Descriptor instead.
func (*Dependency) Descriptor() ([]byte, []int) {
return file_services_dependency_service_proto_rawDescGZIP(), []int{0}
}
func (x *Dependency) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *Dependency) GetVersion() string {
if x != nil {
return x.Version
}
return ""
}
type DependencyServiceConnectRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
NodeKey string `protobuf:"bytes,1,opt,name=node_key,json=nodeKey,proto3" json:"node_key,omitempty"`
}
func (x *DependencyServiceConnectRequest) Reset() {
*x = DependencyServiceConnectRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_services_dependency_service_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *DependencyServiceConnectRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DependencyServiceConnectRequest) ProtoMessage() {}
func (x *DependencyServiceConnectRequest) ProtoReflect() protoreflect.Message {
mi := &file_services_dependency_service_proto_msgTypes[1]
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 DependencyServiceConnectRequest.ProtoReflect.Descriptor instead.
func (*DependencyServiceConnectRequest) Descriptor() ([]byte, []int) {
return file_services_dependency_service_proto_rawDescGZIP(), []int{1}
}
func (x *DependencyServiceConnectRequest) GetNodeKey() string {
if x != nil {
return x.NodeKey
}
return ""
}
type DependencyServiceConnectResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Code DependencyServiceCode `protobuf:"varint,1,opt,name=code,proto3,enum=grpc.DependencyServiceCode" json:"code,omitempty"`
TaskId string `protobuf:"bytes,2,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"`
Lang string `protobuf:"bytes,3,opt,name=lang,proto3" json:"lang,omitempty"`
Proxy string `protobuf:"bytes,4,opt,name=proxy,proto3" json:"proxy,omitempty"`
Dependencies []*Dependency `protobuf:"bytes,5,rep,name=dependencies,proto3" json:"dependencies,omitempty"`
}
func (x *DependencyServiceConnectResponse) Reset() {
*x = DependencyServiceConnectResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_services_dependency_service_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *DependencyServiceConnectResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DependencyServiceConnectResponse) ProtoMessage() {}
func (x *DependencyServiceConnectResponse) ProtoReflect() protoreflect.Message {
mi := &file_services_dependency_service_proto_msgTypes[2]
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 DependencyServiceConnectResponse.ProtoReflect.Descriptor instead.
func (*DependencyServiceConnectResponse) Descriptor() ([]byte, []int) {
return file_services_dependency_service_proto_rawDescGZIP(), []int{2}
}
func (x *DependencyServiceConnectResponse) GetCode() DependencyServiceCode {
if x != nil {
return x.Code
}
return DependencyServiceCode_SYNC
}
func (x *DependencyServiceConnectResponse) GetTaskId() string {
if x != nil {
return x.TaskId
}
return ""
}
func (x *DependencyServiceConnectResponse) GetLang() string {
if x != nil {
return x.Lang
}
return ""
}
func (x *DependencyServiceConnectResponse) GetProxy() string {
if x != nil {
return x.Proxy
}
return ""
}
func (x *DependencyServiceConnectResponse) GetDependencies() []*Dependency {
if x != nil {
return x.Dependencies
}
return nil
}
type DependencyServiceSyncRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
NodeKey string `protobuf:"bytes,1,opt,name=node_key,json=nodeKey,proto3" json:"node_key,omitempty"`
Lang string `protobuf:"bytes,2,opt,name=lang,proto3" json:"lang,omitempty"`
Dependencies []*Dependency `protobuf:"bytes,3,rep,name=dependencies,proto3" json:"dependencies,omitempty"`
}
func (x *DependencyServiceSyncRequest) Reset() {
*x = DependencyServiceSyncRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_services_dependency_service_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *DependencyServiceSyncRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DependencyServiceSyncRequest) ProtoMessage() {}
func (x *DependencyServiceSyncRequest) ProtoReflect() protoreflect.Message {
mi := &file_services_dependency_service_proto_msgTypes[3]
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 DependencyServiceSyncRequest.ProtoReflect.Descriptor instead.
func (*DependencyServiceSyncRequest) Descriptor() ([]byte, []int) {
return file_services_dependency_service_proto_rawDescGZIP(), []int{3}
}
func (x *DependencyServiceSyncRequest) GetNodeKey() string {
if x != nil {
return x.NodeKey
}
return ""
}
func (x *DependencyServiceSyncRequest) GetLang() string {
if x != nil {
return x.Lang
}
return ""
}
func (x *DependencyServiceSyncRequest) GetDependencies() []*Dependency {
if x != nil {
return x.Dependencies
}
return nil
}
type DependencyServiceUpdateTaskLogRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
TaskId string `protobuf:"bytes,1,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"`
LogLines []string `protobuf:"bytes,2,rep,name=log_lines,json=logLines,proto3" json:"log_lines,omitempty"`
}
func (x *DependencyServiceUpdateTaskLogRequest) Reset() {
*x = DependencyServiceUpdateTaskLogRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_services_dependency_service_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *DependencyServiceUpdateTaskLogRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DependencyServiceUpdateTaskLogRequest) ProtoMessage() {}
func (x *DependencyServiceUpdateTaskLogRequest) ProtoReflect() protoreflect.Message {
mi := &file_services_dependency_service_proto_msgTypes[4]
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 DependencyServiceUpdateTaskLogRequest.ProtoReflect.Descriptor instead.
func (*DependencyServiceUpdateTaskLogRequest) Descriptor() ([]byte, []int) {
return file_services_dependency_service_proto_rawDescGZIP(), []int{4}
}
func (x *DependencyServiceUpdateTaskLogRequest) GetTaskId() string {
if x != nil {
return x.TaskId
}
return ""
}
func (x *DependencyServiceUpdateTaskLogRequest) GetLogLines() []string {
if x != nil {
return x.LogLines
}
return nil
}
var File_services_dependency_service_proto protoreflect.FileDescriptor
var file_services_dependency_service_proto_rawDesc = []byte{
0x0a, 0x21, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2f, 0x64, 0x65, 0x70, 0x65, 0x6e,
0x64, 0x65, 0x6e, 0x63, 0x79, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x12, 0x04, 0x67, 0x72, 0x70, 0x63, 0x1a, 0x15, 0x65, 0x6e, 0x74, 0x69, 0x74,
0x79, 0x2f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x22, 0x3a, 0x0a, 0x0a, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x12, 0x12,
0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61,
0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20,
0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x3c, 0x0a, 0x1f,
0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63,
0x65, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
0x19, 0x0a, 0x08, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28,
0x09, 0x52, 0x07, 0x6e, 0x6f, 0x64, 0x65, 0x4b, 0x65, 0x79, 0x22, 0xcc, 0x01, 0x0a, 0x20, 0x44,
0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
0x2f, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e,
0x67, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x53,
0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65,
0x12, 0x17, 0x0a, 0x07, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28,
0x09, 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6c, 0x61, 0x6e,
0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6c, 0x61, 0x6e, 0x67, 0x12, 0x14, 0x0a,
0x05, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x72,
0x6f, 0x78, 0x79, 0x12, 0x34, 0x0a, 0x0c, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63,
0x69, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x67, 0x72, 0x70, 0x63,
0x2e, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x52, 0x0c, 0x64, 0x65, 0x70,
0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x69, 0x65, 0x73, 0x22, 0x83, 0x01, 0x0a, 0x1c, 0x44, 0x65,
0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x53,
0x79, 0x6e, 0x63, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x6e, 0x6f,
0x64, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6e, 0x6f,
0x64, 0x65, 0x4b, 0x65, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x6c, 0x61, 0x6e, 0x67, 0x18, 0x02, 0x20,
0x01, 0x28, 0x09, 0x52, 0x04, 0x6c, 0x61, 0x6e, 0x67, 0x12, 0x34, 0x0a, 0x0c, 0x64, 0x65, 0x70,
0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x69, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32,
0x10, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63,
0x79, 0x52, 0x0c, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x69, 0x65, 0x73, 0x22,
0x5d, 0x0a, 0x25, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x53, 0x65, 0x72,
0x76, 0x69, 0x63, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x4c, 0x6f,
0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x74, 0x61, 0x73, 0x6b,
0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49,
0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6c, 0x6f, 0x67, 0x5f, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x18, 0x02,
0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x6c, 0x6f, 0x67, 0x4c, 0x69, 0x6e, 0x65, 0x73, 0x2a, 0x3d,
0x0a, 0x15, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x53, 0x65, 0x72, 0x76,
0x69, 0x63, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x08, 0x0a, 0x04, 0x53, 0x59, 0x4e, 0x43, 0x10,
0x00, 0x12, 0x0b, 0x0a, 0x07, 0x49, 0x4e, 0x53, 0x54, 0x41, 0x4c, 0x4c, 0x10, 0x01, 0x12, 0x0d,
0x0a, 0x09, 0x55, 0x4e, 0x49, 0x4e, 0x53, 0x54, 0x41, 0x4c, 0x4c, 0x10, 0x02, 0x32, 0x81, 0x02,
0x0a, 0x11, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x53, 0x65, 0x72, 0x76,
0x69, 0x63, 0x65, 0x12, 0x5c, 0x0a, 0x07, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x12, 0x25,
0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79,
0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x52, 0x65,
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x65, 0x70,
0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x43, 0x6f,
0x6e, 0x6e, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30,
0x01, 0x12, 0x3c, 0x0a, 0x04, 0x53, 0x79, 0x6e, 0x63, 0x12, 0x22, 0x2e, 0x67, 0x72, 0x70, 0x63,
0x2e, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69,
0x63, 0x65, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e,
0x67, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12,
0x50, 0x0a, 0x0d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x4c, 0x6f, 0x67,
0x12, 0x2b, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e,
0x63, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54,
0x61, 0x73, 0x6b, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e,
0x67, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28,
0x01, 0x42, 0x08, 0x5a, 0x06, 0x2e, 0x3b, 0x67, 0x72, 0x70, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x33,
}
var (
file_services_dependency_service_proto_rawDescOnce sync.Once
file_services_dependency_service_proto_rawDescData = file_services_dependency_service_proto_rawDesc
)
func file_services_dependency_service_proto_rawDescGZIP() []byte {
file_services_dependency_service_proto_rawDescOnce.Do(func() {
file_services_dependency_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_services_dependency_service_proto_rawDescData)
})
return file_services_dependency_service_proto_rawDescData
}
var file_services_dependency_service_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_services_dependency_service_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
var file_services_dependency_service_proto_goTypes = []any{
(DependencyServiceCode)(0), // 0: grpc.DependencyServiceCode
(*Dependency)(nil), // 1: grpc.Dependency
(*DependencyServiceConnectRequest)(nil), // 2: grpc.DependencyServiceConnectRequest
(*DependencyServiceConnectResponse)(nil), // 3: grpc.DependencyServiceConnectResponse
(*DependencyServiceSyncRequest)(nil), // 4: grpc.DependencyServiceSyncRequest
(*DependencyServiceUpdateTaskLogRequest)(nil), // 5: grpc.DependencyServiceUpdateTaskLogRequest
(*Response)(nil), // 6: grpc.Response
}
var file_services_dependency_service_proto_depIdxs = []int32{
0, // 0: grpc.DependencyServiceConnectResponse.code:type_name -> grpc.DependencyServiceCode
1, // 1: grpc.DependencyServiceConnectResponse.dependencies:type_name -> grpc.Dependency
1, // 2: grpc.DependencyServiceSyncRequest.dependencies:type_name -> grpc.Dependency
2, // 3: grpc.DependencyService.Connect:input_type -> grpc.DependencyServiceConnectRequest
4, // 4: grpc.DependencyService.Sync:input_type -> grpc.DependencyServiceSyncRequest
5, // 5: grpc.DependencyService.UpdateTaskLog:input_type -> grpc.DependencyServiceUpdateTaskLogRequest
3, // 6: grpc.DependencyService.Connect:output_type -> grpc.DependencyServiceConnectResponse
6, // 7: grpc.DependencyService.Sync:output_type -> grpc.Response
6, // 8: grpc.DependencyService.UpdateTaskLog:output_type -> grpc.Response
6, // [6:9] is the sub-list for method output_type
3, // [3:6] is the sub-list for method input_type
3, // [3:3] is the sub-list for extension type_name
3, // [3:3] is the sub-list for extension extendee
0, // [0:3] is the sub-list for field type_name
}
func init() { file_services_dependency_service_proto_init() }
func file_services_dependency_service_proto_init() {
if File_services_dependency_service_proto != nil {
return
}
file_entity_response_proto_init()
if !protoimpl.UnsafeEnabled {
file_services_dependency_service_proto_msgTypes[0].Exporter = func(v any, i int) any {
switch v := v.(*Dependency); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_services_dependency_service_proto_msgTypes[1].Exporter = func(v any, i int) any {
switch v := v.(*DependencyServiceConnectRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_services_dependency_service_proto_msgTypes[2].Exporter = func(v any, i int) any {
switch v := v.(*DependencyServiceConnectResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_services_dependency_service_proto_msgTypes[3].Exporter = func(v any, i int) any {
switch v := v.(*DependencyServiceSyncRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_services_dependency_service_proto_msgTypes[4].Exporter = func(v any, i int) any {
switch v := v.(*DependencyServiceUpdateTaskLogRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_services_dependency_service_proto_rawDesc,
NumEnums: 1,
NumMessages: 5,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_services_dependency_service_proto_goTypes,
DependencyIndexes: file_services_dependency_service_proto_depIdxs,
EnumInfos: file_services_dependency_service_proto_enumTypes,
MessageInfos: file_services_dependency_service_proto_msgTypes,
}.Build()
File_services_dependency_service_proto = out.File
file_services_dependency_service_proto_rawDesc = nil
file_services_dependency_service_proto_goTypes = nil
file_services_dependency_service_proto_depIdxs = nil
}

View File

@@ -0,0 +1,248 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.4.0
// - protoc v5.27.2
// source: services/dependency_service.proto
package grpc
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.62.0 or later.
const _ = grpc.SupportPackageIsVersion8
const (
DependencyService_Connect_FullMethodName = "/grpc.DependencyService/Connect"
DependencyService_Sync_FullMethodName = "/grpc.DependencyService/Sync"
DependencyService_UpdateTaskLog_FullMethodName = "/grpc.DependencyService/UpdateTaskLog"
)
// DependencyServiceClient is the client API for DependencyService 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 DependencyServiceClient interface {
Connect(ctx context.Context, in *DependencyServiceConnectRequest, opts ...grpc.CallOption) (DependencyService_ConnectClient, error)
Sync(ctx context.Context, in *DependencyServiceSyncRequest, opts ...grpc.CallOption) (*Response, error)
UpdateTaskLog(ctx context.Context, opts ...grpc.CallOption) (DependencyService_UpdateTaskLogClient, error)
}
type dependencyServiceClient struct {
cc grpc.ClientConnInterface
}
func NewDependencyServiceClient(cc grpc.ClientConnInterface) DependencyServiceClient {
return &dependencyServiceClient{cc}
}
func (c *dependencyServiceClient) Connect(ctx context.Context, in *DependencyServiceConnectRequest, opts ...grpc.CallOption) (DependencyService_ConnectClient, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
stream, err := c.cc.NewStream(ctx, &DependencyService_ServiceDesc.Streams[0], DependencyService_Connect_FullMethodName, cOpts...)
if err != nil {
return nil, err
}
x := &dependencyServiceConnectClient{ClientStream: 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 DependencyService_ConnectClient interface {
Recv() (*DependencyServiceConnectResponse, error)
grpc.ClientStream
}
type dependencyServiceConnectClient struct {
grpc.ClientStream
}
func (x *dependencyServiceConnectClient) Recv() (*DependencyServiceConnectResponse, error) {
m := new(DependencyServiceConnectResponse)
if err := x.ClientStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
func (c *dependencyServiceClient) Sync(ctx context.Context, in *DependencyServiceSyncRequest, opts ...grpc.CallOption) (*Response, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(Response)
err := c.cc.Invoke(ctx, DependencyService_Sync_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *dependencyServiceClient) UpdateTaskLog(ctx context.Context, opts ...grpc.CallOption) (DependencyService_UpdateTaskLogClient, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
stream, err := c.cc.NewStream(ctx, &DependencyService_ServiceDesc.Streams[1], DependencyService_UpdateTaskLog_FullMethodName, cOpts...)
if err != nil {
return nil, err
}
x := &dependencyServiceUpdateTaskLogClient{ClientStream: stream}
return x, nil
}
type DependencyService_UpdateTaskLogClient interface {
Send(*DependencyServiceUpdateTaskLogRequest) error
CloseAndRecv() (*Response, error)
grpc.ClientStream
}
type dependencyServiceUpdateTaskLogClient struct {
grpc.ClientStream
}
func (x *dependencyServiceUpdateTaskLogClient) Send(m *DependencyServiceUpdateTaskLogRequest) error {
return x.ClientStream.SendMsg(m)
}
func (x *dependencyServiceUpdateTaskLogClient) CloseAndRecv() (*Response, error) {
if err := x.ClientStream.CloseSend(); err != nil {
return nil, err
}
m := new(Response)
if err := x.ClientStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
// DependencyServiceServer is the server API for DependencyService service.
// All implementations must embed UnimplementedDependencyServiceServer
// for forward compatibility
type DependencyServiceServer interface {
Connect(*DependencyServiceConnectRequest, DependencyService_ConnectServer) error
Sync(context.Context, *DependencyServiceSyncRequest) (*Response, error)
UpdateTaskLog(DependencyService_UpdateTaskLogServer) error
mustEmbedUnimplementedDependencyServiceServer()
}
// UnimplementedDependencyServiceServer must be embedded to have forward compatible implementations.
type UnimplementedDependencyServiceServer struct {
}
func (UnimplementedDependencyServiceServer) Connect(*DependencyServiceConnectRequest, DependencyService_ConnectServer) error {
return status.Errorf(codes.Unimplemented, "method Connect not implemented")
}
func (UnimplementedDependencyServiceServer) Sync(context.Context, *DependencyServiceSyncRequest) (*Response, error) {
return nil, status.Errorf(codes.Unimplemented, "method Sync not implemented")
}
func (UnimplementedDependencyServiceServer) UpdateTaskLog(DependencyService_UpdateTaskLogServer) error {
return status.Errorf(codes.Unimplemented, "method UpdateTaskLog not implemented")
}
func (UnimplementedDependencyServiceServer) mustEmbedUnimplementedDependencyServiceServer() {}
// UnsafeDependencyServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to DependencyServiceServer will
// result in compilation errors.
type UnsafeDependencyServiceServer interface {
mustEmbedUnimplementedDependencyServiceServer()
}
func RegisterDependencyServiceServer(s grpc.ServiceRegistrar, srv DependencyServiceServer) {
s.RegisterService(&DependencyService_ServiceDesc, srv)
}
func _DependencyService_Connect_Handler(srv interface{}, stream grpc.ServerStream) error {
m := new(DependencyServiceConnectRequest)
if err := stream.RecvMsg(m); err != nil {
return err
}
return srv.(DependencyServiceServer).Connect(m, &dependencyServiceConnectServer{ServerStream: stream})
}
type DependencyService_ConnectServer interface {
Send(*DependencyServiceConnectResponse) error
grpc.ServerStream
}
type dependencyServiceConnectServer struct {
grpc.ServerStream
}
func (x *dependencyServiceConnectServer) Send(m *DependencyServiceConnectResponse) error {
return x.ServerStream.SendMsg(m)
}
func _DependencyService_Sync_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DependencyServiceSyncRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(DependencyServiceServer).Sync(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: DependencyService_Sync_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(DependencyServiceServer).Sync(ctx, req.(*DependencyServiceSyncRequest))
}
return interceptor(ctx, in, info, handler)
}
func _DependencyService_UpdateTaskLog_Handler(srv interface{}, stream grpc.ServerStream) error {
return srv.(DependencyServiceServer).UpdateTaskLog(&dependencyServiceUpdateTaskLogServer{ServerStream: stream})
}
type DependencyService_UpdateTaskLogServer interface {
SendAndClose(*Response) error
Recv() (*DependencyServiceUpdateTaskLogRequest, error)
grpc.ServerStream
}
type dependencyServiceUpdateTaskLogServer struct {
grpc.ServerStream
}
func (x *dependencyServiceUpdateTaskLogServer) SendAndClose(m *Response) error {
return x.ServerStream.SendMsg(m)
}
func (x *dependencyServiceUpdateTaskLogServer) Recv() (*DependencyServiceUpdateTaskLogRequest, error) {
m := new(DependencyServiceUpdateTaskLogRequest)
if err := x.ServerStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
// DependencyService_ServiceDesc is the grpc.ServiceDesc for DependencyService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var DependencyService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "grpc.DependencyService",
HandlerType: (*DependencyServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Sync",
Handler: _DependencyService_Sync_Handler,
},
},
Streams: []grpc.StreamDesc{
{
StreamName: "Connect",
Handler: _DependencyService_Connect_Handler,
ServerStreams: true,
},
{
StreamName: "UpdateTaskLog",
Handler: _DependencyService_UpdateTaskLog_Handler,
ClientStreams: true,
},
},
Metadata: "services/dependency_service.proto",
}

View File

@@ -1,565 +0,0 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.34.2
// protoc v5.27.2
// source: services/dependency_service_v2.proto
package grpc
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type DependencyServiceV2Code int32
const (
DependencyServiceV2Code_SYNC DependencyServiceV2Code = 0
DependencyServiceV2Code_INSTALL DependencyServiceV2Code = 1
DependencyServiceV2Code_UNINSTALL DependencyServiceV2Code = 2
)
// Enum value maps for DependencyServiceV2Code.
var (
DependencyServiceV2Code_name = map[int32]string{
0: "SYNC",
1: "INSTALL",
2: "UNINSTALL",
}
DependencyServiceV2Code_value = map[string]int32{
"SYNC": 0,
"INSTALL": 1,
"UNINSTALL": 2,
}
)
func (x DependencyServiceV2Code) Enum() *DependencyServiceV2Code {
p := new(DependencyServiceV2Code)
*p = x
return p
}
func (x DependencyServiceV2Code) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (DependencyServiceV2Code) Descriptor() protoreflect.EnumDescriptor {
return file_services_dependency_service_v2_proto_enumTypes[0].Descriptor()
}
func (DependencyServiceV2Code) Type() protoreflect.EnumType {
return &file_services_dependency_service_v2_proto_enumTypes[0]
}
func (x DependencyServiceV2Code) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use DependencyServiceV2Code.Descriptor instead.
func (DependencyServiceV2Code) EnumDescriptor() ([]byte, []int) {
return file_services_dependency_service_v2_proto_rawDescGZIP(), []int{0}
}
type Dependency struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"`
}
func (x *Dependency) Reset() {
*x = Dependency{}
if protoimpl.UnsafeEnabled {
mi := &file_services_dependency_service_v2_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Dependency) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Dependency) ProtoMessage() {}
func (x *Dependency) ProtoReflect() protoreflect.Message {
mi := &file_services_dependency_service_v2_proto_msgTypes[0]
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 Dependency.ProtoReflect.Descriptor instead.
func (*Dependency) Descriptor() ([]byte, []int) {
return file_services_dependency_service_v2_proto_rawDescGZIP(), []int{0}
}
func (x *Dependency) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *Dependency) GetVersion() string {
if x != nil {
return x.Version
}
return ""
}
type DependencyServiceV2ConnectRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
NodeKey string `protobuf:"bytes,1,opt,name=node_key,json=nodeKey,proto3" json:"node_key,omitempty"`
}
func (x *DependencyServiceV2ConnectRequest) Reset() {
*x = DependencyServiceV2ConnectRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_services_dependency_service_v2_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *DependencyServiceV2ConnectRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DependencyServiceV2ConnectRequest) ProtoMessage() {}
func (x *DependencyServiceV2ConnectRequest) ProtoReflect() protoreflect.Message {
mi := &file_services_dependency_service_v2_proto_msgTypes[1]
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 DependencyServiceV2ConnectRequest.ProtoReflect.Descriptor instead.
func (*DependencyServiceV2ConnectRequest) Descriptor() ([]byte, []int) {
return file_services_dependency_service_v2_proto_rawDescGZIP(), []int{1}
}
func (x *DependencyServiceV2ConnectRequest) GetNodeKey() string {
if x != nil {
return x.NodeKey
}
return ""
}
type DependencyServiceV2ConnectResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Code DependencyServiceV2Code `protobuf:"varint,1,opt,name=code,proto3,enum=grpc.DependencyServiceV2Code" json:"code,omitempty"`
TaskId string `protobuf:"bytes,2,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"`
Lang string `protobuf:"bytes,3,opt,name=lang,proto3" json:"lang,omitempty"`
Proxy string `protobuf:"bytes,4,opt,name=proxy,proto3" json:"proxy,omitempty"`
Dependencies []*Dependency `protobuf:"bytes,5,rep,name=dependencies,proto3" json:"dependencies,omitempty"`
}
func (x *DependencyServiceV2ConnectResponse) Reset() {
*x = DependencyServiceV2ConnectResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_services_dependency_service_v2_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *DependencyServiceV2ConnectResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DependencyServiceV2ConnectResponse) ProtoMessage() {}
func (x *DependencyServiceV2ConnectResponse) ProtoReflect() protoreflect.Message {
mi := &file_services_dependency_service_v2_proto_msgTypes[2]
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 DependencyServiceV2ConnectResponse.ProtoReflect.Descriptor instead.
func (*DependencyServiceV2ConnectResponse) Descriptor() ([]byte, []int) {
return file_services_dependency_service_v2_proto_rawDescGZIP(), []int{2}
}
func (x *DependencyServiceV2ConnectResponse) GetCode() DependencyServiceV2Code {
if x != nil {
return x.Code
}
return DependencyServiceV2Code_SYNC
}
func (x *DependencyServiceV2ConnectResponse) GetTaskId() string {
if x != nil {
return x.TaskId
}
return ""
}
func (x *DependencyServiceV2ConnectResponse) GetLang() string {
if x != nil {
return x.Lang
}
return ""
}
func (x *DependencyServiceV2ConnectResponse) GetProxy() string {
if x != nil {
return x.Proxy
}
return ""
}
func (x *DependencyServiceV2ConnectResponse) GetDependencies() []*Dependency {
if x != nil {
return x.Dependencies
}
return nil
}
type DependencyServiceV2SyncRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
NodeKey string `protobuf:"bytes,1,opt,name=node_key,json=nodeKey,proto3" json:"node_key,omitempty"`
Lang string `protobuf:"bytes,2,opt,name=lang,proto3" json:"lang,omitempty"`
Dependencies []*Dependency `protobuf:"bytes,3,rep,name=dependencies,proto3" json:"dependencies,omitempty"`
}
func (x *DependencyServiceV2SyncRequest) Reset() {
*x = DependencyServiceV2SyncRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_services_dependency_service_v2_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *DependencyServiceV2SyncRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DependencyServiceV2SyncRequest) ProtoMessage() {}
func (x *DependencyServiceV2SyncRequest) ProtoReflect() protoreflect.Message {
mi := &file_services_dependency_service_v2_proto_msgTypes[3]
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 DependencyServiceV2SyncRequest.ProtoReflect.Descriptor instead.
func (*DependencyServiceV2SyncRequest) Descriptor() ([]byte, []int) {
return file_services_dependency_service_v2_proto_rawDescGZIP(), []int{3}
}
func (x *DependencyServiceV2SyncRequest) GetNodeKey() string {
if x != nil {
return x.NodeKey
}
return ""
}
func (x *DependencyServiceV2SyncRequest) GetLang() string {
if x != nil {
return x.Lang
}
return ""
}
func (x *DependencyServiceV2SyncRequest) GetDependencies() []*Dependency {
if x != nil {
return x.Dependencies
}
return nil
}
type DependencyServiceV2UpdateTaskLogRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
TaskId string `protobuf:"bytes,1,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"`
LogLines []string `protobuf:"bytes,2,rep,name=log_lines,json=logLines,proto3" json:"log_lines,omitempty"`
}
func (x *DependencyServiceV2UpdateTaskLogRequest) Reset() {
*x = DependencyServiceV2UpdateTaskLogRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_services_dependency_service_v2_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *DependencyServiceV2UpdateTaskLogRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DependencyServiceV2UpdateTaskLogRequest) ProtoMessage() {}
func (x *DependencyServiceV2UpdateTaskLogRequest) ProtoReflect() protoreflect.Message {
mi := &file_services_dependency_service_v2_proto_msgTypes[4]
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 DependencyServiceV2UpdateTaskLogRequest.ProtoReflect.Descriptor instead.
func (*DependencyServiceV2UpdateTaskLogRequest) Descriptor() ([]byte, []int) {
return file_services_dependency_service_v2_proto_rawDescGZIP(), []int{4}
}
func (x *DependencyServiceV2UpdateTaskLogRequest) GetTaskId() string {
if x != nil {
return x.TaskId
}
return ""
}
func (x *DependencyServiceV2UpdateTaskLogRequest) GetLogLines() []string {
if x != nil {
return x.LogLines
}
return nil
}
var File_services_dependency_service_v2_proto protoreflect.FileDescriptor
var file_services_dependency_service_v2_proto_rawDesc = []byte{
0x0a, 0x24, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2f, 0x64, 0x65, 0x70, 0x65, 0x6e,
0x64, 0x65, 0x6e, 0x63, 0x79, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x76, 0x32,
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x04, 0x67, 0x72, 0x70, 0x63, 0x1a, 0x15, 0x65, 0x6e,
0x74, 0x69, 0x74, 0x79, 0x2f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x22, 0x3a, 0x0a, 0x0a, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63,
0x79, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e,
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22,
0x3e, 0x0a, 0x21, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x53, 0x65, 0x72,
0x76, 0x69, 0x63, 0x65, 0x56, 0x32, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x6b, 0x65, 0x79,
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6e, 0x6f, 0x64, 0x65, 0x4b, 0x65, 0x79, 0x22,
0xd0, 0x01, 0x0a, 0x22, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x53, 0x65,
0x72, 0x76, 0x69, 0x63, 0x65, 0x56, 0x32, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x52, 0x65,
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x31, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01,
0x20, 0x01, 0x28, 0x0e, 0x32, 0x1d, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x65, 0x70, 0x65,
0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x56, 0x32, 0x43,
0x6f, 0x64, 0x65, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x74, 0x61, 0x73,
0x6b, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b,
0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6c, 0x61, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09,
0x52, 0x04, 0x6c, 0x61, 0x6e, 0x67, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x18,
0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x12, 0x34, 0x0a, 0x0c,
0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x69, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03,
0x28, 0x0b, 0x32, 0x10, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64,
0x65, 0x6e, 0x63, 0x79, 0x52, 0x0c, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x69,
0x65, 0x73, 0x22, 0x85, 0x01, 0x0a, 0x1e, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63,
0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x56, 0x32, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65,
0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x6b, 0x65,
0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6e, 0x6f, 0x64, 0x65, 0x4b, 0x65, 0x79,
0x12, 0x12, 0x0a, 0x04, 0x6c, 0x61, 0x6e, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04,
0x6c, 0x61, 0x6e, 0x67, 0x12, 0x34, 0x0a, 0x0c, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e,
0x63, 0x69, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x67, 0x72, 0x70,
0x63, 0x2e, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x52, 0x0c, 0x64, 0x65,
0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x69, 0x65, 0x73, 0x22, 0x5f, 0x0a, 0x27, 0x44, 0x65,
0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x56,
0x32, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x4c, 0x6f, 0x67, 0x52, 0x65,
0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x69, 0x64,
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x12, 0x1b,
0x0a, 0x09, 0x6c, 0x6f, 0x67, 0x5f, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28,
0x09, 0x52, 0x08, 0x6c, 0x6f, 0x67, 0x4c, 0x69, 0x6e, 0x65, 0x73, 0x2a, 0x3f, 0x0a, 0x17, 0x44,
0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
0x56, 0x32, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x08, 0x0a, 0x04, 0x53, 0x59, 0x4e, 0x43, 0x10, 0x00,
0x12, 0x0b, 0x0a, 0x07, 0x49, 0x4e, 0x53, 0x54, 0x41, 0x4c, 0x4c, 0x10, 0x01, 0x12, 0x0d, 0x0a,
0x09, 0x55, 0x4e, 0x49, 0x4e, 0x53, 0x54, 0x41, 0x4c, 0x4c, 0x10, 0x02, 0x32, 0x8b, 0x02, 0x0a,
0x13, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69,
0x63, 0x65, 0x56, 0x32, 0x12, 0x60, 0x0a, 0x07, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x12,
0x27, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63,
0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x56, 0x32, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63,
0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e,
0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63,
0x65, 0x56, 0x32, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
0x73, 0x65, 0x22, 0x00, 0x30, 0x01, 0x12, 0x3e, 0x0a, 0x04, 0x53, 0x79, 0x6e, 0x63, 0x12, 0x24,
0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79,
0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x56, 0x32, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x73, 0x70,
0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x52, 0x0a, 0x0d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65,
0x54, 0x61, 0x73, 0x6b, 0x4c, 0x6f, 0x67, 0x12, 0x2d, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x44,
0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
0x56, 0x32, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x4c, 0x6f, 0x67, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65,
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, 0x01, 0x42, 0x08, 0x5a, 0x06, 0x2e, 0x3b,
0x67, 0x72, 0x70, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_services_dependency_service_v2_proto_rawDescOnce sync.Once
file_services_dependency_service_v2_proto_rawDescData = file_services_dependency_service_v2_proto_rawDesc
)
func file_services_dependency_service_v2_proto_rawDescGZIP() []byte {
file_services_dependency_service_v2_proto_rawDescOnce.Do(func() {
file_services_dependency_service_v2_proto_rawDescData = protoimpl.X.CompressGZIP(file_services_dependency_service_v2_proto_rawDescData)
})
return file_services_dependency_service_v2_proto_rawDescData
}
var file_services_dependency_service_v2_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_services_dependency_service_v2_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
var file_services_dependency_service_v2_proto_goTypes = []any{
(DependencyServiceV2Code)(0), // 0: grpc.DependencyServiceV2Code
(*Dependency)(nil), // 1: grpc.Dependency
(*DependencyServiceV2ConnectRequest)(nil), // 2: grpc.DependencyServiceV2ConnectRequest
(*DependencyServiceV2ConnectResponse)(nil), // 3: grpc.DependencyServiceV2ConnectResponse
(*DependencyServiceV2SyncRequest)(nil), // 4: grpc.DependencyServiceV2SyncRequest
(*DependencyServiceV2UpdateTaskLogRequest)(nil), // 5: grpc.DependencyServiceV2UpdateTaskLogRequest
(*Response)(nil), // 6: grpc.Response
}
var file_services_dependency_service_v2_proto_depIdxs = []int32{
0, // 0: grpc.DependencyServiceV2ConnectResponse.code:type_name -> grpc.DependencyServiceV2Code
1, // 1: grpc.DependencyServiceV2ConnectResponse.dependencies:type_name -> grpc.Dependency
1, // 2: grpc.DependencyServiceV2SyncRequest.dependencies:type_name -> grpc.Dependency
2, // 3: grpc.DependencyServiceV2.Connect:input_type -> grpc.DependencyServiceV2ConnectRequest
4, // 4: grpc.DependencyServiceV2.Sync:input_type -> grpc.DependencyServiceV2SyncRequest
5, // 5: grpc.DependencyServiceV2.UpdateTaskLog:input_type -> grpc.DependencyServiceV2UpdateTaskLogRequest
3, // 6: grpc.DependencyServiceV2.Connect:output_type -> grpc.DependencyServiceV2ConnectResponse
6, // 7: grpc.DependencyServiceV2.Sync:output_type -> grpc.Response
6, // 8: grpc.DependencyServiceV2.UpdateTaskLog:output_type -> grpc.Response
6, // [6:9] is the sub-list for method output_type
3, // [3:6] is the sub-list for method input_type
3, // [3:3] is the sub-list for extension type_name
3, // [3:3] is the sub-list for extension extendee
0, // [0:3] is the sub-list for field type_name
}
func init() { file_services_dependency_service_v2_proto_init() }
func file_services_dependency_service_v2_proto_init() {
if File_services_dependency_service_v2_proto != nil {
return
}
file_entity_response_proto_init()
if !protoimpl.UnsafeEnabled {
file_services_dependency_service_v2_proto_msgTypes[0].Exporter = func(v any, i int) any {
switch v := v.(*Dependency); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_services_dependency_service_v2_proto_msgTypes[1].Exporter = func(v any, i int) any {
switch v := v.(*DependencyServiceV2ConnectRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_services_dependency_service_v2_proto_msgTypes[2].Exporter = func(v any, i int) any {
switch v := v.(*DependencyServiceV2ConnectResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_services_dependency_service_v2_proto_msgTypes[3].Exporter = func(v any, i int) any {
switch v := v.(*DependencyServiceV2SyncRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_services_dependency_service_v2_proto_msgTypes[4].Exporter = func(v any, i int) any {
switch v := v.(*DependencyServiceV2UpdateTaskLogRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_services_dependency_service_v2_proto_rawDesc,
NumEnums: 1,
NumMessages: 5,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_services_dependency_service_v2_proto_goTypes,
DependencyIndexes: file_services_dependency_service_v2_proto_depIdxs,
EnumInfos: file_services_dependency_service_v2_proto_enumTypes,
MessageInfos: file_services_dependency_service_v2_proto_msgTypes,
}.Build()
File_services_dependency_service_v2_proto = out.File
file_services_dependency_service_v2_proto_rawDesc = nil
file_services_dependency_service_v2_proto_goTypes = nil
file_services_dependency_service_v2_proto_depIdxs = nil
}

View File

@@ -1,248 +0,0 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.4.0
// - protoc v5.27.2
// source: services/dependency_service_v2.proto
package grpc
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.62.0 or later.
const _ = grpc.SupportPackageIsVersion8
const (
DependencyServiceV2_Connect_FullMethodName = "/grpc.DependencyServiceV2/Connect"
DependencyServiceV2_Sync_FullMethodName = "/grpc.DependencyServiceV2/Sync"
DependencyServiceV2_UpdateTaskLog_FullMethodName = "/grpc.DependencyServiceV2/UpdateTaskLog"
)
// DependencyServiceV2Client is the client API for DependencyServiceV2 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 DependencyServiceV2Client interface {
Connect(ctx context.Context, in *DependencyServiceV2ConnectRequest, opts ...grpc.CallOption) (DependencyServiceV2_ConnectClient, error)
Sync(ctx context.Context, in *DependencyServiceV2SyncRequest, opts ...grpc.CallOption) (*Response, error)
UpdateTaskLog(ctx context.Context, opts ...grpc.CallOption) (DependencyServiceV2_UpdateTaskLogClient, error)
}
type dependencyServiceV2Client struct {
cc grpc.ClientConnInterface
}
func NewDependencyServiceV2Client(cc grpc.ClientConnInterface) DependencyServiceV2Client {
return &dependencyServiceV2Client{cc}
}
func (c *dependencyServiceV2Client) Connect(ctx context.Context, in *DependencyServiceV2ConnectRequest, opts ...grpc.CallOption) (DependencyServiceV2_ConnectClient, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
stream, err := c.cc.NewStream(ctx, &DependencyServiceV2_ServiceDesc.Streams[0], DependencyServiceV2_Connect_FullMethodName, cOpts...)
if err != nil {
return nil, err
}
x := &dependencyServiceV2ConnectClient{ClientStream: 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 DependencyServiceV2_ConnectClient interface {
Recv() (*DependencyServiceV2ConnectResponse, error)
grpc.ClientStream
}
type dependencyServiceV2ConnectClient struct {
grpc.ClientStream
}
func (x *dependencyServiceV2ConnectClient) Recv() (*DependencyServiceV2ConnectResponse, error) {
m := new(DependencyServiceV2ConnectResponse)
if err := x.ClientStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
func (c *dependencyServiceV2Client) Sync(ctx context.Context, in *DependencyServiceV2SyncRequest, opts ...grpc.CallOption) (*Response, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(Response)
err := c.cc.Invoke(ctx, DependencyServiceV2_Sync_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *dependencyServiceV2Client) UpdateTaskLog(ctx context.Context, opts ...grpc.CallOption) (DependencyServiceV2_UpdateTaskLogClient, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
stream, err := c.cc.NewStream(ctx, &DependencyServiceV2_ServiceDesc.Streams[1], DependencyServiceV2_UpdateTaskLog_FullMethodName, cOpts...)
if err != nil {
return nil, err
}
x := &dependencyServiceV2UpdateTaskLogClient{ClientStream: stream}
return x, nil
}
type DependencyServiceV2_UpdateTaskLogClient interface {
Send(*DependencyServiceV2UpdateTaskLogRequest) error
CloseAndRecv() (*Response, error)
grpc.ClientStream
}
type dependencyServiceV2UpdateTaskLogClient struct {
grpc.ClientStream
}
func (x *dependencyServiceV2UpdateTaskLogClient) Send(m *DependencyServiceV2UpdateTaskLogRequest) error {
return x.ClientStream.SendMsg(m)
}
func (x *dependencyServiceV2UpdateTaskLogClient) CloseAndRecv() (*Response, error) {
if err := x.ClientStream.CloseSend(); err != nil {
return nil, err
}
m := new(Response)
if err := x.ClientStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
// DependencyServiceV2Server is the server API for DependencyServiceV2 service.
// All implementations must embed UnimplementedDependencyServiceV2Server
// for forward compatibility
type DependencyServiceV2Server interface {
Connect(*DependencyServiceV2ConnectRequest, DependencyServiceV2_ConnectServer) error
Sync(context.Context, *DependencyServiceV2SyncRequest) (*Response, error)
UpdateTaskLog(DependencyServiceV2_UpdateTaskLogServer) error
mustEmbedUnimplementedDependencyServiceV2Server()
}
// UnimplementedDependencyServiceV2Server must be embedded to have forward compatible implementations.
type UnimplementedDependencyServiceV2Server struct {
}
func (UnimplementedDependencyServiceV2Server) Connect(*DependencyServiceV2ConnectRequest, DependencyServiceV2_ConnectServer) error {
return status.Errorf(codes.Unimplemented, "method Connect not implemented")
}
func (UnimplementedDependencyServiceV2Server) Sync(context.Context, *DependencyServiceV2SyncRequest) (*Response, error) {
return nil, status.Errorf(codes.Unimplemented, "method Sync not implemented")
}
func (UnimplementedDependencyServiceV2Server) UpdateTaskLog(DependencyServiceV2_UpdateTaskLogServer) error {
return status.Errorf(codes.Unimplemented, "method UpdateTaskLog not implemented")
}
func (UnimplementedDependencyServiceV2Server) mustEmbedUnimplementedDependencyServiceV2Server() {}
// UnsafeDependencyServiceV2Server may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to DependencyServiceV2Server will
// result in compilation errors.
type UnsafeDependencyServiceV2Server interface {
mustEmbedUnimplementedDependencyServiceV2Server()
}
func RegisterDependencyServiceV2Server(s grpc.ServiceRegistrar, srv DependencyServiceV2Server) {
s.RegisterService(&DependencyServiceV2_ServiceDesc, srv)
}
func _DependencyServiceV2_Connect_Handler(srv interface{}, stream grpc.ServerStream) error {
m := new(DependencyServiceV2ConnectRequest)
if err := stream.RecvMsg(m); err != nil {
return err
}
return srv.(DependencyServiceV2Server).Connect(m, &dependencyServiceV2ConnectServer{ServerStream: stream})
}
type DependencyServiceV2_ConnectServer interface {
Send(*DependencyServiceV2ConnectResponse) error
grpc.ServerStream
}
type dependencyServiceV2ConnectServer struct {
grpc.ServerStream
}
func (x *dependencyServiceV2ConnectServer) Send(m *DependencyServiceV2ConnectResponse) error {
return x.ServerStream.SendMsg(m)
}
func _DependencyServiceV2_Sync_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DependencyServiceV2SyncRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(DependencyServiceV2Server).Sync(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: DependencyServiceV2_Sync_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(DependencyServiceV2Server).Sync(ctx, req.(*DependencyServiceV2SyncRequest))
}
return interceptor(ctx, in, info, handler)
}
func _DependencyServiceV2_UpdateTaskLog_Handler(srv interface{}, stream grpc.ServerStream) error {
return srv.(DependencyServiceV2Server).UpdateTaskLog(&dependencyServiceV2UpdateTaskLogServer{ServerStream: stream})
}
type DependencyServiceV2_UpdateTaskLogServer interface {
SendAndClose(*Response) error
Recv() (*DependencyServiceV2UpdateTaskLogRequest, error)
grpc.ServerStream
}
type dependencyServiceV2UpdateTaskLogServer struct {
grpc.ServerStream
}
func (x *dependencyServiceV2UpdateTaskLogServer) SendAndClose(m *Response) error {
return x.ServerStream.SendMsg(m)
}
func (x *dependencyServiceV2UpdateTaskLogServer) Recv() (*DependencyServiceV2UpdateTaskLogRequest, error) {
m := new(DependencyServiceV2UpdateTaskLogRequest)
if err := x.ServerStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
// DependencyServiceV2_ServiceDesc is the grpc.ServiceDesc for DependencyServiceV2 service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var DependencyServiceV2_ServiceDesc = grpc.ServiceDesc{
ServiceName: "grpc.DependencyServiceV2",
HandlerType: (*DependencyServiceV2Server)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Sync",
Handler: _DependencyServiceV2_Sync_Handler,
},
},
Streams: []grpc.StreamDesc{
{
StreamName: "Connect",
Handler: _DependencyServiceV2_Connect_Handler,
ServerStreams: true,
},
{
StreamName: "UpdateTaskLog",
Handler: _DependencyServiceV2_UpdateTaskLog_Handler,
ClientStreams: true,
},
},
Metadata: "services/dependency_service_v2.proto",
}

311
grpc/metric_service.pb.go Normal file
View File

@@ -0,0 +1,311 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.34.2
// protoc v5.27.2
// source: services/metric_service.proto
package grpc
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type MetricServiceSendRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`
NodeKey string `protobuf:"bytes,2,opt,name=node_key,json=nodeKey,proto3" json:"node_key,omitempty"`
Timestamp int64 `protobuf:"varint,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
CpuUsagePercent float32 `protobuf:"fixed32,4,opt,name=cpu_usage_percent,json=cpuUsagePercent,proto3" json:"cpu_usage_percent,omitempty"`
TotalMemory uint64 `protobuf:"varint,5,opt,name=total_memory,json=totalMemory,proto3" json:"total_memory,omitempty"`
AvailableMemory uint64 `protobuf:"varint,6,opt,name=available_memory,json=availableMemory,proto3" json:"available_memory,omitempty"`
UsedMemory uint64 `protobuf:"varint,7,opt,name=used_memory,json=usedMemory,proto3" json:"used_memory,omitempty"`
UsedMemoryPercent float32 `protobuf:"fixed32,8,opt,name=used_memory_percent,json=usedMemoryPercent,proto3" json:"used_memory_percent,omitempty"`
TotalDisk uint64 `protobuf:"varint,9,opt,name=total_disk,json=totalDisk,proto3" json:"total_disk,omitempty"`
AvailableDisk uint64 `protobuf:"varint,10,opt,name=available_disk,json=availableDisk,proto3" json:"available_disk,omitempty"`
UsedDisk uint64 `protobuf:"varint,11,opt,name=used_disk,json=usedDisk,proto3" json:"used_disk,omitempty"`
UsedDiskPercent float32 `protobuf:"fixed32,12,opt,name=used_disk_percent,json=usedDiskPercent,proto3" json:"used_disk_percent,omitempty"`
DiskReadBytesRate float32 `protobuf:"fixed32,15,opt,name=disk_read_bytes_rate,json=diskReadBytesRate,proto3" json:"disk_read_bytes_rate,omitempty"`
DiskWriteBytesRate float32 `protobuf:"fixed32,16,opt,name=disk_write_bytes_rate,json=diskWriteBytesRate,proto3" json:"disk_write_bytes_rate,omitempty"`
NetworkBytesSentRate float32 `protobuf:"fixed32,17,opt,name=network_bytes_sent_rate,json=networkBytesSentRate,proto3" json:"network_bytes_sent_rate,omitempty"`
NetworkBytesRecvRate float32 `protobuf:"fixed32,18,opt,name=network_bytes_recv_rate,json=networkBytesRecvRate,proto3" json:"network_bytes_recv_rate,omitempty"`
}
func (x *MetricServiceSendRequest) Reset() {
*x = MetricServiceSendRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_services_metric_service_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MetricServiceSendRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MetricServiceSendRequest) ProtoMessage() {}
func (x *MetricServiceSendRequest) ProtoReflect() protoreflect.Message {
mi := &file_services_metric_service_proto_msgTypes[0]
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 MetricServiceSendRequest.ProtoReflect.Descriptor instead.
func (*MetricServiceSendRequest) Descriptor() ([]byte, []int) {
return file_services_metric_service_proto_rawDescGZIP(), []int{0}
}
func (x *MetricServiceSendRequest) GetType() string {
if x != nil {
return x.Type
}
return ""
}
func (x *MetricServiceSendRequest) GetNodeKey() string {
if x != nil {
return x.NodeKey
}
return ""
}
func (x *MetricServiceSendRequest) GetTimestamp() int64 {
if x != nil {
return x.Timestamp
}
return 0
}
func (x *MetricServiceSendRequest) GetCpuUsagePercent() float32 {
if x != nil {
return x.CpuUsagePercent
}
return 0
}
func (x *MetricServiceSendRequest) GetTotalMemory() uint64 {
if x != nil {
return x.TotalMemory
}
return 0
}
func (x *MetricServiceSendRequest) GetAvailableMemory() uint64 {
if x != nil {
return x.AvailableMemory
}
return 0
}
func (x *MetricServiceSendRequest) GetUsedMemory() uint64 {
if x != nil {
return x.UsedMemory
}
return 0
}
func (x *MetricServiceSendRequest) GetUsedMemoryPercent() float32 {
if x != nil {
return x.UsedMemoryPercent
}
return 0
}
func (x *MetricServiceSendRequest) GetTotalDisk() uint64 {
if x != nil {
return x.TotalDisk
}
return 0
}
func (x *MetricServiceSendRequest) GetAvailableDisk() uint64 {
if x != nil {
return x.AvailableDisk
}
return 0
}
func (x *MetricServiceSendRequest) GetUsedDisk() uint64 {
if x != nil {
return x.UsedDisk
}
return 0
}
func (x *MetricServiceSendRequest) GetUsedDiskPercent() float32 {
if x != nil {
return x.UsedDiskPercent
}
return 0
}
func (x *MetricServiceSendRequest) GetDiskReadBytesRate() float32 {
if x != nil {
return x.DiskReadBytesRate
}
return 0
}
func (x *MetricServiceSendRequest) GetDiskWriteBytesRate() float32 {
if x != nil {
return x.DiskWriteBytesRate
}
return 0
}
func (x *MetricServiceSendRequest) GetNetworkBytesSentRate() float32 {
if x != nil {
return x.NetworkBytesSentRate
}
return 0
}
func (x *MetricServiceSendRequest) GetNetworkBytesRecvRate() float32 {
if x != nil {
return x.NetworkBytesRecvRate
}
return 0
}
var File_services_metric_service_proto protoreflect.FileDescriptor
var file_services_metric_service_proto_rawDesc = []byte{
0x0a, 0x1d, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2f, 0x6d, 0x65, 0x74, 0x72, 0x69,
0x63, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12,
0x04, 0x67, 0x72, 0x70, 0x63, 0x1a, 0x15, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2f, 0x72, 0x65,
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x93, 0x05, 0x0a,
0x18, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x53, 0x65,
0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70,
0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x19, 0x0a,
0x08, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
0x07, 0x6e, 0x6f, 0x64, 0x65, 0x4b, 0x65, 0x79, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65,
0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d,
0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x2a, 0x0a, 0x11, 0x63, 0x70, 0x75, 0x5f, 0x75, 0x73,
0x61, 0x67, 0x65, 0x5f, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28,
0x02, 0x52, 0x0f, 0x63, 0x70, 0x75, 0x55, 0x73, 0x61, 0x67, 0x65, 0x50, 0x65, 0x72, 0x63, 0x65,
0x6e, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x6d, 0x65, 0x6d, 0x6f,
0x72, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x4d,
0x65, 0x6d, 0x6f, 0x72, 0x79, 0x12, 0x29, 0x0a, 0x10, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62,
0x6c, 0x65, 0x5f, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x52,
0x0f, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x4d, 0x65, 0x6d, 0x6f, 0x72, 0x79,
0x12, 0x1f, 0x0a, 0x0b, 0x75, 0x73, 0x65, 0x64, 0x5f, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x18,
0x07, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x75, 0x73, 0x65, 0x64, 0x4d, 0x65, 0x6d, 0x6f, 0x72,
0x79, 0x12, 0x2e, 0x0a, 0x13, 0x75, 0x73, 0x65, 0x64, 0x5f, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79,
0x5f, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x02, 0x52, 0x11,
0x75, 0x73, 0x65, 0x64, 0x4d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e,
0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x64, 0x69, 0x73, 0x6b, 0x18,
0x09, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x44, 0x69, 0x73, 0x6b,
0x12, 0x25, 0x0a, 0x0e, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x64, 0x69,
0x73, 0x6b, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0d, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61,
0x62, 0x6c, 0x65, 0x44, 0x69, 0x73, 0x6b, 0x12, 0x1b, 0x0a, 0x09, 0x75, 0x73, 0x65, 0x64, 0x5f,
0x64, 0x69, 0x73, 0x6b, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x75, 0x73, 0x65, 0x64,
0x44, 0x69, 0x73, 0x6b, 0x12, 0x2a, 0x0a, 0x11, 0x75, 0x73, 0x65, 0x64, 0x5f, 0x64, 0x69, 0x73,
0x6b, 0x5f, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x02, 0x52,
0x0f, 0x75, 0x73, 0x65, 0x64, 0x44, 0x69, 0x73, 0x6b, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74,
0x12, 0x2f, 0x0a, 0x14, 0x64, 0x69, 0x73, 0x6b, 0x5f, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x62, 0x79,
0x74, 0x65, 0x73, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x02, 0x52, 0x11,
0x64, 0x69, 0x73, 0x6b, 0x52, 0x65, 0x61, 0x64, 0x42, 0x79, 0x74, 0x65, 0x73, 0x52, 0x61, 0x74,
0x65, 0x12, 0x31, 0x0a, 0x15, 0x64, 0x69, 0x73, 0x6b, 0x5f, 0x77, 0x72, 0x69, 0x74, 0x65, 0x5f,
0x62, 0x79, 0x74, 0x65, 0x73, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x10, 0x20, 0x01, 0x28, 0x02,
0x52, 0x12, 0x64, 0x69, 0x73, 0x6b, 0x57, 0x72, 0x69, 0x74, 0x65, 0x42, 0x79, 0x74, 0x65, 0x73,
0x52, 0x61, 0x74, 0x65, 0x12, 0x35, 0x0a, 0x17, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5f,
0x62, 0x79, 0x74, 0x65, 0x73, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18,
0x11, 0x20, 0x01, 0x28, 0x02, 0x52, 0x14, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x42, 0x79,
0x74, 0x65, 0x73, 0x53, 0x65, 0x6e, 0x74, 0x52, 0x61, 0x74, 0x65, 0x12, 0x35, 0x0a, 0x17, 0x6e,
0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x5f, 0x72, 0x65, 0x63,
0x76, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x12, 0x20, 0x01, 0x28, 0x02, 0x52, 0x14, 0x6e, 0x65,
0x74, 0x77, 0x6f, 0x72, 0x6b, 0x42, 0x79, 0x74, 0x65, 0x73, 0x52, 0x65, 0x63, 0x76, 0x52, 0x61,
0x74, 0x65, 0x32, 0x49, 0x0a, 0x0d, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x53, 0x65, 0x72, 0x76,
0x69, 0x63, 0x65, 0x12, 0x38, 0x0a, 0x04, 0x53, 0x65, 0x6e, 0x64, 0x12, 0x1e, 0x2e, 0x67, 0x72,
0x70, 0x63, 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
0x53, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x67, 0x72,
0x70, 0x63, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x08, 0x5a,
0x06, 0x2e, 0x3b, 0x67, 0x72, 0x70, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_services_metric_service_proto_rawDescOnce sync.Once
file_services_metric_service_proto_rawDescData = file_services_metric_service_proto_rawDesc
)
func file_services_metric_service_proto_rawDescGZIP() []byte {
file_services_metric_service_proto_rawDescOnce.Do(func() {
file_services_metric_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_services_metric_service_proto_rawDescData)
})
return file_services_metric_service_proto_rawDescData
}
var file_services_metric_service_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_services_metric_service_proto_goTypes = []any{
(*MetricServiceSendRequest)(nil), // 0: grpc.MetricServiceSendRequest
(*Response)(nil), // 1: grpc.Response
}
var file_services_metric_service_proto_depIdxs = []int32{
0, // 0: grpc.MetricService.Send:input_type -> grpc.MetricServiceSendRequest
1, // 1: grpc.MetricService.Send:output_type -> grpc.Response
1, // [1:2] is the sub-list for method output_type
0, // [0:1] is the sub-list for method input_type
0, // [0:0] is the sub-list for extension type_name
0, // [0:0] is the sub-list for extension extendee
0, // [0:0] is the sub-list for field type_name
}
func init() { file_services_metric_service_proto_init() }
func file_services_metric_service_proto_init() {
if File_services_metric_service_proto != nil {
return
}
file_entity_response_proto_init()
if !protoimpl.UnsafeEnabled {
file_services_metric_service_proto_msgTypes[0].Exporter = func(v any, i int) any {
switch v := v.(*MetricServiceSendRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_services_metric_service_proto_rawDesc,
NumEnums: 0,
NumMessages: 1,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_services_metric_service_proto_goTypes,
DependencyIndexes: file_services_metric_service_proto_depIdxs,
MessageInfos: file_services_metric_service_proto_msgTypes,
}.Build()
File_services_metric_service_proto = out.File
file_services_metric_service_proto_rawDesc = nil
file_services_metric_service_proto_goTypes = nil
file_services_metric_service_proto_depIdxs = nil
}

View File

@@ -0,0 +1,110 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.4.0
// - protoc v5.27.2
// source: services/metric_service.proto
package grpc
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.62.0 or later.
const _ = grpc.SupportPackageIsVersion8
const (
MetricService_Send_FullMethodName = "/grpc.MetricService/Send"
)
// MetricServiceClient is the client API for MetricService 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 MetricServiceClient interface {
Send(ctx context.Context, in *MetricServiceSendRequest, opts ...grpc.CallOption) (*Response, error)
}
type metricServiceClient struct {
cc grpc.ClientConnInterface
}
func NewMetricServiceClient(cc grpc.ClientConnInterface) MetricServiceClient {
return &metricServiceClient{cc}
}
func (c *metricServiceClient) Send(ctx context.Context, in *MetricServiceSendRequest, opts ...grpc.CallOption) (*Response, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(Response)
err := c.cc.Invoke(ctx, MetricService_Send_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
// MetricServiceServer is the server API for MetricService service.
// All implementations must embed UnimplementedMetricServiceServer
// for forward compatibility
type MetricServiceServer interface {
Send(context.Context, *MetricServiceSendRequest) (*Response, error)
mustEmbedUnimplementedMetricServiceServer()
}
// UnimplementedMetricServiceServer must be embedded to have forward compatible implementations.
type UnimplementedMetricServiceServer struct {
}
func (UnimplementedMetricServiceServer) Send(context.Context, *MetricServiceSendRequest) (*Response, error) {
return nil, status.Errorf(codes.Unimplemented, "method Send not implemented")
}
func (UnimplementedMetricServiceServer) mustEmbedUnimplementedMetricServiceServer() {}
// UnsafeMetricServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to MetricServiceServer will
// result in compilation errors.
type UnsafeMetricServiceServer interface {
mustEmbedUnimplementedMetricServiceServer()
}
func RegisterMetricServiceServer(s grpc.ServiceRegistrar, srv MetricServiceServer) {
s.RegisterService(&MetricService_ServiceDesc, srv)
}
func _MetricService_Send_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(MetricServiceSendRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(MetricServiceServer).Send(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: MetricService_Send_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(MetricServiceServer).Send(ctx, req.(*MetricServiceSendRequest))
}
return interceptor(ctx, in, info, handler)
}
// MetricService_ServiceDesc is the grpc.ServiceDesc for MetricService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var MetricService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "grpc.MetricService",
HandlerType: (*MetricServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Send",
Handler: _MetricService_Send_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "services/metric_service.proto",
}

View File

@@ -1,312 +0,0 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.34.2
// protoc v5.27.2
// source: services/metric_service_v2.proto
package grpc
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type MetricServiceV2SendRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`
NodeKey string `protobuf:"bytes,2,opt,name=node_key,json=nodeKey,proto3" json:"node_key,omitempty"`
Timestamp int64 `protobuf:"varint,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
CpuUsagePercent float32 `protobuf:"fixed32,4,opt,name=cpu_usage_percent,json=cpuUsagePercent,proto3" json:"cpu_usage_percent,omitempty"`
TotalMemory uint64 `protobuf:"varint,5,opt,name=total_memory,json=totalMemory,proto3" json:"total_memory,omitempty"`
AvailableMemory uint64 `protobuf:"varint,6,opt,name=available_memory,json=availableMemory,proto3" json:"available_memory,omitempty"`
UsedMemory uint64 `protobuf:"varint,7,opt,name=used_memory,json=usedMemory,proto3" json:"used_memory,omitempty"`
UsedMemoryPercent float32 `protobuf:"fixed32,8,opt,name=used_memory_percent,json=usedMemoryPercent,proto3" json:"used_memory_percent,omitempty"`
TotalDisk uint64 `protobuf:"varint,9,opt,name=total_disk,json=totalDisk,proto3" json:"total_disk,omitempty"`
AvailableDisk uint64 `protobuf:"varint,10,opt,name=available_disk,json=availableDisk,proto3" json:"available_disk,omitempty"`
UsedDisk uint64 `protobuf:"varint,11,opt,name=used_disk,json=usedDisk,proto3" json:"used_disk,omitempty"`
UsedDiskPercent float32 `protobuf:"fixed32,12,opt,name=used_disk_percent,json=usedDiskPercent,proto3" json:"used_disk_percent,omitempty"`
DiskReadBytesRate float32 `protobuf:"fixed32,15,opt,name=disk_read_bytes_rate,json=diskReadBytesRate,proto3" json:"disk_read_bytes_rate,omitempty"`
DiskWriteBytesRate float32 `protobuf:"fixed32,16,opt,name=disk_write_bytes_rate,json=diskWriteBytesRate,proto3" json:"disk_write_bytes_rate,omitempty"`
NetworkBytesSentRate float32 `protobuf:"fixed32,17,opt,name=network_bytes_sent_rate,json=networkBytesSentRate,proto3" json:"network_bytes_sent_rate,omitempty"`
NetworkBytesRecvRate float32 `protobuf:"fixed32,18,opt,name=network_bytes_recv_rate,json=networkBytesRecvRate,proto3" json:"network_bytes_recv_rate,omitempty"`
}
func (x *MetricServiceV2SendRequest) Reset() {
*x = MetricServiceV2SendRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_services_metric_service_v2_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MetricServiceV2SendRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MetricServiceV2SendRequest) ProtoMessage() {}
func (x *MetricServiceV2SendRequest) ProtoReflect() protoreflect.Message {
mi := &file_services_metric_service_v2_proto_msgTypes[0]
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 MetricServiceV2SendRequest.ProtoReflect.Descriptor instead.
func (*MetricServiceV2SendRequest) Descriptor() ([]byte, []int) {
return file_services_metric_service_v2_proto_rawDescGZIP(), []int{0}
}
func (x *MetricServiceV2SendRequest) GetType() string {
if x != nil {
return x.Type
}
return ""
}
func (x *MetricServiceV2SendRequest) GetNodeKey() string {
if x != nil {
return x.NodeKey
}
return ""
}
func (x *MetricServiceV2SendRequest) GetTimestamp() int64 {
if x != nil {
return x.Timestamp
}
return 0
}
func (x *MetricServiceV2SendRequest) GetCpuUsagePercent() float32 {
if x != nil {
return x.CpuUsagePercent
}
return 0
}
func (x *MetricServiceV2SendRequest) GetTotalMemory() uint64 {
if x != nil {
return x.TotalMemory
}
return 0
}
func (x *MetricServiceV2SendRequest) GetAvailableMemory() uint64 {
if x != nil {
return x.AvailableMemory
}
return 0
}
func (x *MetricServiceV2SendRequest) GetUsedMemory() uint64 {
if x != nil {
return x.UsedMemory
}
return 0
}
func (x *MetricServiceV2SendRequest) GetUsedMemoryPercent() float32 {
if x != nil {
return x.UsedMemoryPercent
}
return 0
}
func (x *MetricServiceV2SendRequest) GetTotalDisk() uint64 {
if x != nil {
return x.TotalDisk
}
return 0
}
func (x *MetricServiceV2SendRequest) GetAvailableDisk() uint64 {
if x != nil {
return x.AvailableDisk
}
return 0
}
func (x *MetricServiceV2SendRequest) GetUsedDisk() uint64 {
if x != nil {
return x.UsedDisk
}
return 0
}
func (x *MetricServiceV2SendRequest) GetUsedDiskPercent() float32 {
if x != nil {
return x.UsedDiskPercent
}
return 0
}
func (x *MetricServiceV2SendRequest) GetDiskReadBytesRate() float32 {
if x != nil {
return x.DiskReadBytesRate
}
return 0
}
func (x *MetricServiceV2SendRequest) GetDiskWriteBytesRate() float32 {
if x != nil {
return x.DiskWriteBytesRate
}
return 0
}
func (x *MetricServiceV2SendRequest) GetNetworkBytesSentRate() float32 {
if x != nil {
return x.NetworkBytesSentRate
}
return 0
}
func (x *MetricServiceV2SendRequest) GetNetworkBytesRecvRate() float32 {
if x != nil {
return x.NetworkBytesRecvRate
}
return 0
}
var File_services_metric_service_v2_proto protoreflect.FileDescriptor
var file_services_metric_service_v2_proto_rawDesc = []byte{
0x0a, 0x20, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2f, 0x6d, 0x65, 0x74, 0x72, 0x69,
0x63, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x76, 0x32, 0x2e, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x12, 0x04, 0x67, 0x72, 0x70, 0x63, 0x1a, 0x15, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79,
0x2f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22,
0x95, 0x05, 0x0a, 0x1a, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63,
0x65, 0x56, 0x32, 0x53, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12,
0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79,
0x70, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02,
0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6e, 0x6f, 0x64, 0x65, 0x4b, 0x65, 0x79, 0x12, 0x1c, 0x0a,
0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03,
0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x2a, 0x0a, 0x11, 0x63,
0x70, 0x75, 0x5f, 0x75, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74,
0x18, 0x04, 0x20, 0x01, 0x28, 0x02, 0x52, 0x0f, 0x63, 0x70, 0x75, 0x55, 0x73, 0x61, 0x67, 0x65,
0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x74, 0x6f, 0x74, 0x61, 0x6c,
0x5f, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x74,
0x6f, 0x74, 0x61, 0x6c, 0x4d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x12, 0x29, 0x0a, 0x10, 0x61, 0x76,
0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x18, 0x06,
0x20, 0x01, 0x28, 0x04, 0x52, 0x0f, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x4d,
0x65, 0x6d, 0x6f, 0x72, 0x79, 0x12, 0x1f, 0x0a, 0x0b, 0x75, 0x73, 0x65, 0x64, 0x5f, 0x6d, 0x65,
0x6d, 0x6f, 0x72, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x75, 0x73, 0x65, 0x64,
0x4d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x12, 0x2e, 0x0a, 0x13, 0x75, 0x73, 0x65, 0x64, 0x5f, 0x6d,
0x65, 0x6d, 0x6f, 0x72, 0x79, 0x5f, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x18, 0x08, 0x20,
0x01, 0x28, 0x02, 0x52, 0x11, 0x75, 0x73, 0x65, 0x64, 0x4d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x50,
0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f,
0x64, 0x69, 0x73, 0x6b, 0x18, 0x09, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x74, 0x6f, 0x74, 0x61,
0x6c, 0x44, 0x69, 0x73, 0x6b, 0x12, 0x25, 0x0a, 0x0e, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62,
0x6c, 0x65, 0x5f, 0x64, 0x69, 0x73, 0x6b, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0d, 0x61,
0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x44, 0x69, 0x73, 0x6b, 0x12, 0x1b, 0x0a, 0x09,
0x75, 0x73, 0x65, 0x64, 0x5f, 0x64, 0x69, 0x73, 0x6b, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x04, 0x52,
0x08, 0x75, 0x73, 0x65, 0x64, 0x44, 0x69, 0x73, 0x6b, 0x12, 0x2a, 0x0a, 0x11, 0x75, 0x73, 0x65,
0x64, 0x5f, 0x64, 0x69, 0x73, 0x6b, 0x5f, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x18, 0x0c,
0x20, 0x01, 0x28, 0x02, 0x52, 0x0f, 0x75, 0x73, 0x65, 0x64, 0x44, 0x69, 0x73, 0x6b, 0x50, 0x65,
0x72, 0x63, 0x65, 0x6e, 0x74, 0x12, 0x2f, 0x0a, 0x14, 0x64, 0x69, 0x73, 0x6b, 0x5f, 0x72, 0x65,
0x61, 0x64, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x0f, 0x20,
0x01, 0x28, 0x02, 0x52, 0x11, 0x64, 0x69, 0x73, 0x6b, 0x52, 0x65, 0x61, 0x64, 0x42, 0x79, 0x74,
0x65, 0x73, 0x52, 0x61, 0x74, 0x65, 0x12, 0x31, 0x0a, 0x15, 0x64, 0x69, 0x73, 0x6b, 0x5f, 0x77,
0x72, 0x69, 0x74, 0x65, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18,
0x10, 0x20, 0x01, 0x28, 0x02, 0x52, 0x12, 0x64, 0x69, 0x73, 0x6b, 0x57, 0x72, 0x69, 0x74, 0x65,
0x42, 0x79, 0x74, 0x65, 0x73, 0x52, 0x61, 0x74, 0x65, 0x12, 0x35, 0x0a, 0x17, 0x6e, 0x65, 0x74,
0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x5f,
0x72, 0x61, 0x74, 0x65, 0x18, 0x11, 0x20, 0x01, 0x28, 0x02, 0x52, 0x14, 0x6e, 0x65, 0x74, 0x77,
0x6f, 0x72, 0x6b, 0x42, 0x79, 0x74, 0x65, 0x73, 0x53, 0x65, 0x6e, 0x74, 0x52, 0x61, 0x74, 0x65,
0x12, 0x35, 0x0a, 0x17, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x62, 0x79, 0x74, 0x65,
0x73, 0x5f, 0x72, 0x65, 0x63, 0x76, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x12, 0x20, 0x01, 0x28,
0x02, 0x52, 0x14, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x42, 0x79, 0x74, 0x65, 0x73, 0x52,
0x65, 0x63, 0x76, 0x52, 0x61, 0x74, 0x65, 0x32, 0x4d, 0x0a, 0x0f, 0x4d, 0x65, 0x74, 0x72, 0x69,
0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x56, 0x32, 0x12, 0x3a, 0x0a, 0x04, 0x53, 0x65,
0x6e, 0x64, 0x12, 0x20, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63,
0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x56, 0x32, 0x53, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x73, 0x70,
0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x08, 0x5a, 0x06, 0x2e, 0x3b, 0x67, 0x72, 0x70, 0x63,
0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_services_metric_service_v2_proto_rawDescOnce sync.Once
file_services_metric_service_v2_proto_rawDescData = file_services_metric_service_v2_proto_rawDesc
)
func file_services_metric_service_v2_proto_rawDescGZIP() []byte {
file_services_metric_service_v2_proto_rawDescOnce.Do(func() {
file_services_metric_service_v2_proto_rawDescData = protoimpl.X.CompressGZIP(file_services_metric_service_v2_proto_rawDescData)
})
return file_services_metric_service_v2_proto_rawDescData
}
var file_services_metric_service_v2_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_services_metric_service_v2_proto_goTypes = []any{
(*MetricServiceV2SendRequest)(nil), // 0: grpc.MetricServiceV2SendRequest
(*Response)(nil), // 1: grpc.Response
}
var file_services_metric_service_v2_proto_depIdxs = []int32{
0, // 0: grpc.MetricServiceV2.Send:input_type -> grpc.MetricServiceV2SendRequest
1, // 1: grpc.MetricServiceV2.Send:output_type -> grpc.Response
1, // [1:2] is the sub-list for method output_type
0, // [0:1] is the sub-list for method input_type
0, // [0:0] is the sub-list for extension type_name
0, // [0:0] is the sub-list for extension extendee
0, // [0:0] is the sub-list for field type_name
}
func init() { file_services_metric_service_v2_proto_init() }
func file_services_metric_service_v2_proto_init() {
if File_services_metric_service_v2_proto != nil {
return
}
file_entity_response_proto_init()
if !protoimpl.UnsafeEnabled {
file_services_metric_service_v2_proto_msgTypes[0].Exporter = func(v any, i int) any {
switch v := v.(*MetricServiceV2SendRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_services_metric_service_v2_proto_rawDesc,
NumEnums: 0,
NumMessages: 1,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_services_metric_service_v2_proto_goTypes,
DependencyIndexes: file_services_metric_service_v2_proto_depIdxs,
MessageInfos: file_services_metric_service_v2_proto_msgTypes,
}.Build()
File_services_metric_service_v2_proto = out.File
file_services_metric_service_v2_proto_rawDesc = nil
file_services_metric_service_v2_proto_goTypes = nil
file_services_metric_service_v2_proto_depIdxs = nil
}

View File

@@ -1,110 +0,0 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.4.0
// - protoc v5.27.2
// source: services/metric_service_v2.proto
package grpc
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.62.0 or later.
const _ = grpc.SupportPackageIsVersion8
const (
MetricServiceV2_Send_FullMethodName = "/grpc.MetricServiceV2/Send"
)
// MetricServiceV2Client is the client API for MetricServiceV2 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 MetricServiceV2Client interface {
Send(ctx context.Context, in *MetricServiceV2SendRequest, opts ...grpc.CallOption) (*Response, error)
}
type metricServiceV2Client struct {
cc grpc.ClientConnInterface
}
func NewMetricServiceV2Client(cc grpc.ClientConnInterface) MetricServiceV2Client {
return &metricServiceV2Client{cc}
}
func (c *metricServiceV2Client) Send(ctx context.Context, in *MetricServiceV2SendRequest, opts ...grpc.CallOption) (*Response, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(Response)
err := c.cc.Invoke(ctx, MetricServiceV2_Send_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
// MetricServiceV2Server is the server API for MetricServiceV2 service.
// All implementations must embed UnimplementedMetricServiceV2Server
// for forward compatibility
type MetricServiceV2Server interface {
Send(context.Context, *MetricServiceV2SendRequest) (*Response, error)
mustEmbedUnimplementedMetricServiceV2Server()
}
// UnimplementedMetricServiceV2Server must be embedded to have forward compatible implementations.
type UnimplementedMetricServiceV2Server struct {
}
func (UnimplementedMetricServiceV2Server) Send(context.Context, *MetricServiceV2SendRequest) (*Response, error) {
return nil, status.Errorf(codes.Unimplemented, "method Send not implemented")
}
func (UnimplementedMetricServiceV2Server) mustEmbedUnimplementedMetricServiceV2Server() {}
// UnsafeMetricServiceV2Server may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to MetricServiceV2Server will
// result in compilation errors.
type UnsafeMetricServiceV2Server interface {
mustEmbedUnimplementedMetricServiceV2Server()
}
func RegisterMetricServiceV2Server(s grpc.ServiceRegistrar, srv MetricServiceV2Server) {
s.RegisterService(&MetricServiceV2_ServiceDesc, srv)
}
func _MetricServiceV2_Send_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(MetricServiceV2SendRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(MetricServiceV2Server).Send(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: MetricServiceV2_Send_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(MetricServiceV2Server).Send(ctx, req.(*MetricServiceV2SendRequest))
}
return interceptor(ctx, in, info, handler)
}
// MetricServiceV2_ServiceDesc is the grpc.ServiceDesc for MetricServiceV2 service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var MetricServiceV2_ServiceDesc = grpc.ServiceDesc{
ServiceName: "grpc.MetricServiceV2",
HandlerType: (*MetricServiceV2Server)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Send",
Handler: _MetricServiceV2_Send_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "services/metric_service_v2.proto",
}

View File

@@ -0,0 +1,171 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.34.2
// protoc v5.27.2
// source: services/model_base_service.proto
package grpc
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
var File_services_model_base_service_proto protoreflect.FileDescriptor
var file_services_model_base_service_proto_rawDesc = []byte{
0x0a, 0x21, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c,
0x5f, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x12, 0x04, 0x67, 0x72, 0x70, 0x63, 0x1a, 0x22, 0x65, 0x6e, 0x74, 0x69, 0x74,
0x79, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f,
0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x15, 0x65,
0x6e, 0x74, 0x69, 0x74, 0x79, 0x2f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x32, 0xb6, 0x07, 0x0a, 0x10, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x42, 0x61,
0x73, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x3d, 0x0a, 0x07, 0x47, 0x65, 0x74,
0x42, 0x79, 0x49, 0x64, 0x12, 0x20, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x4d, 0x6f, 0x64, 0x65,
0x6c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x47, 0x65, 0x74, 0x42, 0x79, 0x49, 0x64, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65,
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x3b, 0x0a, 0x06, 0x47, 0x65, 0x74, 0x4f,
0x6e, 0x65, 0x12, 0x1f, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x53,
0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x47, 0x65, 0x74, 0x4f, 0x6e, 0x65, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f,
0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x3d, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x4d, 0x61, 0x6e, 0x79,
0x12, 0x20, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x53, 0x65, 0x72,
0x76, 0x69, 0x63, 0x65, 0x47, 0x65, 0x74, 0x4d, 0x61, 0x6e, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
0x73, 0x65, 0x22, 0x00, 0x12, 0x43, 0x0a, 0x0a, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x42, 0x79,
0x49, 0x64, 0x12, 0x23, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x53,
0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x42, 0x79, 0x49, 0x64,
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x52,
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x41, 0x0a, 0x09, 0x44, 0x65, 0x6c,
0x65, 0x74, 0x65, 0x4f, 0x6e, 0x65, 0x12, 0x22, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x4d, 0x6f,
0x64, 0x65, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65,
0x4f, 0x6e, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x67, 0x72, 0x70,
0x63, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x43, 0x0a, 0x0a,
0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4d, 0x61, 0x6e, 0x79, 0x12, 0x23, 0x2e, 0x67, 0x72, 0x70,
0x63, 0x2e, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x44, 0x65,
0x6c, 0x65, 0x74, 0x65, 0x4d, 0x61, 0x6e, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
0x0e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22,
0x00, 0x12, 0x43, 0x0a, 0x0a, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x79, 0x49, 0x64, 0x12,
0x23, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x53, 0x65, 0x72, 0x76,
0x69, 0x63, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x79, 0x49, 0x64, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x73, 0x70,
0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x41, 0x0a, 0x09, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65,
0x4f, 0x6e, 0x65, 0x12, 0x22, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x4d, 0x6f, 0x64, 0x65, 0x6c,
0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4f, 0x6e, 0x65,
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x52,
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x43, 0x0a, 0x0a, 0x55, 0x70, 0x64,
0x61, 0x74, 0x65, 0x4d, 0x61, 0x6e, 0x79, 0x12, 0x23, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x4d,
0x6f, 0x64, 0x65, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74,
0x65, 0x4d, 0x61, 0x6e, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x67,
0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x45,
0x0a, 0x0b, 0x52, 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x42, 0x79, 0x49, 0x64, 0x12, 0x24, 0x2e,
0x67, 0x72, 0x70, 0x63, 0x2e, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63,
0x65, 0x52, 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x42, 0x79, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f,
0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x43, 0x0a, 0x0a, 0x52, 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65,
0x4f, 0x6e, 0x65, 0x12, 0x23, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x4d, 0x6f, 0x64, 0x65, 0x6c,
0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x4f, 0x6e,
0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e,
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x41, 0x0a, 0x09, 0x49, 0x6e,
0x73, 0x65, 0x72, 0x74, 0x4f, 0x6e, 0x65, 0x12, 0x22, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x4d,
0x6f, 0x64, 0x65, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, 0x6e, 0x73, 0x65, 0x72,
0x74, 0x4f, 0x6e, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x67, 0x72,
0x70, 0x63, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x43, 0x0a,
0x0a, 0x49, 0x6e, 0x73, 0x65, 0x72, 0x74, 0x4d, 0x61, 0x6e, 0x79, 0x12, 0x23, 0x2e, 0x67, 0x72,
0x70, 0x63, 0x2e, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49,
0x6e, 0x73, 0x65, 0x72, 0x74, 0x4d, 0x61, 0x6e, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x1a, 0x0e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x22, 0x00, 0x12, 0x39, 0x0a, 0x05, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1e, 0x2e, 0x67, 0x72,
0x70, 0x63, 0x2e, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x43,
0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x67, 0x72,
0x70, 0x63, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x08, 0x5a,
0x06, 0x2e, 0x3b, 0x67, 0x72, 0x70, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var file_services_model_base_service_proto_goTypes = []any{
(*ModelServiceGetByIdRequest)(nil), // 0: grpc.ModelServiceGetByIdRequest
(*ModelServiceGetOneRequest)(nil), // 1: grpc.ModelServiceGetOneRequest
(*ModelServiceGetManyRequest)(nil), // 2: grpc.ModelServiceGetManyRequest
(*ModelServiceDeleteByIdRequest)(nil), // 3: grpc.ModelServiceDeleteByIdRequest
(*ModelServiceDeleteOneRequest)(nil), // 4: grpc.ModelServiceDeleteOneRequest
(*ModelServiceDeleteManyRequest)(nil), // 5: grpc.ModelServiceDeleteManyRequest
(*ModelServiceUpdateByIdRequest)(nil), // 6: grpc.ModelServiceUpdateByIdRequest
(*ModelServiceUpdateOneRequest)(nil), // 7: grpc.ModelServiceUpdateOneRequest
(*ModelServiceUpdateManyRequest)(nil), // 8: grpc.ModelServiceUpdateManyRequest
(*ModelServiceReplaceByIdRequest)(nil), // 9: grpc.ModelServiceReplaceByIdRequest
(*ModelServiceReplaceOneRequest)(nil), // 10: grpc.ModelServiceReplaceOneRequest
(*ModelServiceInsertOneRequest)(nil), // 11: grpc.ModelServiceInsertOneRequest
(*ModelServiceInsertManyRequest)(nil), // 12: grpc.ModelServiceInsertManyRequest
(*ModelServiceCountRequest)(nil), // 13: grpc.ModelServiceCountRequest
(*Response)(nil), // 14: grpc.Response
}
var file_services_model_base_service_proto_depIdxs = []int32{
0, // 0: grpc.ModelBaseService.GetById:input_type -> grpc.ModelServiceGetByIdRequest
1, // 1: grpc.ModelBaseService.GetOne:input_type -> grpc.ModelServiceGetOneRequest
2, // 2: grpc.ModelBaseService.GetMany:input_type -> grpc.ModelServiceGetManyRequest
3, // 3: grpc.ModelBaseService.DeleteById:input_type -> grpc.ModelServiceDeleteByIdRequest
4, // 4: grpc.ModelBaseService.DeleteOne:input_type -> grpc.ModelServiceDeleteOneRequest
5, // 5: grpc.ModelBaseService.DeleteMany:input_type -> grpc.ModelServiceDeleteManyRequest
6, // 6: grpc.ModelBaseService.UpdateById:input_type -> grpc.ModelServiceUpdateByIdRequest
7, // 7: grpc.ModelBaseService.UpdateOne:input_type -> grpc.ModelServiceUpdateOneRequest
8, // 8: grpc.ModelBaseService.UpdateMany:input_type -> grpc.ModelServiceUpdateManyRequest
9, // 9: grpc.ModelBaseService.ReplaceById:input_type -> grpc.ModelServiceReplaceByIdRequest
10, // 10: grpc.ModelBaseService.ReplaceOne:input_type -> grpc.ModelServiceReplaceOneRequest
11, // 11: grpc.ModelBaseService.InsertOne:input_type -> grpc.ModelServiceInsertOneRequest
12, // 12: grpc.ModelBaseService.InsertMany:input_type -> grpc.ModelServiceInsertManyRequest
13, // 13: grpc.ModelBaseService.Count:input_type -> grpc.ModelServiceCountRequest
14, // 14: grpc.ModelBaseService.GetById:output_type -> grpc.Response
14, // 15: grpc.ModelBaseService.GetOne:output_type -> grpc.Response
14, // 16: grpc.ModelBaseService.GetMany:output_type -> grpc.Response
14, // 17: grpc.ModelBaseService.DeleteById:output_type -> grpc.Response
14, // 18: grpc.ModelBaseService.DeleteOne:output_type -> grpc.Response
14, // 19: grpc.ModelBaseService.DeleteMany:output_type -> grpc.Response
14, // 20: grpc.ModelBaseService.UpdateById:output_type -> grpc.Response
14, // 21: grpc.ModelBaseService.UpdateOne:output_type -> grpc.Response
14, // 22: grpc.ModelBaseService.UpdateMany:output_type -> grpc.Response
14, // 23: grpc.ModelBaseService.ReplaceById:output_type -> grpc.Response
14, // 24: grpc.ModelBaseService.ReplaceOne:output_type -> grpc.Response
14, // 25: grpc.ModelBaseService.InsertOne:output_type -> grpc.Response
14, // 26: grpc.ModelBaseService.InsertMany:output_type -> grpc.Response
14, // 27: grpc.ModelBaseService.Count:output_type -> grpc.Response
14, // [14:28] is the sub-list for method output_type
0, // [0:14] is the sub-list for method input_type
0, // [0:0] is the sub-list for extension type_name
0, // [0:0] is the sub-list for extension extendee
0, // [0:0] is the sub-list for field type_name
}
func init() { file_services_model_base_service_proto_init() }
func file_services_model_base_service_proto_init() {
if File_services_model_base_service_proto != nil {
return
}
file_entity_model_service_request_proto_init()
file_entity_response_proto_init()
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_services_model_base_service_proto_rawDesc,
NumEnums: 0,
NumMessages: 0,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_services_model_base_service_proto_goTypes,
DependencyIndexes: file_services_model_base_service_proto_depIdxs,
}.Build()
File_services_model_base_service_proto = out.File
file_services_model_base_service_proto_rawDesc = nil
file_services_model_base_service_proto_goTypes = nil
file_services_model_base_service_proto_depIdxs = nil
}

View File

@@ -0,0 +1,604 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.4.0
// - protoc v5.27.2
// source: services/model_base_service.proto
package grpc
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.62.0 or later.
const _ = grpc.SupportPackageIsVersion8
const (
ModelBaseService_GetById_FullMethodName = "/grpc.ModelBaseService/GetById"
ModelBaseService_GetOne_FullMethodName = "/grpc.ModelBaseService/GetOne"
ModelBaseService_GetMany_FullMethodName = "/grpc.ModelBaseService/GetMany"
ModelBaseService_DeleteById_FullMethodName = "/grpc.ModelBaseService/DeleteById"
ModelBaseService_DeleteOne_FullMethodName = "/grpc.ModelBaseService/DeleteOne"
ModelBaseService_DeleteMany_FullMethodName = "/grpc.ModelBaseService/DeleteMany"
ModelBaseService_UpdateById_FullMethodName = "/grpc.ModelBaseService/UpdateById"
ModelBaseService_UpdateOne_FullMethodName = "/grpc.ModelBaseService/UpdateOne"
ModelBaseService_UpdateMany_FullMethodName = "/grpc.ModelBaseService/UpdateMany"
ModelBaseService_ReplaceById_FullMethodName = "/grpc.ModelBaseService/ReplaceById"
ModelBaseService_ReplaceOne_FullMethodName = "/grpc.ModelBaseService/ReplaceOne"
ModelBaseService_InsertOne_FullMethodName = "/grpc.ModelBaseService/InsertOne"
ModelBaseService_InsertMany_FullMethodName = "/grpc.ModelBaseService/InsertMany"
ModelBaseService_Count_FullMethodName = "/grpc.ModelBaseService/Count"
)
// ModelBaseServiceClient is the client API for ModelBaseService 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 ModelBaseServiceClient interface {
GetById(ctx context.Context, in *ModelServiceGetByIdRequest, opts ...grpc.CallOption) (*Response, error)
GetOne(ctx context.Context, in *ModelServiceGetOneRequest, opts ...grpc.CallOption) (*Response, error)
GetMany(ctx context.Context, in *ModelServiceGetManyRequest, opts ...grpc.CallOption) (*Response, error)
DeleteById(ctx context.Context, in *ModelServiceDeleteByIdRequest, opts ...grpc.CallOption) (*Response, error)
DeleteOne(ctx context.Context, in *ModelServiceDeleteOneRequest, opts ...grpc.CallOption) (*Response, error)
DeleteMany(ctx context.Context, in *ModelServiceDeleteManyRequest, opts ...grpc.CallOption) (*Response, error)
UpdateById(ctx context.Context, in *ModelServiceUpdateByIdRequest, opts ...grpc.CallOption) (*Response, error)
UpdateOne(ctx context.Context, in *ModelServiceUpdateOneRequest, opts ...grpc.CallOption) (*Response, error)
UpdateMany(ctx context.Context, in *ModelServiceUpdateManyRequest, opts ...grpc.CallOption) (*Response, error)
ReplaceById(ctx context.Context, in *ModelServiceReplaceByIdRequest, opts ...grpc.CallOption) (*Response, error)
ReplaceOne(ctx context.Context, in *ModelServiceReplaceOneRequest, opts ...grpc.CallOption) (*Response, error)
InsertOne(ctx context.Context, in *ModelServiceInsertOneRequest, opts ...grpc.CallOption) (*Response, error)
InsertMany(ctx context.Context, in *ModelServiceInsertManyRequest, opts ...grpc.CallOption) (*Response, error)
Count(ctx context.Context, in *ModelServiceCountRequest, opts ...grpc.CallOption) (*Response, error)
}
type modelBaseServiceClient struct {
cc grpc.ClientConnInterface
}
func NewModelBaseServiceClient(cc grpc.ClientConnInterface) ModelBaseServiceClient {
return &modelBaseServiceClient{cc}
}
func (c *modelBaseServiceClient) GetById(ctx context.Context, in *ModelServiceGetByIdRequest, opts ...grpc.CallOption) (*Response, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(Response)
err := c.cc.Invoke(ctx, ModelBaseService_GetById_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *modelBaseServiceClient) GetOne(ctx context.Context, in *ModelServiceGetOneRequest, opts ...grpc.CallOption) (*Response, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(Response)
err := c.cc.Invoke(ctx, ModelBaseService_GetOne_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *modelBaseServiceClient) GetMany(ctx context.Context, in *ModelServiceGetManyRequest, opts ...grpc.CallOption) (*Response, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(Response)
err := c.cc.Invoke(ctx, ModelBaseService_GetMany_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *modelBaseServiceClient) DeleteById(ctx context.Context, in *ModelServiceDeleteByIdRequest, opts ...grpc.CallOption) (*Response, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(Response)
err := c.cc.Invoke(ctx, ModelBaseService_DeleteById_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *modelBaseServiceClient) DeleteOne(ctx context.Context, in *ModelServiceDeleteOneRequest, opts ...grpc.CallOption) (*Response, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(Response)
err := c.cc.Invoke(ctx, ModelBaseService_DeleteOne_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *modelBaseServiceClient) DeleteMany(ctx context.Context, in *ModelServiceDeleteManyRequest, opts ...grpc.CallOption) (*Response, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(Response)
err := c.cc.Invoke(ctx, ModelBaseService_DeleteMany_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *modelBaseServiceClient) UpdateById(ctx context.Context, in *ModelServiceUpdateByIdRequest, opts ...grpc.CallOption) (*Response, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(Response)
err := c.cc.Invoke(ctx, ModelBaseService_UpdateById_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *modelBaseServiceClient) UpdateOne(ctx context.Context, in *ModelServiceUpdateOneRequest, opts ...grpc.CallOption) (*Response, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(Response)
err := c.cc.Invoke(ctx, ModelBaseService_UpdateOne_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *modelBaseServiceClient) UpdateMany(ctx context.Context, in *ModelServiceUpdateManyRequest, opts ...grpc.CallOption) (*Response, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(Response)
err := c.cc.Invoke(ctx, ModelBaseService_UpdateMany_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *modelBaseServiceClient) ReplaceById(ctx context.Context, in *ModelServiceReplaceByIdRequest, opts ...grpc.CallOption) (*Response, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(Response)
err := c.cc.Invoke(ctx, ModelBaseService_ReplaceById_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *modelBaseServiceClient) ReplaceOne(ctx context.Context, in *ModelServiceReplaceOneRequest, opts ...grpc.CallOption) (*Response, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(Response)
err := c.cc.Invoke(ctx, ModelBaseService_ReplaceOne_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *modelBaseServiceClient) InsertOne(ctx context.Context, in *ModelServiceInsertOneRequest, opts ...grpc.CallOption) (*Response, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(Response)
err := c.cc.Invoke(ctx, ModelBaseService_InsertOne_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *modelBaseServiceClient) InsertMany(ctx context.Context, in *ModelServiceInsertManyRequest, opts ...grpc.CallOption) (*Response, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(Response)
err := c.cc.Invoke(ctx, ModelBaseService_InsertMany_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *modelBaseServiceClient) Count(ctx context.Context, in *ModelServiceCountRequest, opts ...grpc.CallOption) (*Response, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(Response)
err := c.cc.Invoke(ctx, ModelBaseService_Count_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
// ModelBaseServiceServer is the server API for ModelBaseService service.
// All implementations must embed UnimplementedModelBaseServiceServer
// for forward compatibility
type ModelBaseServiceServer interface {
GetById(context.Context, *ModelServiceGetByIdRequest) (*Response, error)
GetOne(context.Context, *ModelServiceGetOneRequest) (*Response, error)
GetMany(context.Context, *ModelServiceGetManyRequest) (*Response, error)
DeleteById(context.Context, *ModelServiceDeleteByIdRequest) (*Response, error)
DeleteOne(context.Context, *ModelServiceDeleteOneRequest) (*Response, error)
DeleteMany(context.Context, *ModelServiceDeleteManyRequest) (*Response, error)
UpdateById(context.Context, *ModelServiceUpdateByIdRequest) (*Response, error)
UpdateOne(context.Context, *ModelServiceUpdateOneRequest) (*Response, error)
UpdateMany(context.Context, *ModelServiceUpdateManyRequest) (*Response, error)
ReplaceById(context.Context, *ModelServiceReplaceByIdRequest) (*Response, error)
ReplaceOne(context.Context, *ModelServiceReplaceOneRequest) (*Response, error)
InsertOne(context.Context, *ModelServiceInsertOneRequest) (*Response, error)
InsertMany(context.Context, *ModelServiceInsertManyRequest) (*Response, error)
Count(context.Context, *ModelServiceCountRequest) (*Response, error)
mustEmbedUnimplementedModelBaseServiceServer()
}
// UnimplementedModelBaseServiceServer must be embedded to have forward compatible implementations.
type UnimplementedModelBaseServiceServer struct {
}
func (UnimplementedModelBaseServiceServer) GetById(context.Context, *ModelServiceGetByIdRequest) (*Response, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetById not implemented")
}
func (UnimplementedModelBaseServiceServer) GetOne(context.Context, *ModelServiceGetOneRequest) (*Response, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetOne not implemented")
}
func (UnimplementedModelBaseServiceServer) GetMany(context.Context, *ModelServiceGetManyRequest) (*Response, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetMany not implemented")
}
func (UnimplementedModelBaseServiceServer) DeleteById(context.Context, *ModelServiceDeleteByIdRequest) (*Response, error) {
return nil, status.Errorf(codes.Unimplemented, "method DeleteById not implemented")
}
func (UnimplementedModelBaseServiceServer) DeleteOne(context.Context, *ModelServiceDeleteOneRequest) (*Response, error) {
return nil, status.Errorf(codes.Unimplemented, "method DeleteOne not implemented")
}
func (UnimplementedModelBaseServiceServer) DeleteMany(context.Context, *ModelServiceDeleteManyRequest) (*Response, error) {
return nil, status.Errorf(codes.Unimplemented, "method DeleteMany not implemented")
}
func (UnimplementedModelBaseServiceServer) UpdateById(context.Context, *ModelServiceUpdateByIdRequest) (*Response, error) {
return nil, status.Errorf(codes.Unimplemented, "method UpdateById not implemented")
}
func (UnimplementedModelBaseServiceServer) UpdateOne(context.Context, *ModelServiceUpdateOneRequest) (*Response, error) {
return nil, status.Errorf(codes.Unimplemented, "method UpdateOne not implemented")
}
func (UnimplementedModelBaseServiceServer) UpdateMany(context.Context, *ModelServiceUpdateManyRequest) (*Response, error) {
return nil, status.Errorf(codes.Unimplemented, "method UpdateMany not implemented")
}
func (UnimplementedModelBaseServiceServer) ReplaceById(context.Context, *ModelServiceReplaceByIdRequest) (*Response, error) {
return nil, status.Errorf(codes.Unimplemented, "method ReplaceById not implemented")
}
func (UnimplementedModelBaseServiceServer) ReplaceOne(context.Context, *ModelServiceReplaceOneRequest) (*Response, error) {
return nil, status.Errorf(codes.Unimplemented, "method ReplaceOne not implemented")
}
func (UnimplementedModelBaseServiceServer) InsertOne(context.Context, *ModelServiceInsertOneRequest) (*Response, error) {
return nil, status.Errorf(codes.Unimplemented, "method InsertOne not implemented")
}
func (UnimplementedModelBaseServiceServer) InsertMany(context.Context, *ModelServiceInsertManyRequest) (*Response, error) {
return nil, status.Errorf(codes.Unimplemented, "method InsertMany not implemented")
}
func (UnimplementedModelBaseServiceServer) Count(context.Context, *ModelServiceCountRequest) (*Response, error) {
return nil, status.Errorf(codes.Unimplemented, "method Count not implemented")
}
func (UnimplementedModelBaseServiceServer) mustEmbedUnimplementedModelBaseServiceServer() {}
// UnsafeModelBaseServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to ModelBaseServiceServer will
// result in compilation errors.
type UnsafeModelBaseServiceServer interface {
mustEmbedUnimplementedModelBaseServiceServer()
}
func RegisterModelBaseServiceServer(s grpc.ServiceRegistrar, srv ModelBaseServiceServer) {
s.RegisterService(&ModelBaseService_ServiceDesc, srv)
}
func _ModelBaseService_GetById_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ModelServiceGetByIdRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ModelBaseServiceServer).GetById(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: ModelBaseService_GetById_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ModelBaseServiceServer).GetById(ctx, req.(*ModelServiceGetByIdRequest))
}
return interceptor(ctx, in, info, handler)
}
func _ModelBaseService_GetOne_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ModelServiceGetOneRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ModelBaseServiceServer).GetOne(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: ModelBaseService_GetOne_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ModelBaseServiceServer).GetOne(ctx, req.(*ModelServiceGetOneRequest))
}
return interceptor(ctx, in, info, handler)
}
func _ModelBaseService_GetMany_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ModelServiceGetManyRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ModelBaseServiceServer).GetMany(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: ModelBaseService_GetMany_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ModelBaseServiceServer).GetMany(ctx, req.(*ModelServiceGetManyRequest))
}
return interceptor(ctx, in, info, handler)
}
func _ModelBaseService_DeleteById_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ModelServiceDeleteByIdRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ModelBaseServiceServer).DeleteById(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: ModelBaseService_DeleteById_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ModelBaseServiceServer).DeleteById(ctx, req.(*ModelServiceDeleteByIdRequest))
}
return interceptor(ctx, in, info, handler)
}
func _ModelBaseService_DeleteOne_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ModelServiceDeleteOneRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ModelBaseServiceServer).DeleteOne(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: ModelBaseService_DeleteOne_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ModelBaseServiceServer).DeleteOne(ctx, req.(*ModelServiceDeleteOneRequest))
}
return interceptor(ctx, in, info, handler)
}
func _ModelBaseService_DeleteMany_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ModelServiceDeleteManyRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ModelBaseServiceServer).DeleteMany(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: ModelBaseService_DeleteMany_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ModelBaseServiceServer).DeleteMany(ctx, req.(*ModelServiceDeleteManyRequest))
}
return interceptor(ctx, in, info, handler)
}
func _ModelBaseService_UpdateById_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ModelServiceUpdateByIdRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ModelBaseServiceServer).UpdateById(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: ModelBaseService_UpdateById_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ModelBaseServiceServer).UpdateById(ctx, req.(*ModelServiceUpdateByIdRequest))
}
return interceptor(ctx, in, info, handler)
}
func _ModelBaseService_UpdateOne_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ModelServiceUpdateOneRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ModelBaseServiceServer).UpdateOne(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: ModelBaseService_UpdateOne_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ModelBaseServiceServer).UpdateOne(ctx, req.(*ModelServiceUpdateOneRequest))
}
return interceptor(ctx, in, info, handler)
}
func _ModelBaseService_UpdateMany_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ModelServiceUpdateManyRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ModelBaseServiceServer).UpdateMany(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: ModelBaseService_UpdateMany_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ModelBaseServiceServer).UpdateMany(ctx, req.(*ModelServiceUpdateManyRequest))
}
return interceptor(ctx, in, info, handler)
}
func _ModelBaseService_ReplaceById_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ModelServiceReplaceByIdRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ModelBaseServiceServer).ReplaceById(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: ModelBaseService_ReplaceById_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ModelBaseServiceServer).ReplaceById(ctx, req.(*ModelServiceReplaceByIdRequest))
}
return interceptor(ctx, in, info, handler)
}
func _ModelBaseService_ReplaceOne_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ModelServiceReplaceOneRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ModelBaseServiceServer).ReplaceOne(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: ModelBaseService_ReplaceOne_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ModelBaseServiceServer).ReplaceOne(ctx, req.(*ModelServiceReplaceOneRequest))
}
return interceptor(ctx, in, info, handler)
}
func _ModelBaseService_InsertOne_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ModelServiceInsertOneRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ModelBaseServiceServer).InsertOne(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: ModelBaseService_InsertOne_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ModelBaseServiceServer).InsertOne(ctx, req.(*ModelServiceInsertOneRequest))
}
return interceptor(ctx, in, info, handler)
}
func _ModelBaseService_InsertMany_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ModelServiceInsertManyRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ModelBaseServiceServer).InsertMany(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: ModelBaseService_InsertMany_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ModelBaseServiceServer).InsertMany(ctx, req.(*ModelServiceInsertManyRequest))
}
return interceptor(ctx, in, info, handler)
}
func _ModelBaseService_Count_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ModelServiceCountRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ModelBaseServiceServer).Count(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: ModelBaseService_Count_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ModelBaseServiceServer).Count(ctx, req.(*ModelServiceCountRequest))
}
return interceptor(ctx, in, info, handler)
}
// ModelBaseService_ServiceDesc is the grpc.ServiceDesc for ModelBaseService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var ModelBaseService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "grpc.ModelBaseService",
HandlerType: (*ModelBaseServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "GetById",
Handler: _ModelBaseService_GetById_Handler,
},
{
MethodName: "GetOne",
Handler: _ModelBaseService_GetOne_Handler,
},
{
MethodName: "GetMany",
Handler: _ModelBaseService_GetMany_Handler,
},
{
MethodName: "DeleteById",
Handler: _ModelBaseService_DeleteById_Handler,
},
{
MethodName: "DeleteOne",
Handler: _ModelBaseService_DeleteOne_Handler,
},
{
MethodName: "DeleteMany",
Handler: _ModelBaseService_DeleteMany_Handler,
},
{
MethodName: "UpdateById",
Handler: _ModelBaseService_UpdateById_Handler,
},
{
MethodName: "UpdateOne",
Handler: _ModelBaseService_UpdateOne_Handler,
},
{
MethodName: "UpdateMany",
Handler: _ModelBaseService_UpdateMany_Handler,
},
{
MethodName: "ReplaceById",
Handler: _ModelBaseService_ReplaceById_Handler,
},
{
MethodName: "ReplaceOne",
Handler: _ModelBaseService_ReplaceOne_Handler,
},
{
MethodName: "InsertOne",
Handler: _ModelBaseService_InsertOne_Handler,
},
{
MethodName: "InsertMany",
Handler: _ModelBaseService_InsertMany_Handler,
},
{
MethodName: "Count",
Handler: _ModelBaseService_Count_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "services/model_base_service.proto",
}

View File

@@ -1,174 +0,0 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.34.2
// protoc v5.27.2
// source: services/model_base_service_v2.proto
package grpc
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
var File_services_model_base_service_v2_proto protoreflect.FileDescriptor
var file_services_model_base_service_v2_proto_rawDesc = []byte{
0x0a, 0x24, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c,
0x5f, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x76, 0x32,
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x04, 0x67, 0x72, 0x70, 0x63, 0x1a, 0x25, 0x65, 0x6e,
0x74, 0x69, 0x74, 0x79, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69,
0x63, 0x65, 0x5f, 0x76, 0x32, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x1a, 0x15, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2f, 0x72, 0x65, 0x73, 0x70,
0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0xd4, 0x07, 0x0a, 0x12, 0x4d,
0x6f, 0x64, 0x65, 0x6c, 0x42, 0x61, 0x73, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x56,
0x32, 0x12, 0x3f, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x42, 0x79, 0x49, 0x64, 0x12, 0x22, 0x2e, 0x67,
0x72, 0x70, 0x63, 0x2e, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
0x56, 0x32, 0x47, 0x65, 0x74, 0x42, 0x79, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x1a, 0x0e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x22, 0x00, 0x12, 0x3d, 0x0a, 0x06, 0x47, 0x65, 0x74, 0x4f, 0x6e, 0x65, 0x12, 0x21, 0x2e, 0x67,
0x72, 0x70, 0x63, 0x2e, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
0x56, 0x32, 0x47, 0x65, 0x74, 0x4f, 0x6e, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
0x0e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22,
0x00, 0x12, 0x3f, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x4d, 0x61, 0x6e, 0x79, 0x12, 0x22, 0x2e, 0x67,
0x72, 0x70, 0x63, 0x2e, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
0x56, 0x32, 0x47, 0x65, 0x74, 0x4d, 0x61, 0x6e, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x1a, 0x0e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x22, 0x00, 0x12, 0x45, 0x0a, 0x0a, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x42, 0x79, 0x49, 0x64,
0x12, 0x25, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x53, 0x65, 0x72,
0x76, 0x69, 0x63, 0x65, 0x56, 0x32, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x42, 0x79, 0x49, 0x64,
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x52,
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x43, 0x0a, 0x09, 0x44, 0x65, 0x6c,
0x65, 0x74, 0x65, 0x4f, 0x6e, 0x65, 0x12, 0x24, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x4d, 0x6f,
0x64, 0x65, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x56, 0x32, 0x44, 0x65, 0x6c, 0x65,
0x74, 0x65, 0x4f, 0x6e, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x67,
0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x45,
0x0a, 0x0a, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4d, 0x61, 0x6e, 0x79, 0x12, 0x25, 0x2e, 0x67,
0x72, 0x70, 0x63, 0x2e, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
0x56, 0x32, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4d, 0x61, 0x6e, 0x79, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f,
0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x45, 0x0a, 0x0a, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42,
0x79, 0x49, 0x64, 0x12, 0x25, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x4d, 0x6f, 0x64, 0x65, 0x6c,
0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x56, 0x32, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42,
0x79, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x67, 0x72, 0x70,
0x63, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x43, 0x0a, 0x09,
0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4f, 0x6e, 0x65, 0x12, 0x24, 0x2e, 0x67, 0x72, 0x70, 0x63,
0x2e, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x56, 0x32, 0x55,
0x70, 0x64, 0x61, 0x74, 0x65, 0x4f, 0x6e, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
0x0e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22,
0x00, 0x12, 0x45, 0x0a, 0x0a, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x6e, 0x79, 0x12,
0x25, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x53, 0x65, 0x72, 0x76,
0x69, 0x63, 0x65, 0x56, 0x32, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x6e, 0x79, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65,
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x47, 0x0a, 0x0b, 0x52, 0x65, 0x70, 0x6c,
0x61, 0x63, 0x65, 0x42, 0x79, 0x49, 0x64, 0x12, 0x26, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x4d,
0x6f, 0x64, 0x65, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x56, 0x32, 0x52, 0x65, 0x70,
0x6c, 0x61, 0x63, 0x65, 0x42, 0x79, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
0x0e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22,
0x00, 0x12, 0x45, 0x0a, 0x0a, 0x52, 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x4f, 0x6e, 0x65, 0x12,
0x25, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x53, 0x65, 0x72, 0x76,
0x69, 0x63, 0x65, 0x56, 0x32, 0x52, 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x4f, 0x6e, 0x65, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65,
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x43, 0x0a, 0x09, 0x49, 0x6e, 0x73, 0x65,
0x72, 0x74, 0x4f, 0x6e, 0x65, 0x12, 0x24, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x4d, 0x6f, 0x64,
0x65, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x56, 0x32, 0x49, 0x6e, 0x73, 0x65, 0x72,
0x74, 0x4f, 0x6e, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x67, 0x72,
0x70, 0x63, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x45, 0x0a,
0x0a, 0x49, 0x6e, 0x73, 0x65, 0x72, 0x74, 0x4d, 0x61, 0x6e, 0x79, 0x12, 0x25, 0x2e, 0x67, 0x72,
0x70, 0x63, 0x2e, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x56,
0x32, 0x49, 0x6e, 0x73, 0x65, 0x72, 0x74, 0x4d, 0x61, 0x6e, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
0x73, 0x65, 0x22, 0x00, 0x12, 0x3b, 0x0a, 0x05, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x20, 0x2e,
0x67, 0x72, 0x70, 0x63, 0x2e, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63,
0x65, 0x56, 0x32, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
0x0e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22,
0x00, 0x42, 0x08, 0x5a, 0x06, 0x2e, 0x3b, 0x67, 0x72, 0x70, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x33,
}
var file_services_model_base_service_v2_proto_goTypes = []any{
(*ModelServiceV2GetByIdRequest)(nil), // 0: grpc.ModelServiceV2GetByIdRequest
(*ModelServiceV2GetOneRequest)(nil), // 1: grpc.ModelServiceV2GetOneRequest
(*ModelServiceV2GetManyRequest)(nil), // 2: grpc.ModelServiceV2GetManyRequest
(*ModelServiceV2DeleteByIdRequest)(nil), // 3: grpc.ModelServiceV2DeleteByIdRequest
(*ModelServiceV2DeleteOneRequest)(nil), // 4: grpc.ModelServiceV2DeleteOneRequest
(*ModelServiceV2DeleteManyRequest)(nil), // 5: grpc.ModelServiceV2DeleteManyRequest
(*ModelServiceV2UpdateByIdRequest)(nil), // 6: grpc.ModelServiceV2UpdateByIdRequest
(*ModelServiceV2UpdateOneRequest)(nil), // 7: grpc.ModelServiceV2UpdateOneRequest
(*ModelServiceV2UpdateManyRequest)(nil), // 8: grpc.ModelServiceV2UpdateManyRequest
(*ModelServiceV2ReplaceByIdRequest)(nil), // 9: grpc.ModelServiceV2ReplaceByIdRequest
(*ModelServiceV2ReplaceOneRequest)(nil), // 10: grpc.ModelServiceV2ReplaceOneRequest
(*ModelServiceV2InsertOneRequest)(nil), // 11: grpc.ModelServiceV2InsertOneRequest
(*ModelServiceV2InsertManyRequest)(nil), // 12: grpc.ModelServiceV2InsertManyRequest
(*ModelServiceV2CountRequest)(nil), // 13: grpc.ModelServiceV2CountRequest
(*Response)(nil), // 14: grpc.Response
}
var file_services_model_base_service_v2_proto_depIdxs = []int32{
0, // 0: grpc.ModelBaseServiceV2.GetById:input_type -> grpc.ModelServiceV2GetByIdRequest
1, // 1: grpc.ModelBaseServiceV2.GetOne:input_type -> grpc.ModelServiceV2GetOneRequest
2, // 2: grpc.ModelBaseServiceV2.GetMany:input_type -> grpc.ModelServiceV2GetManyRequest
3, // 3: grpc.ModelBaseServiceV2.DeleteById:input_type -> grpc.ModelServiceV2DeleteByIdRequest
4, // 4: grpc.ModelBaseServiceV2.DeleteOne:input_type -> grpc.ModelServiceV2DeleteOneRequest
5, // 5: grpc.ModelBaseServiceV2.DeleteMany:input_type -> grpc.ModelServiceV2DeleteManyRequest
6, // 6: grpc.ModelBaseServiceV2.UpdateById:input_type -> grpc.ModelServiceV2UpdateByIdRequest
7, // 7: grpc.ModelBaseServiceV2.UpdateOne:input_type -> grpc.ModelServiceV2UpdateOneRequest
8, // 8: grpc.ModelBaseServiceV2.UpdateMany:input_type -> grpc.ModelServiceV2UpdateManyRequest
9, // 9: grpc.ModelBaseServiceV2.ReplaceById:input_type -> grpc.ModelServiceV2ReplaceByIdRequest
10, // 10: grpc.ModelBaseServiceV2.ReplaceOne:input_type -> grpc.ModelServiceV2ReplaceOneRequest
11, // 11: grpc.ModelBaseServiceV2.InsertOne:input_type -> grpc.ModelServiceV2InsertOneRequest
12, // 12: grpc.ModelBaseServiceV2.InsertMany:input_type -> grpc.ModelServiceV2InsertManyRequest
13, // 13: grpc.ModelBaseServiceV2.Count:input_type -> grpc.ModelServiceV2CountRequest
14, // 14: grpc.ModelBaseServiceV2.GetById:output_type -> grpc.Response
14, // 15: grpc.ModelBaseServiceV2.GetOne:output_type -> grpc.Response
14, // 16: grpc.ModelBaseServiceV2.GetMany:output_type -> grpc.Response
14, // 17: grpc.ModelBaseServiceV2.DeleteById:output_type -> grpc.Response
14, // 18: grpc.ModelBaseServiceV2.DeleteOne:output_type -> grpc.Response
14, // 19: grpc.ModelBaseServiceV2.DeleteMany:output_type -> grpc.Response
14, // 20: grpc.ModelBaseServiceV2.UpdateById:output_type -> grpc.Response
14, // 21: grpc.ModelBaseServiceV2.UpdateOne:output_type -> grpc.Response
14, // 22: grpc.ModelBaseServiceV2.UpdateMany:output_type -> grpc.Response
14, // 23: grpc.ModelBaseServiceV2.ReplaceById:output_type -> grpc.Response
14, // 24: grpc.ModelBaseServiceV2.ReplaceOne:output_type -> grpc.Response
14, // 25: grpc.ModelBaseServiceV2.InsertOne:output_type -> grpc.Response
14, // 26: grpc.ModelBaseServiceV2.InsertMany:output_type -> grpc.Response
14, // 27: grpc.ModelBaseServiceV2.Count:output_type -> grpc.Response
14, // [14:28] is the sub-list for method output_type
0, // [0:14] is the sub-list for method input_type
0, // [0:0] is the sub-list for extension type_name
0, // [0:0] is the sub-list for extension extendee
0, // [0:0] is the sub-list for field type_name
}
func init() { file_services_model_base_service_v2_proto_init() }
func file_services_model_base_service_v2_proto_init() {
if File_services_model_base_service_v2_proto != nil {
return
}
file_entity_model_service_v2_request_proto_init()
file_entity_response_proto_init()
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_services_model_base_service_v2_proto_rawDesc,
NumEnums: 0,
NumMessages: 0,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_services_model_base_service_v2_proto_goTypes,
DependencyIndexes: file_services_model_base_service_v2_proto_depIdxs,
}.Build()
File_services_model_base_service_v2_proto = out.File
file_services_model_base_service_v2_proto_rawDesc = nil
file_services_model_base_service_v2_proto_goTypes = nil
file_services_model_base_service_v2_proto_depIdxs = nil
}

View File

@@ -1,604 +0,0 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.4.0
// - protoc v5.27.2
// source: services/model_base_service_v2.proto
package grpc
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.62.0 or later.
const _ = grpc.SupportPackageIsVersion8
const (
ModelBaseServiceV2_GetById_FullMethodName = "/grpc.ModelBaseServiceV2/GetById"
ModelBaseServiceV2_GetOne_FullMethodName = "/grpc.ModelBaseServiceV2/GetOne"
ModelBaseServiceV2_GetMany_FullMethodName = "/grpc.ModelBaseServiceV2/GetMany"
ModelBaseServiceV2_DeleteById_FullMethodName = "/grpc.ModelBaseServiceV2/DeleteById"
ModelBaseServiceV2_DeleteOne_FullMethodName = "/grpc.ModelBaseServiceV2/DeleteOne"
ModelBaseServiceV2_DeleteMany_FullMethodName = "/grpc.ModelBaseServiceV2/DeleteMany"
ModelBaseServiceV2_UpdateById_FullMethodName = "/grpc.ModelBaseServiceV2/UpdateById"
ModelBaseServiceV2_UpdateOne_FullMethodName = "/grpc.ModelBaseServiceV2/UpdateOne"
ModelBaseServiceV2_UpdateMany_FullMethodName = "/grpc.ModelBaseServiceV2/UpdateMany"
ModelBaseServiceV2_ReplaceById_FullMethodName = "/grpc.ModelBaseServiceV2/ReplaceById"
ModelBaseServiceV2_ReplaceOne_FullMethodName = "/grpc.ModelBaseServiceV2/ReplaceOne"
ModelBaseServiceV2_InsertOne_FullMethodName = "/grpc.ModelBaseServiceV2/InsertOne"
ModelBaseServiceV2_InsertMany_FullMethodName = "/grpc.ModelBaseServiceV2/InsertMany"
ModelBaseServiceV2_Count_FullMethodName = "/grpc.ModelBaseServiceV2/Count"
)
// ModelBaseServiceV2Client is the client API for ModelBaseServiceV2 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 ModelBaseServiceV2Client interface {
GetById(ctx context.Context, in *ModelServiceV2GetByIdRequest, opts ...grpc.CallOption) (*Response, error)
GetOne(ctx context.Context, in *ModelServiceV2GetOneRequest, opts ...grpc.CallOption) (*Response, error)
GetMany(ctx context.Context, in *ModelServiceV2GetManyRequest, opts ...grpc.CallOption) (*Response, error)
DeleteById(ctx context.Context, in *ModelServiceV2DeleteByIdRequest, opts ...grpc.CallOption) (*Response, error)
DeleteOne(ctx context.Context, in *ModelServiceV2DeleteOneRequest, opts ...grpc.CallOption) (*Response, error)
DeleteMany(ctx context.Context, in *ModelServiceV2DeleteManyRequest, opts ...grpc.CallOption) (*Response, error)
UpdateById(ctx context.Context, in *ModelServiceV2UpdateByIdRequest, opts ...grpc.CallOption) (*Response, error)
UpdateOne(ctx context.Context, in *ModelServiceV2UpdateOneRequest, opts ...grpc.CallOption) (*Response, error)
UpdateMany(ctx context.Context, in *ModelServiceV2UpdateManyRequest, opts ...grpc.CallOption) (*Response, error)
ReplaceById(ctx context.Context, in *ModelServiceV2ReplaceByIdRequest, opts ...grpc.CallOption) (*Response, error)
ReplaceOne(ctx context.Context, in *ModelServiceV2ReplaceOneRequest, opts ...grpc.CallOption) (*Response, error)
InsertOne(ctx context.Context, in *ModelServiceV2InsertOneRequest, opts ...grpc.CallOption) (*Response, error)
InsertMany(ctx context.Context, in *ModelServiceV2InsertManyRequest, opts ...grpc.CallOption) (*Response, error)
Count(ctx context.Context, in *ModelServiceV2CountRequest, opts ...grpc.CallOption) (*Response, error)
}
type modelBaseServiceV2Client struct {
cc grpc.ClientConnInterface
}
func NewModelBaseServiceV2Client(cc grpc.ClientConnInterface) ModelBaseServiceV2Client {
return &modelBaseServiceV2Client{cc}
}
func (c *modelBaseServiceV2Client) GetById(ctx context.Context, in *ModelServiceV2GetByIdRequest, opts ...grpc.CallOption) (*Response, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(Response)
err := c.cc.Invoke(ctx, ModelBaseServiceV2_GetById_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *modelBaseServiceV2Client) GetOne(ctx context.Context, in *ModelServiceV2GetOneRequest, opts ...grpc.CallOption) (*Response, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(Response)
err := c.cc.Invoke(ctx, ModelBaseServiceV2_GetOne_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *modelBaseServiceV2Client) GetMany(ctx context.Context, in *ModelServiceV2GetManyRequest, opts ...grpc.CallOption) (*Response, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(Response)
err := c.cc.Invoke(ctx, ModelBaseServiceV2_GetMany_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *modelBaseServiceV2Client) DeleteById(ctx context.Context, in *ModelServiceV2DeleteByIdRequest, opts ...grpc.CallOption) (*Response, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(Response)
err := c.cc.Invoke(ctx, ModelBaseServiceV2_DeleteById_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *modelBaseServiceV2Client) DeleteOne(ctx context.Context, in *ModelServiceV2DeleteOneRequest, opts ...grpc.CallOption) (*Response, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(Response)
err := c.cc.Invoke(ctx, ModelBaseServiceV2_DeleteOne_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *modelBaseServiceV2Client) DeleteMany(ctx context.Context, in *ModelServiceV2DeleteManyRequest, opts ...grpc.CallOption) (*Response, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(Response)
err := c.cc.Invoke(ctx, ModelBaseServiceV2_DeleteMany_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *modelBaseServiceV2Client) UpdateById(ctx context.Context, in *ModelServiceV2UpdateByIdRequest, opts ...grpc.CallOption) (*Response, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(Response)
err := c.cc.Invoke(ctx, ModelBaseServiceV2_UpdateById_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *modelBaseServiceV2Client) UpdateOne(ctx context.Context, in *ModelServiceV2UpdateOneRequest, opts ...grpc.CallOption) (*Response, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(Response)
err := c.cc.Invoke(ctx, ModelBaseServiceV2_UpdateOne_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *modelBaseServiceV2Client) UpdateMany(ctx context.Context, in *ModelServiceV2UpdateManyRequest, opts ...grpc.CallOption) (*Response, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(Response)
err := c.cc.Invoke(ctx, ModelBaseServiceV2_UpdateMany_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *modelBaseServiceV2Client) ReplaceById(ctx context.Context, in *ModelServiceV2ReplaceByIdRequest, opts ...grpc.CallOption) (*Response, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(Response)
err := c.cc.Invoke(ctx, ModelBaseServiceV2_ReplaceById_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *modelBaseServiceV2Client) ReplaceOne(ctx context.Context, in *ModelServiceV2ReplaceOneRequest, opts ...grpc.CallOption) (*Response, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(Response)
err := c.cc.Invoke(ctx, ModelBaseServiceV2_ReplaceOne_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *modelBaseServiceV2Client) InsertOne(ctx context.Context, in *ModelServiceV2InsertOneRequest, opts ...grpc.CallOption) (*Response, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(Response)
err := c.cc.Invoke(ctx, ModelBaseServiceV2_InsertOne_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *modelBaseServiceV2Client) InsertMany(ctx context.Context, in *ModelServiceV2InsertManyRequest, opts ...grpc.CallOption) (*Response, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(Response)
err := c.cc.Invoke(ctx, ModelBaseServiceV2_InsertMany_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *modelBaseServiceV2Client) Count(ctx context.Context, in *ModelServiceV2CountRequest, opts ...grpc.CallOption) (*Response, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(Response)
err := c.cc.Invoke(ctx, ModelBaseServiceV2_Count_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
// ModelBaseServiceV2Server is the server API for ModelBaseServiceV2 service.
// All implementations must embed UnimplementedModelBaseServiceV2Server
// for forward compatibility
type ModelBaseServiceV2Server interface {
GetById(context.Context, *ModelServiceV2GetByIdRequest) (*Response, error)
GetOne(context.Context, *ModelServiceV2GetOneRequest) (*Response, error)
GetMany(context.Context, *ModelServiceV2GetManyRequest) (*Response, error)
DeleteById(context.Context, *ModelServiceV2DeleteByIdRequest) (*Response, error)
DeleteOne(context.Context, *ModelServiceV2DeleteOneRequest) (*Response, error)
DeleteMany(context.Context, *ModelServiceV2DeleteManyRequest) (*Response, error)
UpdateById(context.Context, *ModelServiceV2UpdateByIdRequest) (*Response, error)
UpdateOne(context.Context, *ModelServiceV2UpdateOneRequest) (*Response, error)
UpdateMany(context.Context, *ModelServiceV2UpdateManyRequest) (*Response, error)
ReplaceById(context.Context, *ModelServiceV2ReplaceByIdRequest) (*Response, error)
ReplaceOne(context.Context, *ModelServiceV2ReplaceOneRequest) (*Response, error)
InsertOne(context.Context, *ModelServiceV2InsertOneRequest) (*Response, error)
InsertMany(context.Context, *ModelServiceV2InsertManyRequest) (*Response, error)
Count(context.Context, *ModelServiceV2CountRequest) (*Response, error)
mustEmbedUnimplementedModelBaseServiceV2Server()
}
// UnimplementedModelBaseServiceV2Server must be embedded to have forward compatible implementations.
type UnimplementedModelBaseServiceV2Server struct {
}
func (UnimplementedModelBaseServiceV2Server) GetById(context.Context, *ModelServiceV2GetByIdRequest) (*Response, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetById not implemented")
}
func (UnimplementedModelBaseServiceV2Server) GetOne(context.Context, *ModelServiceV2GetOneRequest) (*Response, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetOne not implemented")
}
func (UnimplementedModelBaseServiceV2Server) GetMany(context.Context, *ModelServiceV2GetManyRequest) (*Response, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetMany not implemented")
}
func (UnimplementedModelBaseServiceV2Server) DeleteById(context.Context, *ModelServiceV2DeleteByIdRequest) (*Response, error) {
return nil, status.Errorf(codes.Unimplemented, "method DeleteById not implemented")
}
func (UnimplementedModelBaseServiceV2Server) DeleteOne(context.Context, *ModelServiceV2DeleteOneRequest) (*Response, error) {
return nil, status.Errorf(codes.Unimplemented, "method DeleteOne not implemented")
}
func (UnimplementedModelBaseServiceV2Server) DeleteMany(context.Context, *ModelServiceV2DeleteManyRequest) (*Response, error) {
return nil, status.Errorf(codes.Unimplemented, "method DeleteMany not implemented")
}
func (UnimplementedModelBaseServiceV2Server) UpdateById(context.Context, *ModelServiceV2UpdateByIdRequest) (*Response, error) {
return nil, status.Errorf(codes.Unimplemented, "method UpdateById not implemented")
}
func (UnimplementedModelBaseServiceV2Server) UpdateOne(context.Context, *ModelServiceV2UpdateOneRequest) (*Response, error) {
return nil, status.Errorf(codes.Unimplemented, "method UpdateOne not implemented")
}
func (UnimplementedModelBaseServiceV2Server) UpdateMany(context.Context, *ModelServiceV2UpdateManyRequest) (*Response, error) {
return nil, status.Errorf(codes.Unimplemented, "method UpdateMany not implemented")
}
func (UnimplementedModelBaseServiceV2Server) ReplaceById(context.Context, *ModelServiceV2ReplaceByIdRequest) (*Response, error) {
return nil, status.Errorf(codes.Unimplemented, "method ReplaceById not implemented")
}
func (UnimplementedModelBaseServiceV2Server) ReplaceOne(context.Context, *ModelServiceV2ReplaceOneRequest) (*Response, error) {
return nil, status.Errorf(codes.Unimplemented, "method ReplaceOne not implemented")
}
func (UnimplementedModelBaseServiceV2Server) InsertOne(context.Context, *ModelServiceV2InsertOneRequest) (*Response, error) {
return nil, status.Errorf(codes.Unimplemented, "method InsertOne not implemented")
}
func (UnimplementedModelBaseServiceV2Server) InsertMany(context.Context, *ModelServiceV2InsertManyRequest) (*Response, error) {
return nil, status.Errorf(codes.Unimplemented, "method InsertMany not implemented")
}
func (UnimplementedModelBaseServiceV2Server) Count(context.Context, *ModelServiceV2CountRequest) (*Response, error) {
return nil, status.Errorf(codes.Unimplemented, "method Count not implemented")
}
func (UnimplementedModelBaseServiceV2Server) mustEmbedUnimplementedModelBaseServiceV2Server() {}
// UnsafeModelBaseServiceV2Server may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to ModelBaseServiceV2Server will
// result in compilation errors.
type UnsafeModelBaseServiceV2Server interface {
mustEmbedUnimplementedModelBaseServiceV2Server()
}
func RegisterModelBaseServiceV2Server(s grpc.ServiceRegistrar, srv ModelBaseServiceV2Server) {
s.RegisterService(&ModelBaseServiceV2_ServiceDesc, srv)
}
func _ModelBaseServiceV2_GetById_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ModelServiceV2GetByIdRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ModelBaseServiceV2Server).GetById(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: ModelBaseServiceV2_GetById_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ModelBaseServiceV2Server).GetById(ctx, req.(*ModelServiceV2GetByIdRequest))
}
return interceptor(ctx, in, info, handler)
}
func _ModelBaseServiceV2_GetOne_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ModelServiceV2GetOneRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ModelBaseServiceV2Server).GetOne(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: ModelBaseServiceV2_GetOne_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ModelBaseServiceV2Server).GetOne(ctx, req.(*ModelServiceV2GetOneRequest))
}
return interceptor(ctx, in, info, handler)
}
func _ModelBaseServiceV2_GetMany_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ModelServiceV2GetManyRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ModelBaseServiceV2Server).GetMany(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: ModelBaseServiceV2_GetMany_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ModelBaseServiceV2Server).GetMany(ctx, req.(*ModelServiceV2GetManyRequest))
}
return interceptor(ctx, in, info, handler)
}
func _ModelBaseServiceV2_DeleteById_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ModelServiceV2DeleteByIdRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ModelBaseServiceV2Server).DeleteById(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: ModelBaseServiceV2_DeleteById_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ModelBaseServiceV2Server).DeleteById(ctx, req.(*ModelServiceV2DeleteByIdRequest))
}
return interceptor(ctx, in, info, handler)
}
func _ModelBaseServiceV2_DeleteOne_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ModelServiceV2DeleteOneRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ModelBaseServiceV2Server).DeleteOne(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: ModelBaseServiceV2_DeleteOne_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ModelBaseServiceV2Server).DeleteOne(ctx, req.(*ModelServiceV2DeleteOneRequest))
}
return interceptor(ctx, in, info, handler)
}
func _ModelBaseServiceV2_DeleteMany_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ModelServiceV2DeleteManyRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ModelBaseServiceV2Server).DeleteMany(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: ModelBaseServiceV2_DeleteMany_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ModelBaseServiceV2Server).DeleteMany(ctx, req.(*ModelServiceV2DeleteManyRequest))
}
return interceptor(ctx, in, info, handler)
}
func _ModelBaseServiceV2_UpdateById_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ModelServiceV2UpdateByIdRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ModelBaseServiceV2Server).UpdateById(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: ModelBaseServiceV2_UpdateById_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ModelBaseServiceV2Server).UpdateById(ctx, req.(*ModelServiceV2UpdateByIdRequest))
}
return interceptor(ctx, in, info, handler)
}
func _ModelBaseServiceV2_UpdateOne_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ModelServiceV2UpdateOneRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ModelBaseServiceV2Server).UpdateOne(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: ModelBaseServiceV2_UpdateOne_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ModelBaseServiceV2Server).UpdateOne(ctx, req.(*ModelServiceV2UpdateOneRequest))
}
return interceptor(ctx, in, info, handler)
}
func _ModelBaseServiceV2_UpdateMany_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ModelServiceV2UpdateManyRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ModelBaseServiceV2Server).UpdateMany(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: ModelBaseServiceV2_UpdateMany_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ModelBaseServiceV2Server).UpdateMany(ctx, req.(*ModelServiceV2UpdateManyRequest))
}
return interceptor(ctx, in, info, handler)
}
func _ModelBaseServiceV2_ReplaceById_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ModelServiceV2ReplaceByIdRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ModelBaseServiceV2Server).ReplaceById(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: ModelBaseServiceV2_ReplaceById_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ModelBaseServiceV2Server).ReplaceById(ctx, req.(*ModelServiceV2ReplaceByIdRequest))
}
return interceptor(ctx, in, info, handler)
}
func _ModelBaseServiceV2_ReplaceOne_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ModelServiceV2ReplaceOneRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ModelBaseServiceV2Server).ReplaceOne(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: ModelBaseServiceV2_ReplaceOne_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ModelBaseServiceV2Server).ReplaceOne(ctx, req.(*ModelServiceV2ReplaceOneRequest))
}
return interceptor(ctx, in, info, handler)
}
func _ModelBaseServiceV2_InsertOne_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ModelServiceV2InsertOneRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ModelBaseServiceV2Server).InsertOne(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: ModelBaseServiceV2_InsertOne_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ModelBaseServiceV2Server).InsertOne(ctx, req.(*ModelServiceV2InsertOneRequest))
}
return interceptor(ctx, in, info, handler)
}
func _ModelBaseServiceV2_InsertMany_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ModelServiceV2InsertManyRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ModelBaseServiceV2Server).InsertMany(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: ModelBaseServiceV2_InsertMany_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ModelBaseServiceV2Server).InsertMany(ctx, req.(*ModelServiceV2InsertManyRequest))
}
return interceptor(ctx, in, info, handler)
}
func _ModelBaseServiceV2_Count_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ModelServiceV2CountRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ModelBaseServiceV2Server).Count(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: ModelBaseServiceV2_Count_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ModelBaseServiceV2Server).Count(ctx, req.(*ModelServiceV2CountRequest))
}
return interceptor(ctx, in, info, handler)
}
// ModelBaseServiceV2_ServiceDesc is the grpc.ServiceDesc for ModelBaseServiceV2 service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var ModelBaseServiceV2_ServiceDesc = grpc.ServiceDesc{
ServiceName: "grpc.ModelBaseServiceV2",
HandlerType: (*ModelBaseServiceV2Server)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "GetById",
Handler: _ModelBaseServiceV2_GetById_Handler,
},
{
MethodName: "GetOne",
Handler: _ModelBaseServiceV2_GetOne_Handler,
},
{
MethodName: "GetMany",
Handler: _ModelBaseServiceV2_GetMany_Handler,
},
{
MethodName: "DeleteById",
Handler: _ModelBaseServiceV2_DeleteById_Handler,
},
{
MethodName: "DeleteOne",
Handler: _ModelBaseServiceV2_DeleteOne_Handler,
},
{
MethodName: "DeleteMany",
Handler: _ModelBaseServiceV2_DeleteMany_Handler,
},
{
MethodName: "UpdateById",
Handler: _ModelBaseServiceV2_UpdateById_Handler,
},
{
MethodName: "UpdateOne",
Handler: _ModelBaseServiceV2_UpdateOne_Handler,
},
{
MethodName: "UpdateMany",
Handler: _ModelBaseServiceV2_UpdateMany_Handler,
},
{
MethodName: "ReplaceById",
Handler: _ModelBaseServiceV2_ReplaceById_Handler,
},
{
MethodName: "ReplaceOne",
Handler: _ModelBaseServiceV2_ReplaceOne_Handler,
},
{
MethodName: "InsertOne",
Handler: _ModelBaseServiceV2_InsertOne_Handler,
},
{
MethodName: "InsertMany",
Handler: _ModelBaseServiceV2_InsertMany_Handler,
},
{
MethodName: "Count",
Handler: _ModelBaseServiceV2_Count_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "services/model_base_service_v2.proto",
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -3,92 +3,92 @@ syntax = "proto3";
package grpc;
option go_package = ".;grpc";
message ModelServiceV2GetByIdRequest {
message ModelServiceGetByIdRequest {
string node_key = 1;
string model_type = 2;
string id = 3;
}
message ModelServiceV2GetOneRequest {
message ModelServiceGetOneRequest {
string node_key = 1;
string model_type = 2;
bytes query = 3;
bytes find_options = 4;
}
message ModelServiceV2GetManyRequest {
message ModelServiceGetManyRequest {
string node_key = 1;
string model_type = 2;
bytes query = 3;
bytes find_options = 4;
}
message ModelServiceV2DeleteByIdRequest {
message ModelServiceDeleteByIdRequest {
string node_key = 1;
string model_type = 2;
string id = 3;
}
message ModelServiceV2DeleteOneRequest {
message ModelServiceDeleteOneRequest {
string node_key = 1;
string model_type = 2;
bytes query = 3;
}
message ModelServiceV2DeleteManyRequest {
message ModelServiceDeleteManyRequest {
string node_key = 1;
string model_type = 2;
bytes query = 3;
}
message ModelServiceV2UpdateByIdRequest {
message ModelServiceUpdateByIdRequest {
string node_key = 1;
string model_type = 2;
string id = 3;
bytes update = 4;
}
message ModelServiceV2UpdateOneRequest {
message ModelServiceUpdateOneRequest {
string node_key = 1;
string model_type = 2;
bytes query = 3;
bytes update = 4;
}
message ModelServiceV2UpdateManyRequest {
message ModelServiceUpdateManyRequest {
string node_key = 1;
string model_type = 2;
bytes query = 3;
bytes update = 4;
}
message ModelServiceV2ReplaceByIdRequest {
message ModelServiceReplaceByIdRequest {
string node_key = 1;
string model_type = 2;
string id = 3;
bytes model = 4;
}
message ModelServiceV2ReplaceOneRequest {
message ModelServiceReplaceOneRequest {
string node_key = 1;
string model_type = 2;
bytes query = 3;
bytes model = 4;
}
message ModelServiceV2InsertOneRequest {
message ModelServiceInsertOneRequest {
string node_key = 1;
string model_type = 2;
bytes model = 3;
}
message ModelServiceV2InsertManyRequest {
message ModelServiceInsertManyRequest {
string node_key = 1;
string model_type = 2;
bytes models = 3;
}
message ModelServiceV2CountRequest {
message ModelServiceCountRequest {
string node_key = 1;
string model_type = 2;
bytes query = 3;

View File

@@ -0,0 +1,46 @@
syntax = "proto3";
import "entity/response.proto";
package grpc;
option go_package = ".;grpc";
message Dependency {
string name = 1;
string version = 2;
}
message DependencyServiceConnectRequest {
string node_key = 1;
}
enum DependencyServiceCode {
SYNC = 0;
INSTALL = 1;
UNINSTALL = 2;
}
message DependencyServiceConnectResponse {
DependencyServiceCode code = 1;
string task_id = 2;
string lang = 3;
string proxy = 4;
repeated Dependency dependencies = 5;
}
message DependencyServiceSyncRequest {
string node_key = 1;
string lang = 2;
repeated Dependency dependencies = 3;
}
message DependencyServiceUpdateTaskLogRequest {
string task_id = 1;
repeated string log_lines = 2;
}
service DependencyService {
rpc Connect(DependencyServiceConnectRequest) returns (stream DependencyServiceConnectResponse){};
rpc Sync(DependencyServiceSyncRequest) returns (Response){};
rpc UpdateTaskLog(stream DependencyServiceUpdateTaskLogRequest) returns (Response){};
}

View File

@@ -1,46 +0,0 @@
syntax = "proto3";
import "entity/response.proto";
package grpc;
option go_package = ".;grpc";
message Dependency {
string name = 1;
string version = 2;
}
message DependencyServiceV2ConnectRequest {
string node_key = 1;
}
enum DependencyServiceV2Code {
SYNC = 0;
INSTALL = 1;
UNINSTALL = 2;
}
message DependencyServiceV2ConnectResponse {
DependencyServiceV2Code code = 1;
string task_id = 2;
string lang = 3;
string proxy = 4;
repeated Dependency dependencies = 5;
}
message DependencyServiceV2SyncRequest {
string node_key = 1;
string lang = 2;
repeated Dependency dependencies = 3;
}
message DependencyServiceV2UpdateTaskLogRequest {
string task_id = 1;
repeated string log_lines = 2;
}
service DependencyServiceV2 {
rpc Connect(DependencyServiceV2ConnectRequest) returns (stream DependencyServiceV2ConnectResponse){};
rpc Sync(DependencyServiceV2SyncRequest) returns (Response){};
rpc UpdateTaskLog(stream DependencyServiceV2UpdateTaskLogRequest) returns (Response){};
}

View File

@@ -5,7 +5,7 @@ import "entity/response.proto";
package grpc;
option go_package = ".;grpc";
message MetricServiceV2SendRequest {
message MetricServiceSendRequest {
string type = 1;
string node_key = 2;
int64 timestamp = 3;
@@ -24,6 +24,6 @@ message MetricServiceV2SendRequest {
float network_bytes_recv_rate = 18;
}
service MetricServiceV2 {
rpc Send(MetricServiceV2SendRequest) returns (Response){};
service MetricService {
rpc Send(MetricServiceSendRequest) returns (Response){};
}

View File

@@ -0,0 +1,24 @@
syntax = "proto3";
import "entity/model_service_request.proto";
import "entity/response.proto";
package grpc;
option go_package = ".;grpc";
service ModelBaseService {
rpc GetById(ModelServiceGetByIdRequest) returns (Response){};
rpc GetOne(ModelServiceGetOneRequest) returns (Response){};
rpc GetMany(ModelServiceGetManyRequest) returns (Response){};
rpc DeleteById(ModelServiceDeleteByIdRequest) returns (Response){};
rpc DeleteOne(ModelServiceDeleteOneRequest) returns (Response){};
rpc DeleteMany(ModelServiceDeleteManyRequest) returns (Response){};
rpc UpdateById(ModelServiceUpdateByIdRequest) returns (Response){};
rpc UpdateOne(ModelServiceUpdateOneRequest) returns (Response){};
rpc UpdateMany(ModelServiceUpdateManyRequest) returns (Response){};
rpc ReplaceById(ModelServiceReplaceByIdRequest) returns (Response){};
rpc ReplaceOne(ModelServiceReplaceOneRequest) returns (Response){};
rpc InsertOne(ModelServiceInsertOneRequest) returns (Response){};
rpc InsertMany(ModelServiceInsertManyRequest) returns (Response){};
rpc Count(ModelServiceCountRequest) returns (Response){};
}

View File

@@ -1,24 +0,0 @@
syntax = "proto3";
import "entity/model_service_v2_request.proto";
import "entity/response.proto";
package grpc;
option go_package = ".;grpc";
service ModelBaseServiceV2 {
rpc GetById(ModelServiceV2GetByIdRequest) returns (Response){};
rpc GetOne(ModelServiceV2GetOneRequest) returns (Response){};
rpc GetMany(ModelServiceV2GetManyRequest) returns (Response){};
rpc DeleteById(ModelServiceV2DeleteByIdRequest) returns (Response){};
rpc DeleteOne(ModelServiceV2DeleteOneRequest) returns (Response){};
rpc DeleteMany(ModelServiceV2DeleteManyRequest) returns (Response){};
rpc UpdateById(ModelServiceV2UpdateByIdRequest) returns (Response){};
rpc UpdateOne(ModelServiceV2UpdateOneRequest) returns (Response){};
rpc UpdateMany(ModelServiceV2UpdateManyRequest) returns (Response){};
rpc ReplaceById(ModelServiceV2ReplaceByIdRequest) returns (Response){};
rpc ReplaceOne(ModelServiceV2ReplaceOneRequest) returns (Response){};
rpc InsertOne(ModelServiceV2InsertOneRequest) returns (Response){};
rpc InsertMany(ModelServiceV2InsertManyRequest) returns (Response){};
rpc Count(ModelServiceV2CountRequest) returns (Response){};
}