199 lines
8.5 KiB
Go
199 lines
8.5 KiB
Go
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
|
// versions:
|
|
// - protoc-gen-go-grpc v1.6.0
|
|
// - protoc v6.33.2
|
|
// source: api/proto/results.proto
|
|
|
|
package results
|
|
|
|
import (
|
|
context "context"
|
|
grpc "google.golang.org/grpc"
|
|
codes "google.golang.org/grpc/codes"
|
|
status "google.golang.org/grpc/status"
|
|
emptypb "google.golang.org/protobuf/types/known/emptypb"
|
|
)
|
|
|
|
// 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.64.0 or later.
|
|
const _ = grpc.SupportPackageIsVersion9
|
|
|
|
const (
|
|
ResultsService_GetCompetitionResults_FullMethodName = "/results.ResultsService/GetCompetitionResults"
|
|
ResultsService_GetUserCompetitionResults_FullMethodName = "/results.ResultsService/GetUserCompetitionResults"
|
|
ResultsService_RecalculateResults_FullMethodName = "/results.ResultsService/RecalculateResults"
|
|
)
|
|
|
|
// ResultsServiceClient is the client API for ResultsService 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 ResultsServiceClient interface {
|
|
GetCompetitionResults(ctx context.Context, in *GetCompetitionResultsRequest, opts ...grpc.CallOption) (*GetCompetitionResultsResponse, error)
|
|
GetUserCompetitionResults(ctx context.Context, in *GetUserCompetitionResultsRequest, opts ...grpc.CallOption) (*GetUserCompetitionResultsResponse, error)
|
|
RecalculateResults(ctx context.Context, in *RecalculateResultsRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
|
|
}
|
|
|
|
type resultsServiceClient struct {
|
|
cc grpc.ClientConnInterface
|
|
}
|
|
|
|
func NewResultsServiceClient(cc grpc.ClientConnInterface) ResultsServiceClient {
|
|
return &resultsServiceClient{cc}
|
|
}
|
|
|
|
func (c *resultsServiceClient) GetCompetitionResults(ctx context.Context, in *GetCompetitionResultsRequest, opts ...grpc.CallOption) (*GetCompetitionResultsResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(GetCompetitionResultsResponse)
|
|
err := c.cc.Invoke(ctx, ResultsService_GetCompetitionResults_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *resultsServiceClient) GetUserCompetitionResults(ctx context.Context, in *GetUserCompetitionResultsRequest, opts ...grpc.CallOption) (*GetUserCompetitionResultsResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(GetUserCompetitionResultsResponse)
|
|
err := c.cc.Invoke(ctx, ResultsService_GetUserCompetitionResults_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *resultsServiceClient) RecalculateResults(ctx context.Context, in *RecalculateResultsRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(emptypb.Empty)
|
|
err := c.cc.Invoke(ctx, ResultsService_RecalculateResults_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
// ResultsServiceServer is the server API for ResultsService service.
|
|
// All implementations must embed UnimplementedResultsServiceServer
|
|
// for forward compatibility.
|
|
type ResultsServiceServer interface {
|
|
GetCompetitionResults(context.Context, *GetCompetitionResultsRequest) (*GetCompetitionResultsResponse, error)
|
|
GetUserCompetitionResults(context.Context, *GetUserCompetitionResultsRequest) (*GetUserCompetitionResultsResponse, error)
|
|
RecalculateResults(context.Context, *RecalculateResultsRequest) (*emptypb.Empty, error)
|
|
mustEmbedUnimplementedResultsServiceServer()
|
|
}
|
|
|
|
// UnimplementedResultsServiceServer must be embedded to have
|
|
// forward compatible implementations.
|
|
//
|
|
// NOTE: this should be embedded by value instead of pointer to avoid a nil
|
|
// pointer dereference when methods are called.
|
|
type UnimplementedResultsServiceServer struct{}
|
|
|
|
func (UnimplementedResultsServiceServer) GetCompetitionResults(context.Context, *GetCompetitionResultsRequest) (*GetCompetitionResultsResponse, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method GetCompetitionResults not implemented")
|
|
}
|
|
func (UnimplementedResultsServiceServer) GetUserCompetitionResults(context.Context, *GetUserCompetitionResultsRequest) (*GetUserCompetitionResultsResponse, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method GetUserCompetitionResults not implemented")
|
|
}
|
|
func (UnimplementedResultsServiceServer) RecalculateResults(context.Context, *RecalculateResultsRequest) (*emptypb.Empty, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method RecalculateResults not implemented")
|
|
}
|
|
func (UnimplementedResultsServiceServer) mustEmbedUnimplementedResultsServiceServer() {}
|
|
func (UnimplementedResultsServiceServer) testEmbeddedByValue() {}
|
|
|
|
// UnsafeResultsServiceServer may be embedded to opt out of forward compatibility for this service.
|
|
// Use of this interface is not recommended, as added methods to ResultsServiceServer will
|
|
// result in compilation errors.
|
|
type UnsafeResultsServiceServer interface {
|
|
mustEmbedUnimplementedResultsServiceServer()
|
|
}
|
|
|
|
func RegisterResultsServiceServer(s grpc.ServiceRegistrar, srv ResultsServiceServer) {
|
|
// If the following call panics, it indicates UnimplementedResultsServiceServer was
|
|
// embedded by pointer and is nil. This will cause panics if an
|
|
// unimplemented method is ever invoked, so we test this at initialization
|
|
// time to prevent it from happening at runtime later due to I/O.
|
|
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
|
|
t.testEmbeddedByValue()
|
|
}
|
|
s.RegisterService(&ResultsService_ServiceDesc, srv)
|
|
}
|
|
|
|
func _ResultsService_GetCompetitionResults_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(GetCompetitionResultsRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ResultsServiceServer).GetCompetitionResults(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: ResultsService_GetCompetitionResults_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ResultsServiceServer).GetCompetitionResults(ctx, req.(*GetCompetitionResultsRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _ResultsService_GetUserCompetitionResults_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(GetUserCompetitionResultsRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ResultsServiceServer).GetUserCompetitionResults(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: ResultsService_GetUserCompetitionResults_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ResultsServiceServer).GetUserCompetitionResults(ctx, req.(*GetUserCompetitionResultsRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _ResultsService_RecalculateResults_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(RecalculateResultsRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ResultsServiceServer).RecalculateResults(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: ResultsService_RecalculateResults_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ResultsServiceServer).RecalculateResults(ctx, req.(*RecalculateResultsRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
// ResultsService_ServiceDesc is the grpc.ServiceDesc for ResultsService service.
|
|
// It's only intended for direct use with grpc.RegisterService,
|
|
// and not to be introspected or modified (even as a copy)
|
|
var ResultsService_ServiceDesc = grpc.ServiceDesc{
|
|
ServiceName: "results.ResultsService",
|
|
HandlerType: (*ResultsServiceServer)(nil),
|
|
Methods: []grpc.MethodDesc{
|
|
{
|
|
MethodName: "GetCompetitionResults",
|
|
Handler: _ResultsService_GetCompetitionResults_Handler,
|
|
},
|
|
{
|
|
MethodName: "GetUserCompetitionResults",
|
|
Handler: _ResultsService_GetUserCompetitionResults_Handler,
|
|
},
|
|
{
|
|
MethodName: "RecalculateResults",
|
|
Handler: _ResultsService_RecalculateResults_Handler,
|
|
},
|
|
},
|
|
Streams: []grpc.StreamDesc{},
|
|
Metadata: "api/proto/results.proto",
|
|
}
|