Newer
Older
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
package csbi
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
// CsbiServiceClient is the client API for CsbiService 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.
Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetResponse, error)
Create(ctx context.Context, in *CreateRequest, opts ...grpc.CallOption) (*CreateResponse, error)
Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*DeleteResponse, error)
Hello(ctx context.Context, in *Syn, opts ...grpc.CallOption) (*Ack, error)
CreatePlugin(ctx context.Context, in *CreatePluginRequest, opts ...grpc.CallOption) (CsbiService_CreatePluginClient, error)
func NewCsbiServiceClient(cc grpc.ClientConnInterface) CsbiServiceClient {
return &csbiServiceClient{cc}
func (c *csbiServiceClient) Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetResponse, error) {
err := c.cc.Invoke(ctx, "/gosdn.csbi.CsbiService/Get", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *csbiServiceClient) Create(ctx context.Context, in *CreateRequest, opts ...grpc.CallOption) (*CreateResponse, error) {
err := c.cc.Invoke(ctx, "/gosdn.csbi.CsbiService/Create", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *csbiServiceClient) Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*DeleteResponse, error) {
err := c.cc.Invoke(ctx, "/gosdn.csbi.CsbiService/Delete", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *csbiServiceClient) Hello(ctx context.Context, in *Syn, opts ...grpc.CallOption) (*Ack, error) {
err := c.cc.Invoke(ctx, "/gosdn.csbi.CsbiService/Hello", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *csbiServiceClient) CreatePlugin(ctx context.Context, in *CreatePluginRequest, opts ...grpc.CallOption) (CsbiService_CreatePluginClient, error) {
stream, err := c.cc.NewStream(ctx, &CsbiService_ServiceDesc.Streams[0], "/gosdn.csbi.CsbiService/CreatePlugin", opts...)
x := &csbiServiceCreatePluginClient{stream}
if err := x.ClientStream.SendMsg(in); err != nil {
return nil, err
}
if err := x.ClientStream.CloseSend(); err != nil {
return nil, err
}
return x, nil
}
type CsbiService_CreatePluginClient interface {
type csbiServiceCreatePluginClient struct {
func (x *csbiServiceCreatePluginClient) Recv() (*Payload, error) {
m := new(Payload)
if err := x.ClientStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
// CsbiServiceServer is the server API for CsbiService service.
// All implementations must embed UnimplementedCsbiServiceServer
Get(context.Context, *GetRequest) (*GetResponse, error)
Create(context.Context, *CreateRequest) (*CreateResponse, error)
Delete(context.Context, *DeleteRequest) (*DeleteResponse, error)
CreatePlugin(*CreatePluginRequest, CsbiService_CreatePluginServer) error
mustEmbedUnimplementedCsbiServiceServer()
// UnimplementedCsbiServiceServer must be embedded to have forward compatible implementations.
type UnimplementedCsbiServiceServer struct {
func (UnimplementedCsbiServiceServer) Get(context.Context, *GetRequest) (*GetResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Get not implemented")
}
func (UnimplementedCsbiServiceServer) Create(context.Context, *CreateRequest) (*CreateResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Create not implemented")
}
func (UnimplementedCsbiServiceServer) Delete(context.Context, *DeleteRequest) (*DeleteResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented")
}
func (UnimplementedCsbiServiceServer) Hello(context.Context, *Syn) (*Ack, error) {
return nil, status.Errorf(codes.Unimplemented, "method Hello not implemented")
}
func (UnimplementedCsbiServiceServer) CreatePlugin(*CreatePluginRequest, CsbiService_CreatePluginServer) error {
return status.Errorf(codes.Unimplemented, "method CreatePlugin not implemented")
}
func (UnimplementedCsbiServiceServer) mustEmbedUnimplementedCsbiServiceServer() {}
// UnsafeCsbiServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to CsbiServiceServer will
type UnsafeCsbiServiceServer interface {
mustEmbedUnimplementedCsbiServiceServer()
func RegisterCsbiServiceServer(s grpc.ServiceRegistrar, srv CsbiServiceServer) {
s.RegisterService(&CsbiService_ServiceDesc, srv)
func _CsbiService_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(CsbiServiceServer).Get(ctx, in)
FullMethod: "/gosdn.csbi.CsbiService/Get",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(CsbiServiceServer).Get(ctx, req.(*GetRequest))
func _CsbiService_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CreateRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(CsbiServiceServer).Create(ctx, in)
FullMethod: "/gosdn.csbi.CsbiService/Create",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(CsbiServiceServer).Create(ctx, req.(*CreateRequest))
func _CsbiService_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DeleteRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(CsbiServiceServer).Delete(ctx, in)
FullMethod: "/gosdn.csbi.CsbiService/Delete",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(CsbiServiceServer).Delete(ctx, req.(*DeleteRequest))
func _CsbiService_Hello_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(Syn)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(CsbiServiceServer).Hello(ctx, in)
FullMethod: "/gosdn.csbi.CsbiService/Hello",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(CsbiServiceServer).Hello(ctx, req.(*Syn))
}
return interceptor(ctx, in, info, handler)
}
func _CsbiService_CreatePlugin_Handler(srv interface{}, stream grpc.ServerStream) error {
m := new(CreatePluginRequest)
if err := stream.RecvMsg(m); err != nil {
return err
}
return srv.(CsbiServiceServer).CreatePlugin(m, &csbiServiceCreatePluginServer{stream})
type CsbiService_CreatePluginServer interface {
type csbiServiceCreatePluginServer struct {
func (x *csbiServiceCreatePluginServer) Send(m *Payload) error {
// CsbiService_ServiceDesc is the grpc.ServiceDesc for CsbiService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var CsbiService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "gosdn.csbi.CsbiService",
Streams: []grpc.StreamDesc{
{
StreamName: "CreatePlugin",
Handler: _CsbiService_CreatePlugin_Handler,