erigon-pulse/gointerfaces/starknet/cairo_grpc.pb.go
2022-01-20 14:11:08 +00:00

102 lines
3.3 KiB
Go

// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
package starknet
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
// CAIROVMClient is the client API for CAIROVM 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 CAIROVMClient interface {
Call(ctx context.Context, in *CallRequest, opts ...grpc.CallOption) (*CallResponse, error)
}
type cAIROVMClient struct {
cc grpc.ClientConnInterface
}
func NewCAIROVMClient(cc grpc.ClientConnInterface) CAIROVMClient {
return &cAIROVMClient{cc}
}
func (c *cAIROVMClient) Call(ctx context.Context, in *CallRequest, opts ...grpc.CallOption) (*CallResponse, error) {
out := new(CallResponse)
err := c.cc.Invoke(ctx, "/starknet.CAIROVM/Call", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// CAIROVMServer is the server API for CAIROVM service.
// All implementations must embed UnimplementedCAIROVMServer
// for forward compatibility
type CAIROVMServer interface {
Call(context.Context, *CallRequest) (*CallResponse, error)
mustEmbedUnimplementedCAIROVMServer()
}
// UnimplementedCAIROVMServer must be embedded to have forward compatible implementations.
type UnimplementedCAIROVMServer struct {
}
func (UnimplementedCAIROVMServer) Call(context.Context, *CallRequest) (*CallResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Call not implemented")
}
func (UnimplementedCAIROVMServer) mustEmbedUnimplementedCAIROVMServer() {}
// UnsafeCAIROVMServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to CAIROVMServer will
// result in compilation errors.
type UnsafeCAIROVMServer interface {
mustEmbedUnimplementedCAIROVMServer()
}
func RegisterCAIROVMServer(s grpc.ServiceRegistrar, srv CAIROVMServer) {
s.RegisterService(&CAIROVM_ServiceDesc, srv)
}
func _CAIROVM_Call_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CallRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(CAIROVMServer).Call(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/starknet.CAIROVM/Call",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(CAIROVMServer).Call(ctx, req.(*CallRequest))
}
return interceptor(ctx, in, info, handler)
}
// CAIROVM_ServiceDesc is the grpc.ServiceDesc for CAIROVM service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var CAIROVM_ServiceDesc = grpc.ServiceDesc{
ServiceName: "starknet.CAIROVM",
HandlerType: (*CAIROVMServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Call",
Handler: _CAIROVM_Call_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "starknet/cairo.proto",
}