lint competition service
This commit is contained in:
@@ -3,8 +3,9 @@ package grpc
|
||||
import (
|
||||
"context"
|
||||
|
||||
pb "datarush/pkg/api/competition"
|
||||
"google.golang.org/protobuf/types/known/emptypb"
|
||||
|
||||
pb "datarush/pkg/api/competition"
|
||||
)
|
||||
|
||||
type CompetitionService interface {
|
||||
@@ -29,7 +30,10 @@ func (h *CompetitionHandler) CreateCompetition(ctx context.Context, req *pb.Comp
|
||||
return h.service.CreateCompetition(ctx, req)
|
||||
}
|
||||
|
||||
func (h *CompetitionHandler) GetCompetition(ctx context.Context, req *pb.GetCompetitionRequest) (*pb.Competition, error) {
|
||||
func (h *CompetitionHandler) GetCompetition(
|
||||
ctx context.Context,
|
||||
req *pb.GetCompetitionRequest,
|
||||
) (*pb.Competition, error) {
|
||||
return h.service.GetCompetition(ctx, req)
|
||||
}
|
||||
|
||||
@@ -37,14 +41,23 @@ func (h *CompetitionHandler) EditCompetition(ctx context.Context, req *pb.Compet
|
||||
return h.service.EditCompetition(ctx, req)
|
||||
}
|
||||
|
||||
func (h *CompetitionHandler) DeleteCompetition(ctx context.Context, req *pb.DeleteCompetitionRequest) (*emptypb.Empty, error) {
|
||||
func (h *CompetitionHandler) DeleteCompetition(
|
||||
ctx context.Context,
|
||||
req *pb.DeleteCompetitionRequest,
|
||||
) (*emptypb.Empty, error) {
|
||||
return h.service.DeleteCompetition(ctx, req)
|
||||
}
|
||||
|
||||
func (h *CompetitionHandler) ListCompetitions(ctx context.Context, req *pb.ListCompetitionsRequest) (*pb.ListCompetitionsResponse, error) {
|
||||
func (h *CompetitionHandler) ListCompetitions(
|
||||
ctx context.Context,
|
||||
req *pb.ListCompetitionsRequest,
|
||||
) (*pb.ListCompetitionsResponse, error) {
|
||||
return h.service.ListCompetitions(ctx, req)
|
||||
}
|
||||
|
||||
func (h *CompetitionHandler) ChangeCompetitionState(ctx context.Context, req *pb.ChangeCompetitionStateRequest) (*pb.Competition, error) {
|
||||
func (h *CompetitionHandler) ChangeCompetitionState(
|
||||
ctx context.Context,
|
||||
req *pb.ChangeCompetitionStateRequest,
|
||||
) (*pb.Competition, error) {
|
||||
return h.service.ChangeCompetitionState(ctx, req)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user