mirror of
https://github.com/hanzo-fi/stack.git
synced 2026-10-30 20:34:43 +00:00
142 lines
4.5 KiB
Go
142 lines
4.5 KiB
Go
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
|
// versions:
|
|
// - protoc-gen-go-grpc v1.3.0
|
|
// - protoc v3.21.12
|
|
// source: internal/api/service.proto
|
|
|
|
package api
|
|
|
|
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 (
|
|
StargateService_Stargate_FullMethodName = "/formance.stargate.api.StargateService/Stargate"
|
|
)
|
|
|
|
// StargateServiceClient is the client API for StargateService 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 StargateServiceClient interface {
|
|
Stargate(ctx context.Context, opts ...grpc.CallOption) (StargateService_StargateClient, error)
|
|
}
|
|
|
|
type stargateServiceClient struct {
|
|
cc grpc.ClientConnInterface
|
|
}
|
|
|
|
func NewStargateServiceClient(cc grpc.ClientConnInterface) StargateServiceClient {
|
|
return &stargateServiceClient{cc}
|
|
}
|
|
|
|
func (c *stargateServiceClient) Stargate(ctx context.Context, opts ...grpc.CallOption) (StargateService_StargateClient, error) {
|
|
stream, err := c.cc.NewStream(ctx, &StargateService_ServiceDesc.Streams[0], StargateService_Stargate_FullMethodName, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
x := &stargateServiceStargateClient{stream}
|
|
return x, nil
|
|
}
|
|
|
|
type StargateService_StargateClient interface {
|
|
Send(*StargateClientMessage) error
|
|
Recv() (*StargateServerMessage, error)
|
|
grpc.ClientStream
|
|
}
|
|
|
|
type stargateServiceStargateClient struct {
|
|
grpc.ClientStream
|
|
}
|
|
|
|
func (x *stargateServiceStargateClient) Send(m *StargateClientMessage) error {
|
|
return x.ClientStream.SendMsg(m)
|
|
}
|
|
|
|
func (x *stargateServiceStargateClient) Recv() (*StargateServerMessage, error) {
|
|
m := new(StargateServerMessage)
|
|
if err := x.ClientStream.RecvMsg(m); err != nil {
|
|
return nil, err
|
|
}
|
|
return m, nil
|
|
}
|
|
|
|
// StargateServiceServer is the server API for StargateService service.
|
|
// All implementations must embed UnimplementedStargateServiceServer
|
|
// for forward compatibility
|
|
type StargateServiceServer interface {
|
|
Stargate(StargateService_StargateServer) error
|
|
mustEmbedUnimplementedStargateServiceServer()
|
|
}
|
|
|
|
// UnimplementedStargateServiceServer must be embedded to have forward compatible implementations.
|
|
type UnimplementedStargateServiceServer struct {
|
|
}
|
|
|
|
func (UnimplementedStargateServiceServer) Stargate(StargateService_StargateServer) error {
|
|
return status.Errorf(codes.Unimplemented, "method Stargate not implemented")
|
|
}
|
|
func (UnimplementedStargateServiceServer) mustEmbedUnimplementedStargateServiceServer() {}
|
|
|
|
// UnsafeStargateServiceServer may be embedded to opt out of forward compatibility for this service.
|
|
// Use of this interface is not recommended, as added methods to StargateServiceServer will
|
|
// result in compilation errors.
|
|
type UnsafeStargateServiceServer interface {
|
|
mustEmbedUnimplementedStargateServiceServer()
|
|
}
|
|
|
|
func RegisterStargateServiceServer(s grpc.ServiceRegistrar, srv StargateServiceServer) {
|
|
s.RegisterService(&StargateService_ServiceDesc, srv)
|
|
}
|
|
|
|
func _StargateService_Stargate_Handler(srv interface{}, stream grpc.ServerStream) error {
|
|
return srv.(StargateServiceServer).Stargate(&stargateServiceStargateServer{stream})
|
|
}
|
|
|
|
type StargateService_StargateServer interface {
|
|
Send(*StargateServerMessage) error
|
|
Recv() (*StargateClientMessage, error)
|
|
grpc.ServerStream
|
|
}
|
|
|
|
type stargateServiceStargateServer struct {
|
|
grpc.ServerStream
|
|
}
|
|
|
|
func (x *stargateServiceStargateServer) Send(m *StargateServerMessage) error {
|
|
return x.ServerStream.SendMsg(m)
|
|
}
|
|
|
|
func (x *stargateServiceStargateServer) Recv() (*StargateClientMessage, error) {
|
|
m := new(StargateClientMessage)
|
|
if err := x.ServerStream.RecvMsg(m); err != nil {
|
|
return nil, err
|
|
}
|
|
return m, nil
|
|
}
|
|
|
|
// StargateService_ServiceDesc is the grpc.ServiceDesc for StargateService service.
|
|
// It's only intended for direct use with grpc.RegisterService,
|
|
// and not to be introspected or modified (even as a copy)
|
|
var StargateService_ServiceDesc = grpc.ServiceDesc{
|
|
ServiceName: "formance.stargate.api.StargateService",
|
|
HandlerType: (*StargateServiceServer)(nil),
|
|
Methods: []grpc.MethodDesc{},
|
|
Streams: []grpc.StreamDesc{
|
|
{
|
|
StreamName: "Stargate",
|
|
Handler: _StargateService_Stargate_Handler,
|
|
ServerStreams: true,
|
|
ClientStreams: true,
|
|
},
|
|
},
|
|
Metadata: "internal/api/service.proto",
|
|
}
|