fix: get all spider issue

This commit is contained in:
Marvin Zhang
2024-06-26 17:31:31 +08:00
parent 73a5a64ba4
commit 9c620fa2ee
32 changed files with 979 additions and 303 deletions

View File

@@ -68,7 +68,7 @@ func GetSpiderList(c *gin.Context) {
// get all list // get all list
all := MustGetFilterAll(c) all := MustGetFilterAll(c)
if all { if all {
NewControllerV2[models.ProjectV2]().getAll(c) NewControllerV2[models.SpiderV2]().getAll(c)
return return
} }

View File

@@ -0,0 +1,12 @@
package server
import (
"github.com/crawlab-team/crawlab/grpc"
"sync"
)
type MetricsServerV2 struct {
grpc.UnimplementedMetricsServiceV2Server
mu *sync.Mutex
streams map[string]*grpc.MetricsServiceV2_ConnectServer
}

View File

@@ -1,13 +1,12 @@
// Code generated by protoc-gen-go. DO NOT EDIT. // Code generated by protoc-gen-go. DO NOT EDIT.
// versions: // versions:
// protoc-gen-go v1.25.0 // protoc-gen-go v1.34.2
// protoc v3.20.1 // protoc v3.12.4
// source: services/dependencies_service_v2.proto // source: services/dependencies_service_v2.proto
package grpc package grpc
import ( import (
proto "github.com/golang/protobuf/proto"
protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl" protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect" reflect "reflect"
@@ -21,10 +20,6 @@ const (
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
) )
// This is a compile-time assertion that a sufficiently up-to-date version
// of the legacy proto package is being used.
const _ = proto.ProtoPackageIsVersion4
type DependenciesServiceV2Code int32 type DependenciesServiceV2Code int32
const ( const (
@@ -456,7 +451,7 @@ func file_services_dependencies_service_v2_proto_rawDescGZIP() []byte {
var file_services_dependencies_service_v2_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_services_dependencies_service_v2_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_services_dependencies_service_v2_proto_msgTypes = make([]protoimpl.MessageInfo, 5) var file_services_dependencies_service_v2_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
var file_services_dependencies_service_v2_proto_goTypes = []interface{}{ var file_services_dependencies_service_v2_proto_goTypes = []any{
(DependenciesServiceV2Code)(0), // 0: grpc.DependenciesServiceV2Code (DependenciesServiceV2Code)(0), // 0: grpc.DependenciesServiceV2Code
(*Dependency)(nil), // 1: grpc.Dependency (*Dependency)(nil), // 1: grpc.Dependency
(*DependenciesServiceV2ConnectRequest)(nil), // 2: grpc.DependenciesServiceV2ConnectRequest (*DependenciesServiceV2ConnectRequest)(nil), // 2: grpc.DependenciesServiceV2ConnectRequest
@@ -489,7 +484,7 @@ func file_services_dependencies_service_v2_proto_init() {
} }
file_entity_response_proto_init() file_entity_response_proto_init()
if !protoimpl.UnsafeEnabled { if !protoimpl.UnsafeEnabled {
file_services_dependencies_service_v2_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { file_services_dependencies_service_v2_proto_msgTypes[0].Exporter = func(v any, i int) any {
switch v := v.(*Dependency); i { switch v := v.(*Dependency); i {
case 0: case 0:
return &v.state return &v.state
@@ -501,7 +496,7 @@ func file_services_dependencies_service_v2_proto_init() {
return nil return nil
} }
} }
file_services_dependencies_service_v2_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { file_services_dependencies_service_v2_proto_msgTypes[1].Exporter = func(v any, i int) any {
switch v := v.(*DependenciesServiceV2ConnectRequest); i { switch v := v.(*DependenciesServiceV2ConnectRequest); i {
case 0: case 0:
return &v.state return &v.state
@@ -513,7 +508,7 @@ func file_services_dependencies_service_v2_proto_init() {
return nil return nil
} }
} }
file_services_dependencies_service_v2_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { file_services_dependencies_service_v2_proto_msgTypes[2].Exporter = func(v any, i int) any {
switch v := v.(*DependenciesServiceV2ConnectResponse); i { switch v := v.(*DependenciesServiceV2ConnectResponse); i {
case 0: case 0:
return &v.state return &v.state
@@ -525,7 +520,7 @@ func file_services_dependencies_service_v2_proto_init() {
return nil return nil
} }
} }
file_services_dependencies_service_v2_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { file_services_dependencies_service_v2_proto_msgTypes[3].Exporter = func(v any, i int) any {
switch v := v.(*DependenciesServiceV2SyncRequest); i { switch v := v.(*DependenciesServiceV2SyncRequest); i {
case 0: case 0:
return &v.state return &v.state
@@ -537,7 +532,7 @@ func file_services_dependencies_service_v2_proto_init() {
return nil return nil
} }
} }
file_services_dependencies_service_v2_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { file_services_dependencies_service_v2_proto_msgTypes[4].Exporter = func(v any, i int) any {
switch v := v.(*DependenciesServiceV2UpdateTaskLogRequest); i { switch v := v.(*DependenciesServiceV2UpdateTaskLogRequest); i {
case 0: case 0:
return &v.state return &v.state

View File

@@ -1,7 +1,7 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT. // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions: // versions:
// - protoc-gen-go-grpc v1.2.0 // - protoc-gen-go-grpc v1.4.0
// - protoc v3.20.1 // - protoc v3.12.4
// source: services/dependencies_service_v2.proto // source: services/dependencies_service_v2.proto
package grpc package grpc
@@ -15,8 +15,14 @@ import (
// This is a compile-time assertion to ensure that this generated file // This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against. // is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later. // Requires gRPC-Go v1.62.0 or later.
const _ = grpc.SupportPackageIsVersion7 const _ = grpc.SupportPackageIsVersion8
const (
DependenciesServiceV2_Connect_FullMethodName = "/grpc.DependenciesServiceV2/Connect"
DependenciesServiceV2_Sync_FullMethodName = "/grpc.DependenciesServiceV2/Sync"
DependenciesServiceV2_UpdateTaskLog_FullMethodName = "/grpc.DependenciesServiceV2/UpdateTaskLog"
)
// DependenciesServiceV2Client is the client API for DependenciesServiceV2 service. // DependenciesServiceV2Client is the client API for DependenciesServiceV2 service.
// //
@@ -36,11 +42,12 @@ func NewDependenciesServiceV2Client(cc grpc.ClientConnInterface) DependenciesSer
} }
func (c *dependenciesServiceV2Client) Connect(ctx context.Context, in *DependenciesServiceV2ConnectRequest, opts ...grpc.CallOption) (DependenciesServiceV2_ConnectClient, error) { func (c *dependenciesServiceV2Client) Connect(ctx context.Context, in *DependenciesServiceV2ConnectRequest, opts ...grpc.CallOption) (DependenciesServiceV2_ConnectClient, error) {
stream, err := c.cc.NewStream(ctx, &DependenciesServiceV2_ServiceDesc.Streams[0], "/grpc.DependenciesServiceV2/Connect", opts...) cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
stream, err := c.cc.NewStream(ctx, &DependenciesServiceV2_ServiceDesc.Streams[0], DependenciesServiceV2_Connect_FullMethodName, cOpts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
x := &dependenciesServiceV2ConnectClient{stream} x := &dependenciesServiceV2ConnectClient{ClientStream: stream}
if err := x.ClientStream.SendMsg(in); err != nil { if err := x.ClientStream.SendMsg(in); err != nil {
return nil, err return nil, err
} }
@@ -68,8 +75,9 @@ func (x *dependenciesServiceV2ConnectClient) Recv() (*DependenciesServiceV2Conne
} }
func (c *dependenciesServiceV2Client) Sync(ctx context.Context, in *DependenciesServiceV2SyncRequest, opts ...grpc.CallOption) (*Response, error) { func (c *dependenciesServiceV2Client) Sync(ctx context.Context, in *DependenciesServiceV2SyncRequest, opts ...grpc.CallOption) (*Response, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(Response) out := new(Response)
err := c.cc.Invoke(ctx, "/grpc.DependenciesServiceV2/Sync", in, out, opts...) err := c.cc.Invoke(ctx, DependenciesServiceV2_Sync_FullMethodName, in, out, cOpts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
@@ -77,11 +85,12 @@ func (c *dependenciesServiceV2Client) Sync(ctx context.Context, in *Dependencies
} }
func (c *dependenciesServiceV2Client) UpdateTaskLog(ctx context.Context, opts ...grpc.CallOption) (DependenciesServiceV2_UpdateTaskLogClient, error) { func (c *dependenciesServiceV2Client) UpdateTaskLog(ctx context.Context, opts ...grpc.CallOption) (DependenciesServiceV2_UpdateTaskLogClient, error) {
stream, err := c.cc.NewStream(ctx, &DependenciesServiceV2_ServiceDesc.Streams[1], "/grpc.DependenciesServiceV2/UpdateTaskLog", opts...) cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
stream, err := c.cc.NewStream(ctx, &DependenciesServiceV2_ServiceDesc.Streams[1], DependenciesServiceV2_UpdateTaskLog_FullMethodName, cOpts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
x := &dependenciesServiceV2UpdateTaskLogClient{stream} x := &dependenciesServiceV2UpdateTaskLogClient{ClientStream: stream}
return x, nil return x, nil
} }
@@ -151,7 +160,7 @@ func _DependenciesServiceV2_Connect_Handler(srv interface{}, stream grpc.ServerS
if err := stream.RecvMsg(m); err != nil { if err := stream.RecvMsg(m); err != nil {
return err return err
} }
return srv.(DependenciesServiceV2Server).Connect(m, &dependenciesServiceV2ConnectServer{stream}) return srv.(DependenciesServiceV2Server).Connect(m, &dependenciesServiceV2ConnectServer{ServerStream: stream})
} }
type DependenciesServiceV2_ConnectServer interface { type DependenciesServiceV2_ConnectServer interface {
@@ -177,7 +186,7 @@ func _DependenciesServiceV2_Sync_Handler(srv interface{}, ctx context.Context, d
} }
info := &grpc.UnaryServerInfo{ info := &grpc.UnaryServerInfo{
Server: srv, Server: srv,
FullMethod: "/grpc.DependenciesServiceV2/Sync", FullMethod: DependenciesServiceV2_Sync_FullMethodName,
} }
handler := func(ctx context.Context, req interface{}) (interface{}, error) { handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(DependenciesServiceV2Server).Sync(ctx, req.(*DependenciesServiceV2SyncRequest)) return srv.(DependenciesServiceV2Server).Sync(ctx, req.(*DependenciesServiceV2SyncRequest))
@@ -186,7 +195,7 @@ func _DependenciesServiceV2_Sync_Handler(srv interface{}, ctx context.Context, d
} }
func _DependenciesServiceV2_UpdateTaskLog_Handler(srv interface{}, stream grpc.ServerStream) error { func _DependenciesServiceV2_UpdateTaskLog_Handler(srv interface{}, stream grpc.ServerStream) error {
return srv.(DependenciesServiceV2Server).UpdateTaskLog(&dependenciesServiceV2UpdateTaskLogServer{stream}) return srv.(DependenciesServiceV2Server).UpdateTaskLog(&dependenciesServiceV2UpdateTaskLogServer{ServerStream: stream})
} }
type DependenciesServiceV2_UpdateTaskLogServer interface { type DependenciesServiceV2_UpdateTaskLogServer interface {

View File

@@ -1,13 +1,12 @@
// Code generated by protoc-gen-go. DO NOT EDIT. // Code generated by protoc-gen-go. DO NOT EDIT.
// versions: // versions:
// protoc-gen-go v1.25.0 // protoc-gen-go v1.34.2
// protoc v3.20.1 // protoc v3.12.4
// source: services/message_service.proto // source: services/message_service.proto
package grpc package grpc
import ( import (
proto "github.com/golang/protobuf/proto"
protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl" protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect" reflect "reflect"
@@ -20,10 +19,6 @@ const (
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
) )
// This is a compile-time assertion that a sufficiently up-to-date version
// of the legacy proto package is being used.
const _ = proto.ProtoPackageIsVersion4
var File_services_message_service_proto protoreflect.FileDescriptor var File_services_message_service_proto protoreflect.FileDescriptor
var file_services_message_service_proto_rawDesc = []byte{ var file_services_message_service_proto_rawDesc = []byte{
@@ -40,7 +35,7 @@ var file_services_message_service_proto_rawDesc = []byte{
0x6f, 0x33, 0x6f, 0x33,
} }
var file_services_message_service_proto_goTypes = []interface{}{ var file_services_message_service_proto_goTypes = []any{
(*StreamMessage)(nil), // 0: grpc.StreamMessage (*StreamMessage)(nil), // 0: grpc.StreamMessage
} }
var file_services_message_service_proto_depIdxs = []int32{ var file_services_message_service_proto_depIdxs = []int32{

View File

@@ -1,7 +1,7 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT. // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions: // versions:
// - protoc-gen-go-grpc v1.2.0 // - protoc-gen-go-grpc v1.4.0
// - protoc v3.20.1 // - protoc v3.12.4
// source: services/message_service.proto // source: services/message_service.proto
package grpc package grpc
@@ -15,8 +15,12 @@ import (
// This is a compile-time assertion to ensure that this generated file // This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against. // is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later. // Requires gRPC-Go v1.62.0 or later.
const _ = grpc.SupportPackageIsVersion7 const _ = grpc.SupportPackageIsVersion8
const (
MessageService_Connect_FullMethodName = "/grpc.MessageService/Connect"
)
// MessageServiceClient is the client API for MessageService service. // MessageServiceClient is the client API for MessageService service.
// //
@@ -34,11 +38,12 @@ func NewMessageServiceClient(cc grpc.ClientConnInterface) MessageServiceClient {
} }
func (c *messageServiceClient) Connect(ctx context.Context, opts ...grpc.CallOption) (MessageService_ConnectClient, error) { func (c *messageServiceClient) Connect(ctx context.Context, opts ...grpc.CallOption) (MessageService_ConnectClient, error) {
stream, err := c.cc.NewStream(ctx, &MessageService_ServiceDesc.Streams[0], "/grpc.MessageService/Connect", opts...) cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
stream, err := c.cc.NewStream(ctx, &MessageService_ServiceDesc.Streams[0], MessageService_Connect_FullMethodName, cOpts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
x := &messageServiceConnectClient{stream} x := &messageServiceConnectClient{ClientStream: stream}
return x, nil return x, nil
} }
@@ -93,7 +98,7 @@ func RegisterMessageServiceServer(s grpc.ServiceRegistrar, srv MessageServiceSer
} }
func _MessageService_Connect_Handler(srv interface{}, stream grpc.ServerStream) error { func _MessageService_Connect_Handler(srv interface{}, stream grpc.ServerStream) error {
return srv.(MessageServiceServer).Connect(&messageServiceConnectServer{stream}) return srv.(MessageServiceServer).Connect(&messageServiceConnectServer{ServerStream: stream})
} }
type MessageService_ConnectServer interface { type MessageService_ConnectServer interface {

View File

@@ -0,0 +1,473 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.34.2
// protoc v3.12.4
// source: services/metrics_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 MetricsServiceV2Code int32
const (
MetricsServiceV2Code_SYNC_METRICS MetricsServiceV2Code = 0
)
// Enum value maps for MetricsServiceV2Code.
var (
MetricsServiceV2Code_name = map[int32]string{
0: "SYNC_METRICS",
}
MetricsServiceV2Code_value = map[string]int32{
"SYNC_METRICS": 0,
}
)
func (x MetricsServiceV2Code) Enum() *MetricsServiceV2Code {
p := new(MetricsServiceV2Code)
*p = x
return p
}
func (x MetricsServiceV2Code) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (MetricsServiceV2Code) Descriptor() protoreflect.EnumDescriptor {
return file_services_metrics_service_v2_proto_enumTypes[0].Descriptor()
}
func (MetricsServiceV2Code) Type() protoreflect.EnumType {
return &file_services_metrics_service_v2_proto_enumTypes[0]
}
func (x MetricsServiceV2Code) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use MetricsServiceV2Code.Descriptor instead.
func (MetricsServiceV2Code) EnumDescriptor() ([]byte, []int) {
return file_services_metrics_service_v2_proto_rawDescGZIP(), []int{0}
}
type Metric struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"`
Subsystem string `protobuf:"bytes,2,opt,name=subsystem,proto3" json:"subsystem,omitempty"`
Module string `protobuf:"bytes,3,opt,name=module,proto3" json:"module,omitempty"`
Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"`
Value float32 `protobuf:"fixed32,5,opt,name=value,proto3" json:"value,omitempty"`
Help string `protobuf:"bytes,6,opt,name=help,proto3" json:"help,omitempty"`
Labels string `protobuf:"bytes,7,opt,name=labels,proto3" json:"labels,omitempty"`
Process *MetricProcess `protobuf:"bytes,8,opt,name=process,proto3" json:"process,omitempty"`
}
func (x *Metric) Reset() {
*x = Metric{}
if protoimpl.UnsafeEnabled {
mi := &file_services_metrics_service_v2_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Metric) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Metric) ProtoMessage() {}
func (x *Metric) ProtoReflect() protoreflect.Message {
mi := &file_services_metrics_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 Metric.ProtoReflect.Descriptor instead.
func (*Metric) Descriptor() ([]byte, []int) {
return file_services_metrics_service_v2_proto_rawDescGZIP(), []int{0}
}
func (x *Metric) GetNamespace() string {
if x != nil {
return x.Namespace
}
return ""
}
func (x *Metric) GetSubsystem() string {
if x != nil {
return x.Subsystem
}
return ""
}
func (x *Metric) GetModule() string {
if x != nil {
return x.Module
}
return ""
}
func (x *Metric) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *Metric) GetValue() float32 {
if x != nil {
return x.Value
}
return 0
}
func (x *Metric) GetHelp() string {
if x != nil {
return x.Help
}
return ""
}
func (x *Metric) GetLabels() string {
if x != nil {
return x.Labels
}
return ""
}
func (x *Metric) GetProcess() *MetricProcess {
if x != nil {
return x.Process
}
return nil
}
type MetricProcess struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Pid int32 `protobuf:"varint,1,opt,name=pid,proto3" json:"pid,omitempty"`
}
func (x *MetricProcess) Reset() {
*x = MetricProcess{}
if protoimpl.UnsafeEnabled {
mi := &file_services_metrics_service_v2_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MetricProcess) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MetricProcess) ProtoMessage() {}
func (x *MetricProcess) ProtoReflect() protoreflect.Message {
mi := &file_services_metrics_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 MetricProcess.ProtoReflect.Descriptor instead.
func (*MetricProcess) Descriptor() ([]byte, []int) {
return file_services_metrics_service_v2_proto_rawDescGZIP(), []int{1}
}
func (x *MetricProcess) GetPid() int32 {
if x != nil {
return x.Pid
}
return 0
}
type MetricsServiceV2ConnectRequest 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"`
Metrics []*Metric `protobuf:"bytes,2,rep,name=metrics,proto3" json:"metrics,omitempty"`
}
func (x *MetricsServiceV2ConnectRequest) Reset() {
*x = MetricsServiceV2ConnectRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_services_metrics_service_v2_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MetricsServiceV2ConnectRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MetricsServiceV2ConnectRequest) ProtoMessage() {}
func (x *MetricsServiceV2ConnectRequest) ProtoReflect() protoreflect.Message {
mi := &file_services_metrics_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 MetricsServiceV2ConnectRequest.ProtoReflect.Descriptor instead.
func (*MetricsServiceV2ConnectRequest) Descriptor() ([]byte, []int) {
return file_services_metrics_service_v2_proto_rawDescGZIP(), []int{2}
}
func (x *MetricsServiceV2ConnectRequest) GetNodeKey() string {
if x != nil {
return x.NodeKey
}
return ""
}
func (x *MetricsServiceV2ConnectRequest) GetMetrics() []*Metric {
if x != nil {
return x.Metrics
}
return nil
}
type MetricsServiceV2ConnectResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Code MetricsServiceV2Code `protobuf:"varint,1,opt,name=code,proto3,enum=grpc.MetricsServiceV2Code" json:"code,omitempty"`
}
func (x *MetricsServiceV2ConnectResponse) Reset() {
*x = MetricsServiceV2ConnectResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_services_metrics_service_v2_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MetricsServiceV2ConnectResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MetricsServiceV2ConnectResponse) ProtoMessage() {}
func (x *MetricsServiceV2ConnectResponse) ProtoReflect() protoreflect.Message {
mi := &file_services_metrics_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 MetricsServiceV2ConnectResponse.ProtoReflect.Descriptor instead.
func (*MetricsServiceV2ConnectResponse) Descriptor() ([]byte, []int) {
return file_services_metrics_service_v2_proto_rawDescGZIP(), []int{3}
}
func (x *MetricsServiceV2ConnectResponse) GetCode() MetricsServiceV2Code {
if x != nil {
return x.Code
}
return MetricsServiceV2Code_SYNC_METRICS
}
var File_services_metrics_service_v2_proto protoreflect.FileDescriptor
var file_services_metrics_service_v2_proto_rawDesc = []byte{
0x0a, 0x21, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2f, 0x6d, 0x65, 0x74, 0x72, 0x69,
0x63, 0x73, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x76, 0x32, 0x2e, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x12, 0x04, 0x67, 0x72, 0x70, 0x63, 0x22, 0xe1, 0x01, 0x0a, 0x06, 0x4d, 0x65,
0x74, 0x72, 0x69, 0x63, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63,
0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61,
0x63, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x75, 0x62, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x18,
0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x75, 0x62, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d,
0x12, 0x16, 0x0a, 0x06, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09,
0x52, 0x06, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65,
0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05,
0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x02, 0x52, 0x05, 0x76, 0x61, 0x6c,
0x75, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x65, 0x6c, 0x70, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09,
0x52, 0x04, 0x68, 0x65, 0x6c, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73,
0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x2d,
0x0a, 0x07, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x13, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x50, 0x72, 0x6f,
0x63, 0x65, 0x73, 0x73, 0x52, 0x07, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x22, 0x21, 0x0a,
0x0d, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x12, 0x10,
0x0a, 0x03, 0x70, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x70, 0x69, 0x64,
0x22, 0x63, 0x0a, 0x1e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 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, 0x12, 0x26, 0x0a,
0x07, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c,
0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x52, 0x07, 0x6d, 0x65,
0x74, 0x72, 0x69, 0x63, 0x73, 0x22, 0x51, 0x0a, 0x1f, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73,
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, 0x2e, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65,
0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1a, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x4d, 0x65,
0x74, 0x72, 0x69, 0x63, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x56, 0x32, 0x43, 0x6f,
0x64, 0x65, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x2a, 0x28, 0x0a, 0x14, 0x4d, 0x65, 0x74, 0x72,
0x69, 0x63, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x56, 0x32, 0x43, 0x6f, 0x64, 0x65,
0x12, 0x10, 0x0a, 0x0c, 0x53, 0x59, 0x4e, 0x43, 0x5f, 0x4d, 0x45, 0x54, 0x52, 0x49, 0x43, 0x53,
0x10, 0x00, 0x32, 0x70, 0x0a, 0x10, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x53, 0x65, 0x72,
0x76, 0x69, 0x63, 0x65, 0x56, 0x32, 0x12, 0x5c, 0x0a, 0x07, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63,
0x74, 0x12, 0x24, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73,
0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x56, 0x32, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74,
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x4d,
0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 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,
0x28, 0x01, 0x30, 0x01, 0x42, 0x08, 0x5a, 0x06, 0x2e, 0x3b, 0x67, 0x72, 0x70, 0x63, 0x62, 0x06,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_services_metrics_service_v2_proto_rawDescOnce sync.Once
file_services_metrics_service_v2_proto_rawDescData = file_services_metrics_service_v2_proto_rawDesc
)
func file_services_metrics_service_v2_proto_rawDescGZIP() []byte {
file_services_metrics_service_v2_proto_rawDescOnce.Do(func() {
file_services_metrics_service_v2_proto_rawDescData = protoimpl.X.CompressGZIP(file_services_metrics_service_v2_proto_rawDescData)
})
return file_services_metrics_service_v2_proto_rawDescData
}
var file_services_metrics_service_v2_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_services_metrics_service_v2_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
var file_services_metrics_service_v2_proto_goTypes = []any{
(MetricsServiceV2Code)(0), // 0: grpc.MetricsServiceV2Code
(*Metric)(nil), // 1: grpc.Metric
(*MetricProcess)(nil), // 2: grpc.MetricProcess
(*MetricsServiceV2ConnectRequest)(nil), // 3: grpc.MetricsServiceV2ConnectRequest
(*MetricsServiceV2ConnectResponse)(nil), // 4: grpc.MetricsServiceV2ConnectResponse
}
var file_services_metrics_service_v2_proto_depIdxs = []int32{
2, // 0: grpc.Metric.process:type_name -> grpc.MetricProcess
1, // 1: grpc.MetricsServiceV2ConnectRequest.metrics:type_name -> grpc.Metric
0, // 2: grpc.MetricsServiceV2ConnectResponse.code:type_name -> grpc.MetricsServiceV2Code
3, // 3: grpc.MetricsServiceV2.Connect:input_type -> grpc.MetricsServiceV2ConnectRequest
4, // 4: grpc.MetricsServiceV2.Connect:output_type -> grpc.MetricsServiceV2ConnectResponse
4, // [4:5] is the sub-list for method output_type
3, // [3:4] 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_metrics_service_v2_proto_init() }
func file_services_metrics_service_v2_proto_init() {
if File_services_metrics_service_v2_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_services_metrics_service_v2_proto_msgTypes[0].Exporter = func(v any, i int) any {
switch v := v.(*Metric); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_services_metrics_service_v2_proto_msgTypes[1].Exporter = func(v any, i int) any {
switch v := v.(*MetricProcess); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_services_metrics_service_v2_proto_msgTypes[2].Exporter = func(v any, i int) any {
switch v := v.(*MetricsServiceV2ConnectRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_services_metrics_service_v2_proto_msgTypes[3].Exporter = func(v any, i int) any {
switch v := v.(*MetricsServiceV2ConnectResponse); 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_metrics_service_v2_proto_rawDesc,
NumEnums: 1,
NumMessages: 4,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_services_metrics_service_v2_proto_goTypes,
DependencyIndexes: file_services_metrics_service_v2_proto_depIdxs,
EnumInfos: file_services_metrics_service_v2_proto_enumTypes,
MessageInfos: file_services_metrics_service_v2_proto_msgTypes,
}.Build()
File_services_metrics_service_v2_proto = out.File
file_services_metrics_service_v2_proto_rawDesc = nil
file_services_metrics_service_v2_proto_goTypes = nil
file_services_metrics_service_v2_proto_depIdxs = nil
}

View File

@@ -0,0 +1,142 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.4.0
// - protoc v3.12.4
// source: services/metrics_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 (
MetricsServiceV2_Connect_FullMethodName = "/grpc.MetricsServiceV2/Connect"
)
// MetricsServiceV2Client is the client API for MetricsServiceV2 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 MetricsServiceV2Client interface {
Connect(ctx context.Context, opts ...grpc.CallOption) (MetricsServiceV2_ConnectClient, error)
}
type metricsServiceV2Client struct {
cc grpc.ClientConnInterface
}
func NewMetricsServiceV2Client(cc grpc.ClientConnInterface) MetricsServiceV2Client {
return &metricsServiceV2Client{cc}
}
func (c *metricsServiceV2Client) Connect(ctx context.Context, opts ...grpc.CallOption) (MetricsServiceV2_ConnectClient, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
stream, err := c.cc.NewStream(ctx, &MetricsServiceV2_ServiceDesc.Streams[0], MetricsServiceV2_Connect_FullMethodName, cOpts...)
if err != nil {
return nil, err
}
x := &metricsServiceV2ConnectClient{ClientStream: stream}
return x, nil
}
type MetricsServiceV2_ConnectClient interface {
Send(*MetricsServiceV2ConnectRequest) error
Recv() (*MetricsServiceV2ConnectResponse, error)
grpc.ClientStream
}
type metricsServiceV2ConnectClient struct {
grpc.ClientStream
}
func (x *metricsServiceV2ConnectClient) Send(m *MetricsServiceV2ConnectRequest) error {
return x.ClientStream.SendMsg(m)
}
func (x *metricsServiceV2ConnectClient) Recv() (*MetricsServiceV2ConnectResponse, error) {
m := new(MetricsServiceV2ConnectResponse)
if err := x.ClientStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
// MetricsServiceV2Server is the server API for MetricsServiceV2 service.
// All implementations must embed UnimplementedMetricsServiceV2Server
// for forward compatibility
type MetricsServiceV2Server interface {
Connect(MetricsServiceV2_ConnectServer) error
mustEmbedUnimplementedMetricsServiceV2Server()
}
// UnimplementedMetricsServiceV2Server must be embedded to have forward compatible implementations.
type UnimplementedMetricsServiceV2Server struct {
}
func (UnimplementedMetricsServiceV2Server) Connect(MetricsServiceV2_ConnectServer) error {
return status.Errorf(codes.Unimplemented, "method Connect not implemented")
}
func (UnimplementedMetricsServiceV2Server) mustEmbedUnimplementedMetricsServiceV2Server() {}
// UnsafeMetricsServiceV2Server may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to MetricsServiceV2Server will
// result in compilation errors.
type UnsafeMetricsServiceV2Server interface {
mustEmbedUnimplementedMetricsServiceV2Server()
}
func RegisterMetricsServiceV2Server(s grpc.ServiceRegistrar, srv MetricsServiceV2Server) {
s.RegisterService(&MetricsServiceV2_ServiceDesc, srv)
}
func _MetricsServiceV2_Connect_Handler(srv interface{}, stream grpc.ServerStream) error {
return srv.(MetricsServiceV2Server).Connect(&metricsServiceV2ConnectServer{ServerStream: stream})
}
type MetricsServiceV2_ConnectServer interface {
Send(*MetricsServiceV2ConnectResponse) error
Recv() (*MetricsServiceV2ConnectRequest, error)
grpc.ServerStream
}
type metricsServiceV2ConnectServer struct {
grpc.ServerStream
}
func (x *metricsServiceV2ConnectServer) Send(m *MetricsServiceV2ConnectResponse) error {
return x.ServerStream.SendMsg(m)
}
func (x *metricsServiceV2ConnectServer) Recv() (*MetricsServiceV2ConnectRequest, error) {
m := new(MetricsServiceV2ConnectRequest)
if err := x.ServerStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
// MetricsServiceV2_ServiceDesc is the grpc.ServiceDesc for MetricsServiceV2 service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var MetricsServiceV2_ServiceDesc = grpc.ServiceDesc{
ServiceName: "grpc.MetricsServiceV2",
HandlerType: (*MetricsServiceV2Server)(nil),
Methods: []grpc.MethodDesc{},
Streams: []grpc.StreamDesc{
{
StreamName: "Connect",
Handler: _MetricsServiceV2_Connect_Handler,
ServerStreams: true,
ClientStreams: true,
},
},
Metadata: "services/metrics_service_v2.proto",
}

View File

@@ -1,13 +1,12 @@
// Code generated by protoc-gen-go. DO NOT EDIT. // Code generated by protoc-gen-go. DO NOT EDIT.
// versions: // versions:
// protoc-gen-go v1.25.0 // protoc-gen-go v1.34.2
// protoc v3.20.1 // protoc v3.12.4
// source: services/model_base_service.proto // source: services/model_base_service.proto
package grpc package grpc
import ( import (
proto "github.com/golang/protobuf/proto"
protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl" protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect" reflect "reflect"
@@ -20,10 +19,6 @@ const (
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
) )
// This is a compile-time assertion that a sufficiently up-to-date version
// of the legacy proto package is being used.
const _ = proto.ProtoPackageIsVersion4
var File_services_model_base_service_proto protoreflect.FileDescriptor var File_services_model_base_service_proto protoreflect.FileDescriptor
var file_services_model_base_service_proto_rawDesc = []byte{ var file_services_model_base_service_proto_rawDesc = []byte{
@@ -71,7 +66,7 @@ var file_services_model_base_service_proto_rawDesc = []byte{
0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
} }
var file_services_model_base_service_proto_goTypes = []interface{}{ var file_services_model_base_service_proto_goTypes = []any{
(*Request)(nil), // 0: grpc.Request (*Request)(nil), // 0: grpc.Request
(*Response)(nil), // 1: grpc.Response (*Response)(nil), // 1: grpc.Response
} }

View File

@@ -1,7 +1,7 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT. // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions: // versions:
// - protoc-gen-go-grpc v1.2.0 // - protoc-gen-go-grpc v1.4.0
// - protoc v3.20.1 // - protoc v3.12.4
// source: services/model_base_service.proto // source: services/model_base_service.proto
package grpc package grpc
@@ -15,8 +15,23 @@ import (
// This is a compile-time assertion to ensure that this generated file // This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against. // is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later. // Requires gRPC-Go v1.62.0 or later.
const _ = grpc.SupportPackageIsVersion7 const _ = grpc.SupportPackageIsVersion8
const (
ModelBaseService_GetById_FullMethodName = "/grpc.ModelBaseService/GetById"
ModelBaseService_Get_FullMethodName = "/grpc.ModelBaseService/Get"
ModelBaseService_GetList_FullMethodName = "/grpc.ModelBaseService/GetList"
ModelBaseService_DeleteById_FullMethodName = "/grpc.ModelBaseService/DeleteById"
ModelBaseService_Delete_FullMethodName = "/grpc.ModelBaseService/Delete"
ModelBaseService_DeleteList_FullMethodName = "/grpc.ModelBaseService/DeleteList"
ModelBaseService_ForceDeleteList_FullMethodName = "/grpc.ModelBaseService/ForceDeleteList"
ModelBaseService_UpdateById_FullMethodName = "/grpc.ModelBaseService/UpdateById"
ModelBaseService_Update_FullMethodName = "/grpc.ModelBaseService/Update"
ModelBaseService_UpdateDoc_FullMethodName = "/grpc.ModelBaseService/UpdateDoc"
ModelBaseService_Insert_FullMethodName = "/grpc.ModelBaseService/Insert"
ModelBaseService_Count_FullMethodName = "/grpc.ModelBaseService/Count"
)
// ModelBaseServiceClient is the client API for ModelBaseService service. // ModelBaseServiceClient is the client API for ModelBaseService service.
// //
@@ -45,8 +60,9 @@ func NewModelBaseServiceClient(cc grpc.ClientConnInterface) ModelBaseServiceClie
} }
func (c *modelBaseServiceClient) GetById(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) { func (c *modelBaseServiceClient) GetById(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(Response) out := new(Response)
err := c.cc.Invoke(ctx, "/grpc.ModelBaseService/GetById", in, out, opts...) err := c.cc.Invoke(ctx, ModelBaseService_GetById_FullMethodName, in, out, cOpts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
@@ -54,8 +70,9 @@ func (c *modelBaseServiceClient) GetById(ctx context.Context, in *Request, opts
} }
func (c *modelBaseServiceClient) Get(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) { func (c *modelBaseServiceClient) Get(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(Response) out := new(Response)
err := c.cc.Invoke(ctx, "/grpc.ModelBaseService/Get", in, out, opts...) err := c.cc.Invoke(ctx, ModelBaseService_Get_FullMethodName, in, out, cOpts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
@@ -63,8 +80,9 @@ func (c *modelBaseServiceClient) Get(ctx context.Context, in *Request, opts ...g
} }
func (c *modelBaseServiceClient) GetList(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) { func (c *modelBaseServiceClient) GetList(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(Response) out := new(Response)
err := c.cc.Invoke(ctx, "/grpc.ModelBaseService/GetList", in, out, opts...) err := c.cc.Invoke(ctx, ModelBaseService_GetList_FullMethodName, in, out, cOpts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
@@ -72,8 +90,9 @@ func (c *modelBaseServiceClient) GetList(ctx context.Context, in *Request, opts
} }
func (c *modelBaseServiceClient) DeleteById(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) { func (c *modelBaseServiceClient) DeleteById(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(Response) out := new(Response)
err := c.cc.Invoke(ctx, "/grpc.ModelBaseService/DeleteById", in, out, opts...) err := c.cc.Invoke(ctx, ModelBaseService_DeleteById_FullMethodName, in, out, cOpts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
@@ -81,8 +100,9 @@ func (c *modelBaseServiceClient) DeleteById(ctx context.Context, in *Request, op
} }
func (c *modelBaseServiceClient) Delete(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) { func (c *modelBaseServiceClient) Delete(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(Response) out := new(Response)
err := c.cc.Invoke(ctx, "/grpc.ModelBaseService/Delete", in, out, opts...) err := c.cc.Invoke(ctx, ModelBaseService_Delete_FullMethodName, in, out, cOpts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
@@ -90,8 +110,9 @@ func (c *modelBaseServiceClient) Delete(ctx context.Context, in *Request, opts .
} }
func (c *modelBaseServiceClient) DeleteList(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) { func (c *modelBaseServiceClient) DeleteList(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(Response) out := new(Response)
err := c.cc.Invoke(ctx, "/grpc.ModelBaseService/DeleteList", in, out, opts...) err := c.cc.Invoke(ctx, ModelBaseService_DeleteList_FullMethodName, in, out, cOpts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
@@ -99,8 +120,9 @@ func (c *modelBaseServiceClient) DeleteList(ctx context.Context, in *Request, op
} }
func (c *modelBaseServiceClient) ForceDeleteList(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) { func (c *modelBaseServiceClient) ForceDeleteList(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(Response) out := new(Response)
err := c.cc.Invoke(ctx, "/grpc.ModelBaseService/ForceDeleteList", in, out, opts...) err := c.cc.Invoke(ctx, ModelBaseService_ForceDeleteList_FullMethodName, in, out, cOpts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
@@ -108,8 +130,9 @@ func (c *modelBaseServiceClient) ForceDeleteList(ctx context.Context, in *Reques
} }
func (c *modelBaseServiceClient) UpdateById(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) { func (c *modelBaseServiceClient) UpdateById(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(Response) out := new(Response)
err := c.cc.Invoke(ctx, "/grpc.ModelBaseService/UpdateById", in, out, opts...) err := c.cc.Invoke(ctx, ModelBaseService_UpdateById_FullMethodName, in, out, cOpts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
@@ -117,8 +140,9 @@ func (c *modelBaseServiceClient) UpdateById(ctx context.Context, in *Request, op
} }
func (c *modelBaseServiceClient) Update(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) { func (c *modelBaseServiceClient) Update(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(Response) out := new(Response)
err := c.cc.Invoke(ctx, "/grpc.ModelBaseService/Update", in, out, opts...) err := c.cc.Invoke(ctx, ModelBaseService_Update_FullMethodName, in, out, cOpts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
@@ -126,8 +150,9 @@ func (c *modelBaseServiceClient) Update(ctx context.Context, in *Request, opts .
} }
func (c *modelBaseServiceClient) UpdateDoc(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) { func (c *modelBaseServiceClient) UpdateDoc(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(Response) out := new(Response)
err := c.cc.Invoke(ctx, "/grpc.ModelBaseService/UpdateDoc", in, out, opts...) err := c.cc.Invoke(ctx, ModelBaseService_UpdateDoc_FullMethodName, in, out, cOpts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
@@ -135,8 +160,9 @@ func (c *modelBaseServiceClient) UpdateDoc(ctx context.Context, in *Request, opt
} }
func (c *modelBaseServiceClient) Insert(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) { func (c *modelBaseServiceClient) Insert(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(Response) out := new(Response)
err := c.cc.Invoke(ctx, "/grpc.ModelBaseService/Insert", in, out, opts...) err := c.cc.Invoke(ctx, ModelBaseService_Insert_FullMethodName, in, out, cOpts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
@@ -144,8 +170,9 @@ func (c *modelBaseServiceClient) Insert(ctx context.Context, in *Request, opts .
} }
func (c *modelBaseServiceClient) Count(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) { func (c *modelBaseServiceClient) Count(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(Response) out := new(Response)
err := c.cc.Invoke(ctx, "/grpc.ModelBaseService/Count", in, out, opts...) err := c.cc.Invoke(ctx, ModelBaseService_Count_FullMethodName, in, out, cOpts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
@@ -234,7 +261,7 @@ func _ModelBaseService_GetById_Handler(srv interface{}, ctx context.Context, dec
} }
info := &grpc.UnaryServerInfo{ info := &grpc.UnaryServerInfo{
Server: srv, Server: srv,
FullMethod: "/grpc.ModelBaseService/GetById", FullMethod: ModelBaseService_GetById_FullMethodName,
} }
handler := func(ctx context.Context, req interface{}) (interface{}, error) { handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ModelBaseServiceServer).GetById(ctx, req.(*Request)) return srv.(ModelBaseServiceServer).GetById(ctx, req.(*Request))
@@ -252,7 +279,7 @@ func _ModelBaseService_Get_Handler(srv interface{}, ctx context.Context, dec fun
} }
info := &grpc.UnaryServerInfo{ info := &grpc.UnaryServerInfo{
Server: srv, Server: srv,
FullMethod: "/grpc.ModelBaseService/Get", FullMethod: ModelBaseService_Get_FullMethodName,
} }
handler := func(ctx context.Context, req interface{}) (interface{}, error) { handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ModelBaseServiceServer).Get(ctx, req.(*Request)) return srv.(ModelBaseServiceServer).Get(ctx, req.(*Request))
@@ -270,7 +297,7 @@ func _ModelBaseService_GetList_Handler(srv interface{}, ctx context.Context, dec
} }
info := &grpc.UnaryServerInfo{ info := &grpc.UnaryServerInfo{
Server: srv, Server: srv,
FullMethod: "/grpc.ModelBaseService/GetList", FullMethod: ModelBaseService_GetList_FullMethodName,
} }
handler := func(ctx context.Context, req interface{}) (interface{}, error) { handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ModelBaseServiceServer).GetList(ctx, req.(*Request)) return srv.(ModelBaseServiceServer).GetList(ctx, req.(*Request))
@@ -288,7 +315,7 @@ func _ModelBaseService_DeleteById_Handler(srv interface{}, ctx context.Context,
} }
info := &grpc.UnaryServerInfo{ info := &grpc.UnaryServerInfo{
Server: srv, Server: srv,
FullMethod: "/grpc.ModelBaseService/DeleteById", FullMethod: ModelBaseService_DeleteById_FullMethodName,
} }
handler := func(ctx context.Context, req interface{}) (interface{}, error) { handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ModelBaseServiceServer).DeleteById(ctx, req.(*Request)) return srv.(ModelBaseServiceServer).DeleteById(ctx, req.(*Request))
@@ -306,7 +333,7 @@ func _ModelBaseService_Delete_Handler(srv interface{}, ctx context.Context, dec
} }
info := &grpc.UnaryServerInfo{ info := &grpc.UnaryServerInfo{
Server: srv, Server: srv,
FullMethod: "/grpc.ModelBaseService/Delete", FullMethod: ModelBaseService_Delete_FullMethodName,
} }
handler := func(ctx context.Context, req interface{}) (interface{}, error) { handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ModelBaseServiceServer).Delete(ctx, req.(*Request)) return srv.(ModelBaseServiceServer).Delete(ctx, req.(*Request))
@@ -324,7 +351,7 @@ func _ModelBaseService_DeleteList_Handler(srv interface{}, ctx context.Context,
} }
info := &grpc.UnaryServerInfo{ info := &grpc.UnaryServerInfo{
Server: srv, Server: srv,
FullMethod: "/grpc.ModelBaseService/DeleteList", FullMethod: ModelBaseService_DeleteList_FullMethodName,
} }
handler := func(ctx context.Context, req interface{}) (interface{}, error) { handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ModelBaseServiceServer).DeleteList(ctx, req.(*Request)) return srv.(ModelBaseServiceServer).DeleteList(ctx, req.(*Request))
@@ -342,7 +369,7 @@ func _ModelBaseService_ForceDeleteList_Handler(srv interface{}, ctx context.Cont
} }
info := &grpc.UnaryServerInfo{ info := &grpc.UnaryServerInfo{
Server: srv, Server: srv,
FullMethod: "/grpc.ModelBaseService/ForceDeleteList", FullMethod: ModelBaseService_ForceDeleteList_FullMethodName,
} }
handler := func(ctx context.Context, req interface{}) (interface{}, error) { handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ModelBaseServiceServer).ForceDeleteList(ctx, req.(*Request)) return srv.(ModelBaseServiceServer).ForceDeleteList(ctx, req.(*Request))
@@ -360,7 +387,7 @@ func _ModelBaseService_UpdateById_Handler(srv interface{}, ctx context.Context,
} }
info := &grpc.UnaryServerInfo{ info := &grpc.UnaryServerInfo{
Server: srv, Server: srv,
FullMethod: "/grpc.ModelBaseService/UpdateById", FullMethod: ModelBaseService_UpdateById_FullMethodName,
} }
handler := func(ctx context.Context, req interface{}) (interface{}, error) { handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ModelBaseServiceServer).UpdateById(ctx, req.(*Request)) return srv.(ModelBaseServiceServer).UpdateById(ctx, req.(*Request))
@@ -378,7 +405,7 @@ func _ModelBaseService_Update_Handler(srv interface{}, ctx context.Context, dec
} }
info := &grpc.UnaryServerInfo{ info := &grpc.UnaryServerInfo{
Server: srv, Server: srv,
FullMethod: "/grpc.ModelBaseService/Update", FullMethod: ModelBaseService_Update_FullMethodName,
} }
handler := func(ctx context.Context, req interface{}) (interface{}, error) { handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ModelBaseServiceServer).Update(ctx, req.(*Request)) return srv.(ModelBaseServiceServer).Update(ctx, req.(*Request))
@@ -396,7 +423,7 @@ func _ModelBaseService_UpdateDoc_Handler(srv interface{}, ctx context.Context, d
} }
info := &grpc.UnaryServerInfo{ info := &grpc.UnaryServerInfo{
Server: srv, Server: srv,
FullMethod: "/grpc.ModelBaseService/UpdateDoc", FullMethod: ModelBaseService_UpdateDoc_FullMethodName,
} }
handler := func(ctx context.Context, req interface{}) (interface{}, error) { handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ModelBaseServiceServer).UpdateDoc(ctx, req.(*Request)) return srv.(ModelBaseServiceServer).UpdateDoc(ctx, req.(*Request))
@@ -414,7 +441,7 @@ func _ModelBaseService_Insert_Handler(srv interface{}, ctx context.Context, dec
} }
info := &grpc.UnaryServerInfo{ info := &grpc.UnaryServerInfo{
Server: srv, Server: srv,
FullMethod: "/grpc.ModelBaseService/Insert", FullMethod: ModelBaseService_Insert_FullMethodName,
} }
handler := func(ctx context.Context, req interface{}) (interface{}, error) { handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ModelBaseServiceServer).Insert(ctx, req.(*Request)) return srv.(ModelBaseServiceServer).Insert(ctx, req.(*Request))
@@ -432,7 +459,7 @@ func _ModelBaseService_Count_Handler(srv interface{}, ctx context.Context, dec f
} }
info := &grpc.UnaryServerInfo{ info := &grpc.UnaryServerInfo{
Server: srv, Server: srv,
FullMethod: "/grpc.ModelBaseService/Count", FullMethod: ModelBaseService_Count_FullMethodName,
} }
handler := func(ctx context.Context, req interface{}) (interface{}, error) { handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ModelBaseServiceServer).Count(ctx, req.(*Request)) return srv.(ModelBaseServiceServer).Count(ctx, req.(*Request))

View File

@@ -1,13 +1,12 @@
// Code generated by protoc-gen-go. DO NOT EDIT. // Code generated by protoc-gen-go. DO NOT EDIT.
// versions: // versions:
// protoc-gen-go v1.25.0 // protoc-gen-go v1.34.2
// protoc v3.20.1 // protoc v3.12.4
// source: services/model_base_service_v2.proto // source: services/model_base_service_v2.proto
package grpc package grpc
import ( import (
proto "github.com/golang/protobuf/proto"
protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl" protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect" reflect "reflect"
@@ -20,10 +19,6 @@ const (
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
) )
// This is a compile-time assertion that a sufficiently up-to-date version
// of the legacy proto package is being used.
const _ = proto.ProtoPackageIsVersion4
var File_services_model_base_service_v2_proto protoreflect.FileDescriptor var File_services_model_base_service_v2_proto protoreflect.FileDescriptor
var file_services_model_base_service_v2_proto_rawDesc = []byte{ var file_services_model_base_service_v2_proto_rawDesc = []byte{
@@ -99,7 +94,7 @@ var file_services_model_base_service_v2_proto_rawDesc = []byte{
0x74, 0x6f, 0x33, 0x74, 0x6f, 0x33,
} }
var file_services_model_base_service_v2_proto_goTypes = []interface{}{ var file_services_model_base_service_v2_proto_goTypes = []any{
(*ModelServiceV2GetByIdRequest)(nil), // 0: grpc.ModelServiceV2GetByIdRequest (*ModelServiceV2GetByIdRequest)(nil), // 0: grpc.ModelServiceV2GetByIdRequest
(*ModelServiceV2GetOneRequest)(nil), // 1: grpc.ModelServiceV2GetOneRequest (*ModelServiceV2GetOneRequest)(nil), // 1: grpc.ModelServiceV2GetOneRequest
(*ModelServiceV2GetManyRequest)(nil), // 2: grpc.ModelServiceV2GetManyRequest (*ModelServiceV2GetManyRequest)(nil), // 2: grpc.ModelServiceV2GetManyRequest

View File

@@ -1,7 +1,7 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT. // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions: // versions:
// - protoc-gen-go-grpc v1.2.0 // - protoc-gen-go-grpc v1.4.0
// - protoc v3.20.1 // - protoc v3.12.4
// source: services/model_base_service_v2.proto // source: services/model_base_service_v2.proto
package grpc package grpc
@@ -15,8 +15,25 @@ import (
// This is a compile-time assertion to ensure that this generated file // This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against. // is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later. // Requires gRPC-Go v1.62.0 or later.
const _ = grpc.SupportPackageIsVersion7 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. // ModelBaseServiceV2Client is the client API for ModelBaseServiceV2 service.
// //
@@ -47,8 +64,9 @@ func NewModelBaseServiceV2Client(cc grpc.ClientConnInterface) ModelBaseServiceV2
} }
func (c *modelBaseServiceV2Client) GetById(ctx context.Context, in *ModelServiceV2GetByIdRequest, opts ...grpc.CallOption) (*Response, error) { func (c *modelBaseServiceV2Client) GetById(ctx context.Context, in *ModelServiceV2GetByIdRequest, opts ...grpc.CallOption) (*Response, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(Response) out := new(Response)
err := c.cc.Invoke(ctx, "/grpc.ModelBaseServiceV2/GetById", in, out, opts...) err := c.cc.Invoke(ctx, ModelBaseServiceV2_GetById_FullMethodName, in, out, cOpts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
@@ -56,8 +74,9 @@ func (c *modelBaseServiceV2Client) GetById(ctx context.Context, in *ModelService
} }
func (c *modelBaseServiceV2Client) GetOne(ctx context.Context, in *ModelServiceV2GetOneRequest, opts ...grpc.CallOption) (*Response, error) { func (c *modelBaseServiceV2Client) GetOne(ctx context.Context, in *ModelServiceV2GetOneRequest, opts ...grpc.CallOption) (*Response, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(Response) out := new(Response)
err := c.cc.Invoke(ctx, "/grpc.ModelBaseServiceV2/GetOne", in, out, opts...) err := c.cc.Invoke(ctx, ModelBaseServiceV2_GetOne_FullMethodName, in, out, cOpts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
@@ -65,8 +84,9 @@ func (c *modelBaseServiceV2Client) GetOne(ctx context.Context, in *ModelServiceV
} }
func (c *modelBaseServiceV2Client) GetMany(ctx context.Context, in *ModelServiceV2GetManyRequest, opts ...grpc.CallOption) (*Response, error) { func (c *modelBaseServiceV2Client) GetMany(ctx context.Context, in *ModelServiceV2GetManyRequest, opts ...grpc.CallOption) (*Response, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(Response) out := new(Response)
err := c.cc.Invoke(ctx, "/grpc.ModelBaseServiceV2/GetMany", in, out, opts...) err := c.cc.Invoke(ctx, ModelBaseServiceV2_GetMany_FullMethodName, in, out, cOpts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
@@ -74,8 +94,9 @@ func (c *modelBaseServiceV2Client) GetMany(ctx context.Context, in *ModelService
} }
func (c *modelBaseServiceV2Client) DeleteById(ctx context.Context, in *ModelServiceV2DeleteByIdRequest, opts ...grpc.CallOption) (*Response, error) { func (c *modelBaseServiceV2Client) DeleteById(ctx context.Context, in *ModelServiceV2DeleteByIdRequest, opts ...grpc.CallOption) (*Response, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(Response) out := new(Response)
err := c.cc.Invoke(ctx, "/grpc.ModelBaseServiceV2/DeleteById", in, out, opts...) err := c.cc.Invoke(ctx, ModelBaseServiceV2_DeleteById_FullMethodName, in, out, cOpts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
@@ -83,8 +104,9 @@ func (c *modelBaseServiceV2Client) DeleteById(ctx context.Context, in *ModelServ
} }
func (c *modelBaseServiceV2Client) DeleteOne(ctx context.Context, in *ModelServiceV2DeleteOneRequest, opts ...grpc.CallOption) (*Response, error) { func (c *modelBaseServiceV2Client) DeleteOne(ctx context.Context, in *ModelServiceV2DeleteOneRequest, opts ...grpc.CallOption) (*Response, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(Response) out := new(Response)
err := c.cc.Invoke(ctx, "/grpc.ModelBaseServiceV2/DeleteOne", in, out, opts...) err := c.cc.Invoke(ctx, ModelBaseServiceV2_DeleteOne_FullMethodName, in, out, cOpts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
@@ -92,8 +114,9 @@ func (c *modelBaseServiceV2Client) DeleteOne(ctx context.Context, in *ModelServi
} }
func (c *modelBaseServiceV2Client) DeleteMany(ctx context.Context, in *ModelServiceV2DeleteManyRequest, opts ...grpc.CallOption) (*Response, error) { func (c *modelBaseServiceV2Client) DeleteMany(ctx context.Context, in *ModelServiceV2DeleteManyRequest, opts ...grpc.CallOption) (*Response, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(Response) out := new(Response)
err := c.cc.Invoke(ctx, "/grpc.ModelBaseServiceV2/DeleteMany", in, out, opts...) err := c.cc.Invoke(ctx, ModelBaseServiceV2_DeleteMany_FullMethodName, in, out, cOpts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
@@ -101,8 +124,9 @@ func (c *modelBaseServiceV2Client) DeleteMany(ctx context.Context, in *ModelServ
} }
func (c *modelBaseServiceV2Client) UpdateById(ctx context.Context, in *ModelServiceV2UpdateByIdRequest, opts ...grpc.CallOption) (*Response, error) { func (c *modelBaseServiceV2Client) UpdateById(ctx context.Context, in *ModelServiceV2UpdateByIdRequest, opts ...grpc.CallOption) (*Response, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(Response) out := new(Response)
err := c.cc.Invoke(ctx, "/grpc.ModelBaseServiceV2/UpdateById", in, out, opts...) err := c.cc.Invoke(ctx, ModelBaseServiceV2_UpdateById_FullMethodName, in, out, cOpts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
@@ -110,8 +134,9 @@ func (c *modelBaseServiceV2Client) UpdateById(ctx context.Context, in *ModelServ
} }
func (c *modelBaseServiceV2Client) UpdateOne(ctx context.Context, in *ModelServiceV2UpdateOneRequest, opts ...grpc.CallOption) (*Response, error) { func (c *modelBaseServiceV2Client) UpdateOne(ctx context.Context, in *ModelServiceV2UpdateOneRequest, opts ...grpc.CallOption) (*Response, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(Response) out := new(Response)
err := c.cc.Invoke(ctx, "/grpc.ModelBaseServiceV2/UpdateOne", in, out, opts...) err := c.cc.Invoke(ctx, ModelBaseServiceV2_UpdateOne_FullMethodName, in, out, cOpts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
@@ -119,8 +144,9 @@ func (c *modelBaseServiceV2Client) UpdateOne(ctx context.Context, in *ModelServi
} }
func (c *modelBaseServiceV2Client) UpdateMany(ctx context.Context, in *ModelServiceV2UpdateManyRequest, opts ...grpc.CallOption) (*Response, error) { func (c *modelBaseServiceV2Client) UpdateMany(ctx context.Context, in *ModelServiceV2UpdateManyRequest, opts ...grpc.CallOption) (*Response, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(Response) out := new(Response)
err := c.cc.Invoke(ctx, "/grpc.ModelBaseServiceV2/UpdateMany", in, out, opts...) err := c.cc.Invoke(ctx, ModelBaseServiceV2_UpdateMany_FullMethodName, in, out, cOpts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
@@ -128,8 +154,9 @@ func (c *modelBaseServiceV2Client) UpdateMany(ctx context.Context, in *ModelServ
} }
func (c *modelBaseServiceV2Client) ReplaceById(ctx context.Context, in *ModelServiceV2ReplaceByIdRequest, opts ...grpc.CallOption) (*Response, error) { func (c *modelBaseServiceV2Client) ReplaceById(ctx context.Context, in *ModelServiceV2ReplaceByIdRequest, opts ...grpc.CallOption) (*Response, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(Response) out := new(Response)
err := c.cc.Invoke(ctx, "/grpc.ModelBaseServiceV2/ReplaceById", in, out, opts...) err := c.cc.Invoke(ctx, ModelBaseServiceV2_ReplaceById_FullMethodName, in, out, cOpts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
@@ -137,8 +164,9 @@ func (c *modelBaseServiceV2Client) ReplaceById(ctx context.Context, in *ModelSer
} }
func (c *modelBaseServiceV2Client) ReplaceOne(ctx context.Context, in *ModelServiceV2ReplaceOneRequest, opts ...grpc.CallOption) (*Response, error) { func (c *modelBaseServiceV2Client) ReplaceOne(ctx context.Context, in *ModelServiceV2ReplaceOneRequest, opts ...grpc.CallOption) (*Response, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(Response) out := new(Response)
err := c.cc.Invoke(ctx, "/grpc.ModelBaseServiceV2/ReplaceOne", in, out, opts...) err := c.cc.Invoke(ctx, ModelBaseServiceV2_ReplaceOne_FullMethodName, in, out, cOpts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
@@ -146,8 +174,9 @@ func (c *modelBaseServiceV2Client) ReplaceOne(ctx context.Context, in *ModelServ
} }
func (c *modelBaseServiceV2Client) InsertOne(ctx context.Context, in *ModelServiceV2InsertOneRequest, opts ...grpc.CallOption) (*Response, error) { func (c *modelBaseServiceV2Client) InsertOne(ctx context.Context, in *ModelServiceV2InsertOneRequest, opts ...grpc.CallOption) (*Response, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(Response) out := new(Response)
err := c.cc.Invoke(ctx, "/grpc.ModelBaseServiceV2/InsertOne", in, out, opts...) err := c.cc.Invoke(ctx, ModelBaseServiceV2_InsertOne_FullMethodName, in, out, cOpts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
@@ -155,8 +184,9 @@ func (c *modelBaseServiceV2Client) InsertOne(ctx context.Context, in *ModelServi
} }
func (c *modelBaseServiceV2Client) InsertMany(ctx context.Context, in *ModelServiceV2InsertManyRequest, opts ...grpc.CallOption) (*Response, error) { func (c *modelBaseServiceV2Client) InsertMany(ctx context.Context, in *ModelServiceV2InsertManyRequest, opts ...grpc.CallOption) (*Response, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(Response) out := new(Response)
err := c.cc.Invoke(ctx, "/grpc.ModelBaseServiceV2/InsertMany", in, out, opts...) err := c.cc.Invoke(ctx, ModelBaseServiceV2_InsertMany_FullMethodName, in, out, cOpts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
@@ -164,8 +194,9 @@ func (c *modelBaseServiceV2Client) InsertMany(ctx context.Context, in *ModelServ
} }
func (c *modelBaseServiceV2Client) Count(ctx context.Context, in *ModelServiceV2CountRequest, opts ...grpc.CallOption) (*Response, error) { func (c *modelBaseServiceV2Client) Count(ctx context.Context, in *ModelServiceV2CountRequest, opts ...grpc.CallOption) (*Response, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(Response) out := new(Response)
err := c.cc.Invoke(ctx, "/grpc.ModelBaseServiceV2/Count", in, out, opts...) err := c.cc.Invoke(ctx, ModelBaseServiceV2_Count_FullMethodName, in, out, cOpts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
@@ -262,7 +293,7 @@ func _ModelBaseServiceV2_GetById_Handler(srv interface{}, ctx context.Context, d
} }
info := &grpc.UnaryServerInfo{ info := &grpc.UnaryServerInfo{
Server: srv, Server: srv,
FullMethod: "/grpc.ModelBaseServiceV2/GetById", FullMethod: ModelBaseServiceV2_GetById_FullMethodName,
} }
handler := func(ctx context.Context, req interface{}) (interface{}, error) { handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ModelBaseServiceV2Server).GetById(ctx, req.(*ModelServiceV2GetByIdRequest)) return srv.(ModelBaseServiceV2Server).GetById(ctx, req.(*ModelServiceV2GetByIdRequest))
@@ -280,7 +311,7 @@ func _ModelBaseServiceV2_GetOne_Handler(srv interface{}, ctx context.Context, de
} }
info := &grpc.UnaryServerInfo{ info := &grpc.UnaryServerInfo{
Server: srv, Server: srv,
FullMethod: "/grpc.ModelBaseServiceV2/GetOne", FullMethod: ModelBaseServiceV2_GetOne_FullMethodName,
} }
handler := func(ctx context.Context, req interface{}) (interface{}, error) { handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ModelBaseServiceV2Server).GetOne(ctx, req.(*ModelServiceV2GetOneRequest)) return srv.(ModelBaseServiceV2Server).GetOne(ctx, req.(*ModelServiceV2GetOneRequest))
@@ -298,7 +329,7 @@ func _ModelBaseServiceV2_GetMany_Handler(srv interface{}, ctx context.Context, d
} }
info := &grpc.UnaryServerInfo{ info := &grpc.UnaryServerInfo{
Server: srv, Server: srv,
FullMethod: "/grpc.ModelBaseServiceV2/GetMany", FullMethod: ModelBaseServiceV2_GetMany_FullMethodName,
} }
handler := func(ctx context.Context, req interface{}) (interface{}, error) { handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ModelBaseServiceV2Server).GetMany(ctx, req.(*ModelServiceV2GetManyRequest)) return srv.(ModelBaseServiceV2Server).GetMany(ctx, req.(*ModelServiceV2GetManyRequest))
@@ -316,7 +347,7 @@ func _ModelBaseServiceV2_DeleteById_Handler(srv interface{}, ctx context.Context
} }
info := &grpc.UnaryServerInfo{ info := &grpc.UnaryServerInfo{
Server: srv, Server: srv,
FullMethod: "/grpc.ModelBaseServiceV2/DeleteById", FullMethod: ModelBaseServiceV2_DeleteById_FullMethodName,
} }
handler := func(ctx context.Context, req interface{}) (interface{}, error) { handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ModelBaseServiceV2Server).DeleteById(ctx, req.(*ModelServiceV2DeleteByIdRequest)) return srv.(ModelBaseServiceV2Server).DeleteById(ctx, req.(*ModelServiceV2DeleteByIdRequest))
@@ -334,7 +365,7 @@ func _ModelBaseServiceV2_DeleteOne_Handler(srv interface{}, ctx context.Context,
} }
info := &grpc.UnaryServerInfo{ info := &grpc.UnaryServerInfo{
Server: srv, Server: srv,
FullMethod: "/grpc.ModelBaseServiceV2/DeleteOne", FullMethod: ModelBaseServiceV2_DeleteOne_FullMethodName,
} }
handler := func(ctx context.Context, req interface{}) (interface{}, error) { handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ModelBaseServiceV2Server).DeleteOne(ctx, req.(*ModelServiceV2DeleteOneRequest)) return srv.(ModelBaseServiceV2Server).DeleteOne(ctx, req.(*ModelServiceV2DeleteOneRequest))
@@ -352,7 +383,7 @@ func _ModelBaseServiceV2_DeleteMany_Handler(srv interface{}, ctx context.Context
} }
info := &grpc.UnaryServerInfo{ info := &grpc.UnaryServerInfo{
Server: srv, Server: srv,
FullMethod: "/grpc.ModelBaseServiceV2/DeleteMany", FullMethod: ModelBaseServiceV2_DeleteMany_FullMethodName,
} }
handler := func(ctx context.Context, req interface{}) (interface{}, error) { handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ModelBaseServiceV2Server).DeleteMany(ctx, req.(*ModelServiceV2DeleteManyRequest)) return srv.(ModelBaseServiceV2Server).DeleteMany(ctx, req.(*ModelServiceV2DeleteManyRequest))
@@ -370,7 +401,7 @@ func _ModelBaseServiceV2_UpdateById_Handler(srv interface{}, ctx context.Context
} }
info := &grpc.UnaryServerInfo{ info := &grpc.UnaryServerInfo{
Server: srv, Server: srv,
FullMethod: "/grpc.ModelBaseServiceV2/UpdateById", FullMethod: ModelBaseServiceV2_UpdateById_FullMethodName,
} }
handler := func(ctx context.Context, req interface{}) (interface{}, error) { handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ModelBaseServiceV2Server).UpdateById(ctx, req.(*ModelServiceV2UpdateByIdRequest)) return srv.(ModelBaseServiceV2Server).UpdateById(ctx, req.(*ModelServiceV2UpdateByIdRequest))
@@ -388,7 +419,7 @@ func _ModelBaseServiceV2_UpdateOne_Handler(srv interface{}, ctx context.Context,
} }
info := &grpc.UnaryServerInfo{ info := &grpc.UnaryServerInfo{
Server: srv, Server: srv,
FullMethod: "/grpc.ModelBaseServiceV2/UpdateOne", FullMethod: ModelBaseServiceV2_UpdateOne_FullMethodName,
} }
handler := func(ctx context.Context, req interface{}) (interface{}, error) { handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ModelBaseServiceV2Server).UpdateOne(ctx, req.(*ModelServiceV2UpdateOneRequest)) return srv.(ModelBaseServiceV2Server).UpdateOne(ctx, req.(*ModelServiceV2UpdateOneRequest))
@@ -406,7 +437,7 @@ func _ModelBaseServiceV2_UpdateMany_Handler(srv interface{}, ctx context.Context
} }
info := &grpc.UnaryServerInfo{ info := &grpc.UnaryServerInfo{
Server: srv, Server: srv,
FullMethod: "/grpc.ModelBaseServiceV2/UpdateMany", FullMethod: ModelBaseServiceV2_UpdateMany_FullMethodName,
} }
handler := func(ctx context.Context, req interface{}) (interface{}, error) { handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ModelBaseServiceV2Server).UpdateMany(ctx, req.(*ModelServiceV2UpdateManyRequest)) return srv.(ModelBaseServiceV2Server).UpdateMany(ctx, req.(*ModelServiceV2UpdateManyRequest))
@@ -424,7 +455,7 @@ func _ModelBaseServiceV2_ReplaceById_Handler(srv interface{}, ctx context.Contex
} }
info := &grpc.UnaryServerInfo{ info := &grpc.UnaryServerInfo{
Server: srv, Server: srv,
FullMethod: "/grpc.ModelBaseServiceV2/ReplaceById", FullMethod: ModelBaseServiceV2_ReplaceById_FullMethodName,
} }
handler := func(ctx context.Context, req interface{}) (interface{}, error) { handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ModelBaseServiceV2Server).ReplaceById(ctx, req.(*ModelServiceV2ReplaceByIdRequest)) return srv.(ModelBaseServiceV2Server).ReplaceById(ctx, req.(*ModelServiceV2ReplaceByIdRequest))
@@ -442,7 +473,7 @@ func _ModelBaseServiceV2_ReplaceOne_Handler(srv interface{}, ctx context.Context
} }
info := &grpc.UnaryServerInfo{ info := &grpc.UnaryServerInfo{
Server: srv, Server: srv,
FullMethod: "/grpc.ModelBaseServiceV2/ReplaceOne", FullMethod: ModelBaseServiceV2_ReplaceOne_FullMethodName,
} }
handler := func(ctx context.Context, req interface{}) (interface{}, error) { handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ModelBaseServiceV2Server).ReplaceOne(ctx, req.(*ModelServiceV2ReplaceOneRequest)) return srv.(ModelBaseServiceV2Server).ReplaceOne(ctx, req.(*ModelServiceV2ReplaceOneRequest))
@@ -460,7 +491,7 @@ func _ModelBaseServiceV2_InsertOne_Handler(srv interface{}, ctx context.Context,
} }
info := &grpc.UnaryServerInfo{ info := &grpc.UnaryServerInfo{
Server: srv, Server: srv,
FullMethod: "/grpc.ModelBaseServiceV2/InsertOne", FullMethod: ModelBaseServiceV2_InsertOne_FullMethodName,
} }
handler := func(ctx context.Context, req interface{}) (interface{}, error) { handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ModelBaseServiceV2Server).InsertOne(ctx, req.(*ModelServiceV2InsertOneRequest)) return srv.(ModelBaseServiceV2Server).InsertOne(ctx, req.(*ModelServiceV2InsertOneRequest))
@@ -478,7 +509,7 @@ func _ModelBaseServiceV2_InsertMany_Handler(srv interface{}, ctx context.Context
} }
info := &grpc.UnaryServerInfo{ info := &grpc.UnaryServerInfo{
Server: srv, Server: srv,
FullMethod: "/grpc.ModelBaseServiceV2/InsertMany", FullMethod: ModelBaseServiceV2_InsertMany_FullMethodName,
} }
handler := func(ctx context.Context, req interface{}) (interface{}, error) { handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ModelBaseServiceV2Server).InsertMany(ctx, req.(*ModelServiceV2InsertManyRequest)) return srv.(ModelBaseServiceV2Server).InsertMany(ctx, req.(*ModelServiceV2InsertManyRequest))
@@ -496,7 +527,7 @@ func _ModelBaseServiceV2_Count_Handler(srv interface{}, ctx context.Context, dec
} }
info := &grpc.UnaryServerInfo{ info := &grpc.UnaryServerInfo{
Server: srv, Server: srv,
FullMethod: "/grpc.ModelBaseServiceV2/Count", FullMethod: ModelBaseServiceV2_Count_FullMethodName,
} }
handler := func(ctx context.Context, req interface{}) (interface{}, error) { handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ModelBaseServiceV2Server).Count(ctx, req.(*ModelServiceV2CountRequest)) return srv.(ModelBaseServiceV2Server).Count(ctx, req.(*ModelServiceV2CountRequest))

View File

@@ -1,13 +1,12 @@
// Code generated by protoc-gen-go. DO NOT EDIT. // Code generated by protoc-gen-go. DO NOT EDIT.
// versions: // versions:
// protoc-gen-go v1.25.0 // protoc-gen-go v1.34.2
// protoc v3.20.1 // protoc v3.12.4
// source: services/model_delegate.proto // source: services/model_delegate.proto
package grpc package grpc
import ( import (
proto "github.com/golang/protobuf/proto"
protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl" protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect" reflect "reflect"
@@ -20,10 +19,6 @@ const (
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
) )
// This is a compile-time assertion that a sufficiently up-to-date version
// of the legacy proto package is being used.
const _ = proto.ProtoPackageIsVersion4
var File_services_model_delegate_proto protoreflect.FileDescriptor var File_services_model_delegate_proto protoreflect.FileDescriptor
var file_services_model_delegate_proto_rawDesc = []byte{ var file_services_model_delegate_proto_rawDesc = []byte{
@@ -39,7 +34,7 @@ var file_services_model_delegate_proto_rawDesc = []byte{
0x67, 0x72, 0x70, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x67, 0x72, 0x70, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
} }
var file_services_model_delegate_proto_goTypes = []interface{}{ var file_services_model_delegate_proto_goTypes = []any{
(*Request)(nil), // 0: grpc.Request (*Request)(nil), // 0: grpc.Request
(*Response)(nil), // 1: grpc.Response (*Response)(nil), // 1: grpc.Response
} }

View File

@@ -1,7 +1,7 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT. // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions: // versions:
// - protoc-gen-go-grpc v1.2.0 // - protoc-gen-go-grpc v1.4.0
// - protoc v3.20.1 // - protoc v3.12.4
// source: services/model_delegate.proto // source: services/model_delegate.proto
package grpc package grpc
@@ -15,8 +15,12 @@ import (
// This is a compile-time assertion to ensure that this generated file // This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against. // is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later. // Requires gRPC-Go v1.62.0 or later.
const _ = grpc.SupportPackageIsVersion7 const _ = grpc.SupportPackageIsVersion8
const (
ModelDelegate_Do_FullMethodName = "/grpc.ModelDelegate/Do"
)
// ModelDelegateClient is the client API for ModelDelegate service. // ModelDelegateClient is the client API for ModelDelegate service.
// //
@@ -34,8 +38,9 @@ func NewModelDelegateClient(cc grpc.ClientConnInterface) ModelDelegateClient {
} }
func (c *modelDelegateClient) Do(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) { func (c *modelDelegateClient) Do(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(Response) out := new(Response)
err := c.cc.Invoke(ctx, "/grpc.ModelDelegate/Do", in, out, opts...) err := c.cc.Invoke(ctx, ModelDelegate_Do_FullMethodName, in, out, cOpts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
@@ -80,7 +85,7 @@ func _ModelDelegate_Do_Handler(srv interface{}, ctx context.Context, dec func(in
} }
info := &grpc.UnaryServerInfo{ info := &grpc.UnaryServerInfo{
Server: srv, Server: srv,
FullMethod: "/grpc.ModelDelegate/Do", FullMethod: ModelDelegate_Do_FullMethodName,
} }
handler := func(ctx context.Context, req interface{}) (interface{}, error) { handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ModelDelegateServer).Do(ctx, req.(*Request)) return srv.(ModelDelegateServer).Do(ctx, req.(*Request))

View File

@@ -1,13 +1,12 @@
// Code generated by protoc-gen-go. DO NOT EDIT. // Code generated by protoc-gen-go. DO NOT EDIT.
// versions: // versions:
// protoc-gen-go v1.25.0 // protoc-gen-go v1.34.2
// protoc v3.20.1 // protoc v3.12.4
// source: entity/model_service_v2_request.proto // source: entity/model_service_v2_request.proto
package grpc package grpc
import ( import (
proto "github.com/golang/protobuf/proto"
protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl" protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect" reflect "reflect"
@@ -21,10 +20,6 @@ const (
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
) )
// This is a compile-time assertion that a sufficiently up-to-date version
// of the legacy proto package is being used.
const _ = proto.ProtoPackageIsVersion4
type ModelServiceV2GetByIdRequest struct { type ModelServiceV2GetByIdRequest struct {
state protoimpl.MessageState state protoimpl.MessageState
sizeCache protoimpl.SizeCache sizeCache protoimpl.SizeCache
@@ -1096,7 +1091,7 @@ func file_entity_model_service_v2_request_proto_rawDescGZIP() []byte {
} }
var file_entity_model_service_v2_request_proto_msgTypes = make([]protoimpl.MessageInfo, 14) var file_entity_model_service_v2_request_proto_msgTypes = make([]protoimpl.MessageInfo, 14)
var file_entity_model_service_v2_request_proto_goTypes = []interface{}{ var file_entity_model_service_v2_request_proto_goTypes = []any{
(*ModelServiceV2GetByIdRequest)(nil), // 0: grpc.ModelServiceV2GetByIdRequest (*ModelServiceV2GetByIdRequest)(nil), // 0: grpc.ModelServiceV2GetByIdRequest
(*ModelServiceV2GetOneRequest)(nil), // 1: grpc.ModelServiceV2GetOneRequest (*ModelServiceV2GetOneRequest)(nil), // 1: grpc.ModelServiceV2GetOneRequest
(*ModelServiceV2GetManyRequest)(nil), // 2: grpc.ModelServiceV2GetManyRequest (*ModelServiceV2GetManyRequest)(nil), // 2: grpc.ModelServiceV2GetManyRequest
@@ -1126,7 +1121,7 @@ func file_entity_model_service_v2_request_proto_init() {
return return
} }
if !protoimpl.UnsafeEnabled { if !protoimpl.UnsafeEnabled {
file_entity_model_service_v2_request_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { file_entity_model_service_v2_request_proto_msgTypes[0].Exporter = func(v any, i int) any {
switch v := v.(*ModelServiceV2GetByIdRequest); i { switch v := v.(*ModelServiceV2GetByIdRequest); i {
case 0: case 0:
return &v.state return &v.state
@@ -1138,7 +1133,7 @@ func file_entity_model_service_v2_request_proto_init() {
return nil return nil
} }
} }
file_entity_model_service_v2_request_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { file_entity_model_service_v2_request_proto_msgTypes[1].Exporter = func(v any, i int) any {
switch v := v.(*ModelServiceV2GetOneRequest); i { switch v := v.(*ModelServiceV2GetOneRequest); i {
case 0: case 0:
return &v.state return &v.state
@@ -1150,7 +1145,7 @@ func file_entity_model_service_v2_request_proto_init() {
return nil return nil
} }
} }
file_entity_model_service_v2_request_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { file_entity_model_service_v2_request_proto_msgTypes[2].Exporter = func(v any, i int) any {
switch v := v.(*ModelServiceV2GetManyRequest); i { switch v := v.(*ModelServiceV2GetManyRequest); i {
case 0: case 0:
return &v.state return &v.state
@@ -1162,7 +1157,7 @@ func file_entity_model_service_v2_request_proto_init() {
return nil return nil
} }
} }
file_entity_model_service_v2_request_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { file_entity_model_service_v2_request_proto_msgTypes[3].Exporter = func(v any, i int) any {
switch v := v.(*ModelServiceV2DeleteByIdRequest); i { switch v := v.(*ModelServiceV2DeleteByIdRequest); i {
case 0: case 0:
return &v.state return &v.state
@@ -1174,7 +1169,7 @@ func file_entity_model_service_v2_request_proto_init() {
return nil return nil
} }
} }
file_entity_model_service_v2_request_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { file_entity_model_service_v2_request_proto_msgTypes[4].Exporter = func(v any, i int) any {
switch v := v.(*ModelServiceV2DeleteOneRequest); i { switch v := v.(*ModelServiceV2DeleteOneRequest); i {
case 0: case 0:
return &v.state return &v.state
@@ -1186,7 +1181,7 @@ func file_entity_model_service_v2_request_proto_init() {
return nil return nil
} }
} }
file_entity_model_service_v2_request_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { file_entity_model_service_v2_request_proto_msgTypes[5].Exporter = func(v any, i int) any {
switch v := v.(*ModelServiceV2DeleteManyRequest); i { switch v := v.(*ModelServiceV2DeleteManyRequest); i {
case 0: case 0:
return &v.state return &v.state
@@ -1198,7 +1193,7 @@ func file_entity_model_service_v2_request_proto_init() {
return nil return nil
} }
} }
file_entity_model_service_v2_request_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { file_entity_model_service_v2_request_proto_msgTypes[6].Exporter = func(v any, i int) any {
switch v := v.(*ModelServiceV2UpdateByIdRequest); i { switch v := v.(*ModelServiceV2UpdateByIdRequest); i {
case 0: case 0:
return &v.state return &v.state
@@ -1210,7 +1205,7 @@ func file_entity_model_service_v2_request_proto_init() {
return nil return nil
} }
} }
file_entity_model_service_v2_request_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { file_entity_model_service_v2_request_proto_msgTypes[7].Exporter = func(v any, i int) any {
switch v := v.(*ModelServiceV2UpdateOneRequest); i { switch v := v.(*ModelServiceV2UpdateOneRequest); i {
case 0: case 0:
return &v.state return &v.state
@@ -1222,7 +1217,7 @@ func file_entity_model_service_v2_request_proto_init() {
return nil return nil
} }
} }
file_entity_model_service_v2_request_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { file_entity_model_service_v2_request_proto_msgTypes[8].Exporter = func(v any, i int) any {
switch v := v.(*ModelServiceV2UpdateManyRequest); i { switch v := v.(*ModelServiceV2UpdateManyRequest); i {
case 0: case 0:
return &v.state return &v.state
@@ -1234,7 +1229,7 @@ func file_entity_model_service_v2_request_proto_init() {
return nil return nil
} }
} }
file_entity_model_service_v2_request_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { file_entity_model_service_v2_request_proto_msgTypes[9].Exporter = func(v any, i int) any {
switch v := v.(*ModelServiceV2ReplaceByIdRequest); i { switch v := v.(*ModelServiceV2ReplaceByIdRequest); i {
case 0: case 0:
return &v.state return &v.state
@@ -1246,7 +1241,7 @@ func file_entity_model_service_v2_request_proto_init() {
return nil return nil
} }
} }
file_entity_model_service_v2_request_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { file_entity_model_service_v2_request_proto_msgTypes[10].Exporter = func(v any, i int) any {
switch v := v.(*ModelServiceV2ReplaceOneRequest); i { switch v := v.(*ModelServiceV2ReplaceOneRequest); i {
case 0: case 0:
return &v.state return &v.state
@@ -1258,7 +1253,7 @@ func file_entity_model_service_v2_request_proto_init() {
return nil return nil
} }
} }
file_entity_model_service_v2_request_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { file_entity_model_service_v2_request_proto_msgTypes[11].Exporter = func(v any, i int) any {
switch v := v.(*ModelServiceV2InsertOneRequest); i { switch v := v.(*ModelServiceV2InsertOneRequest); i {
case 0: case 0:
return &v.state return &v.state
@@ -1270,7 +1265,7 @@ func file_entity_model_service_v2_request_proto_init() {
return nil return nil
} }
} }
file_entity_model_service_v2_request_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { file_entity_model_service_v2_request_proto_msgTypes[12].Exporter = func(v any, i int) any {
switch v := v.(*ModelServiceV2InsertManyRequest); i { switch v := v.(*ModelServiceV2InsertManyRequest); i {
case 0: case 0:
return &v.state return &v.state
@@ -1282,7 +1277,7 @@ func file_entity_model_service_v2_request_proto_init() {
return nil return nil
} }
} }
file_entity_model_service_v2_request_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { file_entity_model_service_v2_request_proto_msgTypes[13].Exporter = func(v any, i int) any {
switch v := v.(*ModelServiceV2CountRequest); i { switch v := v.(*ModelServiceV2CountRequest); i {
case 0: case 0:
return &v.state return &v.state

View File

@@ -1,13 +1,12 @@
// Code generated by protoc-gen-go. DO NOT EDIT. // Code generated by protoc-gen-go. DO NOT EDIT.
// versions: // versions:
// protoc-gen-go v1.25.0 // protoc-gen-go v1.34.2
// protoc v3.20.1 // protoc v3.12.4
// source: models/node.proto // source: models/node.proto
package grpc package grpc
import ( import (
proto "github.com/golang/protobuf/proto"
protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl" protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect" reflect "reflect"
@@ -21,10 +20,6 @@ const (
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
) )
// This is a compile-time assertion that a sufficiently up-to-date version
// of the legacy proto package is being used.
const _ = proto.ProtoPackageIsVersion4
type Node struct { type Node struct {
state protoimpl.MessageState state protoimpl.MessageState
sizeCache protoimpl.SizeCache sizeCache protoimpl.SizeCache
@@ -200,7 +195,7 @@ func file_models_node_proto_rawDescGZIP() []byte {
} }
var file_models_node_proto_msgTypes = make([]protoimpl.MessageInfo, 1) var file_models_node_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_models_node_proto_goTypes = []interface{}{ var file_models_node_proto_goTypes = []any{
(*Node)(nil), // 0: grpc.Node (*Node)(nil), // 0: grpc.Node
} }
var file_models_node_proto_depIdxs = []int32{ var file_models_node_proto_depIdxs = []int32{
@@ -217,7 +212,7 @@ func file_models_node_proto_init() {
return return
} }
if !protoimpl.UnsafeEnabled { if !protoimpl.UnsafeEnabled {
file_models_node_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { file_models_node_proto_msgTypes[0].Exporter = func(v any, i int) any {
switch v := v.(*Node); i { switch v := v.(*Node); i {
case 0: case 0:
return &v.state return &v.state

View File

@@ -1,13 +1,12 @@
// Code generated by protoc-gen-go. DO NOT EDIT. // Code generated by protoc-gen-go. DO NOT EDIT.
// versions: // versions:
// protoc-gen-go v1.25.0 // protoc-gen-go v1.34.2
// protoc v3.20.1 // protoc v3.12.4
// source: entity/node_info.proto // source: entity/node_info.proto
package grpc package grpc
import ( import (
proto "github.com/golang/protobuf/proto"
protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl" protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect" reflect "reflect"
@@ -21,10 +20,6 @@ const (
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
) )
// This is a compile-time assertion that a sufficiently up-to-date version
// of the legacy proto package is being used.
const _ = proto.ProtoPackageIsVersion4
type NodeInfo struct { type NodeInfo struct {
state protoimpl.MessageState state protoimpl.MessageState
sizeCache protoimpl.SizeCache sizeCache protoimpl.SizeCache
@@ -105,7 +100,7 @@ func file_entity_node_info_proto_rawDescGZIP() []byte {
} }
var file_entity_node_info_proto_msgTypes = make([]protoimpl.MessageInfo, 1) var file_entity_node_info_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_entity_node_info_proto_goTypes = []interface{}{ var file_entity_node_info_proto_goTypes = []any{
(*NodeInfo)(nil), // 0: grpc.NodeInfo (*NodeInfo)(nil), // 0: grpc.NodeInfo
} }
var file_entity_node_info_proto_depIdxs = []int32{ var file_entity_node_info_proto_depIdxs = []int32{
@@ -122,7 +117,7 @@ func file_entity_node_info_proto_init() {
return return
} }
if !protoimpl.UnsafeEnabled { if !protoimpl.UnsafeEnabled {
file_entity_node_info_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { file_entity_node_info_proto_msgTypes[0].Exporter = func(v any, i int) any {
switch v := v.(*NodeInfo); i { switch v := v.(*NodeInfo); i {
case 0: case 0:
return &v.state return &v.state

View File

@@ -1,13 +1,12 @@
// Code generated by protoc-gen-go. DO NOT EDIT. // Code generated by protoc-gen-go. DO NOT EDIT.
// versions: // versions:
// protoc-gen-go v1.25.0 // protoc-gen-go v1.34.2
// protoc v3.20.1 // protoc v3.12.4
// source: services/node_service.proto // source: services/node_service.proto
package grpc package grpc
import ( import (
proto "github.com/golang/protobuf/proto"
protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl" protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect" reflect "reflect"
@@ -20,10 +19,6 @@ const (
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
) )
// This is a compile-time assertion that a sufficiently up-to-date version
// of the legacy proto package is being used.
const _ = proto.ProtoPackageIsVersion4
var File_services_node_service_proto protoreflect.FileDescriptor var File_services_node_service_proto protoreflect.FileDescriptor
var file_services_node_service_proto_rawDesc = []byte{ var file_services_node_service_proto_rawDesc = []byte{
@@ -53,7 +48,7 @@ var file_services_node_service_proto_rawDesc = []byte{
0x67, 0x72, 0x70, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x67, 0x72, 0x70, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
} }
var file_services_node_service_proto_goTypes = []interface{}{ var file_services_node_service_proto_goTypes = []any{
(*Request)(nil), // 0: grpc.Request (*Request)(nil), // 0: grpc.Request
(*Response)(nil), // 1: grpc.Response (*Response)(nil), // 1: grpc.Response
(*StreamMessage)(nil), // 2: grpc.StreamMessage (*StreamMessage)(nil), // 2: grpc.StreamMessage

View File

@@ -1,7 +1,7 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT. // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions: // versions:
// - protoc-gen-go-grpc v1.2.0 // - protoc-gen-go-grpc v1.4.0
// - protoc v3.20.1 // - protoc v3.12.4
// source: services/node_service.proto // source: services/node_service.proto
package grpc package grpc
@@ -15,8 +15,16 @@ import (
// This is a compile-time assertion to ensure that this generated file // This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against. // is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later. // Requires gRPC-Go v1.62.0 or later.
const _ = grpc.SupportPackageIsVersion7 const _ = grpc.SupportPackageIsVersion8
const (
NodeService_Register_FullMethodName = "/grpc.NodeService/Register"
NodeService_SendHeartbeat_FullMethodName = "/grpc.NodeService/SendHeartbeat"
NodeService_Ping_FullMethodName = "/grpc.NodeService/Ping"
NodeService_Subscribe_FullMethodName = "/grpc.NodeService/Subscribe"
NodeService_Unsubscribe_FullMethodName = "/grpc.NodeService/Unsubscribe"
)
// NodeServiceClient is the client API for NodeService service. // NodeServiceClient is the client API for NodeService service.
// //
@@ -38,8 +46,9 @@ func NewNodeServiceClient(cc grpc.ClientConnInterface) NodeServiceClient {
} }
func (c *nodeServiceClient) Register(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) { func (c *nodeServiceClient) Register(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(Response) out := new(Response)
err := c.cc.Invoke(ctx, "/grpc.NodeService/Register", in, out, opts...) err := c.cc.Invoke(ctx, NodeService_Register_FullMethodName, in, out, cOpts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
@@ -47,8 +56,9 @@ func (c *nodeServiceClient) Register(ctx context.Context, in *Request, opts ...g
} }
func (c *nodeServiceClient) SendHeartbeat(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) { func (c *nodeServiceClient) SendHeartbeat(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(Response) out := new(Response)
err := c.cc.Invoke(ctx, "/grpc.NodeService/SendHeartbeat", in, out, opts...) err := c.cc.Invoke(ctx, NodeService_SendHeartbeat_FullMethodName, in, out, cOpts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
@@ -56,8 +66,9 @@ func (c *nodeServiceClient) SendHeartbeat(ctx context.Context, in *Request, opts
} }
func (c *nodeServiceClient) Ping(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) { func (c *nodeServiceClient) Ping(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(Response) out := new(Response)
err := c.cc.Invoke(ctx, "/grpc.NodeService/Ping", in, out, opts...) err := c.cc.Invoke(ctx, NodeService_Ping_FullMethodName, in, out, cOpts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
@@ -65,11 +76,12 @@ func (c *nodeServiceClient) Ping(ctx context.Context, in *Request, opts ...grpc.
} }
func (c *nodeServiceClient) Subscribe(ctx context.Context, in *Request, opts ...grpc.CallOption) (NodeService_SubscribeClient, error) { func (c *nodeServiceClient) Subscribe(ctx context.Context, in *Request, opts ...grpc.CallOption) (NodeService_SubscribeClient, error) {
stream, err := c.cc.NewStream(ctx, &NodeService_ServiceDesc.Streams[0], "/grpc.NodeService/Subscribe", opts...) cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
stream, err := c.cc.NewStream(ctx, &NodeService_ServiceDesc.Streams[0], NodeService_Subscribe_FullMethodName, cOpts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
x := &nodeServiceSubscribeClient{stream} x := &nodeServiceSubscribeClient{ClientStream: stream}
if err := x.ClientStream.SendMsg(in); err != nil { if err := x.ClientStream.SendMsg(in); err != nil {
return nil, err return nil, err
} }
@@ -97,8 +109,9 @@ func (x *nodeServiceSubscribeClient) Recv() (*StreamMessage, error) {
} }
func (c *nodeServiceClient) Unsubscribe(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) { func (c *nodeServiceClient) Unsubscribe(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(Response) out := new(Response)
err := c.cc.Invoke(ctx, "/grpc.NodeService/Unsubscribe", in, out, opts...) err := c.cc.Invoke(ctx, NodeService_Unsubscribe_FullMethodName, in, out, cOpts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
@@ -159,7 +172,7 @@ func _NodeService_Register_Handler(srv interface{}, ctx context.Context, dec fun
} }
info := &grpc.UnaryServerInfo{ info := &grpc.UnaryServerInfo{
Server: srv, Server: srv,
FullMethod: "/grpc.NodeService/Register", FullMethod: NodeService_Register_FullMethodName,
} }
handler := func(ctx context.Context, req interface{}) (interface{}, error) { handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(NodeServiceServer).Register(ctx, req.(*Request)) return srv.(NodeServiceServer).Register(ctx, req.(*Request))
@@ -177,7 +190,7 @@ func _NodeService_SendHeartbeat_Handler(srv interface{}, ctx context.Context, de
} }
info := &grpc.UnaryServerInfo{ info := &grpc.UnaryServerInfo{
Server: srv, Server: srv,
FullMethod: "/grpc.NodeService/SendHeartbeat", FullMethod: NodeService_SendHeartbeat_FullMethodName,
} }
handler := func(ctx context.Context, req interface{}) (interface{}, error) { handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(NodeServiceServer).SendHeartbeat(ctx, req.(*Request)) return srv.(NodeServiceServer).SendHeartbeat(ctx, req.(*Request))
@@ -195,7 +208,7 @@ func _NodeService_Ping_Handler(srv interface{}, ctx context.Context, dec func(in
} }
info := &grpc.UnaryServerInfo{ info := &grpc.UnaryServerInfo{
Server: srv, Server: srv,
FullMethod: "/grpc.NodeService/Ping", FullMethod: NodeService_Ping_FullMethodName,
} }
handler := func(ctx context.Context, req interface{}) (interface{}, error) { handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(NodeServiceServer).Ping(ctx, req.(*Request)) return srv.(NodeServiceServer).Ping(ctx, req.(*Request))
@@ -208,7 +221,7 @@ func _NodeService_Subscribe_Handler(srv interface{}, stream grpc.ServerStream) e
if err := stream.RecvMsg(m); err != nil { if err := stream.RecvMsg(m); err != nil {
return err return err
} }
return srv.(NodeServiceServer).Subscribe(m, &nodeServiceSubscribeServer{stream}) return srv.(NodeServiceServer).Subscribe(m, &nodeServiceSubscribeServer{ServerStream: stream})
} }
type NodeService_SubscribeServer interface { type NodeService_SubscribeServer interface {
@@ -234,7 +247,7 @@ func _NodeService_Unsubscribe_Handler(srv interface{}, ctx context.Context, dec
} }
info := &grpc.UnaryServerInfo{ info := &grpc.UnaryServerInfo{
Server: srv, Server: srv,
FullMethod: "/grpc.NodeService/Unsubscribe", FullMethod: NodeService_Unsubscribe_FullMethodName,
} }
handler := func(ctx context.Context, req interface{}) (interface{}, error) { handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(NodeServiceServer).Unsubscribe(ctx, req.(*Request)) return srv.(NodeServiceServer).Unsubscribe(ctx, req.(*Request))

View File

@@ -1,13 +1,12 @@
// Code generated by protoc-gen-go. DO NOT EDIT. // Code generated by protoc-gen-go. DO NOT EDIT.
// versions: // versions:
// protoc-gen-go v1.25.0 // protoc-gen-go v1.34.2
// protoc v3.20.1 // protoc v3.12.4
// source: entity/plugin_request.proto // source: entity/plugin_request.proto
package grpc package grpc
import ( import (
proto "github.com/golang/protobuf/proto"
protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl" protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect" reflect "reflect"
@@ -21,10 +20,6 @@ const (
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
) )
// This is a compile-time assertion that a sufficiently up-to-date version
// of the legacy proto package is being used.
const _ = proto.ProtoPackageIsVersion4
type PluginRequest struct { type PluginRequest struct {
state protoimpl.MessageState state protoimpl.MessageState
sizeCache protoimpl.SizeCache sizeCache protoimpl.SizeCache
@@ -115,7 +110,7 @@ func file_entity_plugin_request_proto_rawDescGZIP() []byte {
} }
var file_entity_plugin_request_proto_msgTypes = make([]protoimpl.MessageInfo, 1) var file_entity_plugin_request_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_entity_plugin_request_proto_goTypes = []interface{}{ var file_entity_plugin_request_proto_goTypes = []any{
(*PluginRequest)(nil), // 0: grpc.PluginRequest (*PluginRequest)(nil), // 0: grpc.PluginRequest
} }
var file_entity_plugin_request_proto_depIdxs = []int32{ var file_entity_plugin_request_proto_depIdxs = []int32{
@@ -132,7 +127,7 @@ func file_entity_plugin_request_proto_init() {
return return
} }
if !protoimpl.UnsafeEnabled { if !protoimpl.UnsafeEnabled {
file_entity_plugin_request_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { file_entity_plugin_request_proto_msgTypes[0].Exporter = func(v any, i int) any {
switch v := v.(*PluginRequest); i { switch v := v.(*PluginRequest); i {
case 0: case 0:
return &v.state return &v.state

View File

@@ -1,13 +1,12 @@
// Code generated by protoc-gen-go. DO NOT EDIT. // Code generated by protoc-gen-go. DO NOT EDIT.
// versions: // versions:
// protoc-gen-go v1.25.0 // protoc-gen-go v1.34.2
// protoc v3.20.1 // protoc v3.12.4
// source: services/plugin_service.proto // source: services/plugin_service.proto
package grpc package grpc
import ( import (
proto "github.com/golang/protobuf/proto"
protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl" protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect" reflect "reflect"
@@ -20,10 +19,6 @@ const (
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
) )
// This is a compile-time assertion that a sufficiently up-to-date version
// of the legacy proto package is being used.
const _ = proto.ProtoPackageIsVersion4
var File_services_plugin_service_proto protoreflect.FileDescriptor var File_services_plugin_service_proto protoreflect.FileDescriptor
var file_services_plugin_service_proto_rawDesc = []byte{ var file_services_plugin_service_proto_rawDesc = []byte{
@@ -49,7 +44,7 @@ var file_services_plugin_service_proto_rawDesc = []byte{
0x5a, 0x06, 0x2e, 0x3b, 0x67, 0x72, 0x70, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x5a, 0x06, 0x2e, 0x3b, 0x67, 0x72, 0x70, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
} }
var file_services_plugin_service_proto_goTypes = []interface{}{ var file_services_plugin_service_proto_goTypes = []any{
(*PluginRequest)(nil), // 0: grpc.PluginRequest (*PluginRequest)(nil), // 0: grpc.PluginRequest
(*StreamMessage)(nil), // 1: grpc.StreamMessage (*StreamMessage)(nil), // 1: grpc.StreamMessage
(*Response)(nil), // 2: grpc.Response (*Response)(nil), // 2: grpc.Response

View File

@@ -1,7 +1,7 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT. // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions: // versions:
// - protoc-gen-go-grpc v1.2.0 // - protoc-gen-go-grpc v1.4.0
// - protoc v3.20.1 // - protoc v3.12.4
// source: services/plugin_service.proto // source: services/plugin_service.proto
package grpc package grpc
@@ -15,8 +15,14 @@ import (
// This is a compile-time assertion to ensure that this generated file // This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against. // is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later. // Requires gRPC-Go v1.62.0 or later.
const _ = grpc.SupportPackageIsVersion7 const _ = grpc.SupportPackageIsVersion8
const (
PluginService_Register_FullMethodName = "/grpc.PluginService/Register"
PluginService_Subscribe_FullMethodName = "/grpc.PluginService/Subscribe"
PluginService_Poll_FullMethodName = "/grpc.PluginService/Poll"
)
// PluginServiceClient is the client API for PluginService service. // PluginServiceClient is the client API for PluginService service.
// //
@@ -36,8 +42,9 @@ func NewPluginServiceClient(cc grpc.ClientConnInterface) PluginServiceClient {
} }
func (c *pluginServiceClient) Register(ctx context.Context, in *PluginRequest, opts ...grpc.CallOption) (*Response, error) { func (c *pluginServiceClient) Register(ctx context.Context, in *PluginRequest, opts ...grpc.CallOption) (*Response, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(Response) out := new(Response)
err := c.cc.Invoke(ctx, "/grpc.PluginService/Register", in, out, opts...) err := c.cc.Invoke(ctx, PluginService_Register_FullMethodName, in, out, cOpts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
@@ -45,11 +52,12 @@ func (c *pluginServiceClient) Register(ctx context.Context, in *PluginRequest, o
} }
func (c *pluginServiceClient) Subscribe(ctx context.Context, in *PluginRequest, opts ...grpc.CallOption) (PluginService_SubscribeClient, error) { func (c *pluginServiceClient) Subscribe(ctx context.Context, in *PluginRequest, opts ...grpc.CallOption) (PluginService_SubscribeClient, error) {
stream, err := c.cc.NewStream(ctx, &PluginService_ServiceDesc.Streams[0], "/grpc.PluginService/Subscribe", opts...) cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
stream, err := c.cc.NewStream(ctx, &PluginService_ServiceDesc.Streams[0], PluginService_Subscribe_FullMethodName, cOpts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
x := &pluginServiceSubscribeClient{stream} x := &pluginServiceSubscribeClient{ClientStream: stream}
if err := x.ClientStream.SendMsg(in); err != nil { if err := x.ClientStream.SendMsg(in); err != nil {
return nil, err return nil, err
} }
@@ -77,11 +85,12 @@ func (x *pluginServiceSubscribeClient) Recv() (*StreamMessage, error) {
} }
func (c *pluginServiceClient) Poll(ctx context.Context, opts ...grpc.CallOption) (PluginService_PollClient, error) { func (c *pluginServiceClient) Poll(ctx context.Context, opts ...grpc.CallOption) (PluginService_PollClient, error) {
stream, err := c.cc.NewStream(ctx, &PluginService_ServiceDesc.Streams[1], "/grpc.PluginService/Poll", opts...) cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
stream, err := c.cc.NewStream(ctx, &PluginService_ServiceDesc.Streams[1], PluginService_Poll_FullMethodName, cOpts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
x := &pluginServicePollClient{stream} x := &pluginServicePollClient{ClientStream: stream}
return x, nil return x, nil
} }
@@ -153,7 +162,7 @@ func _PluginService_Register_Handler(srv interface{}, ctx context.Context, dec f
} }
info := &grpc.UnaryServerInfo{ info := &grpc.UnaryServerInfo{
Server: srv, Server: srv,
FullMethod: "/grpc.PluginService/Register", FullMethod: PluginService_Register_FullMethodName,
} }
handler := func(ctx context.Context, req interface{}) (interface{}, error) { handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PluginServiceServer).Register(ctx, req.(*PluginRequest)) return srv.(PluginServiceServer).Register(ctx, req.(*PluginRequest))
@@ -166,7 +175,7 @@ func _PluginService_Subscribe_Handler(srv interface{}, stream grpc.ServerStream)
if err := stream.RecvMsg(m); err != nil { if err := stream.RecvMsg(m); err != nil {
return err return err
} }
return srv.(PluginServiceServer).Subscribe(m, &pluginServiceSubscribeServer{stream}) return srv.(PluginServiceServer).Subscribe(m, &pluginServiceSubscribeServer{ServerStream: stream})
} }
type PluginService_SubscribeServer interface { type PluginService_SubscribeServer interface {
@@ -183,7 +192,7 @@ func (x *pluginServiceSubscribeServer) Send(m *StreamMessage) error {
} }
func _PluginService_Poll_Handler(srv interface{}, stream grpc.ServerStream) error { func _PluginService_Poll_Handler(srv interface{}, stream grpc.ServerStream) error {
return srv.(PluginServiceServer).Poll(&pluginServicePollServer{stream}) return srv.(PluginServiceServer).Poll(&pluginServicePollServer{ServerStream: stream})
} }
type PluginService_PollServer interface { type PluginService_PollServer interface {

View File

@@ -0,0 +1,36 @@
syntax = "proto3";
package grpc;
option go_package = ".;grpc";
message Metric {
string namespace = 1;
string subsystem = 2;
string module = 3;
string name = 4;
float value = 5;
string help = 6;
string labels = 7;
MetricProcess process = 8;
}
message MetricProcess {
int32 pid = 1;
}
message MetricsServiceV2ConnectRequest {
string node_key = 1;
repeated Metric metrics = 2;
}
enum MetricsServiceV2Code {
SYNC_METRICS = 0;
}
message MetricsServiceV2ConnectResponse {
MetricsServiceV2Code code = 1;
}
service MetricsServiceV2 {
rpc Connect(stream MetricsServiceV2ConnectRequest) returns (stream MetricsServiceV2ConnectResponse){};
}

View File

@@ -1,13 +1,12 @@
// Code generated by protoc-gen-go. DO NOT EDIT. // Code generated by protoc-gen-go. DO NOT EDIT.
// versions: // versions:
// protoc-gen-go v1.25.0 // protoc-gen-go v1.34.2
// protoc v3.20.1 // protoc v3.12.4
// source: entity/request.proto // source: entity/request.proto
package grpc package grpc
import ( import (
proto "github.com/golang/protobuf/proto"
protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl" protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect" reflect "reflect"
@@ -21,10 +20,6 @@ const (
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
) )
// This is a compile-time assertion that a sufficiently up-to-date version
// of the legacy proto package is being used.
const _ = proto.ProtoPackageIsVersion4
type Request struct { type Request struct {
state protoimpl.MessageState state protoimpl.MessageState
sizeCache protoimpl.SizeCache sizeCache protoimpl.SizeCache
@@ -105,7 +100,7 @@ func file_entity_request_proto_rawDescGZIP() []byte {
} }
var file_entity_request_proto_msgTypes = make([]protoimpl.MessageInfo, 1) var file_entity_request_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_entity_request_proto_goTypes = []interface{}{ var file_entity_request_proto_goTypes = []any{
(*Request)(nil), // 0: grpc.Request (*Request)(nil), // 0: grpc.Request
} }
var file_entity_request_proto_depIdxs = []int32{ var file_entity_request_proto_depIdxs = []int32{
@@ -122,7 +117,7 @@ func file_entity_request_proto_init() {
return return
} }
if !protoimpl.UnsafeEnabled { if !protoimpl.UnsafeEnabled {
file_entity_request_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { file_entity_request_proto_msgTypes[0].Exporter = func(v any, i int) any {
switch v := v.(*Request); i { switch v := v.(*Request); i {
case 0: case 0:
return &v.state return &v.state

View File

@@ -1,13 +1,12 @@
// Code generated by protoc-gen-go. DO NOT EDIT. // Code generated by protoc-gen-go. DO NOT EDIT.
// versions: // versions:
// protoc-gen-go v1.25.0 // protoc-gen-go v1.34.2
// protoc v3.20.1 // protoc v3.12.4
// source: entity/response.proto // source: entity/response.proto
package grpc package grpc
import ( import (
proto "github.com/golang/protobuf/proto"
protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl" protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect" reflect "reflect"
@@ -21,10 +20,6 @@ const (
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
) )
// This is a compile-time assertion that a sufficiently up-to-date version
// of the legacy proto package is being used.
const _ = proto.ProtoPackageIsVersion4
type Response struct { type Response struct {
state protoimpl.MessageState state protoimpl.MessageState
sizeCache protoimpl.SizeCache sizeCache protoimpl.SizeCache
@@ -136,7 +131,7 @@ func file_entity_response_proto_rawDescGZIP() []byte {
} }
var file_entity_response_proto_msgTypes = make([]protoimpl.MessageInfo, 1) var file_entity_response_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_entity_response_proto_goTypes = []interface{}{ var file_entity_response_proto_goTypes = []any{
(*Response)(nil), // 0: grpc.Response (*Response)(nil), // 0: grpc.Response
(ResponseCode)(0), // 1: ResponseCode (ResponseCode)(0), // 1: ResponseCode
} }
@@ -156,7 +151,7 @@ func file_entity_response_proto_init() {
} }
file_entity_response_code_proto_init() file_entity_response_code_proto_init()
if !protoimpl.UnsafeEnabled { if !protoimpl.UnsafeEnabled {
file_entity_response_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { file_entity_response_proto_msgTypes[0].Exporter = func(v any, i int) any {
switch v := v.(*Response); i { switch v := v.(*Response); i {
case 0: case 0:
return &v.state return &v.state

View File

@@ -1,13 +1,12 @@
// Code generated by protoc-gen-go. DO NOT EDIT. // Code generated by protoc-gen-go. DO NOT EDIT.
// versions: // versions:
// protoc-gen-go v1.25.0 // protoc-gen-go v1.34.2
// protoc v3.20.1 // protoc v3.12.4
// source: entity/response_code.proto // source: entity/response_code.proto
package grpc package grpc
import ( import (
proto "github.com/golang/protobuf/proto"
protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl" protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect" reflect "reflect"
@@ -21,10 +20,6 @@ const (
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
) )
// This is a compile-time assertion that a sufficiently up-to-date version
// of the legacy proto package is being used.
const _ = proto.ProtoPackageIsVersion4
type ResponseCode int32 type ResponseCode int32
const ( const (
@@ -95,7 +90,7 @@ func file_entity_response_code_proto_rawDescGZIP() []byte {
} }
var file_entity_response_code_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_entity_response_code_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_entity_response_code_proto_goTypes = []interface{}{ var file_entity_response_code_proto_goTypes = []any{
(ResponseCode)(0), // 0: ResponseCode (ResponseCode)(0), // 0: ResponseCode
} }
var file_entity_response_code_proto_depIdxs = []int32{ var file_entity_response_code_proto_depIdxs = []int32{

View File

@@ -1,13 +1,12 @@
// Code generated by protoc-gen-go. DO NOT EDIT. // Code generated by protoc-gen-go. DO NOT EDIT.
// versions: // versions:
// protoc-gen-go v1.25.0 // protoc-gen-go v1.34.2
// protoc v3.20.1 // protoc v3.12.4
// source: entity/stream_message.proto // source: entity/stream_message.proto
package grpc package grpc
import ( import (
proto "github.com/golang/protobuf/proto"
protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl" protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect" reflect "reflect"
@@ -21,10 +20,6 @@ const (
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
) )
// This is a compile-time assertion that a sufficiently up-to-date version
// of the legacy proto package is being used.
const _ = proto.ProtoPackageIsVersion4
type StreamMessage struct { type StreamMessage struct {
state protoimpl.MessageState state protoimpl.MessageState
sizeCache protoimpl.SizeCache sizeCache protoimpl.SizeCache
@@ -156,7 +151,7 @@ func file_entity_stream_message_proto_rawDescGZIP() []byte {
} }
var file_entity_stream_message_proto_msgTypes = make([]protoimpl.MessageInfo, 1) var file_entity_stream_message_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_entity_stream_message_proto_goTypes = []interface{}{ var file_entity_stream_message_proto_goTypes = []any{
(*StreamMessage)(nil), // 0: grpc.StreamMessage (*StreamMessage)(nil), // 0: grpc.StreamMessage
(StreamMessageCode)(0), // 1: grpc.StreamMessageCode (StreamMessageCode)(0), // 1: grpc.StreamMessageCode
} }
@@ -176,7 +171,7 @@ func file_entity_stream_message_proto_init() {
} }
file_entity_stream_message_code_proto_init() file_entity_stream_message_code_proto_init()
if !protoimpl.UnsafeEnabled { if !protoimpl.UnsafeEnabled {
file_entity_stream_message_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { file_entity_stream_message_proto_msgTypes[0].Exporter = func(v any, i int) any {
switch v := v.(*StreamMessage); i { switch v := v.(*StreamMessage); i {
case 0: case 0:
return &v.state return &v.state

View File

@@ -1,13 +1,12 @@
// Code generated by protoc-gen-go. DO NOT EDIT. // Code generated by protoc-gen-go. DO NOT EDIT.
// versions: // versions:
// protoc-gen-go v1.25.0 // protoc-gen-go v1.34.2
// protoc v3.20.1 // protoc v3.12.4
// source: entity/stream_message_code.proto // source: entity/stream_message_code.proto
package grpc package grpc
import ( import (
proto "github.com/golang/protobuf/proto"
protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl" protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect" reflect "reflect"
@@ -21,10 +20,6 @@ const (
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
) )
// This is a compile-time assertion that a sufficiently up-to-date version
// of the legacy proto package is being used.
const _ = proto.ProtoPackageIsVersion4
type StreamMessageCode int32 type StreamMessageCode int32
const ( const (
@@ -153,7 +148,7 @@ func file_entity_stream_message_code_proto_rawDescGZIP() []byte {
} }
var file_entity_stream_message_code_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_entity_stream_message_code_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_entity_stream_message_code_proto_goTypes = []interface{}{ var file_entity_stream_message_code_proto_goTypes = []any{
(StreamMessageCode)(0), // 0: grpc.StreamMessageCode (StreamMessageCode)(0), // 0: grpc.StreamMessageCode
} }
var file_entity_stream_message_code_proto_depIdxs = []int32{ var file_entity_stream_message_code_proto_depIdxs = []int32{

View File

@@ -1,13 +1,12 @@
// Code generated by protoc-gen-go. DO NOT EDIT. // Code generated by protoc-gen-go. DO NOT EDIT.
// versions: // versions:
// protoc-gen-go v1.25.0 // protoc-gen-go v1.34.2
// protoc v3.20.1 // protoc v3.12.4
// source: entity/stream_message_data_task.proto // source: entity/stream_message_data_task.proto
package grpc package grpc
import ( import (
proto "github.com/golang/protobuf/proto"
protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl" protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect" reflect "reflect"
@@ -21,10 +20,6 @@ const (
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
) )
// This is a compile-time assertion that a sufficiently up-to-date version
// of the legacy proto package is being used.
const _ = proto.ProtoPackageIsVersion4
type StreamMessageDataTask struct { type StreamMessageDataTask struct {
state protoimpl.MessageState state protoimpl.MessageState
sizeCache protoimpl.SizeCache sizeCache protoimpl.SizeCache
@@ -107,7 +102,7 @@ func file_entity_stream_message_data_task_proto_rawDescGZIP() []byte {
} }
var file_entity_stream_message_data_task_proto_msgTypes = make([]protoimpl.MessageInfo, 1) var file_entity_stream_message_data_task_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_entity_stream_message_data_task_proto_goTypes = []interface{}{ var file_entity_stream_message_data_task_proto_goTypes = []any{
(*StreamMessageDataTask)(nil), // 0: grpc.StreamMessageDataTask (*StreamMessageDataTask)(nil), // 0: grpc.StreamMessageDataTask
} }
var file_entity_stream_message_data_task_proto_depIdxs = []int32{ var file_entity_stream_message_data_task_proto_depIdxs = []int32{
@@ -124,7 +119,7 @@ func file_entity_stream_message_data_task_proto_init() {
return return
} }
if !protoimpl.UnsafeEnabled { if !protoimpl.UnsafeEnabled {
file_entity_stream_message_data_task_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { file_entity_stream_message_data_task_proto_msgTypes[0].Exporter = func(v any, i int) any {
switch v := v.(*StreamMessageDataTask); i { switch v := v.(*StreamMessageDataTask); i {
case 0: case 0:
return &v.state return &v.state

View File

@@ -1,13 +1,12 @@
// Code generated by protoc-gen-go. DO NOT EDIT. // Code generated by protoc-gen-go. DO NOT EDIT.
// versions: // versions:
// protoc-gen-go v1.25.0 // protoc-gen-go v1.34.2
// protoc v3.20.1 // protoc v3.12.4
// source: models/task.proto // source: models/task.proto
package grpc package grpc
import ( import (
proto "github.com/golang/protobuf/proto"
protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl" protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect" reflect "reflect"
@@ -21,10 +20,6 @@ const (
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
) )
// This is a compile-time assertion that a sufficiently up-to-date version
// of the legacy proto package is being used.
const _ = proto.ProtoPackageIsVersion4
type Task struct { type Task struct {
state protoimpl.MessageState state protoimpl.MessageState
sizeCache protoimpl.SizeCache sizeCache protoimpl.SizeCache
@@ -190,7 +185,7 @@ func file_models_task_proto_rawDescGZIP() []byte {
} }
var file_models_task_proto_msgTypes = make([]protoimpl.MessageInfo, 1) var file_models_task_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_models_task_proto_goTypes = []interface{}{ var file_models_task_proto_goTypes = []any{
(*Task)(nil), // 0: grpc.Task (*Task)(nil), // 0: grpc.Task
} }
var file_models_task_proto_depIdxs = []int32{ var file_models_task_proto_depIdxs = []int32{
@@ -207,7 +202,7 @@ func file_models_task_proto_init() {
return return
} }
if !protoimpl.UnsafeEnabled { if !protoimpl.UnsafeEnabled {
file_models_task_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { file_models_task_proto_msgTypes[0].Exporter = func(v any, i int) any {
switch v := v.(*Task); i { switch v := v.(*Task); i {
case 0: case 0:
return &v.state return &v.state

View File

@@ -1,13 +1,12 @@
// Code generated by protoc-gen-go. DO NOT EDIT. // Code generated by protoc-gen-go. DO NOT EDIT.
// versions: // versions:
// protoc-gen-go v1.25.0 // protoc-gen-go v1.34.2
// protoc v3.20.1 // protoc v3.12.4
// source: services/task_service.proto // source: services/task_service.proto
package grpc package grpc
import ( import (
proto "github.com/golang/protobuf/proto"
protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl" protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect" reflect "reflect"
@@ -20,10 +19,6 @@ const (
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
) )
// This is a compile-time assertion that a sufficiently up-to-date version
// of the legacy proto package is being used.
const _ = proto.ProtoPackageIsVersion4
var File_services_task_service_proto protoreflect.FileDescriptor var File_services_task_service_proto protoreflect.FileDescriptor
var file_services_task_service_proto_rawDesc = []byte{ var file_services_task_service_proto_rawDesc = []byte{
@@ -48,7 +43,7 @@ var file_services_task_service_proto_rawDesc = []byte{
0x6f, 0x74, 0x6f, 0x33, 0x6f, 0x74, 0x6f, 0x33,
} }
var file_services_task_service_proto_goTypes = []interface{}{ var file_services_task_service_proto_goTypes = []any{
(*StreamMessage)(nil), // 0: grpc.StreamMessage (*StreamMessage)(nil), // 0: grpc.StreamMessage
(*Request)(nil), // 1: grpc.Request (*Request)(nil), // 1: grpc.Request
(*Response)(nil), // 2: grpc.Response (*Response)(nil), // 2: grpc.Response

View File

@@ -1,7 +1,7 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT. // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions: // versions:
// - protoc-gen-go-grpc v1.2.0 // - protoc-gen-go-grpc v1.4.0
// - protoc v3.20.1 // - protoc v3.12.4
// source: services/task_service.proto // source: services/task_service.proto
package grpc package grpc
@@ -15,8 +15,14 @@ import (
// This is a compile-time assertion to ensure that this generated file // This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against. // is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later. // Requires gRPC-Go v1.62.0 or later.
const _ = grpc.SupportPackageIsVersion7 const _ = grpc.SupportPackageIsVersion8
const (
TaskService_Subscribe_FullMethodName = "/grpc.TaskService/Subscribe"
TaskService_Fetch_FullMethodName = "/grpc.TaskService/Fetch"
TaskService_SendNotification_FullMethodName = "/grpc.TaskService/SendNotification"
)
// TaskServiceClient is the client API for TaskService service. // TaskServiceClient is the client API for TaskService service.
// //
@@ -36,11 +42,12 @@ func NewTaskServiceClient(cc grpc.ClientConnInterface) TaskServiceClient {
} }
func (c *taskServiceClient) Subscribe(ctx context.Context, opts ...grpc.CallOption) (TaskService_SubscribeClient, error) { func (c *taskServiceClient) Subscribe(ctx context.Context, opts ...grpc.CallOption) (TaskService_SubscribeClient, error) {
stream, err := c.cc.NewStream(ctx, &TaskService_ServiceDesc.Streams[0], "/grpc.TaskService/Subscribe", opts...) cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
stream, err := c.cc.NewStream(ctx, &TaskService_ServiceDesc.Streams[0], TaskService_Subscribe_FullMethodName, cOpts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
x := &taskServiceSubscribeClient{stream} x := &taskServiceSubscribeClient{ClientStream: stream}
return x, nil return x, nil
} }
@@ -70,8 +77,9 @@ func (x *taskServiceSubscribeClient) CloseAndRecv() (*Response, error) {
} }
func (c *taskServiceClient) Fetch(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) { func (c *taskServiceClient) Fetch(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(Response) out := new(Response)
err := c.cc.Invoke(ctx, "/grpc.TaskService/Fetch", in, out, opts...) err := c.cc.Invoke(ctx, TaskService_Fetch_FullMethodName, in, out, cOpts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
@@ -79,8 +87,9 @@ func (c *taskServiceClient) Fetch(ctx context.Context, in *Request, opts ...grpc
} }
func (c *taskServiceClient) SendNotification(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) { func (c *taskServiceClient) SendNotification(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(Response) out := new(Response)
err := c.cc.Invoke(ctx, "/grpc.TaskService/SendNotification", in, out, opts...) err := c.cc.Invoke(ctx, TaskService_SendNotification_FullMethodName, in, out, cOpts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
@@ -124,7 +133,7 @@ func RegisterTaskServiceServer(s grpc.ServiceRegistrar, srv TaskServiceServer) {
} }
func _TaskService_Subscribe_Handler(srv interface{}, stream grpc.ServerStream) error { func _TaskService_Subscribe_Handler(srv interface{}, stream grpc.ServerStream) error {
return srv.(TaskServiceServer).Subscribe(&taskServiceSubscribeServer{stream}) return srv.(TaskServiceServer).Subscribe(&taskServiceSubscribeServer{ServerStream: stream})
} }
type TaskService_SubscribeServer interface { type TaskService_SubscribeServer interface {
@@ -159,7 +168,7 @@ func _TaskService_Fetch_Handler(srv interface{}, ctx context.Context, dec func(i
} }
info := &grpc.UnaryServerInfo{ info := &grpc.UnaryServerInfo{
Server: srv, Server: srv,
FullMethod: "/grpc.TaskService/Fetch", FullMethod: TaskService_Fetch_FullMethodName,
} }
handler := func(ctx context.Context, req interface{}) (interface{}, error) { handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(TaskServiceServer).Fetch(ctx, req.(*Request)) return srv.(TaskServiceServer).Fetch(ctx, req.(*Request))
@@ -177,7 +186,7 @@ func _TaskService_SendNotification_Handler(srv interface{}, ctx context.Context,
} }
info := &grpc.UnaryServerInfo{ info := &grpc.UnaryServerInfo{
Server: srv, Server: srv,
FullMethod: "/grpc.TaskService/SendNotification", FullMethod: TaskService_SendNotification_FullMethodName,
} }
handler := func(ctx context.Context, req interface{}) (interface{}, error) { handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(TaskServiceServer).SendNotification(ctx, req.(*Request)) return srv.(TaskServiceServer).SendNotification(ctx, req.(*Request))