mirror of
https://github.com/safing/portmaster.git
synced 2026-12-05 10:03:06 +00:00
142 lines
5.1 KiB
Go
142 lines
5.1 KiB
Go
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
|
// versions:
|
|
// - protoc-gen-go-grpc v1.2.0
|
|
// - protoc v3.21.2
|
|
// source: base.proto
|
|
|
|
package proto
|
|
|
|
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
|
|
|
|
// BaseServiceClient is the client API for BaseService 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 BaseServiceClient interface {
|
|
Configure(ctx context.Context, in *ConfigureRequest, opts ...grpc.CallOption) (*ConfigureResponse, error)
|
|
Shutdown(ctx context.Context, in *ShutdownRequest, opts ...grpc.CallOption) (*ShutdownResponse, error)
|
|
}
|
|
|
|
type baseServiceClient struct {
|
|
cc grpc.ClientConnInterface
|
|
}
|
|
|
|
func NewBaseServiceClient(cc grpc.ClientConnInterface) BaseServiceClient {
|
|
return &baseServiceClient{cc}
|
|
}
|
|
|
|
func (c *baseServiceClient) Configure(ctx context.Context, in *ConfigureRequest, opts ...grpc.CallOption) (*ConfigureResponse, error) {
|
|
out := new(ConfigureResponse)
|
|
err := c.cc.Invoke(ctx, "/safing.portmaster.plugin.proto.BaseService/Configure", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *baseServiceClient) Shutdown(ctx context.Context, in *ShutdownRequest, opts ...grpc.CallOption) (*ShutdownResponse, error) {
|
|
out := new(ShutdownResponse)
|
|
err := c.cc.Invoke(ctx, "/safing.portmaster.plugin.proto.BaseService/Shutdown", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
// BaseServiceServer is the server API for BaseService service.
|
|
// All implementations must embed UnimplementedBaseServiceServer
|
|
// for forward compatibility
|
|
type BaseServiceServer interface {
|
|
Configure(context.Context, *ConfigureRequest) (*ConfigureResponse, error)
|
|
Shutdown(context.Context, *ShutdownRequest) (*ShutdownResponse, error)
|
|
mustEmbedUnimplementedBaseServiceServer()
|
|
}
|
|
|
|
// UnimplementedBaseServiceServer must be embedded to have forward compatible implementations.
|
|
type UnimplementedBaseServiceServer struct {
|
|
}
|
|
|
|
func (UnimplementedBaseServiceServer) Configure(context.Context, *ConfigureRequest) (*ConfigureResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method Configure not implemented")
|
|
}
|
|
func (UnimplementedBaseServiceServer) Shutdown(context.Context, *ShutdownRequest) (*ShutdownResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method Shutdown not implemented")
|
|
}
|
|
func (UnimplementedBaseServiceServer) mustEmbedUnimplementedBaseServiceServer() {}
|
|
|
|
// UnsafeBaseServiceServer may be embedded to opt out of forward compatibility for this service.
|
|
// Use of this interface is not recommended, as added methods to BaseServiceServer will
|
|
// result in compilation errors.
|
|
type UnsafeBaseServiceServer interface {
|
|
mustEmbedUnimplementedBaseServiceServer()
|
|
}
|
|
|
|
func RegisterBaseServiceServer(s grpc.ServiceRegistrar, srv BaseServiceServer) {
|
|
s.RegisterService(&BaseService_ServiceDesc, srv)
|
|
}
|
|
|
|
func _BaseService_Configure_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(ConfigureRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(BaseServiceServer).Configure(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/safing.portmaster.plugin.proto.BaseService/Configure",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(BaseServiceServer).Configure(ctx, req.(*ConfigureRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _BaseService_Shutdown_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(ShutdownRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(BaseServiceServer).Shutdown(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/safing.portmaster.plugin.proto.BaseService/Shutdown",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(BaseServiceServer).Shutdown(ctx, req.(*ShutdownRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
// BaseService_ServiceDesc is the grpc.ServiceDesc for BaseService service.
|
|
// It's only intended for direct use with grpc.RegisterService,
|
|
// and not to be introspected or modified (even as a copy)
|
|
var BaseService_ServiceDesc = grpc.ServiceDesc{
|
|
ServiceName: "safing.portmaster.plugin.proto.BaseService",
|
|
HandlerType: (*BaseServiceServer)(nil),
|
|
Methods: []grpc.MethodDesc{
|
|
{
|
|
MethodName: "Configure",
|
|
Handler: _BaseService_Configure_Handler,
|
|
},
|
|
{
|
|
MethodName: "Shutdown",
|
|
Handler: _BaseService_Shutdown_Handler,
|
|
},
|
|
},
|
|
Streams: []grpc.StreamDesc{},
|
|
Metadata: "base.proto",
|
|
}
|