// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.3.0
// - protoc v3.12.4
// source: plugin.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
const (
RuleSetService_ListRules_FullMethodName = "/proto.RuleSetService/ListRules"
RuleSetService_Apply_FullMethodName = "/proto.RuleSetService/Apply"
)
// RuleSetServiceClient is the client API for RuleSetService 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 RuleSetServiceClient interface {
ListRules(ctx context.Context, in *ListRulesRequest, opts ...grpc.CallOption) (*ListRulesResponse, error)
Apply(ctx context.Context, in *ApplyRequest, opts ...grpc.CallOption) (*ApplyResponse, error)
}
type ruleSetServiceClient struct {
cc grpc.ClientConnInterface
}
func NewRuleSetServiceClient(cc grpc.ClientConnInterface) RuleSetServiceClient {
return &ruleSetServiceClient{cc}
}
func (c *ruleSetServiceClient) ListRules(ctx context.Context, in *ListRulesRequest, opts ...grpc.CallOption) (*ListRulesResponse, error) {
out := new(ListRulesResponse)
err := c.cc.Invoke(ctx, RuleSetService_ListRules_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *ruleSetServiceClient) Apply(ctx context.Context, in *ApplyRequest, opts ...grpc.CallOption) (*ApplyResponse, error) {
out := new(ApplyResponse)
err := c.cc.Invoke(ctx, RuleSetService_Apply_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// RuleSetServiceServer is the server API for RuleSetService service.
// All implementations must embed UnimplementedRuleSetServiceServer
// for forward compatibility
type RuleSetServiceServer interface {
ListRules(context.Context, *ListRulesRequest) (*ListRulesResponse, error)
Apply(context.Context, *ApplyRequest) (*ApplyResponse, error)
mustEmbedUnimplementedRuleSetServiceServer()
}
// UnimplementedRuleSetServiceServer must be embedded to have forward compatible implementations.
type UnimplementedRuleSetServiceServer struct {
}
func (UnimplementedRuleSetServiceServer) ListRules(context.Context, *ListRulesRequest) (*ListRulesResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ListRules not implemented")
}
func (UnimplementedRuleSetServiceServer) Apply(context.Context, *ApplyRequest) (*ApplyResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Apply not implemented")
}
func (UnimplementedRuleSetServiceServer) mustEmbedUnimplementedRuleSetServiceServer() {}
// UnsafeRuleSetServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to RuleSetServiceServer will
// result in compilation errors.
type UnsafeRuleSetServiceServer interface {
mustEmbedUnimplementedRuleSetServiceServer()
}
func RegisterRuleSetServiceServer(s grpc.ServiceRegistrar, srv RuleSetServiceServer) {
s.RegisterService(&RuleSetService_ServiceDesc, srv)
}
func _RuleSetService_ListRules_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListRulesRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(RuleSetServiceServer).ListRules(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: RuleSetService_ListRules_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(RuleSetServiceServer).ListRules(ctx, req.(*ListRulesRequest))
}
return interceptor(ctx, in, info, handler)
}
func _RuleSetService_Apply_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ApplyRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(RuleSetServiceServer).Apply(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: RuleSetService_Apply_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(RuleSetServiceServer).Apply(ctx, req.(*ApplyRequest))
}
return interceptor(ctx, in, info, handler)
}
// RuleSetService_ServiceDesc is the grpc.ServiceDesc for RuleSetService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var RuleSetService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "proto.RuleSetService",
HandlerType: (*RuleSetServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "ListRules",
Handler: _RuleSetService_ListRules_Handler,
},
{
MethodName: "Apply",
Handler: _RuleSetService_Apply_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "plugin.proto",
}