// Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.5.1 // - protoc v6.33.4 // source: plugin.proto package plugin_pb 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.64.0 or later. const _ = grpc.SupportPackageIsVersion9 const ( PluginService_Connect_FullMethodName = "/plugin.PluginService/Connect" PluginService_ExecuteJob_FullMethodName = "/plugin.PluginService/ExecuteJob" PluginService_ReportHealth_FullMethodName = "/plugin.PluginService/ReportHealth" PluginService_GetConfig_FullMethodName = "/plugin.PluginService/GetConfig" PluginService_SubmitResult_FullMethodName = "/plugin.PluginService/SubmitResult" ) // PluginServiceClient is the client API for PluginService 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. // // PluginService is the core service for plugin lifecycle and job execution type PluginServiceClient interface { // Connect registers a plugin with the master Connect(ctx context.Context, in *PluginConnectRequest, opts ...grpc.CallOption) (*PluginConnectResponse, error) // ExecuteJob processes a detection or maintenance job ExecuteJob(ctx context.Context, in *ExecuteJobRequest, opts ...grpc.CallOption) (*ExecuteJobResponse, error) // ReportHealth sends periodic health status updates ReportHealth(ctx context.Context, in *HealthReport, opts ...grpc.CallOption) (*HealthReportResponse, error) // GetConfig retrieves the latest configuration GetConfig(ctx context.Context, in *GetConfigRequest, opts ...grpc.CallOption) (*GetConfigResponse, error) // SubmitResult sends job execution results back to master SubmitResult(ctx context.Context, in *JobResultRequest, opts ...grpc.CallOption) (*JobResultResponse, error) } type pluginServiceClient struct { cc grpc.ClientConnInterface } func NewPluginServiceClient(cc grpc.ClientConnInterface) PluginServiceClient { return &pluginServiceClient{cc} } func (c *pluginServiceClient) Connect(ctx context.Context, in *PluginConnectRequest, opts ...grpc.CallOption) (*PluginConnectResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(PluginConnectResponse) err := c.cc.Invoke(ctx, PluginService_Connect_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } func (c *pluginServiceClient) ExecuteJob(ctx context.Context, in *ExecuteJobRequest, opts ...grpc.CallOption) (*ExecuteJobResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ExecuteJobResponse) err := c.cc.Invoke(ctx, PluginService_ExecuteJob_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } func (c *pluginServiceClient) ReportHealth(ctx context.Context, in *HealthReport, opts ...grpc.CallOption) (*HealthReportResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(HealthReportResponse) err := c.cc.Invoke(ctx, PluginService_ReportHealth_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } func (c *pluginServiceClient) GetConfig(ctx context.Context, in *GetConfigRequest, opts ...grpc.CallOption) (*GetConfigResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetConfigResponse) err := c.cc.Invoke(ctx, PluginService_GetConfig_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } func (c *pluginServiceClient) SubmitResult(ctx context.Context, in *JobResultRequest, opts ...grpc.CallOption) (*JobResultResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(JobResultResponse) err := c.cc.Invoke(ctx, PluginService_SubmitResult_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } // PluginServiceServer is the server API for PluginService service. // All implementations must embed UnimplementedPluginServiceServer // for forward compatibility. // // PluginService is the core service for plugin lifecycle and job execution type PluginServiceServer interface { // Connect registers a plugin with the master Connect(context.Context, *PluginConnectRequest) (*PluginConnectResponse, error) // ExecuteJob processes a detection or maintenance job ExecuteJob(context.Context, *ExecuteJobRequest) (*ExecuteJobResponse, error) // ReportHealth sends periodic health status updates ReportHealth(context.Context, *HealthReport) (*HealthReportResponse, error) // GetConfig retrieves the latest configuration GetConfig(context.Context, *GetConfigRequest) (*GetConfigResponse, error) // SubmitResult sends job execution results back to master SubmitResult(context.Context, *JobResultRequest) (*JobResultResponse, error) mustEmbedUnimplementedPluginServiceServer() } // UnimplementedPluginServiceServer must be embedded to have // forward compatible implementations. // // NOTE: this should be embedded by value instead of pointer to avoid a nil // pointer dereference when methods are called. type UnimplementedPluginServiceServer struct{} func (UnimplementedPluginServiceServer) Connect(context.Context, *PluginConnectRequest) (*PluginConnectResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Connect not implemented") } func (UnimplementedPluginServiceServer) ExecuteJob(context.Context, *ExecuteJobRequest) (*ExecuteJobResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ExecuteJob not implemented") } func (UnimplementedPluginServiceServer) ReportHealth(context.Context, *HealthReport) (*HealthReportResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ReportHealth not implemented") } func (UnimplementedPluginServiceServer) GetConfig(context.Context, *GetConfigRequest) (*GetConfigResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetConfig not implemented") } func (UnimplementedPluginServiceServer) SubmitResult(context.Context, *JobResultRequest) (*JobResultResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method SubmitResult not implemented") } func (UnimplementedPluginServiceServer) mustEmbedUnimplementedPluginServiceServer() {} func (UnimplementedPluginServiceServer) testEmbeddedByValue() {} // UnsafePluginServiceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to PluginServiceServer will // result in compilation errors. type UnsafePluginServiceServer interface { mustEmbedUnimplementedPluginServiceServer() } func RegisterPluginServiceServer(s grpc.ServiceRegistrar, srv PluginServiceServer) { // If the following call pancis, it indicates UnimplementedPluginServiceServer was // embedded by pointer and is nil. This will cause panics if an // unimplemented method is ever invoked, so we test this at initialization // time to prevent it from happening at runtime later due to I/O. if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { t.testEmbeddedByValue() } s.RegisterService(&PluginService_ServiceDesc, srv) } func _PluginService_Connect_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(PluginConnectRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(PluginServiceServer).Connect(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: PluginService_Connect_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(PluginServiceServer).Connect(ctx, req.(*PluginConnectRequest)) } return interceptor(ctx, in, info, handler) } func _PluginService_ExecuteJob_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ExecuteJobRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(PluginServiceServer).ExecuteJob(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: PluginService_ExecuteJob_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(PluginServiceServer).ExecuteJob(ctx, req.(*ExecuteJobRequest)) } return interceptor(ctx, in, info, handler) } func _PluginService_ReportHealth_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(HealthReport) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(PluginServiceServer).ReportHealth(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: PluginService_ReportHealth_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(PluginServiceServer).ReportHealth(ctx, req.(*HealthReport)) } return interceptor(ctx, in, info, handler) } func _PluginService_GetConfig_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(GetConfigRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(PluginServiceServer).GetConfig(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: PluginService_GetConfig_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(PluginServiceServer).GetConfig(ctx, req.(*GetConfigRequest)) } return interceptor(ctx, in, info, handler) } func _PluginService_SubmitResult_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(JobResultRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(PluginServiceServer).SubmitResult(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: PluginService_SubmitResult_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(PluginServiceServer).SubmitResult(ctx, req.(*JobResultRequest)) } return interceptor(ctx, in, info, handler) } // PluginService_ServiceDesc is the grpc.ServiceDesc for PluginService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) var PluginService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "plugin.PluginService", HandlerType: (*PluginServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Connect", Handler: _PluginService_Connect_Handler, }, { MethodName: "ExecuteJob", Handler: _PluginService_ExecuteJob_Handler, }, { MethodName: "ReportHealth", Handler: _PluginService_ReportHealth_Handler, }, { MethodName: "GetConfig", Handler: _PluginService_GetConfig_Handler, }, { MethodName: "SubmitResult", Handler: _PluginService_SubmitResult_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "plugin.proto", } const ( AdminQueryService_GetPluginStats_FullMethodName = "/plugin.AdminQueryService/GetPluginStats" AdminQueryService_ListPlugins_FullMethodName = "/plugin.AdminQueryService/ListPlugins" AdminQueryService_ListJobs_FullMethodName = "/plugin.AdminQueryService/ListJobs" AdminQueryService_GetJobStatus_FullMethodName = "/plugin.AdminQueryService/GetJobStatus" AdminQueryService_GetPluginLogs_FullMethodName = "/plugin.AdminQueryService/GetPluginLogs" ) // AdminQueryServiceClient is the client API for AdminQueryService 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. // // AdminQueryService provides monitoring and diagnostics endpoints type AdminQueryServiceClient interface { // GetPluginStats returns statistics for all connected plugins GetPluginStats(ctx context.Context, in *GetPluginStatsRequest, opts ...grpc.CallOption) (*GetPluginStatsResponse, error) // ListPlugins returns information about all registered plugins ListPlugins(ctx context.Context, in *ListPluginsRequest, opts ...grpc.CallOption) (*ListPluginsResponse, error) // ListJobs returns current and historical job information ListJobs(ctx context.Context, in *ListJobsRequest, opts ...grpc.CallOption) (*ListJobsResponse, error) // GetJobStatus returns detailed status of a specific job GetJobStatus(ctx context.Context, in *GetJobStatusRequest, opts ...grpc.CallOption) (*GetJobStatusResponse, error) // GetPluginLogs returns logs from a specific plugin GetPluginLogs(ctx context.Context, in *GetPluginLogsRequest, opts ...grpc.CallOption) (*GetPluginLogsResponse, error) } type adminQueryServiceClient struct { cc grpc.ClientConnInterface } func NewAdminQueryServiceClient(cc grpc.ClientConnInterface) AdminQueryServiceClient { return &adminQueryServiceClient{cc} } func (c *adminQueryServiceClient) GetPluginStats(ctx context.Context, in *GetPluginStatsRequest, opts ...grpc.CallOption) (*GetPluginStatsResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetPluginStatsResponse) err := c.cc.Invoke(ctx, AdminQueryService_GetPluginStats_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } func (c *adminQueryServiceClient) ListPlugins(ctx context.Context, in *ListPluginsRequest, opts ...grpc.CallOption) (*ListPluginsResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ListPluginsResponse) err := c.cc.Invoke(ctx, AdminQueryService_ListPlugins_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } func (c *adminQueryServiceClient) ListJobs(ctx context.Context, in *ListJobsRequest, opts ...grpc.CallOption) (*ListJobsResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ListJobsResponse) err := c.cc.Invoke(ctx, AdminQueryService_ListJobs_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } func (c *adminQueryServiceClient) GetJobStatus(ctx context.Context, in *GetJobStatusRequest, opts ...grpc.CallOption) (*GetJobStatusResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetJobStatusResponse) err := c.cc.Invoke(ctx, AdminQueryService_GetJobStatus_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } func (c *adminQueryServiceClient) GetPluginLogs(ctx context.Context, in *GetPluginLogsRequest, opts ...grpc.CallOption) (*GetPluginLogsResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetPluginLogsResponse) err := c.cc.Invoke(ctx, AdminQueryService_GetPluginLogs_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } // AdminQueryServiceServer is the server API for AdminQueryService service. // All implementations must embed UnimplementedAdminQueryServiceServer // for forward compatibility. // // AdminQueryService provides monitoring and diagnostics endpoints type AdminQueryServiceServer interface { // GetPluginStats returns statistics for all connected plugins GetPluginStats(context.Context, *GetPluginStatsRequest) (*GetPluginStatsResponse, error) // ListPlugins returns information about all registered plugins ListPlugins(context.Context, *ListPluginsRequest) (*ListPluginsResponse, error) // ListJobs returns current and historical job information ListJobs(context.Context, *ListJobsRequest) (*ListJobsResponse, error) // GetJobStatus returns detailed status of a specific job GetJobStatus(context.Context, *GetJobStatusRequest) (*GetJobStatusResponse, error) // GetPluginLogs returns logs from a specific plugin GetPluginLogs(context.Context, *GetPluginLogsRequest) (*GetPluginLogsResponse, error) mustEmbedUnimplementedAdminQueryServiceServer() } // UnimplementedAdminQueryServiceServer must be embedded to have // forward compatible implementations. // // NOTE: this should be embedded by value instead of pointer to avoid a nil // pointer dereference when methods are called. type UnimplementedAdminQueryServiceServer struct{} func (UnimplementedAdminQueryServiceServer) GetPluginStats(context.Context, *GetPluginStatsRequest) (*GetPluginStatsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetPluginStats not implemented") } func (UnimplementedAdminQueryServiceServer) ListPlugins(context.Context, *ListPluginsRequest) (*ListPluginsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListPlugins not implemented") } func (UnimplementedAdminQueryServiceServer) ListJobs(context.Context, *ListJobsRequest) (*ListJobsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListJobs not implemented") } func (UnimplementedAdminQueryServiceServer) GetJobStatus(context.Context, *GetJobStatusRequest) (*GetJobStatusResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetJobStatus not implemented") } func (UnimplementedAdminQueryServiceServer) GetPluginLogs(context.Context, *GetPluginLogsRequest) (*GetPluginLogsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetPluginLogs not implemented") } func (UnimplementedAdminQueryServiceServer) mustEmbedUnimplementedAdminQueryServiceServer() {} func (UnimplementedAdminQueryServiceServer) testEmbeddedByValue() {} // UnsafeAdminQueryServiceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to AdminQueryServiceServer will // result in compilation errors. type UnsafeAdminQueryServiceServer interface { mustEmbedUnimplementedAdminQueryServiceServer() } func RegisterAdminQueryServiceServer(s grpc.ServiceRegistrar, srv AdminQueryServiceServer) { // If the following call pancis, it indicates UnimplementedAdminQueryServiceServer was // embedded by pointer and is nil. This will cause panics if an // unimplemented method is ever invoked, so we test this at initialization // time to prevent it from happening at runtime later due to I/O. if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { t.testEmbeddedByValue() } s.RegisterService(&AdminQueryService_ServiceDesc, srv) } func _AdminQueryService_GetPluginStats_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(GetPluginStatsRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(AdminQueryServiceServer).GetPluginStats(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: AdminQueryService_GetPluginStats_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(AdminQueryServiceServer).GetPluginStats(ctx, req.(*GetPluginStatsRequest)) } return interceptor(ctx, in, info, handler) } func _AdminQueryService_ListPlugins_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ListPluginsRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(AdminQueryServiceServer).ListPlugins(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: AdminQueryService_ListPlugins_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(AdminQueryServiceServer).ListPlugins(ctx, req.(*ListPluginsRequest)) } return interceptor(ctx, in, info, handler) } func _AdminQueryService_ListJobs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ListJobsRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(AdminQueryServiceServer).ListJobs(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: AdminQueryService_ListJobs_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(AdminQueryServiceServer).ListJobs(ctx, req.(*ListJobsRequest)) } return interceptor(ctx, in, info, handler) } func _AdminQueryService_GetJobStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(GetJobStatusRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(AdminQueryServiceServer).GetJobStatus(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: AdminQueryService_GetJobStatus_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(AdminQueryServiceServer).GetJobStatus(ctx, req.(*GetJobStatusRequest)) } return interceptor(ctx, in, info, handler) } func _AdminQueryService_GetPluginLogs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(GetPluginLogsRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(AdminQueryServiceServer).GetPluginLogs(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: AdminQueryService_GetPluginLogs_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(AdminQueryServiceServer).GetPluginLogs(ctx, req.(*GetPluginLogsRequest)) } return interceptor(ctx, in, info, handler) } // AdminQueryService_ServiceDesc is the grpc.ServiceDesc for AdminQueryService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) var AdminQueryService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "plugin.AdminQueryService", HandlerType: (*AdminQueryServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetPluginStats", Handler: _AdminQueryService_GetPluginStats_Handler, }, { MethodName: "ListPlugins", Handler: _AdminQueryService_ListPlugins_Handler, }, { MethodName: "ListJobs", Handler: _AdminQueryService_ListJobs_Handler, }, { MethodName: "GetJobStatus", Handler: _AdminQueryService_GetJobStatus_Handler, }, { MethodName: "GetPluginLogs", Handler: _AdminQueryService_GetPluginLogs_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "plugin.proto", } const ( AdminCommandService_SaveConfig_FullMethodName = "/plugin.AdminCommandService/SaveConfig" AdminCommandService_ReloadConfig_FullMethodName = "/plugin.AdminCommandService/ReloadConfig" AdminCommandService_EnablePlugin_FullMethodName = "/plugin.AdminCommandService/EnablePlugin" AdminCommandService_DisablePlugin_FullMethodName = "/plugin.AdminCommandService/DisablePlugin" AdminCommandService_TriggerDetection_FullMethodName = "/plugin.AdminCommandService/TriggerDetection" AdminCommandService_CancelJob_FullMethodName = "/plugin.AdminCommandService/CancelJob" AdminCommandService_PurgeHistory_FullMethodName = "/plugin.AdminCommandService/PurgeHistory" ) // AdminCommandServiceClient is the client API for AdminCommandService 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. // // AdminCommandService provides administrative operations type AdminCommandServiceClient interface { // SaveConfig persists plugin configuration SaveConfig(ctx context.Context, in *SaveConfigRequest, opts ...grpc.CallOption) (*SaveConfigResponse, error) // ReloadConfig reloads configuration without restarting ReloadConfig(ctx context.Context, in *ReloadConfigRequest, opts ...grpc.CallOption) (*ReloadConfigResponse, error) // EnablePlugin enables a specific plugin EnablePlugin(ctx context.Context, in *EnablePluginRequest, opts ...grpc.CallOption) (*EnablePluginResponse, error) // DisablePlugin disables a specific plugin DisablePlugin(ctx context.Context, in *DisablePluginRequest, opts ...grpc.CallOption) (*DisablePluginResponse, error) // TriggerDetection manually triggers a detection for specific types TriggerDetection(ctx context.Context, in *TriggerDetectionRequest, opts ...grpc.CallOption) (*TriggerDetectionResponse, error) // CancelJob cancels a running job CancelJob(ctx context.Context, in *CancelJobRequest, opts ...grpc.CallOption) (*CancelJobResponse, error) // PurgeHistory clears job history PurgeHistory(ctx context.Context, in *PurgeHistoryRequest, opts ...grpc.CallOption) (*PurgeHistoryResponse, error) } type adminCommandServiceClient struct { cc grpc.ClientConnInterface } func NewAdminCommandServiceClient(cc grpc.ClientConnInterface) AdminCommandServiceClient { return &adminCommandServiceClient{cc} } func (c *adminCommandServiceClient) SaveConfig(ctx context.Context, in *SaveConfigRequest, opts ...grpc.CallOption) (*SaveConfigResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(SaveConfigResponse) err := c.cc.Invoke(ctx, AdminCommandService_SaveConfig_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } func (c *adminCommandServiceClient) ReloadConfig(ctx context.Context, in *ReloadConfigRequest, opts ...grpc.CallOption) (*ReloadConfigResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ReloadConfigResponse) err := c.cc.Invoke(ctx, AdminCommandService_ReloadConfig_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } func (c *adminCommandServiceClient) EnablePlugin(ctx context.Context, in *EnablePluginRequest, opts ...grpc.CallOption) (*EnablePluginResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(EnablePluginResponse) err := c.cc.Invoke(ctx, AdminCommandService_EnablePlugin_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } func (c *adminCommandServiceClient) DisablePlugin(ctx context.Context, in *DisablePluginRequest, opts ...grpc.CallOption) (*DisablePluginResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(DisablePluginResponse) err := c.cc.Invoke(ctx, AdminCommandService_DisablePlugin_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } func (c *adminCommandServiceClient) TriggerDetection(ctx context.Context, in *TriggerDetectionRequest, opts ...grpc.CallOption) (*TriggerDetectionResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(TriggerDetectionResponse) err := c.cc.Invoke(ctx, AdminCommandService_TriggerDetection_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } func (c *adminCommandServiceClient) CancelJob(ctx context.Context, in *CancelJobRequest, opts ...grpc.CallOption) (*CancelJobResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(CancelJobResponse) err := c.cc.Invoke(ctx, AdminCommandService_CancelJob_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } func (c *adminCommandServiceClient) PurgeHistory(ctx context.Context, in *PurgeHistoryRequest, opts ...grpc.CallOption) (*PurgeHistoryResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(PurgeHistoryResponse) err := c.cc.Invoke(ctx, AdminCommandService_PurgeHistory_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } // AdminCommandServiceServer is the server API for AdminCommandService service. // All implementations must embed UnimplementedAdminCommandServiceServer // for forward compatibility. // // AdminCommandService provides administrative operations type AdminCommandServiceServer interface { // SaveConfig persists plugin configuration SaveConfig(context.Context, *SaveConfigRequest) (*SaveConfigResponse, error) // ReloadConfig reloads configuration without restarting ReloadConfig(context.Context, *ReloadConfigRequest) (*ReloadConfigResponse, error) // EnablePlugin enables a specific plugin EnablePlugin(context.Context, *EnablePluginRequest) (*EnablePluginResponse, error) // DisablePlugin disables a specific plugin DisablePlugin(context.Context, *DisablePluginRequest) (*DisablePluginResponse, error) // TriggerDetection manually triggers a detection for specific types TriggerDetection(context.Context, *TriggerDetectionRequest) (*TriggerDetectionResponse, error) // CancelJob cancels a running job CancelJob(context.Context, *CancelJobRequest) (*CancelJobResponse, error) // PurgeHistory clears job history PurgeHistory(context.Context, *PurgeHistoryRequest) (*PurgeHistoryResponse, error) mustEmbedUnimplementedAdminCommandServiceServer() } // UnimplementedAdminCommandServiceServer must be embedded to have // forward compatible implementations. // // NOTE: this should be embedded by value instead of pointer to avoid a nil // pointer dereference when methods are called. type UnimplementedAdminCommandServiceServer struct{} func (UnimplementedAdminCommandServiceServer) SaveConfig(context.Context, *SaveConfigRequest) (*SaveConfigResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method SaveConfig not implemented") } func (UnimplementedAdminCommandServiceServer) ReloadConfig(context.Context, *ReloadConfigRequest) (*ReloadConfigResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ReloadConfig not implemented") } func (UnimplementedAdminCommandServiceServer) EnablePlugin(context.Context, *EnablePluginRequest) (*EnablePluginResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method EnablePlugin not implemented") } func (UnimplementedAdminCommandServiceServer) DisablePlugin(context.Context, *DisablePluginRequest) (*DisablePluginResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method DisablePlugin not implemented") } func (UnimplementedAdminCommandServiceServer) TriggerDetection(context.Context, *TriggerDetectionRequest) (*TriggerDetectionResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method TriggerDetection not implemented") } func (UnimplementedAdminCommandServiceServer) CancelJob(context.Context, *CancelJobRequest) (*CancelJobResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method CancelJob not implemented") } func (UnimplementedAdminCommandServiceServer) PurgeHistory(context.Context, *PurgeHistoryRequest) (*PurgeHistoryResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method PurgeHistory not implemented") } func (UnimplementedAdminCommandServiceServer) mustEmbedUnimplementedAdminCommandServiceServer() {} func (UnimplementedAdminCommandServiceServer) testEmbeddedByValue() {} // UnsafeAdminCommandServiceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to AdminCommandServiceServer will // result in compilation errors. type UnsafeAdminCommandServiceServer interface { mustEmbedUnimplementedAdminCommandServiceServer() } func RegisterAdminCommandServiceServer(s grpc.ServiceRegistrar, srv AdminCommandServiceServer) { // If the following call pancis, it indicates UnimplementedAdminCommandServiceServer was // embedded by pointer and is nil. This will cause panics if an // unimplemented method is ever invoked, so we test this at initialization // time to prevent it from happening at runtime later due to I/O. if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { t.testEmbeddedByValue() } s.RegisterService(&AdminCommandService_ServiceDesc, srv) } func _AdminCommandService_SaveConfig_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(SaveConfigRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(AdminCommandServiceServer).SaveConfig(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: AdminCommandService_SaveConfig_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(AdminCommandServiceServer).SaveConfig(ctx, req.(*SaveConfigRequest)) } return interceptor(ctx, in, info, handler) } func _AdminCommandService_ReloadConfig_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ReloadConfigRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(AdminCommandServiceServer).ReloadConfig(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: AdminCommandService_ReloadConfig_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(AdminCommandServiceServer).ReloadConfig(ctx, req.(*ReloadConfigRequest)) } return interceptor(ctx, in, info, handler) } func _AdminCommandService_EnablePlugin_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(EnablePluginRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(AdminCommandServiceServer).EnablePlugin(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: AdminCommandService_EnablePlugin_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(AdminCommandServiceServer).EnablePlugin(ctx, req.(*EnablePluginRequest)) } return interceptor(ctx, in, info, handler) } func _AdminCommandService_DisablePlugin_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(DisablePluginRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(AdminCommandServiceServer).DisablePlugin(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: AdminCommandService_DisablePlugin_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(AdminCommandServiceServer).DisablePlugin(ctx, req.(*DisablePluginRequest)) } return interceptor(ctx, in, info, handler) } func _AdminCommandService_TriggerDetection_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(TriggerDetectionRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(AdminCommandServiceServer).TriggerDetection(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: AdminCommandService_TriggerDetection_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(AdminCommandServiceServer).TriggerDetection(ctx, req.(*TriggerDetectionRequest)) } return interceptor(ctx, in, info, handler) } func _AdminCommandService_CancelJob_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(CancelJobRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(AdminCommandServiceServer).CancelJob(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: AdminCommandService_CancelJob_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(AdminCommandServiceServer).CancelJob(ctx, req.(*CancelJobRequest)) } return interceptor(ctx, in, info, handler) } func _AdminCommandService_PurgeHistory_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(PurgeHistoryRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(AdminCommandServiceServer).PurgeHistory(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: AdminCommandService_PurgeHistory_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(AdminCommandServiceServer).PurgeHistory(ctx, req.(*PurgeHistoryRequest)) } return interceptor(ctx, in, info, handler) } // AdminCommandService_ServiceDesc is the grpc.ServiceDesc for AdminCommandService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) var AdminCommandService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "plugin.AdminCommandService", HandlerType: (*AdminCommandServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "SaveConfig", Handler: _AdminCommandService_SaveConfig_Handler, }, { MethodName: "ReloadConfig", Handler: _AdminCommandService_ReloadConfig_Handler, }, { MethodName: "EnablePlugin", Handler: _AdminCommandService_EnablePlugin_Handler, }, { MethodName: "DisablePlugin", Handler: _AdminCommandService_DisablePlugin_Handler, }, { MethodName: "TriggerDetection", Handler: _AdminCommandService_TriggerDetection_Handler, }, { MethodName: "CancelJob", Handler: _AdminCommandService_CancelJob_Handler, }, { MethodName: "PurgeHistory", Handler: _AdminCommandService_PurgeHistory_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "plugin.proto", }