Files
clocker-demo/src/serve_segments/stubs/serve_currenttime/serve_currenttime_grpc.pb.go
2023-03-22 23:09:54 +01:00

107 lines
4.2 KiB
Go

// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.2.0
// - protoc v3.21.12
// source: serve_currenttime.proto
package serve_currenttime
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
// ServeCurrentTimeServiceClient is the client API for ServeCurrentTimeService 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 ServeCurrentTimeServiceClient interface {
GetCurrentTime(ctx context.Context, in *GetCurrentTimeRequest, opts ...grpc.CallOption) (*GetCurrentTimeResponse, error)
}
type serveCurrentTimeServiceClient struct {
cc grpc.ClientConnInterface
}
func NewServeCurrentTimeServiceClient(cc grpc.ClientConnInterface) ServeCurrentTimeServiceClient {
return &serveCurrentTimeServiceClient{cc}
}
func (c *serveCurrentTimeServiceClient) GetCurrentTime(ctx context.Context, in *GetCurrentTimeRequest, opts ...grpc.CallOption) (*GetCurrentTimeResponse, error) {
out := new(GetCurrentTimeResponse)
err := c.cc.Invoke(ctx, "/serve_currenttime.ServeCurrentTimeService/GetCurrentTime", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// ServeCurrentTimeServiceServer is the server API for ServeCurrentTimeService service.
// All implementations must embed UnimplementedServeCurrentTimeServiceServer
// for forward compatibility
type ServeCurrentTimeServiceServer interface {
GetCurrentTime(context.Context, *GetCurrentTimeRequest) (*GetCurrentTimeResponse, error)
mustEmbedUnimplementedServeCurrentTimeServiceServer()
}
// UnimplementedServeCurrentTimeServiceServer must be embedded to have forward compatible implementations.
type UnimplementedServeCurrentTimeServiceServer struct {
}
func (UnimplementedServeCurrentTimeServiceServer) GetCurrentTime(context.Context, *GetCurrentTimeRequest) (*GetCurrentTimeResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetCurrentTime not implemented")
}
func (UnimplementedServeCurrentTimeServiceServer) mustEmbedUnimplementedServeCurrentTimeServiceServer() {
}
// UnsafeServeCurrentTimeServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to ServeCurrentTimeServiceServer will
// result in compilation errors.
type UnsafeServeCurrentTimeServiceServer interface {
mustEmbedUnimplementedServeCurrentTimeServiceServer()
}
func RegisterServeCurrentTimeServiceServer(s grpc.ServiceRegistrar, srv ServeCurrentTimeServiceServer) {
s.RegisterService(&ServeCurrentTimeService_ServiceDesc, srv)
}
func _ServeCurrentTimeService_GetCurrentTime_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetCurrentTimeRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ServeCurrentTimeServiceServer).GetCurrentTime(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/serve_currenttime.ServeCurrentTimeService/GetCurrentTime",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ServeCurrentTimeServiceServer).GetCurrentTime(ctx, req.(*GetCurrentTimeRequest))
}
return interceptor(ctx, in, info, handler)
}
// ServeCurrentTimeService_ServiceDesc is the grpc.ServiceDesc for ServeCurrentTimeService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var ServeCurrentTimeService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "serve_currenttime.ServeCurrentTimeService",
HandlerType: (*ServeCurrentTimeServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "GetCurrentTime",
Handler: _ServeCurrentTimeService_GetCurrentTime_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "serve_currenttime.proto",
}