[dev] regen

This commit is contained in:
loveckiy.ivan
2025-11-09 12:15:51 +03:00
parent 259b46f384
commit 12ed2d435a
3 changed files with 85 additions and 87 deletions

View File

@@ -138,14 +138,14 @@ func (x *ExecOut) GetId() string {
return "" return ""
} }
type ServicesIn struct { type ListIn struct {
state protoimpl.MessageState state protoimpl.MessageState
sizeCache protoimpl.SizeCache sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields unknownFields protoimpl.UnknownFields
} }
func (x *ServicesIn) Reset() { func (x *ListIn) Reset() {
*x = ServicesIn{} *x = ListIn{}
if protoimpl.UnsafeEnabled { if protoimpl.UnsafeEnabled {
mi := &file_plugin_proto_msgTypes[2] mi := &file_plugin_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@@ -153,13 +153,13 @@ func (x *ServicesIn) Reset() {
} }
} }
func (x *ServicesIn) String() string { func (x *ListIn) String() string {
return protoimpl.X.MessageStringOf(x) return protoimpl.X.MessageStringOf(x)
} }
func (*ServicesIn) ProtoMessage() {} func (*ListIn) ProtoMessage() {}
func (x *ServicesIn) ProtoReflect() protoreflect.Message { func (x *ListIn) ProtoReflect() protoreflect.Message {
mi := &file_plugin_proto_msgTypes[2] mi := &file_plugin_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil { if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@@ -171,12 +171,12 @@ func (x *ServicesIn) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x) return mi.MessageOf(x)
} }
// Deprecated: Use ServicesIn.ProtoReflect.Descriptor instead. // Deprecated: Use ListIn.ProtoReflect.Descriptor instead.
func (*ServicesIn) Descriptor() ([]byte, []int) { func (*ListIn) Descriptor() ([]byte, []int) {
return file_plugin_proto_rawDescGZIP(), []int{2} return file_plugin_proto_rawDescGZIP(), []int{2}
} }
type ServicesOut struct { type ListOut struct {
state protoimpl.MessageState state protoimpl.MessageState
sizeCache protoimpl.SizeCache sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields unknownFields protoimpl.UnknownFields
@@ -184,8 +184,8 @@ type ServicesOut struct {
List []string `protobuf:"bytes,1,rep,name=list,proto3" json:"list,omitempty"` List []string `protobuf:"bytes,1,rep,name=list,proto3" json:"list,omitempty"`
} }
func (x *ServicesOut) Reset() { func (x *ListOut) Reset() {
*x = ServicesOut{} *x = ListOut{}
if protoimpl.UnsafeEnabled { if protoimpl.UnsafeEnabled {
mi := &file_plugin_proto_msgTypes[3] mi := &file_plugin_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@@ -193,13 +193,13 @@ func (x *ServicesOut) Reset() {
} }
} }
func (x *ServicesOut) String() string { func (x *ListOut) String() string {
return protoimpl.X.MessageStringOf(x) return protoimpl.X.MessageStringOf(x)
} }
func (*ServicesOut) ProtoMessage() {} func (*ListOut) ProtoMessage() {}
func (x *ServicesOut) ProtoReflect() protoreflect.Message { func (x *ListOut) ProtoReflect() protoreflect.Message {
mi := &file_plugin_proto_msgTypes[3] mi := &file_plugin_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil { if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@@ -211,12 +211,12 @@ func (x *ServicesOut) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x) return mi.MessageOf(x)
} }
// Deprecated: Use ServicesOut.ProtoReflect.Descriptor instead. // Deprecated: Use ListOut.ProtoReflect.Descriptor instead.
func (*ServicesOut) Descriptor() ([]byte, []int) { func (*ListOut) Descriptor() ([]byte, []int) {
return file_plugin_proto_rawDescGZIP(), []int{3} return file_plugin_proto_rawDescGZIP(), []int{3}
} }
func (x *ServicesOut) GetList() []string { func (x *ListOut) GetList() []string {
if x != nil { if x != nil {
return x.List return x.List
} }
@@ -235,18 +235,16 @@ var file_plugin_proto_rawDesc = []byte{
0x28, 0x09, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x31, 0x0a, 0x07, 0x45, 0x78, 0x28, 0x09, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x31, 0x0a, 0x07, 0x45, 0x78,
0x65, 0x63, 0x4f, 0x75, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x65, 0x63, 0x4f, 0x75, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18,
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x0e, 0x0a, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x0e, 0x0a,
0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x0c, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x08, 0x0a,
0x0a, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x49, 0x6e, 0x22, 0x21, 0x0a, 0x0b, 0x53, 0x06, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6e, 0x22, 0x1d, 0x0a, 0x07, 0x4c, 0x69, 0x73, 0x74, 0x4f,
0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x4f, 0x75, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6c, 0x69, 0x75, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09,
0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x32, 0x69, 0x52, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x32, 0x5a, 0x0a, 0x06, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e,
0x0a, 0x09, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x27, 0x0a, 0x04, 0x45, 0x12, 0x27, 0x0a, 0x04, 0x45, 0x78, 0x65, 0x63, 0x12, 0x0e, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69,
0x78, 0x65, 0x63, 0x12, 0x0e, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x45, 0x78, 0x65, 0x6e, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x49, 0x6e, 0x1a, 0x0f, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69,
0x63, 0x49, 0x6e, 0x1a, 0x0f, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x45, 0x78, 0x65, 0x6e, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x4f, 0x75, 0x74, 0x12, 0x27, 0x0a, 0x04, 0x4c, 0x69, 0x73,
0x63, 0x4f, 0x75, 0x74, 0x12, 0x33, 0x0a, 0x08, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x49,
0x12, 0x12, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x6e, 0x1a, 0x0f, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4f,
0x65, 0x73, 0x49, 0x6e, 0x1a, 0x13, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x53, 0x65, 0x75, 0x74, 0x42, 0x03, 0x5a, 0x01, 0x2e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x4f, 0x75, 0x74, 0x42, 0x03, 0x5a, 0x01, 0x2e, 0x62, 0x06,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
} }
var ( var (
@@ -263,16 +261,16 @@ func file_plugin_proto_rawDescGZIP() []byte {
var file_plugin_proto_msgTypes = make([]protoimpl.MessageInfo, 4) var file_plugin_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
var file_plugin_proto_goTypes = []interface{}{ var file_plugin_proto_goTypes = []interface{}{
(*ExecIn)(nil), // 0: plugin.ExecIn (*ExecIn)(nil), // 0: plugin.ExecIn
(*ExecOut)(nil), // 1: plugin.ExecOut (*ExecOut)(nil), // 1: plugin.ExecOut
(*ServicesIn)(nil), // 2: plugin.ServicesIn (*ListIn)(nil), // 2: plugin.ListIn
(*ServicesOut)(nil), // 3: plugin.ServicesOut (*ListOut)(nil), // 3: plugin.ListOut
} }
var file_plugin_proto_depIdxs = []int32{ var file_plugin_proto_depIdxs = []int32{
0, // 0: plugin.Collector.Exec:input_type -> plugin.ExecIn 0, // 0: plugin.Plugin.Exec:input_type -> plugin.ExecIn
2, // 1: plugin.Collector.Services:input_type -> plugin.ServicesIn 2, // 1: plugin.Plugin.List:input_type -> plugin.ListIn
1, // 2: plugin.Collector.Exec:output_type -> plugin.ExecOut 1, // 2: plugin.Plugin.Exec:output_type -> plugin.ExecOut
3, // 3: plugin.Collector.Services:output_type -> plugin.ServicesOut 3, // 3: plugin.Plugin.List:output_type -> plugin.ListOut
2, // [2:4] is the sub-list for method output_type 2, // [2:4] is the sub-list for method output_type
0, // [0:2] is the sub-list for method input_type 0, // [0:2] is the sub-list for method input_type
0, // [0:0] is the sub-list for extension type_name 0, // [0:0] is the sub-list for extension type_name
@@ -311,7 +309,7 @@ func file_plugin_proto_init() {
} }
} }
file_plugin_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { file_plugin_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ServicesIn); i { switch v := v.(*ListIn); i {
case 0: case 0:
return &v.state return &v.state
case 1: case 1:
@@ -323,7 +321,7 @@ func file_plugin_proto_init() {
} }
} }
file_plugin_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { file_plugin_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ServicesOut); i { switch v := v.(*ListOut); i {
case 0: case 0:
return &v.state return &v.state
case 1: case 1:

View File

@@ -15,14 +15,14 @@ message ExecOut {
string id = 2; string id = 2;
} }
message ServicesIn { message ListIn {
} }
message ServicesOut { message ListOut {
repeated string list = 1; repeated string list = 1;
} }
service Collector { service Plugin {
rpc Exec(ExecIn) returns (ExecOut); rpc Exec(ExecIn) returns (ExecOut);
rpc Services(ServicesIn) returns (ServicesOut); rpc List(ListIn) returns (ListOut);
} }

View File

@@ -18,122 +18,122 @@ import (
// Requires gRPC-Go v1.32.0 or later. // Requires gRPC-Go v1.32.0 or later.
const _ = grpc.SupportPackageIsVersion7 const _ = grpc.SupportPackageIsVersion7
// CollectorClient is the client API for Collector service. // PluginClient is the client API for Plugin 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. // 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 CollectorClient interface { type PluginClient interface {
Exec(ctx context.Context, in *ExecIn, opts ...grpc.CallOption) (*ExecOut, error) Exec(ctx context.Context, in *ExecIn, opts ...grpc.CallOption) (*ExecOut, error)
Services(ctx context.Context, in *ServicesIn, opts ...grpc.CallOption) (*ServicesOut, error) List(ctx context.Context, in *ListIn, opts ...grpc.CallOption) (*ListOut, error)
} }
type collectorClient struct { type pluginClient struct {
cc grpc.ClientConnInterface cc grpc.ClientConnInterface
} }
func NewCollectorClient(cc grpc.ClientConnInterface) CollectorClient { func NewPluginClient(cc grpc.ClientConnInterface) PluginClient {
return &collectorClient{cc} return &pluginClient{cc}
} }
func (c *collectorClient) Exec(ctx context.Context, in *ExecIn, opts ...grpc.CallOption) (*ExecOut, error) { func (c *pluginClient) Exec(ctx context.Context, in *ExecIn, opts ...grpc.CallOption) (*ExecOut, error) {
out := new(ExecOut) out := new(ExecOut)
err := c.cc.Invoke(ctx, "/plugin.Collector/Exec", in, out, opts...) err := c.cc.Invoke(ctx, "/plugin.Plugin/Exec", in, out, opts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
return out, nil return out, nil
} }
func (c *collectorClient) Services(ctx context.Context, in *ServicesIn, opts ...grpc.CallOption) (*ServicesOut, error) { func (c *pluginClient) List(ctx context.Context, in *ListIn, opts ...grpc.CallOption) (*ListOut, error) {
out := new(ServicesOut) out := new(ListOut)
err := c.cc.Invoke(ctx, "/plugin.Collector/Services", in, out, opts...) err := c.cc.Invoke(ctx, "/plugin.Plugin/List", in, out, opts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
return out, nil return out, nil
} }
// CollectorServer is the server API for Collector service. // PluginServer is the server API for Plugin service.
// All implementations must embed UnimplementedCollectorServer // All implementations must embed UnimplementedPluginServer
// for forward compatibility // for forward compatibility
type CollectorServer interface { type PluginServer interface {
Exec(context.Context, *ExecIn) (*ExecOut, error) Exec(context.Context, *ExecIn) (*ExecOut, error)
Services(context.Context, *ServicesIn) (*ServicesOut, error) List(context.Context, *ListIn) (*ListOut, error)
mustEmbedUnimplementedCollectorServer() mustEmbedUnimplementedPluginServer()
} }
// UnimplementedCollectorServer must be embedded to have forward compatible implementations. // UnimplementedPluginServer must be embedded to have forward compatible implementations.
type UnimplementedCollectorServer struct { type UnimplementedPluginServer struct {
} }
func (UnimplementedCollectorServer) Exec(context.Context, *ExecIn) (*ExecOut, error) { func (UnimplementedPluginServer) Exec(context.Context, *ExecIn) (*ExecOut, error) {
return nil, status.Errorf(codes.Unimplemented, "method Exec not implemented") return nil, status.Errorf(codes.Unimplemented, "method Exec not implemented")
} }
func (UnimplementedCollectorServer) Services(context.Context, *ServicesIn) (*ServicesOut, error) { func (UnimplementedPluginServer) List(context.Context, *ListIn) (*ListOut, error) {
return nil, status.Errorf(codes.Unimplemented, "method Services not implemented") return nil, status.Errorf(codes.Unimplemented, "method List not implemented")
} }
func (UnimplementedCollectorServer) mustEmbedUnimplementedCollectorServer() {} func (UnimplementedPluginServer) mustEmbedUnimplementedPluginServer() {}
// UnsafeCollectorServer may be embedded to opt out of forward compatibility for this service. // UnsafePluginServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to CollectorServer will // Use of this interface is not recommended, as added methods to PluginServer will
// result in compilation errors. // result in compilation errors.
type UnsafeCollectorServer interface { type UnsafePluginServer interface {
mustEmbedUnimplementedCollectorServer() mustEmbedUnimplementedPluginServer()
} }
func RegisterCollectorServer(s grpc.ServiceRegistrar, srv CollectorServer) { func RegisterPluginServer(s grpc.ServiceRegistrar, srv PluginServer) {
s.RegisterService(&Collector_ServiceDesc, srv) s.RegisterService(&Plugin_ServiceDesc, srv)
} }
func _Collector_Exec_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { func _Plugin_Exec_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ExecIn) in := new(ExecIn)
if err := dec(in); err != nil { if err := dec(in); err != nil {
return nil, err return nil, err
} }
if interceptor == nil { if interceptor == nil {
return srv.(CollectorServer).Exec(ctx, in) return srv.(PluginServer).Exec(ctx, in)
} }
info := &grpc.UnaryServerInfo{ info := &grpc.UnaryServerInfo{
Server: srv, Server: srv,
FullMethod: "/plugin.Collector/Exec", FullMethod: "/plugin.Plugin/Exec",
} }
handler := func(ctx context.Context, req interface{}) (interface{}, error) { handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(CollectorServer).Exec(ctx, req.(*ExecIn)) return srv.(PluginServer).Exec(ctx, req.(*ExecIn))
} }
return interceptor(ctx, in, info, handler) return interceptor(ctx, in, info, handler)
} }
func _Collector_Services_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { func _Plugin_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ServicesIn) in := new(ListIn)
if err := dec(in); err != nil { if err := dec(in); err != nil {
return nil, err return nil, err
} }
if interceptor == nil { if interceptor == nil {
return srv.(CollectorServer).Services(ctx, in) return srv.(PluginServer).List(ctx, in)
} }
info := &grpc.UnaryServerInfo{ info := &grpc.UnaryServerInfo{
Server: srv, Server: srv,
FullMethod: "/plugin.Collector/Services", FullMethod: "/plugin.Plugin/List",
} }
handler := func(ctx context.Context, req interface{}) (interface{}, error) { handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(CollectorServer).Services(ctx, req.(*ServicesIn)) return srv.(PluginServer).List(ctx, req.(*ListIn))
} }
return interceptor(ctx, in, info, handler) return interceptor(ctx, in, info, handler)
} }
// Collector_ServiceDesc is the grpc.ServiceDesc for Collector service. // Plugin_ServiceDesc is the grpc.ServiceDesc for Plugin service.
// It's only intended for direct use with grpc.RegisterService, // It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy) // and not to be introspected or modified (even as a copy)
var Collector_ServiceDesc = grpc.ServiceDesc{ var Plugin_ServiceDesc = grpc.ServiceDesc{
ServiceName: "plugin.Collector", ServiceName: "plugin.Plugin",
HandlerType: (*CollectorServer)(nil), HandlerType: (*PluginServer)(nil),
Methods: []grpc.MethodDesc{ Methods: []grpc.MethodDesc{
{ {
MethodName: "Exec", MethodName: "Exec",
Handler: _Collector_Exec_Handler, Handler: _Plugin_Exec_Handler,
}, },
{ {
MethodName: "Services", MethodName: "List",
Handler: _Collector_Services_Handler, Handler: _Plugin_List_Handler,
}, },
}, },
Streams: []grpc.StreamDesc{}, Streams: []grpc.StreamDesc{},