Files
go-grpc/mapfixes/mapfixes_grpc.pb.go

178 lines
6.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: mapfixes.proto
package mapfixes
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
// MapfixesServiceClient is the client API for MapfixesService 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 MapfixesServiceClient interface {
Get(ctx context.Context, in *MapfixId, opts ...grpc.CallOption) (*MapfixResponse, error)
GetList(ctx context.Context, in *MapfixIdList, opts ...grpc.CallOption) (*MapfixList, error)
List(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*MapfixList, error)
}
type mapfixesServiceClient struct {
cc grpc.ClientConnInterface
}
func NewMapfixesServiceClient(cc grpc.ClientConnInterface) MapfixesServiceClient {
return &mapfixesServiceClient{cc}
}
func (c *mapfixesServiceClient) Get(ctx context.Context, in *MapfixId, opts ...grpc.CallOption) (*MapfixResponse, error) {
out := new(MapfixResponse)
err := c.cc.Invoke(ctx, "/mapfixes.MapfixesService/Get", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *mapfixesServiceClient) GetList(ctx context.Context, in *MapfixIdList, opts ...grpc.CallOption) (*MapfixList, error) {
out := new(MapfixList)
err := c.cc.Invoke(ctx, "/mapfixes.MapfixesService/GetList", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *mapfixesServiceClient) List(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*MapfixList, error) {
out := new(MapfixList)
err := c.cc.Invoke(ctx, "/mapfixes.MapfixesService/List", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// MapfixesServiceServer is the server API for MapfixesService service.
// All implementations must embed UnimplementedMapfixesServiceServer
// for forward compatibility
type MapfixesServiceServer interface {
Get(context.Context, *MapfixId) (*MapfixResponse, error)
GetList(context.Context, *MapfixIdList) (*MapfixList, error)
List(context.Context, *ListRequest) (*MapfixList, error)
mustEmbedUnimplementedMapfixesServiceServer()
}
// UnimplementedMapfixesServiceServer must be embedded to have forward compatible implementations.
type UnimplementedMapfixesServiceServer struct {
}
func (UnimplementedMapfixesServiceServer) Get(context.Context, *MapfixId) (*MapfixResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Get not implemented")
}
func (UnimplementedMapfixesServiceServer) GetList(context.Context, *MapfixIdList) (*MapfixList, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetList not implemented")
}
func (UnimplementedMapfixesServiceServer) List(context.Context, *ListRequest) (*MapfixList, error) {
return nil, status.Errorf(codes.Unimplemented, "method List not implemented")
}
func (UnimplementedMapfixesServiceServer) mustEmbedUnimplementedMapfixesServiceServer() {}
// UnsafeMapfixesServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to MapfixesServiceServer will
// result in compilation errors.
type UnsafeMapfixesServiceServer interface {
mustEmbedUnimplementedMapfixesServiceServer()
}
func RegisterMapfixesServiceServer(s grpc.ServiceRegistrar, srv MapfixesServiceServer) {
s.RegisterService(&MapfixesService_ServiceDesc, srv)
}
func _MapfixesService_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(MapfixId)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(MapfixesServiceServer).Get(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/mapfixes.MapfixesService/Get",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(MapfixesServiceServer).Get(ctx, req.(*MapfixId))
}
return interceptor(ctx, in, info, handler)
}
func _MapfixesService_GetList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(MapfixIdList)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(MapfixesServiceServer).GetList(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/mapfixes.MapfixesService/GetList",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(MapfixesServiceServer).GetList(ctx, req.(*MapfixIdList))
}
return interceptor(ctx, in, info, handler)
}
func _MapfixesService_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(MapfixesServiceServer).List(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/mapfixes.MapfixesService/List",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(MapfixesServiceServer).List(ctx, req.(*ListRequest))
}
return interceptor(ctx, in, info, handler)
}
// MapfixesService_ServiceDesc is the grpc.ServiceDesc for MapfixesService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var MapfixesService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "mapfixes.MapfixesService",
HandlerType: (*MapfixesServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Get",
Handler: _MapfixesService_Get_Handler,
},
{
MethodName: "GetList",
Handler: _MapfixesService_GetList_Handler,
},
{
MethodName: "List",
Handler: _MapfixesService_List_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "mapfixes.proto",
}