chore: updated grpc stubs

This commit is contained in:
ITQ
2025-12-14 14:11:22 +03:00
parent 5636096c08
commit fe355677db
19 changed files with 4120 additions and 2131 deletions
+545
View File
@@ -0,0 +1,545 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.11
// protoc v6.33.2
// source: api/proto/results.proto
package results
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
emptypb "google.golang.org/protobuf/types/known/emptypb"
reflect "reflect"
sync "sync"
unsafe "unsafe"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type TaskStatus struct {
state protoimpl.MessageState `protogen:"open.v1"`
TaskId string `protobuf:"bytes,1,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"`
TaskTitle string `protobuf:"bytes,2,opt,name=task_title,json=taskTitle,proto3" json:"task_title,omitempty"`
EarnedPoints int32 `protobuf:"varint,3,opt,name=earned_points,json=earnedPoints,proto3" json:"earned_points,omitempty"`
MaxPoints int32 `protobuf:"varint,4,opt,name=max_points,json=maxPoints,proto3" json:"max_points,omitempty"`
Position *int32 `protobuf:"varint,5,opt,name=position,proto3,oneof" json:"position,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *TaskStatus) Reset() {
*x = TaskStatus{}
mi := &file_api_proto_results_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *TaskStatus) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*TaskStatus) ProtoMessage() {}
func (x *TaskStatus) ProtoReflect() protoreflect.Message {
mi := &file_api_proto_results_proto_msgTypes[0]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use TaskStatus.ProtoReflect.Descriptor instead.
func (*TaskStatus) Descriptor() ([]byte, []int) {
return file_api_proto_results_proto_rawDescGZIP(), []int{0}
}
func (x *TaskStatus) GetTaskId() string {
if x != nil {
return x.TaskId
}
return ""
}
func (x *TaskStatus) GetTaskTitle() string {
if x != nil {
return x.TaskTitle
}
return ""
}
func (x *TaskStatus) GetEarnedPoints() int32 {
if x != nil {
return x.EarnedPoints
}
return 0
}
func (x *TaskStatus) GetMaxPoints() int32 {
if x != nil {
return x.MaxPoints
}
return 0
}
func (x *TaskStatus) GetPosition() int32 {
if x != nil && x.Position != nil {
return *x.Position
}
return 0
}
type UserResult struct {
state protoimpl.MessageState `protogen:"open.v1"`
UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"`
TotalScore int32 `protobuf:"varint,3,opt,name=total_score,json=totalScore,proto3" json:"total_score,omitempty"`
OverallPosition int32 `protobuf:"varint,4,opt,name=overall_position,json=overallPosition,proto3" json:"overall_position,omitempty"`
TaskStatuses []*TaskStatus `protobuf:"bytes,5,rep,name=task_statuses,json=taskStatuses,proto3" json:"task_statuses,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *UserResult) Reset() {
*x = UserResult{}
mi := &file_api_proto_results_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *UserResult) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*UserResult) ProtoMessage() {}
func (x *UserResult) ProtoReflect() protoreflect.Message {
mi := &file_api_proto_results_proto_msgTypes[1]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use UserResult.ProtoReflect.Descriptor instead.
func (*UserResult) Descriptor() ([]byte, []int) {
return file_api_proto_results_proto_rawDescGZIP(), []int{1}
}
func (x *UserResult) GetUserId() string {
if x != nil {
return x.UserId
}
return ""
}
func (x *UserResult) GetUsername() string {
if x != nil {
return x.Username
}
return ""
}
func (x *UserResult) GetTotalScore() int32 {
if x != nil {
return x.TotalScore
}
return 0
}
func (x *UserResult) GetOverallPosition() int32 {
if x != nil {
return x.OverallPosition
}
return 0
}
func (x *UserResult) GetTaskStatuses() []*TaskStatus {
if x != nil {
return x.TaskStatuses
}
return nil
}
type GetCompetitionResultsRequest struct {
state protoimpl.MessageState `protogen:"open.v1"`
PageSize int32 `protobuf:"varint,1,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
PageToken int32 `protobuf:"varint,2,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
CompetitionId string `protobuf:"bytes,3,opt,name=competition_id,json=competitionId,proto3" json:"competition_id,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *GetCompetitionResultsRequest) Reset() {
*x = GetCompetitionResultsRequest{}
mi := &file_api_proto_results_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *GetCompetitionResultsRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetCompetitionResultsRequest) ProtoMessage() {}
func (x *GetCompetitionResultsRequest) ProtoReflect() protoreflect.Message {
mi := &file_api_proto_results_proto_msgTypes[2]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetCompetitionResultsRequest.ProtoReflect.Descriptor instead.
func (*GetCompetitionResultsRequest) Descriptor() ([]byte, []int) {
return file_api_proto_results_proto_rawDescGZIP(), []int{2}
}
func (x *GetCompetitionResultsRequest) GetPageSize() int32 {
if x != nil {
return x.PageSize
}
return 0
}
func (x *GetCompetitionResultsRequest) GetPageToken() int32 {
if x != nil {
return x.PageToken
}
return 0
}
func (x *GetCompetitionResultsRequest) GetCompetitionId() string {
if x != nil {
return x.CompetitionId
}
return ""
}
type GetCompetitionResultsResponse struct {
state protoimpl.MessageState `protogen:"open.v1"`
Results []*UserResult `protobuf:"bytes,1,rep,name=results,proto3" json:"results,omitempty"`
TotalCount int32 `protobuf:"varint,2,opt,name=total_count,json=totalCount,proto3" json:"total_count,omitempty"`
NextPageToken int32 `protobuf:"varint,3,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *GetCompetitionResultsResponse) Reset() {
*x = GetCompetitionResultsResponse{}
mi := &file_api_proto_results_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *GetCompetitionResultsResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetCompetitionResultsResponse) ProtoMessage() {}
func (x *GetCompetitionResultsResponse) ProtoReflect() protoreflect.Message {
mi := &file_api_proto_results_proto_msgTypes[3]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetCompetitionResultsResponse.ProtoReflect.Descriptor instead.
func (*GetCompetitionResultsResponse) Descriptor() ([]byte, []int) {
return file_api_proto_results_proto_rawDescGZIP(), []int{3}
}
func (x *GetCompetitionResultsResponse) GetResults() []*UserResult {
if x != nil {
return x.Results
}
return nil
}
func (x *GetCompetitionResultsResponse) GetTotalCount() int32 {
if x != nil {
return x.TotalCount
}
return 0
}
func (x *GetCompetitionResultsResponse) GetNextPageToken() int32 {
if x != nil {
return x.NextPageToken
}
return 0
}
type GetUserCompetitionResultsRequest struct {
state protoimpl.MessageState `protogen:"open.v1"`
CompetitionId string `protobuf:"bytes,1,opt,name=competition_id,json=competitionId,proto3" json:"competition_id,omitempty"`
UserId string `protobuf:"bytes,2,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *GetUserCompetitionResultsRequest) Reset() {
*x = GetUserCompetitionResultsRequest{}
mi := &file_api_proto_results_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *GetUserCompetitionResultsRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetUserCompetitionResultsRequest) ProtoMessage() {}
func (x *GetUserCompetitionResultsRequest) ProtoReflect() protoreflect.Message {
mi := &file_api_proto_results_proto_msgTypes[4]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetUserCompetitionResultsRequest.ProtoReflect.Descriptor instead.
func (*GetUserCompetitionResultsRequest) Descriptor() ([]byte, []int) {
return file_api_proto_results_proto_rawDescGZIP(), []int{4}
}
func (x *GetUserCompetitionResultsRequest) GetCompetitionId() string {
if x != nil {
return x.CompetitionId
}
return ""
}
func (x *GetUserCompetitionResultsRequest) GetUserId() string {
if x != nil {
return x.UserId
}
return ""
}
type GetUserCompetitionResultsResponse struct {
state protoimpl.MessageState `protogen:"open.v1"`
Result *UserResult `protobuf:"bytes,1,opt,name=result,proto3" json:"result,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *GetUserCompetitionResultsResponse) Reset() {
*x = GetUserCompetitionResultsResponse{}
mi := &file_api_proto_results_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *GetUserCompetitionResultsResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetUserCompetitionResultsResponse) ProtoMessage() {}
func (x *GetUserCompetitionResultsResponse) ProtoReflect() protoreflect.Message {
mi := &file_api_proto_results_proto_msgTypes[5]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetUserCompetitionResultsResponse.ProtoReflect.Descriptor instead.
func (*GetUserCompetitionResultsResponse) Descriptor() ([]byte, []int) {
return file_api_proto_results_proto_rawDescGZIP(), []int{5}
}
func (x *GetUserCompetitionResultsResponse) GetResult() *UserResult {
if x != nil {
return x.Result
}
return nil
}
type RecalculateResultsRequest struct {
state protoimpl.MessageState `protogen:"open.v1"`
CompetitionId string `protobuf:"bytes,1,opt,name=competition_id,json=competitionId,proto3" json:"competition_id,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *RecalculateResultsRequest) Reset() {
*x = RecalculateResultsRequest{}
mi := &file_api_proto_results_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *RecalculateResultsRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*RecalculateResultsRequest) ProtoMessage() {}
func (x *RecalculateResultsRequest) ProtoReflect() protoreflect.Message {
mi := &file_api_proto_results_proto_msgTypes[6]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use RecalculateResultsRequest.ProtoReflect.Descriptor instead.
func (*RecalculateResultsRequest) Descriptor() ([]byte, []int) {
return file_api_proto_results_proto_rawDescGZIP(), []int{6}
}
func (x *RecalculateResultsRequest) GetCompetitionId() string {
if x != nil {
return x.CompetitionId
}
return ""
}
var File_api_proto_results_proto protoreflect.FileDescriptor
const file_api_proto_results_proto_rawDesc = "" +
"\n" +
"\x17api/proto/results.proto\x12\aresults\x1a\x1bgoogle/protobuf/empty.proto\"\xb6\x01\n" +
"\n" +
"TaskStatus\x12\x17\n" +
"\atask_id\x18\x01 \x01(\tR\x06taskId\x12\x1d\n" +
"\n" +
"task_title\x18\x02 \x01(\tR\ttaskTitle\x12#\n" +
"\rearned_points\x18\x03 \x01(\x05R\fearnedPoints\x12\x1d\n" +
"\n" +
"max_points\x18\x04 \x01(\x05R\tmaxPoints\x12\x1f\n" +
"\bposition\x18\x05 \x01(\x05H\x00R\bposition\x88\x01\x01B\v\n" +
"\t_position\"\xc7\x01\n" +
"\n" +
"UserResult\x12\x17\n" +
"\auser_id\x18\x01 \x01(\tR\x06userId\x12\x1a\n" +
"\busername\x18\x02 \x01(\tR\busername\x12\x1f\n" +
"\vtotal_score\x18\x03 \x01(\x05R\n" +
"totalScore\x12)\n" +
"\x10overall_position\x18\x04 \x01(\x05R\x0foverallPosition\x128\n" +
"\rtask_statuses\x18\x05 \x03(\v2\x13.results.TaskStatusR\ftaskStatuses\"\x81\x01\n" +
"\x1cGetCompetitionResultsRequest\x12\x1b\n" +
"\tpage_size\x18\x01 \x01(\x05R\bpageSize\x12\x1d\n" +
"\n" +
"page_token\x18\x02 \x01(\x05R\tpageToken\x12%\n" +
"\x0ecompetition_id\x18\x03 \x01(\tR\rcompetitionId\"\x97\x01\n" +
"\x1dGetCompetitionResultsResponse\x12-\n" +
"\aresults\x18\x01 \x03(\v2\x13.results.UserResultR\aresults\x12\x1f\n" +
"\vtotal_count\x18\x02 \x01(\x05R\n" +
"totalCount\x12&\n" +
"\x0fnext_page_token\x18\x03 \x01(\x05R\rnextPageToken\"b\n" +
" GetUserCompetitionResultsRequest\x12%\n" +
"\x0ecompetition_id\x18\x01 \x01(\tR\rcompetitionId\x12\x17\n" +
"\auser_id\x18\x02 \x01(\tR\x06userId\"P\n" +
"!GetUserCompetitionResultsResponse\x12+\n" +
"\x06result\x18\x01 \x01(\v2\x13.results.UserResultR\x06result\"B\n" +
"\x19RecalculateResultsRequest\x12%\n" +
"\x0ecompetition_id\x18\x01 \x01(\tR\rcompetitionId2\xbe\x02\n" +
"\x0eResultsService\x12f\n" +
"\x15GetCompetitionResults\x12%.results.GetCompetitionResultsRequest\x1a&.results.GetCompetitionResultsResponse\x12r\n" +
"\x19GetUserCompetitionResults\x12).results.GetUserCompetitionResultsRequest\x1a*.results.GetUserCompetitionResultsResponse\x12P\n" +
"\x12RecalculateResults\x12\".results.RecalculateResultsRequest\x1a\x16.google.protobuf.EmptyB\x11Z\x0fpkg/api/resultsb\x06proto3"
var (
file_api_proto_results_proto_rawDescOnce sync.Once
file_api_proto_results_proto_rawDescData []byte
)
func file_api_proto_results_proto_rawDescGZIP() []byte {
file_api_proto_results_proto_rawDescOnce.Do(func() {
file_api_proto_results_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_api_proto_results_proto_rawDesc), len(file_api_proto_results_proto_rawDesc)))
})
return file_api_proto_results_proto_rawDescData
}
var file_api_proto_results_proto_msgTypes = make([]protoimpl.MessageInfo, 7)
var file_api_proto_results_proto_goTypes = []any{
(*TaskStatus)(nil), // 0: results.TaskStatus
(*UserResult)(nil), // 1: results.UserResult
(*GetCompetitionResultsRequest)(nil), // 2: results.GetCompetitionResultsRequest
(*GetCompetitionResultsResponse)(nil), // 3: results.GetCompetitionResultsResponse
(*GetUserCompetitionResultsRequest)(nil), // 4: results.GetUserCompetitionResultsRequest
(*GetUserCompetitionResultsResponse)(nil), // 5: results.GetUserCompetitionResultsResponse
(*RecalculateResultsRequest)(nil), // 6: results.RecalculateResultsRequest
(*emptypb.Empty)(nil), // 7: google.protobuf.Empty
}
var file_api_proto_results_proto_depIdxs = []int32{
0, // 0: results.UserResult.task_statuses:type_name -> results.TaskStatus
1, // 1: results.GetCompetitionResultsResponse.results:type_name -> results.UserResult
1, // 2: results.GetUserCompetitionResultsResponse.result:type_name -> results.UserResult
2, // 3: results.ResultsService.GetCompetitionResults:input_type -> results.GetCompetitionResultsRequest
4, // 4: results.ResultsService.GetUserCompetitionResults:input_type -> results.GetUserCompetitionResultsRequest
6, // 5: results.ResultsService.RecalculateResults:input_type -> results.RecalculateResultsRequest
3, // 6: results.ResultsService.GetCompetitionResults:output_type -> results.GetCompetitionResultsResponse
5, // 7: results.ResultsService.GetUserCompetitionResults:output_type -> results.GetUserCompetitionResultsResponse
7, // 8: results.ResultsService.RecalculateResults:output_type -> google.protobuf.Empty
6, // [6:9] is the sub-list for method output_type
3, // [3:6] is the sub-list for method input_type
3, // [3:3] is the sub-list for extension type_name
3, // [3:3] is the sub-list for extension extendee
0, // [0:3] is the sub-list for field type_name
}
func init() { file_api_proto_results_proto_init() }
func file_api_proto_results_proto_init() {
if File_api_proto_results_proto != nil {
return
}
file_api_proto_results_proto_msgTypes[0].OneofWrappers = []any{}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: unsafe.Slice(unsafe.StringData(file_api_proto_results_proto_rawDesc), len(file_api_proto_results_proto_rawDesc)),
NumEnums: 0,
NumMessages: 7,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_api_proto_results_proto_goTypes,
DependencyIndexes: file_api_proto_results_proto_depIdxs,
MessageInfos: file_api_proto_results_proto_msgTypes,
}.Build()
File_api_proto_results_proto = out.File
file_api_proto_results_proto_goTypes = nil
file_api_proto_results_proto_depIdxs = nil
}
+198
View File
@@ -0,0 +1,198 @@
// 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",
}