You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

214 lines
8.2 KiB
Go

// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.2.0
// - protoc v3.6.1
// source: internal/pkg/grpc/management.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.32.0 or later.
const _ = grpc.SupportPackageIsVersion7
// ManagementClient is the client API for Management 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 ManagementClient interface {
GetReactors(ctx context.Context, in *GetReactorsRequest, opts ...grpc.CallOption) (*GetReactorsResponse, error)
GetReactorDevices(ctx context.Context, in *GetReactorDevicesRequest, opts ...grpc.CallOption) (*GetReactorDevicesResponse, error)
DeleteReactor(ctx context.Context, in *DeleteReactorRequest, opts ...grpc.CallOption) (*DeleteReactorResponse, error)
DeleteReactorDevice(ctx context.Context, in *DeleteReactorDeviceRequest, opts ...grpc.CallOption) (*DeleteReactorDeviceResponse, error)
}
type managementClient struct {
cc grpc.ClientConnInterface
}
func NewManagementClient(cc grpc.ClientConnInterface) ManagementClient {
return &managementClient{cc}
}
func (c *managementClient) GetReactors(ctx context.Context, in *GetReactorsRequest, opts ...grpc.CallOption) (*GetReactorsResponse, error) {
out := new(GetReactorsResponse)
err := c.cc.Invoke(ctx, "/grpc.management/GetReactors", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *managementClient) GetReactorDevices(ctx context.Context, in *GetReactorDevicesRequest, opts ...grpc.CallOption) (*GetReactorDevicesResponse, error) {
out := new(GetReactorDevicesResponse)
err := c.cc.Invoke(ctx, "/grpc.management/GetReactorDevices", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *managementClient) DeleteReactor(ctx context.Context, in *DeleteReactorRequest, opts ...grpc.CallOption) (*DeleteReactorResponse, error) {
out := new(DeleteReactorResponse)
err := c.cc.Invoke(ctx, "/grpc.management/DeleteReactor", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *managementClient) DeleteReactorDevice(ctx context.Context, in *DeleteReactorDeviceRequest, opts ...grpc.CallOption) (*DeleteReactorDeviceResponse, error) {
out := new(DeleteReactorDeviceResponse)
err := c.cc.Invoke(ctx, "/grpc.management/DeleteReactorDevice", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// ManagementServer is the server API for Management service.
// All implementations must embed UnimplementedManagementServer
// for forward compatibility
type ManagementServer interface {
GetReactors(context.Context, *GetReactorsRequest) (*GetReactorsResponse, error)
GetReactorDevices(context.Context, *GetReactorDevicesRequest) (*GetReactorDevicesResponse, error)
DeleteReactor(context.Context, *DeleteReactorRequest) (*DeleteReactorResponse, error)
DeleteReactorDevice(context.Context, *DeleteReactorDeviceRequest) (*DeleteReactorDeviceResponse, error)
mustEmbedUnimplementedManagementServer()
}
// UnimplementedManagementServer must be embedded to have forward compatible implementations.
type UnimplementedManagementServer struct {
}
func (UnimplementedManagementServer) GetReactors(context.Context, *GetReactorsRequest) (*GetReactorsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetReactors not implemented")
}
func (UnimplementedManagementServer) GetReactorDevices(context.Context, *GetReactorDevicesRequest) (*GetReactorDevicesResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetReactorDevices not implemented")
}
func (UnimplementedManagementServer) DeleteReactor(context.Context, *DeleteReactorRequest) (*DeleteReactorResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method DeleteReactor not implemented")
}
func (UnimplementedManagementServer) DeleteReactorDevice(context.Context, *DeleteReactorDeviceRequest) (*DeleteReactorDeviceResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method DeleteReactorDevice not implemented")
}
func (UnimplementedManagementServer) mustEmbedUnimplementedManagementServer() {}
// UnsafeManagementServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to ManagementServer will
// result in compilation errors.
type UnsafeManagementServer interface {
mustEmbedUnimplementedManagementServer()
}
func RegisterManagementServer(s grpc.ServiceRegistrar, srv ManagementServer) {
s.RegisterService(&Management_ServiceDesc, srv)
}
func _Management_GetReactors_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetReactorsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ManagementServer).GetReactors(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/grpc.management/GetReactors",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ManagementServer).GetReactors(ctx, req.(*GetReactorsRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Management_GetReactorDevices_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetReactorDevicesRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ManagementServer).GetReactorDevices(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/grpc.management/GetReactorDevices",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ManagementServer).GetReactorDevices(ctx, req.(*GetReactorDevicesRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Management_DeleteReactor_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DeleteReactorRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ManagementServer).DeleteReactor(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/grpc.management/DeleteReactor",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ManagementServer).DeleteReactor(ctx, req.(*DeleteReactorRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Management_DeleteReactorDevice_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DeleteReactorDeviceRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ManagementServer).DeleteReactorDevice(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/grpc.management/DeleteReactorDevice",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ManagementServer).DeleteReactorDevice(ctx, req.(*DeleteReactorDeviceRequest))
}
return interceptor(ctx, in, info, handler)
}
// Management_ServiceDesc is the grpc.ServiceDesc for Management service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var Management_ServiceDesc = grpc.ServiceDesc{
ServiceName: "grpc.management",
HandlerType: (*ManagementServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "GetReactors",
Handler: _Management_GetReactors_Handler,
},
{
MethodName: "GetReactorDevices",
Handler: _Management_GetReactorDevices_Handler,
},
{
MethodName: "DeleteReactor",
Handler: _Management_DeleteReactor_Handler,
},
{
MethodName: "DeleteReactorDevice",
Handler: _Management_DeleteReactorDevice_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "internal/pkg/grpc/management.proto",
}