178 lines
6.0 KiB
Go
178 lines
6.0 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: ranks.proto
|
|
|
|
package ranks
|
|
|
|
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
|
|
|
|
// RanksServiceClient is the client API for RanksService 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 RanksServiceClient interface {
|
|
Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*RankMessage, error)
|
|
List(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*RankList, error)
|
|
Delete(ctx context.Context, in *IdMessage, opts ...grpc.CallOption) (*IdMessage, error)
|
|
}
|
|
|
|
type ranksServiceClient struct {
|
|
cc grpc.ClientConnInterface
|
|
}
|
|
|
|
func NewRanksServiceClient(cc grpc.ClientConnInterface) RanksServiceClient {
|
|
return &ranksServiceClient{cc}
|
|
}
|
|
|
|
func (c *ranksServiceClient) Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*RankMessage, error) {
|
|
out := new(RankMessage)
|
|
err := c.cc.Invoke(ctx, "/ranks.RanksService/Get", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *ranksServiceClient) List(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*RankList, error) {
|
|
out := new(RankList)
|
|
err := c.cc.Invoke(ctx, "/ranks.RanksService/List", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *ranksServiceClient) Delete(ctx context.Context, in *IdMessage, opts ...grpc.CallOption) (*IdMessage, error) {
|
|
out := new(IdMessage)
|
|
err := c.cc.Invoke(ctx, "/ranks.RanksService/Delete", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
// RanksServiceServer is the server API for RanksService service.
|
|
// All implementations must embed UnimplementedRanksServiceServer
|
|
// for forward compatibility
|
|
type RanksServiceServer interface {
|
|
Get(context.Context, *GetRequest) (*RankMessage, error)
|
|
List(context.Context, *ListRequest) (*RankList, error)
|
|
Delete(context.Context, *IdMessage) (*IdMessage, error)
|
|
mustEmbedUnimplementedRanksServiceServer()
|
|
}
|
|
|
|
// UnimplementedRanksServiceServer must be embedded to have forward compatible implementations.
|
|
type UnimplementedRanksServiceServer struct {
|
|
}
|
|
|
|
func (UnimplementedRanksServiceServer) Get(context.Context, *GetRequest) (*RankMessage, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method Get not implemented")
|
|
}
|
|
func (UnimplementedRanksServiceServer) List(context.Context, *ListRequest) (*RankList, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method List not implemented")
|
|
}
|
|
func (UnimplementedRanksServiceServer) Delete(context.Context, *IdMessage) (*IdMessage, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented")
|
|
}
|
|
func (UnimplementedRanksServiceServer) mustEmbedUnimplementedRanksServiceServer() {}
|
|
|
|
// UnsafeRanksServiceServer may be embedded to opt out of forward compatibility for this service.
|
|
// Use of this interface is not recommended, as added methods to RanksServiceServer will
|
|
// result in compilation errors.
|
|
type UnsafeRanksServiceServer interface {
|
|
mustEmbedUnimplementedRanksServiceServer()
|
|
}
|
|
|
|
func RegisterRanksServiceServer(s grpc.ServiceRegistrar, srv RanksServiceServer) {
|
|
s.RegisterService(&RanksService_ServiceDesc, srv)
|
|
}
|
|
|
|
func _RanksService_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.(RanksServiceServer).Get(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/ranks.RanksService/Get",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(RanksServiceServer).Get(ctx, req.(*GetRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _RanksService_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.(RanksServiceServer).List(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/ranks.RanksService/List",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(RanksServiceServer).List(ctx, req.(*ListRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _RanksService_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(IdMessage)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(RanksServiceServer).Delete(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/ranks.RanksService/Delete",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(RanksServiceServer).Delete(ctx, req.(*IdMessage))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
// RanksService_ServiceDesc is the grpc.ServiceDesc for RanksService service.
|
|
// It's only intended for direct use with grpc.RegisterService,
|
|
// and not to be introspected or modified (even as a copy)
|
|
var RanksService_ServiceDesc = grpc.ServiceDesc{
|
|
ServiceName: "ranks.RanksService",
|
|
HandlerType: (*RanksServiceServer)(nil),
|
|
Methods: []grpc.MethodDesc{
|
|
{
|
|
MethodName: "Get",
|
|
Handler: _RanksService_Get_Handler,
|
|
},
|
|
{
|
|
MethodName: "List",
|
|
Handler: _RanksService_List_Handler,
|
|
},
|
|
{
|
|
MethodName: "Delete",
|
|
Handler: _RanksService_Delete_Handler,
|
|
},
|
|
},
|
|
Streams: []grpc.StreamDesc{},
|
|
Metadata: "ranks.proto",
|
|
}
|