From 0fc0751b74166785283d5b1aec32123acf43f738 Mon Sep 17 00:00:00 2001 From: naingminkhant Date: Sun, 27 Jul 2025 23:20:27 +0630 Subject: [PATCH] feat: Quiz Create,Update,Delete and get by module id --- .../lms-main-system/app/gateway/gateway.go | 6 + .../app/rpc/quiz/rpc_create_quiz.go | 119 ++++ .../app/rpc/quiz/rpc_delete_quiz.go | 56 ++ .../app/rpc/quiz/rpc_get_quiz.go | 85 +++ .../app/rpc/quiz/rpc_update_quiz.go | 89 +++ .../lms-main-system/app/rpc/quiz/service.go | 20 + backend/lms-main-system/app/rpc/server.go | 6 + .../database/queries/answer.sql | 22 + .../database/queries/question.sql | 26 + .../lms-main-system/database/queries/quiz.sql | 20 + .../database/schema/schema.sql | 39 +- backend/lms-main-system/doc/statik/statik.go | 2 +- .../doc/swagger/api.swagger.json | 304 ++++++++ backend/lms-main-system/http/lesson.http | 19 +- backend/lms-main-system/http/quiz.http | 96 +++ .../internal/repo/answer.sql.go | 118 ++++ .../lms-main-system/internal/repo/models.go | 20 +- .../lms-main-system/internal/repo/querier.go | 18 +- .../internal/repo/question.sql.go | 130 ++++ .../lms-main-system/internal/repo/quiz.sql.go | 105 +++ .../proto/authentication/rpc_login.proto | 1 - .../proto/files/service.file.proto | 1 - backend/lms-main-system/proto/quiz/quiz.proto | 47 ++ .../proto/quiz/rpc_quiz_create.proto | 10 + .../proto/quiz/rpc_quiz_delete.proto | 9 + .../proto/quiz/rpc_quiz_get.proto | 13 + .../proto/quiz/rpc_quiz_update.proto | 11 + .../proto/quiz/service.quiz.proto | 79 +++ .../authentication/authentication.pb.go | 105 ++- .../authentication/rpc_email_verify.pb.go | 107 ++- .../protogen/authentication/rpc_login.pb.go | 118 +++- .../protogen/authentication/rpc_logout.pb.go | 102 ++- .../authentication/rpc_mfa_setup.pb.go | 108 ++- .../protogen/authentication/rpc_refresh.pb.go | 95 ++- .../authentication/rpc_register.pb.go | 142 ++-- .../rpc_resend_email_verification.pb.go | 109 ++- .../service.authentication.pb.go | 296 +++++--- .../service.authentication_grpc.pb.go | 2 +- .../protogen/files/service.file.pb.go | 319 ++++++--- .../protogen/files/service.file_grpc.pb.go | 2 +- .../protogen/lesson/lesson.pb.go | 137 ++-- .../protogen/lesson/rpc_lesson_create.pb.go | 115 ++- .../protogen/lesson/rpc_lesson_delete.pb.go | 97 ++- .../protogen/lesson/rpc_lesson_get.pb.go | 170 +++-- .../protogen/lesson/rpc_lesson_update.pb.go | 119 +++- .../protogen/lesson/service.lesson.pb.go | 113 ++- .../protogen/lesson/service.lesson_grpc.pb.go | 2 +- .../protogen/modules/module.pb.go | 95 ++- .../protogen/modules/rpc_create_module.pb.go | 111 ++- .../protogen/modules/rpc_delete_modules.pb.go | 102 ++- .../protogen/modules/rpc_get_module.pb.go | 99 ++- .../protogen/modules/rpc_list_modules.pb.go | 66 +- .../protogen/modules/rpc_update_module.pb.go | 126 ++-- .../protogen/modules/service.module.pb.go | 95 ++- .../modules/service.module_grpc.pb.go | 2 +- .../lms-main-system/protogen/quiz/quiz.pb.go | 663 ++++++++++++++++++ .../protogen/quiz/rpc_quiz_create.pb.go | 161 +++++ .../protogen/quiz/rpc_quiz_delete.pb.go | 156 +++++ .../protogen/quiz/rpc_quiz_get.pb.go | 215 ++++++ .../protogen/quiz/rpc_quiz_update.pb.go | 172 +++++ .../protogen/quiz/service.quiz.pb.go | 154 ++++ .../protogen/quiz/service.quiz.pb.gw.go | 389 ++++++++++ .../protogen/quiz/service.quiz_grpc.pb.go | 236 +++++++ 63 files changed, 5679 insertions(+), 892 deletions(-) create mode 100644 backend/lms-main-system/app/rpc/quiz/rpc_create_quiz.go create mode 100644 backend/lms-main-system/app/rpc/quiz/rpc_delete_quiz.go create mode 100644 backend/lms-main-system/app/rpc/quiz/rpc_get_quiz.go create mode 100644 backend/lms-main-system/app/rpc/quiz/rpc_update_quiz.go create mode 100644 backend/lms-main-system/app/rpc/quiz/service.go create mode 100644 backend/lms-main-system/database/queries/answer.sql create mode 100644 backend/lms-main-system/database/queries/question.sql create mode 100644 backend/lms-main-system/database/queries/quiz.sql create mode 100644 backend/lms-main-system/http/quiz.http create mode 100644 backend/lms-main-system/internal/repo/answer.sql.go create mode 100644 backend/lms-main-system/internal/repo/question.sql.go create mode 100644 backend/lms-main-system/internal/repo/quiz.sql.go create mode 100644 backend/lms-main-system/proto/quiz/quiz.proto create mode 100644 backend/lms-main-system/proto/quiz/rpc_quiz_create.proto create mode 100644 backend/lms-main-system/proto/quiz/rpc_quiz_delete.proto create mode 100644 backend/lms-main-system/proto/quiz/rpc_quiz_get.proto create mode 100644 backend/lms-main-system/proto/quiz/rpc_quiz_update.proto create mode 100644 backend/lms-main-system/proto/quiz/service.quiz.proto create mode 100644 backend/lms-main-system/protogen/quiz/quiz.pb.go create mode 100644 backend/lms-main-system/protogen/quiz/rpc_quiz_create.pb.go create mode 100644 backend/lms-main-system/protogen/quiz/rpc_quiz_delete.pb.go create mode 100644 backend/lms-main-system/protogen/quiz/rpc_quiz_get.pb.go create mode 100644 backend/lms-main-system/protogen/quiz/rpc_quiz_update.pb.go create mode 100644 backend/lms-main-system/protogen/quiz/service.quiz.pb.go create mode 100644 backend/lms-main-system/protogen/quiz/service.quiz.pb.gw.go create mode 100644 backend/lms-main-system/protogen/quiz/service.quiz_grpc.pb.go diff --git a/backend/lms-main-system/app/gateway/gateway.go b/backend/lms-main-system/app/gateway/gateway.go index 31d35f2..0e8af2d 100644 --- a/backend/lms-main-system/app/gateway/gateway.go +++ b/backend/lms-main-system/app/gateway/gateway.go @@ -19,6 +19,7 @@ import ( fb "github.com/multi-tenants-cms-golang/lms-sys/protogen/files" lspb "github.com/multi-tenants-cms-golang/lms-sys/protogen/lesson" mpb "github.com/multi-tenants-cms-golang/lms-sys/protogen/modules" + qspb "github.com/multi-tenants-cms-golang/lms-sys/protogen/quiz" "github.com/rakyll/statik/fs" "github.com/rs/cors" "github.com/sirupsen/logrus" @@ -99,6 +100,11 @@ func (g *Gateway) Start() error { if err != nil { return fmt.Errorf("failed to register module handler: %w", err) } + // Quiz + err = qspb.RegisterQuizServiceHandlerFromEndpoint(ctx, gwMux, g.grpcAddr, opts) + if err != nil { + return fmt.Errorf("failed to register quiz handler: %w", err) + } err = fb.RegisterFileServiceHandlerFromEndpoint( ctx, diff --git a/backend/lms-main-system/app/rpc/quiz/rpc_create_quiz.go b/backend/lms-main-system/app/rpc/quiz/rpc_create_quiz.go new file mode 100644 index 0000000..348a121 --- /dev/null +++ b/backend/lms-main-system/app/rpc/quiz/rpc_create_quiz.go @@ -0,0 +1,119 @@ +package quiz + +import ( + "context" + "fmt" + "github.com/google/uuid" + "github.com/jackc/pgx/v5/pgtype" + "github.com/multi-tenants-cms-golang/lms-sys/internal/convert/global" + "github.com/multi-tenants-cms-golang/lms-sys/internal/repo" + db "github.com/multi-tenants-cms-golang/lms-sys/internal/repo" + "github.com/multi-tenants-cms-golang/lms-sys/pkg/utils" + qpb "github.com/multi-tenants-cms-golang/lms-sys/protogen/quiz" + "github.com/sirupsen/logrus" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" + "google.golang.org/protobuf/types/known/timestamppb" +) + +func (qs *QuizService) CreateQuiz(ctx context.Context, req *qpb.CreateQuizRequest) (*qpb.QuizResponse, error) { + qs.logger.WithFields(logrus.Fields{ + "method": "CreateQuiz", + "params": req, + }).Info("Creating quiz") + + md, ok := metadata.FromIncomingContext(ctx) + if !ok { + return nil, utils.ErrMissingOrganization().ToGRPCStatus() + } + organization := md.Get("x-organisation") + if len(organization) <= 0 { + return nil, utils.ErrMissingOrganization().ToGRPCStatus() + } + organizationName := organization[0] + + // Validate ModuleID + if req.ModuleId == "" { + return nil, status.Error(codes.InvalidArgument, "Module ID is required") + } + pgModuleID, err := global.ConvertStringToUUID(req.ModuleId) + if err != nil { + return nil, status.Error(codes.InvalidArgument, err.Error()) + } + + fmt.Println("Org Name:", organizationName) + fmt.Println("Module ID:", pgModuleID) + // Check module exists + args := repo.GetModuleByIDWithTenantParams{ + ModuleID: uuid.MustParse(pgModuleID.String()), + Namespace: organizationName, + } + module, err := qs.store.GetModuleByIDWithTenant(ctx, args) + if err != nil { + qs.logger.WithError(err).Error("Failed to fetch module") + return nil, status.Errorf(codes.NotFound, "Module not found") + } + + // Create Quiz + quizResult, err := qs.store.CreateQuiz(ctx, db.CreateQuizParams{ + ModuleID: module.ModuleID, + Title: "Quiz for " + module.ModuleName, + }) + if err != nil { + qs.logger.WithError(err).Error("Failed to create quiz") + return nil, status.Errorf(codes.Internal, "Unable to create quiz") + } + + questionIDToQuestion := make(map[uuid.UUID]*qpb.Question) + var allQuestions []*qpb.Question + + // Insert each question and its answers + for _, q := range req.Quiz { + questionResult, err := qs.store.CreateQuestion(ctx, db.CreateQuestionParams{ + Question: q.Question, + QuizID: quizResult.QuizID, + }) + if err != nil { + return nil, status.Errorf(codes.Internal, "Failed to create question") + } + + questionPB := &qpb.Question{ + QuestionId: questionResult.QuestionID.String(), + QuizId: quizResult.QuizID.String(), + Question: questionResult.Question, + Answers: []*qpb.Answer{}, + } + allQuestions = append(allQuestions, questionPB) + questionIDToQuestion[questionResult.QuestionID] = questionPB + + for _, a := range q.AnswerOptions { + answerResult, err := qs.store.CreateAnswer(ctx, db.CreateAnswerParams{ + Answer: a.Answer, + IsCorrect: pgtype.Bool{Bool: a.IsCorrect, Valid: true}, + QuestionID: questionResult.QuestionID, + }) + if err != nil { + return nil, status.Errorf(codes.Internal, "Failed to create answer") + } + + questionPB.Answers = append(questionPB.Answers, &qpb.Answer{ + AnswerId: answerResult.AnswerID.String(), + QuestionId: answerResult.QuestionID.String(), + Answer: answerResult.Answer, + IsCorrect: answerResult.IsCorrect.Bool, + }) + } + } + + return &qpb.QuizResponse{ + Quiz: &qpb.Quiz{ + QuizId: quizResult.QuizID.String(), + ModuleId: quizResult.ModuleID.String(), + Title: quizResult.Title, + CreatedAt: timestamppb.New(quizResult.CreatedAt.Time), + UpdatedAt: timestamppb.New(quizResult.UpdatedAt.Time), + }, + Questions: allQuestions, + }, nil +} diff --git a/backend/lms-main-system/app/rpc/quiz/rpc_delete_quiz.go b/backend/lms-main-system/app/rpc/quiz/rpc_delete_quiz.go new file mode 100644 index 0000000..5cfa792 --- /dev/null +++ b/backend/lms-main-system/app/rpc/quiz/rpc_delete_quiz.go @@ -0,0 +1,56 @@ +package quiz + +import ( + "context" + "github.com/google/uuid" + qpb "github.com/multi-tenants-cms-golang/lms-sys/protogen/quiz" + "github.com/sirupsen/logrus" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" + "google.golang.org/protobuf/types/known/emptypb" +) + +func (qs *QuizService) DeleteQuiz(ctx context.Context, req *qpb.DeleteQuizRequest) (*emptypb.Empty, error) { + qs.logger.WithFields(logrus.Fields{ + "method": "DeleteQuiz", + "req": req, + }).Info("Deleting quizzes") + + for _, id := range req.Ids { + quizID, err := uuid.Parse(id) + if err != nil { + return nil, status.Errorf(codes.InvalidArgument, "invalid quiz ID: %v", err) + } + + // Check for existing questions + questions, err := qs.store.GetQuestionsByQuizID(ctx, quizID) + if err != nil { + return nil, status.Errorf(codes.Internal, "failed to fetch quiz questions: %v", err) + } + + if len(questions) > 0 && !req.ForceDelete { + return nil, status.Errorf(codes.FailedPrecondition, "Quiz %s has associated questions. Use force_delete: true to force delete.", id) + } + + if req.ForceDelete { + // Delete answers + for _, q := range questions { + if err := qs.store.DeleteAnswersByQuestionId(ctx, uuid.MustParse(q.QuestionID.String())); err != nil { + return nil, status.Errorf(codes.Internal, "failed to delete answers: %v", err) + } + } + + // Delete questions + if err := qs.store.DeleteQuestionsByQuizId(ctx, quizID); err != nil { + return nil, status.Errorf(codes.Internal, "failed to delete questions: %v", err) + } + } + + // Delete quiz + if err := qs.store.DeleteQuizById(ctx, quizID); err != nil { + return nil, status.Errorf(codes.Internal, "failed to delete quiz: %v", err) + } + } + + return &emptypb.Empty{}, nil +} diff --git a/backend/lms-main-system/app/rpc/quiz/rpc_get_quiz.go b/backend/lms-main-system/app/rpc/quiz/rpc_get_quiz.go new file mode 100644 index 0000000..6c69eea --- /dev/null +++ b/backend/lms-main-system/app/rpc/quiz/rpc_get_quiz.go @@ -0,0 +1,85 @@ +package quiz + +import ( + "context" + "github.com/google/uuid" + "github.com/multi-tenants-cms-golang/lms-sys/internal/convert/global" + qpb "github.com/multi-tenants-cms-golang/lms-sys/protogen/quiz" + "github.com/sirupsen/logrus" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" + "google.golang.org/protobuf/types/known/timestamppb" +) + +func (qs *QuizService) GetQuizzesByModule(ctx context.Context, req *qpb.GetQuizByModuleRequest) (*qpb.GetQuizByModuleResponse, error) { + qs.logger.WithFields(logrus.Fields{ + "method": "GetQuizzesByModule", + "params": req, + }).Info("Fetching quizzes by module") + + // Validate input + if req.ModuleId == "" { + return nil, status.Error(codes.InvalidArgument, "Module ID is required") + } + pgModuleID, err := global.ConvertStringToUUID(req.ModuleId) + if err != nil { + return nil, status.Error(codes.InvalidArgument, "Invalid Module ID") + } + // Get quizzes by module ID + quizzes, err := qs.store.GetQuizzesByModule(ctx, uuid.MustParse(pgModuleID.String())) + if err != nil { + qs.logger.WithError(err).Error("Failed to fetch quizzes") + return nil, status.Errorf(codes.Internal, "Failed to fetch quizzes") + } + var quizResponses []*qpb.QuizResponse + + for _, quiz := range quizzes { + questions, err := qs.store.GetQuestionsByQuizID(ctx, quiz.QuizID) + if err != nil { + qs.logger.WithError(err).Error("Failed to fetch questions") + return nil, status.Errorf(codes.Internal, "Failed to fetch questions for quiz %s", quiz.QuizID) + } + + var questionResponses []*qpb.Question + + for _, question := range questions { + answers, err := qs.store.GetAnswersByQuestionID(ctx, question.QuestionID) + if err != nil { + qs.logger.WithError(err).Error("Failed to fetch answers") + return nil, status.Errorf(codes.Internal, "Failed to fetch answers for question %s", question.QuestionID) + } + + var answerResponses []*qpb.Answer + for _, ans := range answers { + answerResponses = append(answerResponses, &qpb.Answer{ + AnswerId: ans.AnswerID.String(), + QuestionId: ans.QuestionID.String(), + Answer: ans.Answer, + IsCorrect: ans.IsCorrect.Bool, + }) + } + + questionResponses = append(questionResponses, &qpb.Question{ + QuestionId: question.QuestionID.String(), + QuizId: question.QuizID.String(), + Question: question.Question, + Answers: answerResponses, + }) + } + + quizResponses = append(quizResponses, &qpb.QuizResponse{ + Quiz: &qpb.Quiz{ + QuizId: quiz.QuizID.String(), + ModuleId: quiz.ModuleID.String(), + Title: quiz.Title, + CreatedAt: timestamppb.New(quiz.CreatedAt.Time), + UpdatedAt: timestamppb.New(quiz.UpdatedAt.Time), + }, + Questions: questionResponses, + }) + } + + return &qpb.GetQuizByModuleResponse{ + Quizzes: quizResponses, + }, nil +} diff --git a/backend/lms-main-system/app/rpc/quiz/rpc_update_quiz.go b/backend/lms-main-system/app/rpc/quiz/rpc_update_quiz.go new file mode 100644 index 0000000..4af0db9 --- /dev/null +++ b/backend/lms-main-system/app/rpc/quiz/rpc_update_quiz.go @@ -0,0 +1,89 @@ +package quiz + +import ( + "context" + "github.com/google/uuid" + "github.com/jackc/pgx/v5/pgtype" + "github.com/multi-tenants-cms-golang/lms-sys/internal/convert/global" + "github.com/multi-tenants-cms-golang/lms-sys/internal/repo" + qpb "github.com/multi-tenants-cms-golang/lms-sys/protogen/quiz" + "github.com/sirupsen/logrus" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" + "google.golang.org/protobuf/types/known/timestamppb" +) + +func (qs *QuizService) UpdateQuiz(ctx context.Context, req *qpb.UpdateQuizRequest) (*qpb.Question, error) { + qs.logger.WithFields(logrus.Fields{ + "method": "UpdateQuiz", + "params": req, + }).Info("Updating quiz") + + // Validate input + if req.QuestionId == "" { + return nil, status.Error(codes.InvalidArgument, "Question Id is required") + } + if req.Question == "" { + return nil, status.Error(codes.InvalidArgument, "Question is required") + } + + questionID, err := global.ConvertStringToUUID(req.QuestionId) + if err != nil { + return nil, status.Error(codes.InvalidArgument, "Invalid question ID") + } + qUUID := uuid.MustParse(questionID.String()) + // Update the question + updateQ := repo.UpdateQuestionParams{ + Question: req.Question, + QuestionID: qUUID, + } + + _, err = qs.store.UpdateQuestion(ctx, updateQ) + if err != nil { + qs.logger.WithError(err).Error("Failed to update question") + return nil, status.Error(codes.Internal, "Failed to update question") + } + + // Update each answer option + for _, a := range req.AnswerOptions { + ua, err := qs.store.UpdateAnswer(ctx, repo.UpdateAnswerParams{ + Answer: a.Answer, + IsCorrect: pgtype.Bool{Bool: a.IsCorrect, Valid: true}, + AnswerID: global.ConvertStringToGoogleUUID(a.AnswerId), + }) + if err != nil { + qs.logger.WithError(err).Errorf("Failed to update answer %s", ua.AnswerID) + return nil, status.Errorf(codes.Internal, "Failed to update answer: %s", ua.AnswerID) + } + } + + // Fetch updated data to return + question, err := qs.store.GetQuestionByID(ctx, qUUID) + if err != nil { + return nil, status.Errorf(codes.Internal, "Failed to retrieve updated question") + } + + answers, err := qs.store.GetAnswersByQuestionID(ctx, qUUID) + if err != nil { + return nil, status.Errorf(codes.Internal, "Failed to retrieve updated answers") + } + + responseAnswers := make([]*qpb.Answer, len(answers)) + for _, a := range answers { + responseAnswers = append(responseAnswers, &qpb.Answer{ + AnswerId: a.AnswerID.String(), + Answer: a.Answer, + QuestionId: a.QuestionID.String(), + IsCorrect: a.IsCorrect.Bool, + CreatedAt: timestamppb.New(a.CreatedAt.Time), + UpdatedAt: timestamppb.New(a.CreatedAt.Time), + }) + } + + return &qpb.Question{ + QuestionId: question.QuestionID.String(), + QuizId: question.QuizID.String(), + Question: question.Question, + Answers: responseAnswers, + }, nil +} diff --git a/backend/lms-main-system/app/rpc/quiz/service.go b/backend/lms-main-system/app/rpc/quiz/service.go new file mode 100644 index 0000000..0a80fe6 --- /dev/null +++ b/backend/lms-main-system/app/rpc/quiz/service.go @@ -0,0 +1,20 @@ +package quiz + +import ( + db "github.com/multi-tenants-cms-golang/lms-sys/internal/repo" + qpb "github.com/multi-tenants-cms-golang/lms-sys/protogen/quiz" + "github.com/sirupsen/logrus" +) + +type QuizService struct { + store db.Store + logger *logrus.Logger + qpb.UnimplementedQuizServiceServer +} + +func NewQuizService(store db.Store, logger *logrus.Logger) *QuizService { + return &QuizService{ + store: store, + logger: logger, + } +} diff --git a/backend/lms-main-system/app/rpc/server.go b/backend/lms-main-system/app/rpc/server.go index a4e8258..b415160 100644 --- a/backend/lms-main-system/app/rpc/server.go +++ b/backend/lms-main-system/app/rpc/server.go @@ -18,10 +18,12 @@ import ( authSrv "github.com/multi-tenants-cms-golang/lms-sys/app/rpc/authentication" lsv "github.com/multi-tenants-cms-golang/lms-sys/app/rpc/lesson" msv "github.com/multi-tenants-cms-golang/lms-sys/app/rpc/module" + qsv "github.com/multi-tenants-cms-golang/lms-sys/app/rpc/quiz" "github.com/multi-tenants-cms-golang/lms-sys/internal/types" authpb "github.com/multi-tenants-cms-golang/lms-sys/protogen/authentication" lspb "github.com/multi-tenants-cms-golang/lms-sys/protogen/lesson" mspb "github.com/multi-tenants-cms-golang/lms-sys/protogen/modules" + qspb "github.com/multi-tenants-cms-golang/lms-sys/protogen/quiz" "github.com/oklog/run" "github.com/sirupsen/logrus" "google.golang.org/grpc" @@ -117,6 +119,10 @@ func (s *Server) Run() error { lessonService := lsv.NewLessonService(s.store, s.logger) lspb.RegisterLessonServiceServer(grpcServer, lessonService) + // Quiz + quizService := qsv.NewQuizService(s.store, s.logger) + qspb.RegisterQuizServiceServer(grpcServer, quizService) + //fb.RegisterFileServiceServer(grpcServer, fileService) var g run.Group diff --git a/backend/lms-main-system/database/queries/answer.sql b/backend/lms-main-system/database/queries/answer.sql new file mode 100644 index 0000000..9fbe75a --- /dev/null +++ b/backend/lms-main-system/database/queries/answer.sql @@ -0,0 +1,22 @@ +-- name: CreateAnswer :one +INSERT INTO Answer (answer, is_correct, question_id) +VALUES ($1, $2, $3) + RETURNING *; + +-- name: UpdateAnswer :one +UPDATE Answer +SET answer = $1, is_correct = $2, updated_at = now() +WHERE answer_id = $3 + RETURNING *; + +-- name: GetAnswersByQuestionID :many +SELECT * FROM Answer +WHERE question_id = $1; + +-- name: DeleteAnswersByQuestionIDs :exec +DELETE FROM Answer +WHERE question_id = ANY($1::uuid[]); + +-- name: DeleteAnswersByQuestionId :exec +DELETE FROM Answer +WHERE question_id = $1; \ No newline at end of file diff --git a/backend/lms-main-system/database/queries/question.sql b/backend/lms-main-system/database/queries/question.sql new file mode 100644 index 0000000..9193ae1 --- /dev/null +++ b/backend/lms-main-system/database/queries/question.sql @@ -0,0 +1,26 @@ +-- name: CreateQuestion :one +INSERT INTO Question (question, quiz_id) +VALUES ($1, $2) + RETURNING *; + +-- name: UpdateQuestion :one +UPDATE Question +SET question = $1, updated_at = now() +WHERE question_id = $2 + RETURNING *; + +-- name: GetQuestionsByQuizID :many +SELECT * FROM Question +WHERE quiz_id = $1; + +-- name: DeleteQuestionsByQuizIDs :exec +DELETE FROM Question +WHERE quiz_id = ANY($1::uuid[]); + +-- name: GetQuestionByID :one +SELECT * FROM Question +WHERE question_id = $1; + +-- name: DeleteQuestionsByQuizId :exec +DELETE FROM Question +WHERE quiz_id = $1; \ No newline at end of file diff --git a/backend/lms-main-system/database/queries/quiz.sql b/backend/lms-main-system/database/queries/quiz.sql new file mode 100644 index 0000000..a93f6fb --- /dev/null +++ b/backend/lms-main-system/database/queries/quiz.sql @@ -0,0 +1,20 @@ +-- name: CreateQuiz :one +INSERT INTO Quiz (module_id, title) +VALUES ($1, $2) +RETURNING *; + +-- name: GetQuizzesByModule :many +SELECT * FROM Quiz +WHERE module_id = $1; + +-- name: DeleteQuizzes :exec +DELETE FROM Quiz +WHERE quiz_id = ANY($1::uuid[]); + +-- name: GetQuizById :one +SELECT * FROM Quiz +WHERE quiz_id = $1; + +-- name: DeleteQuizById :exec +DELETE FROM Quiz +WHERE quiz_id = $1; \ No newline at end of file diff --git a/backend/lms-main-system/database/schema/schema.sql b/backend/lms-main-system/database/schema/schema.sql index d841e86..fc5bcd1 100644 --- a/backend/lms-main-system/database/schema/schema.sql +++ b/backend/lms-main-system/database/schema/schema.sql @@ -190,16 +190,13 @@ CREATE TABLE Module ); -- 13. Quiz -CREATE TABLE Quiz -( - quiz_id UUID PRIMARY KEY DEFAULT gen_random_uuid(), - question TEXT NOT NULL, - answer TEXT NOT NULL, - module_id UUID NOT NULL, - created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - updated_at TIMESTAMP, - CONSTRAINT fk_quiz_module FOREIGN KEY (module_id) - REFERENCES Module (module_id) ON DELETE CASCADE +CREATE TABLE Quiz ( + "quiz_id" uuid NOT NULL DEFAULT gen_random_uuid(), + "module_id" uuid NOT NULL, + "created_at" timestamp DEFAULT CURRENT_TIMESTAMP, + "updated_at" timestamp, + "title" text NOT NULL, + PRIMARY KEY ("quiz_id") ); -- 14. Student Quiz @@ -291,6 +288,28 @@ CREATE TABLE Report REFERENCES LMS_USER (lms_user_id) ON DELETE CASCADE ); +-- 20. Question +CREATE TABLE Question ( + "question_id" uuid NOT NULL DEFAULT gen_random_uuid(), + "question" text NOT NULL, + "quiz_id" uuid NOT NULL, + "created_at" timestamp DEFAULT CURRENT_TIMESTAMP, + "updated_at" timestamp, + PRIMARY KEY ("question_id") +); + +-- 21. Answer +CREATE TABLE Answer +( + "answer_id" uuid NOT NULL DEFAULT gen_random_uuid(), + "answer" text NOT NULL, + "is_correct" bool DEFAULT false, + "question_id" uuid NOT NULL, + "created_at" timestamp DEFAULT CURRENT_TIMESTAMP, + "updated_at" timestamp, + PRIMARY KEY ("answer_id") +); + CREATE TABLE LMS_USER_MFA ( mfa_secret_id uuid not null default gen_random_uuid(), mfa_secret varchar not null unique , diff --git a/backend/lms-main-system/doc/statik/statik.go b/backend/lms-main-system/doc/statik/statik.go index 514bf41..f308c66 100644 --- a/backend/lms-main-system/doc/statik/statik.go +++ b/backend/lms-main-system/doc/statik/statik.go @@ -8,7 +8,7 @@ import ( func init() { - data := "PK\x03\x04\x14\x00\x08\x00\x08\x00\x98x\xf6Z\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00 \x00api.swagger.jsonUT\x05\x00\x01\x91\xa8\x7fh\xec]_o\xdb8\xf6}\xcf\xa7 \xf4\xfb\x01\xbb\x0b\xb4q\xdb-\x16\xb3}\x1a7q\x8a`\xe3&[\xc7\x83\x05\x06E\xc1H\xd76\xa7\x12\xa9\x92TRo\x91\xef\xbe\x10)\xd9\x94D\xfd3\x95&\x9e\xb8/i$^\xea\xf0\xf2\x9e\xc3K\x8ab~\x1c!\xe4\x89;\xbc\\\x02\xf7\xde!\xef\xcd\xf1+\xefEz\x8d\xd0\x05\xf3\xde\xa1\xf4>B\x9e$2\x84\xf4\xfe\xc5t\x86\xc6\x89\\\x01\x95\xc4\xc7\x920\x8af\xc0o\x89\x0f\xca\x0c!/\x00\xe1s\x12\xa7\xb7R\x83\xf1\xd59Z0\x8e\x12\x01\x1c\xe1\xa2%\xa1H\xae\x00]\x00\xe6\x94\xd0%\x9ab\x8a\x97\x10\x01\x95h\xb6\x16\x12\xa2\xbc\xce[\xe0\"\xab\xefu\x06\x10!\xcfgTb_nP\"\xe4Q\x1cm`^\x03\xce+@\xc8Kx\x98\xdeXI\x19\x8bw\xa3Q\x18\x89c\xf8\x8e\xa38\x84c\x9fE#\x91\xc41\xe3r[\x1e\"L\x94Ev\xe7\xd7\x92\x85\xa7\n\xdegPB\xe2\x03\x15`\x832\x8e\xb1\xbf\x02\xf4f\x83\xbb\n\xe6\xee\xee\xee\x18\xabb\xc7\x8c/GYebtq~2\xf98\x9b\xbc|s\xfc\xeax%\xa30{\xe6Q\xf6\\O\xe2\xa5\xf0\xde\xa1\xdf\xd5\xe5\xea\x83\x0b\xce\xce{\xc9\x84]19#!t*x\x01Bt\xacs\xca\x82\xa4\\\xeb\x11B\x9fU\x0bVL\xa4\xfd\xe7\x85\xcc\xc7a\xfa\xcb\xbb_^\xfd\xf2\x0f\x1d\x817X\xc0\x15\x96\xab\xf4\xfe\xe8\xf6\xb5\xbe(\xfc\x15D\xb0m\xb5\xf6a\x1e\x11\xe9/\xde\xa6r\x9fQ\x91\x14\n\xe38\x0e3\x7f\x8c\xfe\x10\x8cn\xcb\xc6\x9c\x05\x89\xdf\xb1,\x96+\xb1\xe5F\x1aK\xa3\xdb\xd7\xa34\xb8G![\x12j\x86A\xac[\x98\xff\x9e6!\x89\"\xcc\xd7i\xb3\xe6))\xb4\xc9\x8bm\x812\x83\xb6\xfd\x08B\xf3\xc8\xe7\x10\xa4\x97p(\x10\xa6\x01\xe2 \x13N\x05\xc2\xbe\x0fB \xc9\xbe\x02\x15f\x95,\x06\xae\x9ar\x1e\xd4\x86\xc6\x97\x8b2\x10\x0e\"fi$\x16\x1a\x80\x90\xf7\xe6\xd5\xab\xd2\xa5*lU\x1b\x12\x89\x82\xb4HB\xa3bU\\\xf5$\xaeT\x83\x90\xf7\xff\x1c\x16i\x0d\xff7\n`A(Ik\x14#U\xdf\xa7\x0c\x91W\xb0\xb97~\xbb7\x1f\xe3\xbd}\xf5\xba\x15\xe89\xbd\xc5! L\xa7\xd6c\xad\x7fT\x00\x0b\x9c\x84\xb2\xf5qc\x8a\x12\n\xdfc\xf0%\x04\x088g\x1c\xe5\x8e>vu\xd2\x92\xb1e\x08<\xf6g\x12\xcbD4\xb8i\xf3\x7f\xa3\x15^\x8c9\x8e@\x02\xdf\xf2@\xff+5)\xe7\xf6\x0d\x0b\xd6e\xc8*\xfc\xadw8|K\x08\x874\x02%O\xc0\xb1\xa9\xc5\xb1$\x8b\x8eo \x08\xd918j\xda\xf4\x9f\x97\x97|\x89)\x11\xaa\xder\x1bJ\x9d\xa9\x8b\xfe7\x1b\xceT\xf8,\x08p\xb4\x02\x1c\x00\xb7\xbb\xc6~\xaf\xd99r\x1d+pBrB\x97\x9e\xb5#?\x1b\x1dY\x18\x19\xb2kE\xd2o\xeb\xf8|d\xd6\x94\x8fheUc\x89\xec-k\xa9M\xbd\xaee\xbcS\xaa\x96\xa6\x01\xa9\xb2\xfdE\x94s\x84\xdd\xb5\xec\xb2\xf8tW1c\x89\x1cV\xcdX\"\x1fR\xce\x18G\x11\x11\"\xcd\xab\x94\x0f\x0f\x9a\xb6\x97\x9av\x99F\xc9A\xd6\xb2\xf2}d\xcd\xb0\x13\xe0'\x9c\xc8us\x04\xbc\x07\xcc\xd5,\xe8\xf7\xcfv$G\xe6\x15\xabPrXp\x10\xab\xceJ\xf9I\x97G\xd7%\x86\x96;\xe4d\x05\xfeW\xa5\x92>c_ \x08T\xc8\xfb(\xdc!\xc7\xe4/C2\x98b\x8e\x0d\xb1\x1cN\x0b\x8a\x04\xc90+\xe7\xf5\x95\xd2\xe7(m\xcfO\x03\x8e\xcc\x9aj\x18\xbb$B*\xdaw\xa5\xac6P\xa4Ks\x96&\xdarP\xe9\x0d\xde\x14NY\xca\x12*7k\x1f\xd3\x19\x12\xe6Z\x07\xea\xc1\xd8\x0c\xf9~QV\x83\xeeK\xd77\x1d2\x1f\x95vn\x9b\x10\xaeQ\xde\xb9\x10\xb8\xb6bW\xdco;\xf8=\xcf\xd8\xb8\x1e\xe7\x91A\xebZ\xd4MO\xfcg\xeb\x13\x95\xa7p\xc8\x01\x07k\x04\xdf\x89\x90;=\xea9j\xe8\xd3I\x0f\xb7!yH\x0f\xb3\xf2C\x0f\x0d\x02h0\xfa\xa1\x96\x82\xef{\x0c\x10\xa9\x19\xba\x05N\x16\xf9,V\xaf&\xd7\x0f\x14\xdaF\xcf\x83U\xd9\xa2\xb9\xca\xe9\x90d\xea\xbe\x88\xc1O\xfd\x1dd%q\x10p\x10\xbbd|\xe93\x7f3\x9e3)\xa3t\x1aN~\xab8\x00)\x8fJW\xc6W\x81\xf7W\xe5\xb7\xad\xf0\x953\x10e\x12-XB\x1b\x06\x90\x83>\x9aBR\x8et\xb4\x95\x80\x18\xcb\xd5`\x02\xd0A\xd3X\x83\xa2iD\xdf\x12\xe0M\x9a\xbd\xc0\xa1\x18\x16\xd3AgU\xe9\x82\xce\n\x90I\xfc2Z\xe0\xce\x12;\x03\x89\xe6Whz6\xee\xadz3\x90\xf3\xb8d\xe8$s?#k\x9e\x9e\x8d\x15\xee\xbe:\xf7\x1c\x05\xe8\xe9$h\xdb^;$hY\xf9a\x85C\xe5H\xeb\x97j\xc8\xc9\xd3\xb4\xd1\x0f\x95,uO\xd7T\x1e\xb1\xae\xcf\xa5\xacY\x8d\x9a\xd3g/,\n\x96(\xd1+\xee+\xc8\x92\xb64\xe1\xc927\xc2\xaby`'\xcd\xd2\x10\x87\xcd\xcetzS\x98-\xeb\x94\xd3}\xae\xac\xaa\xd6\x98\xfb\nV\x9f\xe92\xe3\x08\xbe\xc7ip\x1e^p\xf4\x11\xc8'\x94\xa1Y\xfb\xedq\xa0<\xe6\xb0ae\xbdA\xfa\xf7)\x82n\x0c:\x8c\x1e\x99\xdd\x91YSy\xf4\x08\xd5\xf6%S7\xbd\x00B\x90P\x1c%J\xe2\\\xd8\xf4\xf4\xe5T\x19\\d5\x0d%\xcb\x0f\x93M\xea\xf6\x16\x10\xf7U\xe6\xe7\xa8\x94$\xa8,\x8b\xba\xcf\x1b1\xe7\xb8\xaa4\x12\xa2r\xbc\xa0f\x8e\x94:H\xedw\x0bC\xf0SO\x9d1\x1ea\xb5\xb1.JBIv\xa3\x96e\x8f\x1f2\x99\x95\x9b[\xd2\xabF\xe2\xe8\x97\"\xfa\xda^\xf0\xc6\x04|\xa0M;m\x1es(\xb5\xf5X\xdb\xeck0F\xa8\x9f5c\xcd\xe8\x07 \n\x93\x92%\xf4!\xcd\x07\x90\xfa\xc2\xfb\xf5y\xb0\x17\xac) >\xd0\xa6\x9d6\xa42\xf1z\x80Lx\xb0X\xdf\xaa\x7f\xd2'\x8e\xe7q\xb0_\xe2o\x02>D\xf1\x13\x89\xe2\x17\xed8\x1es\x10*\x84\xbc\x19@-\x13\xb9\xcd\xff]\xc9\xa9~\x96\x07\xa2H}\x88\xd18\x04\x19\xcbb\x1f@\"\x1c\x86(\xb32\x00\x95\x82\xf7\x82\x089\xaa/]R\x83\xc2\xd7 _R[}\xe5\xa9\xcf\xa0t\xc3\x84\x01\xf89\x8a\x81-\x16-\xdf\xf7 \xeb@a\x9ba\x1b\x01\xa7g\xa7\xed\xf1\x96\x95\x13\x84.CP\xbb\x9c\xd3)N\x1c\xdaL\x1b\x83OW\xb4W\xe1W\x80\xfc\x1c\x03\xb0\xffh\xf4'\x9c\xc1w\x18\xfd\x16\x8c\xfb\xa0\xa3e\xf8\xf6\xdf0\x16\x02\xa6\xbb\xe5\x95\x9d\xe5\xa2\xf1\xa5\x8d\x9e\xe0\xb5\x8bEVN\xef\xbf\xec\xa9\x0f\xdavZ1z\xba\xf2`\">\xa8C;K\x1e3G\xb4v\xd9`+\x15m,S?\xed \xe2\xe8\x87\xfey\xde\xb2\\Q\xce\x15\xdb\xc9XW\xac\x91\x85\x1f@\xee\x13\x057p\x0f\xfc3\x8a\xd7\xf0/\x0f\xb4\x9f0c\x1c\x8c9\xdb\xf1\xa9\xbc\xeea~\x00\xa9\xe6|\xed\x8c\xc8\xcaa\xaa7a\x13\xba\xecK\x0f]\xc3>1\xc4D| \xc9\x93\"\xc9\x8bv4\x8f9d\x16\"\xdf\x0c\xa3\xa1\x96U\xda\xb8\xaf~\xdaGMa{\xa7\xdc{\x89\x7f\x1c\x86\xd9\xeb\xd9\xf7\xebi\xb5\xdf\x9f\"\xabK\x8b\xfd\x06\xf0\x03\xb9\xdb\xe9\xd4Ln\x97I\x9a\xcb\x18\xd8oy\xf1\xf6\xf5hA\xc2BL\xb6\xbf\x126N\x9a\xf92\x8fC\x86\x83\xf4\xca\x13\x8fu\xd5\xcc-\xdaC\x80\xb7\x07\xb8mT(5\x17\xfdUH\x0e8J\xb3\x1fB\xe3D\x8a\xbf=\xd6\x08S\xe9\xe0\xc1&d\x95\x93\x95P;\xa1\xd4+\xe3\x91\xd0\xfd\xd4cX1\xb9\xf5\x01\xa4\xfaUW\xb2\x07\xf4\xda\xa2=\xd0\xcb(^C\xaf\x9f\xf2\xb6m\xd0 \xdf\x1c^fxm\xe3^\xfb\xfe\xe7\xf2NH\x83\n9jv\xf3\x07\xf8\xc6\xe9m1O9!I)\xbc\x8b\x9f\x04\x95\x02\xbf\xce\x03\xf7\xc5\x06d,m~\xc7\xe7\x001?j\xaf\x1b6\xa3G|F%\xd0r\xfcw2\x8d\xb0\x04Npx\xad\xcb\xf6\xb7\xcf\xd3\x98\xae\xb6V\x976\xe7\xf7\x0e.\xd5\xf0>j\xcet\x03X\xf0k\xc2E\x9f\xc6\x19\xb6E\xe9\xe9fn\xf5M\xf1\xcb\x12\xdb\x0e{\x17\xff\x80\x10x\xd9\xdd9\x1d\x10\x96\xcf\xaeq@\xb7\x13g\x8d>\xc8Or\xecf\xd8\xb5mO\xa0a\xe9 b\xec\xc3)\x8b0\xc9\xbe\xde\xdd\xa1\x9e\x18\x0bq\xc7x\xf7\x00\xef\xee\xa3\x9f\x1f\x9b\xa6*-\xf0\x84\xe2\x9bz5\xad\xbc\xc8\xea\xd82\xf3\xe4\xae\x9f\xd8\xb4\x0e\xe0\xca\x9f\x9c9\xa0\x0bv\x08\xaa^\x08\x07p\xe0\x02\xcfywtf\xc8\xaf\x98d3]`\x07\xf3\x08\xd3\x04\x87\x13*\xf9\xba\xb3y\x07\xdfX\xcf3r\xf0\x0f\x85\xbb\xb1J\xd3\xf5\xf1R\x83\"-\x9e=\xe1\x00\xd2U\x05\x13\x01\x9c\xee8\xb4\xf7\x1b\x1a\\$\xd3\xb0\xcd\xbf1\xdc\xc14^1\n\x1f\x93\xe8\xa6p^Qg\xf3h\x81\xcdS\x13.\x1b\xf3\x92\x9d\xc4\xb1rL\x8eC`l\x0f\xef\x99\x8bj{\xed\xd3\xaf\"\x1a}\x88\xb4\xb2\xb6\xfbcx\x01n8\x9b\xc2\xc1\x15}\x81\x1am\xcc&\xea\x83\xf6\xb2\xe1W\x87F\x91\x9d\xd8\xf38tw\xe3\x9d\x03\xe3a\x93\xe9\x13\xa8\xf5W\xb5\x13\xdd\xb2 \xc3z\x97,\xc00\xd7\x1c\xd6\x8bS\xa7X\xb6\xf5\xda\x0b\xf3\xdeb\xb3\x05*\x9d \xbe\x94$\x02\xfbC|\xb5\x87\"\x18\xb7M}w\xab=Q\x13\xd1Ak?*=e{\xbc\xfe\xb9@\xf0-\xc1a~\xd6\xcf\xc5t\x86\xe6\xb3\xc9'm\x9c\xb3q\xb3P6\x05\x89\x03,\xb1\x0b\x0dw%SV\xa6\xb7]\x88o \xac\xe5B 5\xca\xe8\xa3\xe4\x1d\x87W\xf66\xa0\xa6g\x9b\x0bXvq\xab[wtp\xean\xdaVY\xeaUW{-\x96\x96\x97\x1d\xcd\xeaI\xbc\x10'\xbb!S\xab\xa4\xd3\xddG\xa1o $\xc3r\xa8\xe86>0CMuaQ\x1c\xc2\xc0\xf5\xf7\x89\xc3Y\xe5\x05@\xcds=\xa0ITX\x93\xf5f\xd7\xe3\xeb\xf9\xec\xcb\xfc\xe3\xecjrr~v>95\xdf\x01\xfc{>\x99\x17\xaf\\}\xba<\x99\xccf\xe7\x1f?\x98WO.\xa7W\x17\x93\xebb\xd1\xb3\xf1\xf9\xc5\xe44o\xd3fi\xd8X\x86\xb7=\xbd\xda\xe0\xea\xeb\x16\x07\xdeEUAD\x1d8\xb4\xd1Q{\x04\xac\x12\xfau\xb7\xbe\xbfY\xcbn\xddny\xab\xe8\xe0\x86\x1e$\xb7B*\xbf\xc5p\x80\xe2\xb3\xa0V1\x08\x95\xb0,\x9d\x1a`8\x8fP\xf9\xf77\xc3d\xee\x86i\x00\x12\x93\xfa\x01\xa8\xba\xb9\xbbfkw\xd3\x90U\x1bq1g\x92\xdd$\x8b1]\xf7\x19\xa1\xea\xbfju\xe8\x99\xe7\xfb\xa2\xa1\xe1\xb3n\x07\x7f\xeaZ\xbb)\x8f.\x9b}\x06\xd9 \xad\xfd\xf0\x06\x07\xb8\xc3L\x0c\x9b\xbe\xf5u\x00\xf7\xb0\xbel\xdc\xad\xe4\x8c\xfa\x91\xa4\xc5\xee\x86\xae\xdarQvx\xef\xc6\xf7\x18s\x0cB\xef\xaf\x08u\x0c\xceHh\x07g[t\xedm\xd9\xd7 \xac%\x90\xac\xdfK;\x84\xd5\x83)A\xa9c\x1c \xee\x16\xf9\xbd\xe6\xdduM\xc86\x9f\xba\xb7\xa1\xf7\xc0Z\xe1\xc3\xbe\xbc^\xff\xd3\xf1\xae\xe1K\"\xe7\x80\xd8\x97N\xed\xee\x18wE\xea)\xffE\x8av\x83l\xff\xce\xd7\x05s\xcf\xf9R\x13\xb8\xea'N.\xc0\x1e\xde\x99\xb6o\xf6\x9d\x11?V\x92W\xeb\x82\xf6D\xaf\xe9\xfb\x1bg\x7f\x99^\x8edSm\xdd\xfas\x86u\xb3\xa31\xff+S\xa7\xb6\x9d\x8d\x9b?.Ui\x05\x8e\xc9\xbf`\x1b2\x95\xed\xaa\x85Wo\xfa\xa8\xd3\x17(\xe6\xb0 \xdf!@wD\xaePV\xf9\xa6\x8a|{hj\xcbxv\x94\xe3\xf6v\xe1\xc8\xc6\x9aFl\xd6\x117x\xcb\x7f\x1e+\xb5\xf9|t\x7f\xf4\xbf\x00\x00\x00\xff\xffPK\x07\x08\xe95\xf5!u\x0b\x00\x00Cx\x00\x00PK\x01\x02\x14\x03\x14\x00\x08\x00\x08\x00\x98x\xf6Z\xe95\xf5!u\x0b\x00\x00Cx\x00\x00\x10\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x81\x00\x00\x00\x00api.swagger.jsonUT\x05\x00\x01\x91\xa8\x7fhPK\x05\x06\x00\x00\x00\x00\x01\x00\x01\x00G\x00\x00\x00\xbc\x0b\x00\x00\x00\x00" + data := "PK\x03\x04\x14\x00\x08\x00\x08\x00;\x80\xfbZ\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00 \x00api.swagger.jsonUT\x05\x00\x01rM\x86h\xec]_o\xdb8\xf6}\xcf\xa7 \xf4\xfb\x01\xbb\x0b\xb4q\xdb\x1d,f\xfb4n\x9b\x16\xc1&M\xa6n\x06\x0b\x0c\x8a\x82\x91\xaemN%R!\xa9\xa4n\x91\xef\xbe\x10)\xd9\x94D\xfd\xa5R\xdb\x8d\xfb\x92Z\xe6\xa5\x0e/\xef9\xbc\xa4(\xfa\xfb\x11B\x9e\xb8\xc3\x8b\x05p\xef%\xf2^\x1c?\xf3\x9e\xa4\xd7\x08\x9d3\xef%J\xbfG\xc8\x93D\x86\x90~\x7fv>C\xd3D.\x81J\xe2cI\x18E3\xe0\xb7\xc4\x07e\x86\x90\x17\x80\xf09\x89\xd3\xafR\x83\xe9\xe5)\x9a3\x8e\x12\x01\x1c\xe1\xa2%\xa1H.\x01\x9d\x01\xe6\x94\xd0\x05:\xc7\x14/ \x02*\xd1l%$Dy\x9d\xb7\xc0EV\xdf\xf3\x0c B\x9e\xcf\xa8\xc4\xbe\\\xa3D\xc8\xa38Z\xc3\xfc\x088\xaf\x00!/\xe1a\xfa\xc5R\xcaX\xbc\x9cL\xc2H\x1c\xc3W\x1c\xc5!\x1c\xfb,\x9a\x88$\x8e\x19\x97\x9b\xf2\x10a\xa2,\xb2o~+Yx\xaa\xe0}\x06%$>P\x016(\xd3\x18\xfbK@/\xd6\xb8\xab`\xee\xee\xee\x8e\xb1*v\xcc\xf8b\x92U&&g\xa7\xafO\xde\xcfN\x9e\xbe8~v\xbc\x94Q\x98\xdd\xf3(\xbb\xaf'\xf1Bx/\xd1\x9f\xear\xf5\xc6\x05g\xe7\xbdd\xc2\xae\x98\xbc%!t*x\x06Bt\xac\xf3\x9c\x05I\xc7Z\x7fO\xc8\xb7b\xc1#\x84>\xa9\xa6.\x99H;\xda\x0b\x99\x8f\xc3\xf4\xc3\xcb_\x9f\xfd\xfa/\x1d\xaa\xd7X\xc0%\x96\xcb\xf4\xfb\xc9\xeds}Q\xf8K\x88`\xe3\x1e\xed\xec\nw\xc81\xf9\xcb\x90\x8c\xa6\x98SC,\xc7\xd3\x82\"A2\xcc\xcay}\xa5\xf41J\xdb\xe3\xd3\x80#\xb3\xa6\x1a\xc6.\x88\x90\x8a\xf6])\xab\x0d\x14\xe9\xd2\x9c\xa5\x89\xb6\x1cTz\x83\xd7\x85S\x96\xb2\x84\xca\xf5\"\xc9\xf9\x0c sQ\x04\xf5`l\x86|\xbf(\xabA\xf7\xa5\xeb\x8b\x0e\x99\x8fJ;7M\x08W(\xef\\\x08\\[1\x14\xf7/\x1d\xfc\x9egl\\\x8f\xf3\xc8\xa0u-\xea\xa6;\xfe\xbb\xf5\x8e\xcaS8\xe4\x80\x83\x15\x82\xafD\xc8A\xb7z\x8c\x1a\xba;\xe9\xe1&$\x0f\xe9aV~\xec\xa1A\x00\x0d&\xdf\xd5\x9a\xf1}\x8f\x01\"5C\xb7\xc0\xc9<\x9f\xc5\xeae\xe7\xfa\x81B\xdb\xe8y\xb0*[4W9\x1d\x92L}/b\xf0S\x7f\x07YI\x1c\x04\x1c\xc4\x90\x8c/\xbd\xe7\x1f\xc6}N\xca(\x9d\x86\x93?*\x0e@\xca\xa3\xd2\x95\xf1U\xe0\xfdU\xf9\x97V\xf8\xca\x19\x882\x89\xe6,\xa1\x0d\x03\xc8A\x1fM!)G:\xdaH@\x8c\xe5r4\x01\xe8\xa0i\xacA\xd14\xa2\x9b\x04x\x93f\xcfq(\xc6\xc5t\xd0YU\xba\xa0\xb3\x02d\x12?\x8d\xe6\xb8\xb3\xc4\xce@\xa2\xabKt\xfev\xda[\xf5f \xaf\xe2\x92\xa1\x93\xcc\xfd\x88\xac\xf9\xfc\xedT\xe1\xee\xabs\x8fQ\x80v'A\xdb\xf4\xda!A\xcb\xca\x8f+\x1c*GZ=UCN\x9e\xa6M\xbe\xabd\xa9{\xba\xa6\xf2\x88U}.e\xcdj\xd4\x9c>{`Q\xb0D\x89^q_B\x96\xb4\xa5 O\x96\xb9\x11^\xcd\x03;i\x96\x868nv\xa6\xd3\x9b\xc2lY\xa7\x9c\xeeseU\xb5\xc6\xdcW\xb0\xfaL\x97\x19G\xf05N\x83\xf3\xf0\x80\xa3\x8f@\xeeP\x86f\xed\xb7\xed@\xd9\xe6\xb0ae\xbdA\xfaW)\x82n\x0c:\x8c\x1e\x99\xdd\x91YSy\xf4\x08\xd5>'S7\xbd\x00B\x90P\x1c%J\xe2\\\xd8\x1d\xf5\xf9\x8d28\xcbj\x1aK\x96\x1f&\x9b\xd4\xed- \xee\xab\xcc\x8fQ)IPY\x16u\x9f7b\xceqUi$D\xe5xA\xcd\x1c)u\x90\xda\xef\x16\x86\xe0\xa7\x9ez\xcbx\x84\xd5\xc6\xba( %\x19F-\xcbf@d2+7\xb7\xa4W\x8d\xc4\xd1\x0fE\xf4\xb5\xbd\xe0\x8d \xf8@\x9bv\xdals(\xb5\xf5X\xdb\xeck4F\xa8\xbf5c\xcd\xe4; \n\x93\x92\x05\xf4!\xcd;\x90\xfa\xc2\xab\xd5i\xb0\x17\xac) >\xd0\xa6\x9d6\xa42\xf1z\x80Lx\xb4X\xdf\xa8\x7f\xd2'\x8e\xaf\xe2`\xbf\xc4\xdf\x04|\x88\xe2\x1d\x89\xe2'\xed8\xb69\x08\x15B\xde\x0c\xa0\x96\x89\xdc\xfa\xff\xae\xe4T\x7f\xcb\x03Q\xa4\xde\xd8h\x1c\x82\x8ce\xb1w \x11\x0eC\x94Y\x19\x80J\xc1{F\x84\x9c\xd4\x97.\xa9A\xe1\xb5\x91\xcf\xa9\xad\xbe\xb2\xeb3(\xdd0a\x00~\x8cb`\x8bE\xcb\x8b@\xc8:P\xd8f\xd8F\xc0\xe9\xd9i{\xbce\xe5\x04\xa1\x8b\x10\xd4.\xe7t\x8a\x13\x876\xd3\xc6\xe0\xd3\x15\xedU\xf8\x15 ?\xc6\x00\xec?\x1a\xfd\x843\xf8\x0e\xa3\xdf\x9cq\x1ft\xb4\x8c\xdf\xfek\xc6B\xc0tX^\xd9Y.\x1a\x1f\xda\xe8 ^\xbbXd\xe5\xf4\xfe\xcb\x9e\xfa\xa0m\xcf+F\xbb+\x0f&\xe2\x83:\xb4\xb3d\x9b9\xa2\xb5\xcbF[\xa9hc\x99\xfakO\x10'\xdf\xf5\xdf\xd3\x96\xe5\x8ar\xae\xd8N\xc6\xbab\x8d,|\x07r\x9f(\xb8\x86{\xe0\x9fQ\xbc\x86\x7fy\xa0\xfd\x80\x19\xe3h\xcc\xd9\x8cO\xe5u\x0f\xf3\x05H5\xe7kgDV\x0eS\xbd \x9b\xd0E_z\xe8\x1a\xf6\x89!&\xe2\x03Iv\x8a$O\xda\xd1ls\xc8,D\xbe\x19Fc-\xab\xb4q_\xfd\xb5\x8f\x9a\xc2\xf6L\xb9\xf7\x12\xff4\x0c\xb3\xc7\xb3\xafV\xe7\xd5~\xdfEV\x97\x16\xfb\x0d\xe0\x07r\xb7\xd3\xa9\x99\xdc.\x934\x971p\xd0\xf2\xe2MB\xbe\x99\xc1\xdfaC\x85q0L\xb6\x1a\x93^\xd9\x99\x80\xcf]\xc9\xae\xff\x02\xbf\xfc\xd6\x82>3&\x06.\x89Fw\x7f\x08\xf3\xc32LV\xc1\xee/\xc3T\xcedB\x1d\x17a\x1a(\xac\xe7\xb2;Ea{\xf4\xa7R\x95\xc2<\x8cP\xed!\xbc\xcd\x84/\xed\xa7MP\x8d\xb8<\xd2\x1c\xfd\xea\xafmx\xcbs\xbd>9\x9eI\x90w \xd3\x8f\xdf`\x9d%\xed\x01Q2\xd09\xe2\x03g\xda9\xb3\x9bY\xdd\xd0\xa0\xff\xaeh\xa7\x02\xba\xf8VE\xcb\xc6\x0f3\xf2\xf5lmo\x86\x06\xdd\xdeC\x88\xd7\x87\xf8&&\x0e\xeb\x12F\xa0o\xe2|\xac5\x89>\xac\xbd}>\x99\x93\xd2\xf8\xd4\x9a\xc1\x19\x87\x83~\xbe\x8aC\x86\x83\xf4\xca\x8e\xd3T5s\x83\xf60(\x0dcH\xa9\xb9\xe8\xefBr\xc0\x11\xa1\x0bDh\x9cH\xf1\x8fmq\xaa\xd2\xc1\xa3\xe5~\x95\xc3pQ;\xa1\xd4\xe6\xdd\x89\xd0\xfd\xd4#\xf93\xb9\xf5\x0e\xa4\xfa\xa8+\xd9\x03zm\xd0\x1e\xe8e\x14\xaf\xa1\xd7\x0f\xd9\xf78j\x90\xaf\xcf\x9b6\xbc\xb6v\xaf\xfdM\xd4\xf2;i\x06\x15j\x16\xcbJ\x8bd\x06S\xcc\xf7\xd1J\x81_\xe7\x81\xfbb\x032\x966\xef\xb6t\x80\x98\x9f\x8e\xde\x0d\x9b\xd1#>\xa3\x12h9\xfe;\x99FX\x02'8\xfc\xa8\xcb\xf6\xb7\xcf\xa7\x1e]m\xad.m~\xd2\xe2\xe0R\x0d\xef\xbd\xe6L7\x80\x05\xbf&\\\xf4i\x9ca[\x94\x9en\xe6V\xdf\xd4g{\x0e~\xc9\xd3\xe9\xce\xd0\x8c\x96a*\xee\x80_\xc4E\x02\x97*\xa8.\x96\xd6,\x956\xafz7\xcc\x9a\xa6\x06\x0c\xbbh\xd9\xfdY<3\xc1\xf6\xee\xb8\x83_#\x10\x02/\xba\x07[\x07\x84\xe5SY\x1d\xd0\x0d\xd2@\xa3\xe7\xf3\x1f3\xe8f\xd8\xb5m;\xd0\xb0tP\x151\xf6\xe1\x0d\x8b0\xc9\xce\xa5\x1aPO\x8c\x85\xb8c\xbc\xbb`t\xf7\xd1\x8f\x8fMS\xe5\xe7\xf8\x84\xe2\xeb\xfa\xd1\xa9\xf2l\xa0c\xcb\xcc3\xa9\x7f`\xd3:\x80+\x1f\xa6\xe2\x80.\x18\x10T\xbd\x10\x8e\xe0\xc09\xbe\xe2\xdd\xd1\x99!\xbfd\x92\xcdt\x81\x01\xe6\x11\xa6 \x0eO\xa8\xe4\xab\xce\xe6\x1d|c=\xa9\xd7\xc1?\x14\xee\xa6j\xda\xa3\x0fN\x1e\x15i\xf1TE\x07\x90\xae*\x98\x08\xe0t`\xaa\xd4ohp\x91L3\x13\xc9N\xcf\x19`\x1a/\x19\x85\xf7It]8\x89\xb7\xb3y4\xc7\xe6y\x80\x17\x8dy\xde q\xac\x1c\x00\xeb\x10\x18\x9bci\xafD\xb5\xbd\xf6\x14\xab\x88F\xff\x8e\x92\xb2\xb6\xfbc|\x01n8u\xd1\xc1\x15}\x81\x1am\xcc\x16>F\xede\xc3\xaf\x0e\x8d\"\x83\xd8\xb3\x1d\xba\xbb\xf1\xce\x81\xf1\xb0\xce\xf4 \xd4\xfa\xab\xda\x89nY\x90a=$\x0b0\xcc5\x87\xf5b\xdf\x1b,\xdbz\xed\x89\xf9\xdd|\xbd\xab$\x9d?>\x95$\x02\xfbM|\xf5\xf0;\x98\xb6-%\x0c\xab=Q\xd3\xd7Qk?*\xdde\xf3\x0bs\xa7\x02\xc1M\x82\xc3\xfc\x14\xdb\xb3\xf3\x19\xba\x9a\x9d|\xd0\xc69\x1b\xd7\x0b\x8f\xe7 q\x80%v\xa1\xe1P2eez\xdb\x85\xf8\x1a\xc2Z.X\xe6\xd3)}\x94\xbc\xe3\xf0\xd2\xde\x06\xd4t\xef\xf6\xb9u\xdd:\xae\x83S\x87i[e\xe9\\]\xed\xb5\xf8\\^\xc65\xab'\xf1\\\xbc\x1e\x86L\xad:\x9f\x0f\x1f\x85n\x12H\xc6\xe5P\xd1m|d\x86\x9a\xea\xc2\xa28\x84\x91\xeb\xef\x13\x87\xb3\xca\x03\x95\x9a\xfbz@\x93\xa8\xb0\xc6\xed\xcd>N?^\xcd>_\xbd\x9f]\x9e\xbc>}{z\xf2\xc6@\xe9\xfd~urU\xbcr\xf9\xe1\xe2\xf5\xc9lv\xfa\xfe\x9dy\xf5\xf5\xc5\xf9\xe5\xd9\xc9\xc7b\xd1\xb7\xd3\xd3\xb3\x937y\x9b\xd6K\xed\xc6c\x0d\xdb\xdd\xab\x0d\xae>\xber\xe0]T\x15D\xd4\x81Ck\x1d\xb5G\xc02\xa1_\x86\xf5\xfd\xf5Jv\xebv\xcbSZ\x077\xf4 \xb9\x15R\xf9\xa9\x90\x03\x14\x9f\x05\xb5\x8aA\xa8\x84E\xe9<<\xc3y\x84\xca\x7f\xbe\x18's7L\x03\x90\x98\xd4\x0f@\x0f\xbb\x04\x1cs&\xd9u2\x9f\xd2U\x9f\x11\xaa\xfe\xbc&\x87\x9ey\xbc\x0fn\x1a\x0e,s\xf0\xa7\xae\xb5\x9b\xf2\xe8\xb2\xd9\x01?\x9d\xd0\xda\x8f%t\x80;\xce\xc4\xb0\xe9\x14+\x07p\x0f\xeb\xcb\xc6\xf7p\x9cQoIZ\xecn\xe8\xaa-ge\x87\xf7n|\x8f1\xc7 \xf4\xfe\x8aP\xc7\xe0\x8c\x84vp\xb6\x93\xd9\xde\x96}\x9d\xc0Z\x02\xc9z\x12\x98CX=\x98\x12\x94:\xc6\x01\xe2\xb0\xc8\xef5\xef\xaekB\xb6\xd5\xde\xbd\x0d\xbd\x07\xd6\n\x1f\xf6e\xbb\xc2O\xc7\xbb\x8632\x9c\x03b_:\xb5\xbbc\xdc\x15\xa9\xa7\xfc\x17)\xda\x0d\xb2\xfd\x04+\x17\xcc=\xe7KM\xe0\xaa\x87w\xb8\x00{xg\xdaN\xa3sF\xbc\xad$\xaf\xd6\x05\xed\x89^\xd3\xc9\x12\xce\xfex\x98\x1e4\xa7\xcb\x0e\x10\x7f\x93}2\xbd\x1c\xc9\xba\xda\xba\xf5\xe7\"\xd6\xcd\xee.\x17\xa8z\x9b\xda0\xe14\xde6\x19`\x8d\xcb\xd8;[\x12\xf1\x9aq\x9e6\xaf\xc6\xb8\xf1 \xd3\xcf1\x08W\xf6\xf6m)\x06~h/\xd6z\xa2\xfa:\xaa\x83;\\R\xd3\xd2q\x0b\x05\xbb\x87Uj\xf3\x15\xb9S\x1a'\xb2\x8fT7\xbdQ\xea\xe0\xc9\x1b\xfdZ\xed6\x1db\x7f\x9d\xbc\x8b?~\xafn\xfe\x1d\xe0\x00\x17\x85LQ\x0c\xb5t\xdd\xb8\xbc\xc5N\xcb\x065{w\xfd\x94B^\xe4\xed\x08\xf16\xbc\xdf\xf7v\xc3zNw7\xf7\x0d%\x9c\xcb\x981|I\xf2'\"\x80\xa1\xd3\x8e\x1dX\x86\xdb<:4\xeb\xe7\x16y`{\xdd\xbd\x96\x03\xeb\x97\xc6\x04\xf8 'r\xf5\xc6\xf6\xf2\xd8+\xc0\xdc>[\xc01\xf9\x0fl\xdaSy#\xb0\xb0\x1bO\xff\xae\xdf\x13\x14s\x98\x93\xaf\x10\xa0;\"\x97(\xab|]E\xfe\x06^j\xcbx\xf6\xbbe\x9b\xaf\x0b\xbfOV\xd3\x88\xf5\xd6\x825\xdeu\x0b\xfe\xfc\xb4\xb6\xf9tt\x7f\xf4\xbf\x00\x00\x00\xff\xffPK\x07\x08\x1a\xc357\xe5\x0c\x00\x00Y\x93\x00\x00PK\x01\x02\x14\x03\x14\x00\x08\x00\x08\x00;\x80\xfbZ\x1a\xc357\xe5\x0c\x00\x00Y\x93\x00\x00\x10\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\xb4\x81\x00\x00\x00\x00api.swagger.jsonUT\x05\x00\x01rM\x86hPK\x05\x06\x00\x00\x00\x00\x01\x00\x01\x00G\x00\x00\x00,\x0d\x00\x00\x00\x00" fs.Register(data) } \ No newline at end of file diff --git a/backend/lms-main-system/doc/swagger/api.swagger.json b/backend/lms-main-system/doc/swagger/api.swagger.json index aeb2cc2..e70f341 100644 --- a/backend/lms-main-system/doc/swagger/api.swagger.json +++ b/backend/lms-main-system/doc/swagger/api.swagger.json @@ -26,6 +26,9 @@ }, { "name": "ModuleService" + }, + { + "name": "QuizService" } ], "host": "localhost:8086", @@ -696,6 +699,145 @@ ] } }, + "/lms/v1/quiz": { + "delete": { + "operationId": "QuizService_DeleteQuiz", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "type": "object", + "properties": {} + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googlerpcStatus" + } + } + }, + "parameters": [ + { + "name": "ids", + "in": "query", + "required": false, + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi" + }, + { + "name": "forceDelete", + "in": "query", + "required": false, + "type": "boolean" + } + ], + "tags": [ + "QuizService" + ] + }, + "post": { + "operationId": "QuizService_CreateQuiz", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/quizQuizResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googlerpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/quizCreateQuizRequest" + } + } + ], + "tags": [ + "QuizService" + ] + } + }, + "/lms/v1/quiz/modules": { + "get": { + "operationId": "QuizService_GetQuizzesByModule", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/quizGetQuizByModuleResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googlerpcStatus" + } + } + }, + "parameters": [ + { + "name": "moduleId", + "in": "query", + "required": false, + "type": "string" + } + ], + "tags": [ + "QuizService" + ] + } + }, + "/lms/v1/quiz/{questionId}": { + "put": { + "operationId": "QuizService_UpdateQuiz", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/quizQuestion" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googlerpcStatus" + } + } + }, + "parameters": [ + { + "name": "questionId", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/QuizServiceUpdateQuizBody" + } + } + ], + "tags": [ + "QuizService" + ] + } + }, "/v1/files": { "post": { "operationId": "FileService_UploadFile", @@ -800,6 +942,21 @@ } } }, + "QuizServiceUpdateQuizBody": { + "type": "object", + "properties": { + "question": { + "type": "string" + }, + "answerOptions": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/quizAnswerOption" + } + } + } + }, "authenticationEmailVerifyResponse": { "type": "object", "properties": { @@ -1259,6 +1416,153 @@ } }, "additionalProperties": {} + }, + "quizAnswer": { + "type": "object", + "properties": { + "answerId": { + "type": "string" + }, + "questionId": { + "type": "string" + }, + "answer": { + "type": "string" + }, + "isCorrect": { + "type": "boolean" + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + } + } + }, + "quizAnswerOption": { + "type": "object", + "properties": { + "answerId": { + "type": "string" + }, + "answer": { + "type": "string" + }, + "isCorrect": { + "type": "boolean" + } + } + }, + "quizCreateQuizRequest": { + "type": "object", + "properties": { + "moduleId": { + "type": "string" + }, + "quiz": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/quizQuestionInput" + } + } + } + }, + "quizGetQuizByModuleResponse": { + "type": "object", + "properties": { + "quizzes": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/quizQuizResponse" + } + } + } + }, + "quizQuestion": { + "type": "object", + "properties": { + "questionId": { + "type": "string" + }, + "quizId": { + "type": "string" + }, + "question": { + "type": "string" + }, + "answers": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/quizAnswer" + } + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + } + } + }, + "quizQuestionInput": { + "type": "object", + "properties": { + "question": { + "type": "string" + }, + "answerOptions": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/quizAnswerOption" + } + } + } + }, + "quizQuiz": { + "type": "object", + "properties": { + "quizId": { + "type": "string" + }, + "moduleId": { + "type": "string" + }, + "title": { + "type": "string" + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + } + } + }, + "quizQuizResponse": { + "type": "object", + "properties": { + "quiz": { + "$ref": "#/definitions/quizQuiz" + }, + "questions": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/quizQuestion" + } + } + } } }, "securityDefinitions": { diff --git a/backend/lms-main-system/http/lesson.http b/backend/lms-main-system/http/lesson.http index 8af1120..9199d00 100644 --- a/backend/lms-main-system/http/lesson.http +++ b/backend/lms-main-system/http/lesson.http @@ -1,33 +1,37 @@ ### Get Lessons By Module Id -GET http://localhost:8086/lms/v1/modules/lessons +GET {{lms_url}}/lms/v1/modules/lessons Accept: application/json Content-Type: application/json +X-Organisation: tenant_namespace_1 { - "module_id": "e678a95f-7829-41e2-9b62-e23e0bb8a338" + "module_id": "60944d61-5419-4433-a2a2-0a4be4538c6f" } ### Create Lesson -POST http://localhost:8086/lms/v1/lessons +POST {{lms_url}}/lms/v1/lessons Accept: application/json Content-Type: application/json +X-Organisation: tenant_namespace_1 { "title": "Introduction to Databases", "content": "https://example.com/database-intro.pdf", "materialType": "PDF", - "moduleId": "e678a95f-7829-41e2-9b62-e23e0bb8a338" + "moduleId": "60944d61-5419-4433-a2a2-0a4be4538c6f" } ### Get lesson by id -GET http://localhost:8086/lms/v1/lessons/e678a95f-7829-41e2-9b62-e23e0bb8a338 +GET {{lms_url}}/lms/v1/lessons/b81901c9-beb8-45b8-99dc-ba530d33a27e +X-Organisation: tenant_namespace_1 Accept: application/json Content-Type: application/json ### Update lesson by id -PUT http://localhost:8086/lms/v1/lessons/e678a95f-7829-41e2-9b62-e23e0bb8a338 +PUT {{lms_url}}/lms/v1/lessons/e678a95f-7829-41e2-9b62-e23e0bb8a338 Content-Type: application/json Accept: application/json +X-Organisation: tenant_namespace_1 { "id": "e678a95f-7829-41e2-9b62-e23e0bb8a338", @@ -38,9 +42,10 @@ Accept: application/json } ### Bulk Delete Lessons -DELETE http://localhost:8086/lms/v1/lessons +DELETE {{lms_url}}/lms/v1/lessons Accept: application/json Content-Type: application/json +X-Organisation: tenant_namespace_1 { "ids": [ diff --git a/backend/lms-main-system/http/quiz.http b/backend/lms-main-system/http/quiz.http new file mode 100644 index 0000000..75e8ca9 --- /dev/null +++ b/backend/lms-main-system/http/quiz.http @@ -0,0 +1,96 @@ +### Create Quiz +POST {{lms_url}}/lms/v1/quiz +Content-Type: application/json +X-Organisation: new-namespace +Accept: application/json + +{ + "moduleId": "60944d61-5419-4433-a2a2-0a4be4538c6f", + "quiz": [ + { + "question": "Which planet is known as the Red Planet?", + "answerOptions": [ + { + "answer": "Mars", + "isCorrect": true + }, + { + "answer": "Venus", + "isCorrect": false + }, + { + "answer": "Jupiter", + "isCorrect": false + } + ] + }, + { + "question": "Which gas do plants absorb from the atmosphere?", + "answerOptions": [ + { + "answer": "Carbon Dioxide", + "isCorrect": true + }, + { + "answer": "Oxygen", + "isCorrect": false + }, + { + "answer": "Nitrogen", + "isCorrect": false + } + ] + } + ] +} + +### Get all quizzes by Module ID +GET {{lms_url}}/lms/v1/quiz/modules?moduleId=60944d61-5419-4433-a2a2-0a4be4538c6f +Accept: application/json +X-Organisation: new-namespace +Content-Type: application/json + +{ + "moduleId": "60944d61-5419-4433-a2a2-0a4be4538c6f" +} + +### Update Questions and Answer by Question Id +PUT {{lms_url}}/lms/v1/quiz/8ab38d5a-b3a3-400d-94f6-aac75e9769ed +Content-Type: application/json +Accept: application/json +X-Organisation: new-namespace + +{ + "question_id": "8ab38d5a-b3a3-400d-94f6-aac75e9769ed", + "question": "What is the capital of England?", + "answerOptions": [ + { + "answerId": "831a6bdc-f488-4da7-837a-5a5df65019ed", + "answer": "London", + "isCorrect": true + }, + { + "answerId": "a46507e6-e425-41ed-9302-01f2c76f0340", + "answer": "Liverpool", + "isCorrect": false + }, + { + "answerId": "ccfc62fd-2217-4ac1-b796-7026b4636101", + "answer": "Berlin", + "isCorrect": false + } + ] +} + +### Attempt soft delete with association check +DELETE {{lms_url}}/lms/v1/quiz +Content-Type: application/json +Accept: application/json +X-Organisation: new-namespace + +{ + "ids": [ + "d7e473dd-17ae-40a7-86a6-31c25cad1408" + ], + "force_delete": false +} \ No newline at end of file diff --git a/backend/lms-main-system/internal/repo/answer.sql.go b/backend/lms-main-system/internal/repo/answer.sql.go new file mode 100644 index 0000000..236d524 --- /dev/null +++ b/backend/lms-main-system/internal/repo/answer.sql.go @@ -0,0 +1,118 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.29.0 +// source: answer.sql + +package repo + +import ( + "context" + + "github.com/google/uuid" + "github.com/jackc/pgx/v5/pgtype" +) + +const createAnswer = `-- name: CreateAnswer :one +INSERT INTO Answer (answer, is_correct, question_id) +VALUES ($1, $2, $3) + RETURNING answer_id, answer, is_correct, question_id, created_at, updated_at +` + +type CreateAnswerParams struct { + Answer string `json:"answer"` + IsCorrect pgtype.Bool `json:"is_correct"` + QuestionID uuid.UUID `json:"question_id"` +} + +func (q *Queries) CreateAnswer(ctx context.Context, arg CreateAnswerParams) (Answer, error) { + row := q.db.QueryRow(ctx, createAnswer, arg.Answer, arg.IsCorrect, arg.QuestionID) + var i Answer + err := row.Scan( + &i.AnswerID, + &i.Answer, + &i.IsCorrect, + &i.QuestionID, + &i.CreatedAt, + &i.UpdatedAt, + ) + return i, err +} + +const deleteAnswersByQuestionIDs = `-- name: DeleteAnswersByQuestionIDs :exec +DELETE FROM Answer +WHERE question_id = ANY($1::uuid[]) +` + +func (q *Queries) DeleteAnswersByQuestionIDs(ctx context.Context, dollar_1 []uuid.UUID) error { + _, err := q.db.Exec(ctx, deleteAnswersByQuestionIDs, dollar_1) + return err +} + +const deleteAnswersByQuestionId = `-- name: DeleteAnswersByQuestionId :exec +DELETE FROM Answer +WHERE question_id = $1 +` + +func (q *Queries) DeleteAnswersByQuestionId(ctx context.Context, questionID uuid.UUID) error { + _, err := q.db.Exec(ctx, deleteAnswersByQuestionId, questionID) + return err +} + +const getAnswersByQuestionID = `-- name: GetAnswersByQuestionID :many +SELECT answer_id, answer, is_correct, question_id, created_at, updated_at FROM Answer +WHERE question_id = $1 +` + +func (q *Queries) GetAnswersByQuestionID(ctx context.Context, questionID uuid.UUID) ([]Answer, error) { + rows, err := q.db.Query(ctx, getAnswersByQuestionID, questionID) + if err != nil { + return nil, err + } + defer rows.Close() + items := []Answer{} + for rows.Next() { + var i Answer + if err := rows.Scan( + &i.AnswerID, + &i.Answer, + &i.IsCorrect, + &i.QuestionID, + &i.CreatedAt, + &i.UpdatedAt, + ); err != nil { + return nil, err + } + items = append(items, i) + } + if err := rows.Err(); err != nil { + return nil, err + } + return items, nil +} + +const updateAnswer = `-- name: UpdateAnswer :one +UPDATE Answer +SET answer = $1, is_correct = $2, updated_at = now() +WHERE answer_id = $3 + RETURNING answer_id, answer, is_correct, question_id, created_at, updated_at +` + +type UpdateAnswerParams struct { + Answer string `json:"answer"` + IsCorrect pgtype.Bool `json:"is_correct"` + AnswerID uuid.UUID `json:"answer_id"` +} + +func (q *Queries) UpdateAnswer(ctx context.Context, arg UpdateAnswerParams) (Answer, error) { + row := q.db.QueryRow(ctx, updateAnswer, arg.Answer, arg.IsCorrect, arg.AnswerID) + var i Answer + err := row.Scan( + &i.AnswerID, + &i.Answer, + &i.IsCorrect, + &i.QuestionID, + &i.CreatedAt, + &i.UpdatedAt, + ) + return i, err +} diff --git a/backend/lms-main-system/internal/repo/models.go b/backend/lms-main-system/internal/repo/models.go index 060eb9b..9c9b528 100644 --- a/backend/lms-main-system/internal/repo/models.go +++ b/backend/lms-main-system/internal/repo/models.go @@ -226,6 +226,15 @@ func AllMaterialTypeValues() []MaterialType { } } +type Answer struct { + AnswerID uuid.UUID `json:"answer_id"` + Answer string `json:"answer"` + IsCorrect pgtype.Bool `json:"is_correct"` + QuestionID uuid.UUID `json:"question_id"` + CreatedAt pgtype.Timestamp `json:"created_at"` + UpdatedAt pgtype.Timestamp `json:"updated_at"` +} + type Assignment struct { AssignmentID uuid.UUID `json:"assignment_id"` CourseID uuid.UUID `json:"course_id"` @@ -343,13 +352,20 @@ type NamespaceConsumer struct { IsActive pgtype.Bool `json:"is_active"` } +type Question struct { + QuestionID uuid.UUID `json:"question_id"` + Question string `json:"question"` + QuizID uuid.UUID `json:"quiz_id"` + CreatedAt pgtype.Timestamp `json:"created_at"` + UpdatedAt pgtype.Timestamp `json:"updated_at"` +} + type Quiz struct { QuizID uuid.UUID `json:"quiz_id"` - Question string `json:"question"` - Answer string `json:"answer"` ModuleID uuid.UUID `json:"module_id"` CreatedAt pgtype.Timestamp `json:"created_at"` UpdatedAt pgtype.Timestamp `json:"updated_at"` + Title string `json:"title"` } type Rating struct { diff --git a/backend/lms-main-system/internal/repo/querier.go b/backend/lms-main-system/internal/repo/querier.go index 05c3843..4e1bf84 100644 --- a/backend/lms-main-system/internal/repo/querier.go +++ b/backend/lms-main-system/internal/repo/querier.go @@ -16,18 +16,32 @@ type Querier interface { AssignRolesToUser(ctx context.Context, arg AssignRolesToUserParams) error CheckNameSpaceFromMetaData(ctx context.Context, namespace string) (int32, error) CheckTenantsMemberExistenceByEmail(ctx context.Context, lmsUserEmail string) (int32, error) + CreateAnswer(ctx context.Context, arg CreateAnswerParams) (Answer, error) CreateLesson(ctx context.Context, arg CreateLessonParams) (Lesson, error) CreateModule(ctx context.Context, arg CreateModuleParams) (Module, error) + CreateQuestion(ctx context.Context, arg CreateQuestionParams) (Question, error) + CreateQuiz(ctx context.Context, arg CreateQuizParams) (Quiz, error) CreateUser(ctx context.Context, arg CreateUserParams) (CreateUserRow, error) + DeleteAnswersByQuestionIDs(ctx context.Context, dollar_1 []uuid.UUID) error + DeleteAnswersByQuestionId(ctx context.Context, questionID uuid.UUID) error DeleteAssociatedLessons(ctx context.Context, moduleID uuid.UUID) error DeleteAssociatedQuizzes(ctx context.Context, moduleID uuid.UUID) error DeleteLessons(ctx context.Context, dollar_1 []uuid.UUID) ([]uuid.UUID, error) DeleteModule(ctx context.Context, moduleID uuid.UUID) error DeleteModules(ctx context.Context, dollar_1 []uuid.UUID) error + DeleteQuestionsByQuizIDs(ctx context.Context, dollar_1 []uuid.UUID) error + DeleteQuestionsByQuizId(ctx context.Context, quizID uuid.UUID) error + DeleteQuizById(ctx context.Context, quizID uuid.UUID) error + DeleteQuizzes(ctx context.Context, dollar_1 []uuid.UUID) error + GetAnswersByQuestionID(ctx context.Context, questionID uuid.UUID) ([]Answer, error) GetDefaultRoleIDs(ctx context.Context) ([]uuid.UUID, error) - GetModuleByIDWithTenant(ctx context.Context, arg GetModuleByIDWithTenantParams) (Module, error) GetLessonById(ctx context.Context, lessonID uuid.UUID) (GetLessonByIdRow, error) GetLessonsByModuleId(ctx context.Context, moduleID uuid.UUID) ([]GetLessonsByModuleIdRow, error) + GetModuleByIDWithTenant(ctx context.Context, arg GetModuleByIDWithTenantParams) (Module, error) + GetQuestionByID(ctx context.Context, questionID uuid.UUID) (Question, error) + GetQuestionsByQuizID(ctx context.Context, quizID uuid.UUID) ([]Question, error) + GetQuizById(ctx context.Context, quizID uuid.UUID) (Quiz, error) + GetQuizzesByModule(ctx context.Context, moduleID uuid.UUID) ([]Quiz, error) GetRoleIdByName(ctx context.Context, lmsRoleName LmsRoleType) (uuid.UUID, error) GetTenantIdByNameSpace(ctx context.Context, namespace string) (uuid.UUID, error) GetUserByEmail(ctx context.Context, lmsUserEmail string) (LmsUser, error) @@ -37,9 +51,11 @@ type Querier interface { ListModulesWithTenant(ctx context.Context, namespace string) ([]Module, error) ModuleHasAssociations(ctx context.Context, moduleID uuid.UUID) (pgtype.Bool, error) SetUpMFA(ctx context.Context, arg SetUpMFAParams) (uuid.UUID, error) + UpdateAnswer(ctx context.Context, arg UpdateAnswerParams) (Answer, error) UpdateEmailVerification(ctx context.Context, lmsUserEmail string) error UpdateLesson(ctx context.Context, arg UpdateLessonParams) (Lesson, error) UpdateModuleByID(ctx context.Context, arg UpdateModuleByIDParams) (Module, error) + UpdateQuestion(ctx context.Context, arg UpdateQuestionParams) (Question, error) } var _ Querier = (*Queries)(nil) diff --git a/backend/lms-main-system/internal/repo/question.sql.go b/backend/lms-main-system/internal/repo/question.sql.go new file mode 100644 index 0000000..71d9d65 --- /dev/null +++ b/backend/lms-main-system/internal/repo/question.sql.go @@ -0,0 +1,130 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.29.0 +// source: question.sql + +package repo + +import ( + "context" + + "github.com/google/uuid" +) + +const createQuestion = `-- name: CreateQuestion :one +INSERT INTO Question (question, quiz_id) +VALUES ($1, $2) + RETURNING question_id, question, quiz_id, created_at, updated_at +` + +type CreateQuestionParams struct { + Question string `json:"question"` + QuizID uuid.UUID `json:"quiz_id"` +} + +func (q *Queries) CreateQuestion(ctx context.Context, arg CreateQuestionParams) (Question, error) { + row := q.db.QueryRow(ctx, createQuestion, arg.Question, arg.QuizID) + var i Question + err := row.Scan( + &i.QuestionID, + &i.Question, + &i.QuizID, + &i.CreatedAt, + &i.UpdatedAt, + ) + return i, err +} + +const deleteQuestionsByQuizIDs = `-- name: DeleteQuestionsByQuizIDs :exec +DELETE FROM Question +WHERE quiz_id = ANY($1::uuid[]) +` + +func (q *Queries) DeleteQuestionsByQuizIDs(ctx context.Context, dollar_1 []uuid.UUID) error { + _, err := q.db.Exec(ctx, deleteQuestionsByQuizIDs, dollar_1) + return err +} + +const deleteQuestionsByQuizId = `-- name: DeleteQuestionsByQuizId :exec +DELETE FROM Question +WHERE quiz_id = $1 +` + +func (q *Queries) DeleteQuestionsByQuizId(ctx context.Context, quizID uuid.UUID) error { + _, err := q.db.Exec(ctx, deleteQuestionsByQuizId, quizID) + return err +} + +const getQuestionByID = `-- name: GetQuestionByID :one +SELECT question_id, question, quiz_id, created_at, updated_at FROM Question +WHERE question_id = $1 +` + +func (q *Queries) GetQuestionByID(ctx context.Context, questionID uuid.UUID) (Question, error) { + row := q.db.QueryRow(ctx, getQuestionByID, questionID) + var i Question + err := row.Scan( + &i.QuestionID, + &i.Question, + &i.QuizID, + &i.CreatedAt, + &i.UpdatedAt, + ) + return i, err +} + +const getQuestionsByQuizID = `-- name: GetQuestionsByQuizID :many +SELECT question_id, question, quiz_id, created_at, updated_at FROM Question +WHERE quiz_id = $1 +` + +func (q *Queries) GetQuestionsByQuizID(ctx context.Context, quizID uuid.UUID) ([]Question, error) { + rows, err := q.db.Query(ctx, getQuestionsByQuizID, quizID) + if err != nil { + return nil, err + } + defer rows.Close() + items := []Question{} + for rows.Next() { + var i Question + if err := rows.Scan( + &i.QuestionID, + &i.Question, + &i.QuizID, + &i.CreatedAt, + &i.UpdatedAt, + ); err != nil { + return nil, err + } + items = append(items, i) + } + if err := rows.Err(); err != nil { + return nil, err + } + return items, nil +} + +const updateQuestion = `-- name: UpdateQuestion :one +UPDATE Question +SET question = $1, updated_at = now() +WHERE question_id = $2 + RETURNING question_id, question, quiz_id, created_at, updated_at +` + +type UpdateQuestionParams struct { + Question string `json:"question"` + QuestionID uuid.UUID `json:"question_id"` +} + +func (q *Queries) UpdateQuestion(ctx context.Context, arg UpdateQuestionParams) (Question, error) { + row := q.db.QueryRow(ctx, updateQuestion, arg.Question, arg.QuestionID) + var i Question + err := row.Scan( + &i.QuestionID, + &i.Question, + &i.QuizID, + &i.CreatedAt, + &i.UpdatedAt, + ) + return i, err +} diff --git a/backend/lms-main-system/internal/repo/quiz.sql.go b/backend/lms-main-system/internal/repo/quiz.sql.go new file mode 100644 index 0000000..05040ca --- /dev/null +++ b/backend/lms-main-system/internal/repo/quiz.sql.go @@ -0,0 +1,105 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.29.0 +// source: quiz.sql + +package repo + +import ( + "context" + + "github.com/google/uuid" +) + +const createQuiz = `-- name: CreateQuiz :one +INSERT INTO Quiz (module_id, title) +VALUES ($1, $2) +RETURNING quiz_id, module_id, created_at, updated_at, title +` + +type CreateQuizParams struct { + ModuleID uuid.UUID `json:"module_id"` + Title string `json:"title"` +} + +func (q *Queries) CreateQuiz(ctx context.Context, arg CreateQuizParams) (Quiz, error) { + row := q.db.QueryRow(ctx, createQuiz, arg.ModuleID, arg.Title) + var i Quiz + err := row.Scan( + &i.QuizID, + &i.ModuleID, + &i.CreatedAt, + &i.UpdatedAt, + &i.Title, + ) + return i, err +} + +const deleteQuizById = `-- name: DeleteQuizById :exec +DELETE FROM Quiz +WHERE quiz_id = $1 +` + +func (q *Queries) DeleteQuizById(ctx context.Context, quizID uuid.UUID) error { + _, err := q.db.Exec(ctx, deleteQuizById, quizID) + return err +} + +const deleteQuizzes = `-- name: DeleteQuizzes :exec +DELETE FROM Quiz +WHERE quiz_id = ANY($1::uuid[]) +` + +func (q *Queries) DeleteQuizzes(ctx context.Context, dollar_1 []uuid.UUID) error { + _, err := q.db.Exec(ctx, deleteQuizzes, dollar_1) + return err +} + +const getQuizById = `-- name: GetQuizById :one +SELECT quiz_id, module_id, created_at, updated_at, title FROM Quiz +WHERE quiz_id = $1 +` + +func (q *Queries) GetQuizById(ctx context.Context, quizID uuid.UUID) (Quiz, error) { + row := q.db.QueryRow(ctx, getQuizById, quizID) + var i Quiz + err := row.Scan( + &i.QuizID, + &i.ModuleID, + &i.CreatedAt, + &i.UpdatedAt, + &i.Title, + ) + return i, err +} + +const getQuizzesByModule = `-- name: GetQuizzesByModule :many +SELECT quiz_id, module_id, created_at, updated_at, title FROM Quiz +WHERE module_id = $1 +` + +func (q *Queries) GetQuizzesByModule(ctx context.Context, moduleID uuid.UUID) ([]Quiz, error) { + rows, err := q.db.Query(ctx, getQuizzesByModule, moduleID) + if err != nil { + return nil, err + } + defer rows.Close() + items := []Quiz{} + for rows.Next() { + var i Quiz + if err := rows.Scan( + &i.QuizID, + &i.ModuleID, + &i.CreatedAt, + &i.UpdatedAt, + &i.Title, + ); err != nil { + return nil, err + } + items = append(items, i) + } + if err := rows.Err(); err != nil { + return nil, err + } + return items, nil +} diff --git a/backend/lms-main-system/proto/authentication/rpc_login.proto b/backend/lms-main-system/proto/authentication/rpc_login.proto index 5962ccc..e89f40d 100644 --- a/backend/lms-main-system/proto/authentication/rpc_login.proto +++ b/backend/lms-main-system/proto/authentication/rpc_login.proto @@ -2,7 +2,6 @@ syntax = "proto3"; package lms.authentication; option go_package = "github.com/multi-tenant-cms-golang/lms-sys/protogen/authentication"; -import "google/protobuf/timestamp.proto"; message LoginRequest { diff --git a/backend/lms-main-system/proto/files/service.file.proto b/backend/lms-main-system/proto/files/service.file.proto index e08780a..d6014ba 100644 --- a/backend/lms-main-system/proto/files/service.file.proto +++ b/backend/lms-main-system/proto/files/service.file.proto @@ -4,7 +4,6 @@ package lms.files; import "google/api/annotations.proto"; import "google/protobuf/timestamp.proto"; -import "protoc-gen-openapiv2/options/annotations.proto"; option go_package = "github.com/multi-tenants-cms-golang/lms-sys/protogen/files"; diff --git a/backend/lms-main-system/proto/quiz/quiz.proto b/backend/lms-main-system/proto/quiz/quiz.proto new file mode 100644 index 0000000..b7605e1 --- /dev/null +++ b/backend/lms-main-system/proto/quiz/quiz.proto @@ -0,0 +1,47 @@ +syntax = "proto3"; + +package lms.quiz; +option go_package = "github.com/multi-tenant-cms-golang/lms-sys/protogen/quiz"; +import "google/protobuf/timestamp.proto"; + +message Quiz { + string quizId = 1; + string moduleId = 2; + string title = 3; + google.protobuf.Timestamp createdAt = 4; + google.protobuf.Timestamp updatedAt = 5; +} + +message Question { + string questionId = 1; + string quizId = 2; + string question = 3; + repeated Answer answers = 4; + google.protobuf.Timestamp createdAt = 5; + google.protobuf.Timestamp updatedAt = 6; +} + +message Answer { + string answerId = 1; + string questionId = 2; + string answer = 3; + bool isCorrect = 4; + google.protobuf.Timestamp createdAt = 5; + google.protobuf.Timestamp updatedAt = 6; +} + +message AnswerOption { + string answerId=1; + string answer = 2; + bool isCorrect = 3; +} + +message QuestionInput { + string question = 1; + repeated AnswerOption answerOptions = 2; +} + +message QuizResponse { + Quiz quiz = 1; + repeated Question questions = 2; +} diff --git a/backend/lms-main-system/proto/quiz/rpc_quiz_create.proto b/backend/lms-main-system/proto/quiz/rpc_quiz_create.proto new file mode 100644 index 0000000..1e5765e --- /dev/null +++ b/backend/lms-main-system/proto/quiz/rpc_quiz_create.proto @@ -0,0 +1,10 @@ +syntax = "proto3"; + +package lms.quiz; +option go_package = "github.com/multi-tenant-cms-golang/lms-sys/protogen/quiz"; +import "quiz/quiz.proto"; + +message CreateQuizRequest { + string moduleId = 1; + repeated QuestionInput quiz = 2; +} \ No newline at end of file diff --git a/backend/lms-main-system/proto/quiz/rpc_quiz_delete.proto b/backend/lms-main-system/proto/quiz/rpc_quiz_delete.proto new file mode 100644 index 0000000..59f64b2 --- /dev/null +++ b/backend/lms-main-system/proto/quiz/rpc_quiz_delete.proto @@ -0,0 +1,9 @@ +syntax = "proto3"; + +package lms.quiz; +option go_package = "github.com/multi-tenant-cms-golang/lms-sys/protogen/quiz"; + +message DeleteQuizRequest { + repeated string ids = 1; + bool force_delete = 2; +} \ No newline at end of file diff --git a/backend/lms-main-system/proto/quiz/rpc_quiz_get.proto b/backend/lms-main-system/proto/quiz/rpc_quiz_get.proto new file mode 100644 index 0000000..c30ff8a --- /dev/null +++ b/backend/lms-main-system/proto/quiz/rpc_quiz_get.proto @@ -0,0 +1,13 @@ +syntax = "proto3"; + +package lms.quiz; +option go_package = "github.com/multi-tenant-cms-golang/lms-sys/protogen/quiz"; +import "quiz/quiz.proto"; + +message GetQuizByModuleRequest { + string moduleId = 1; +} + +message GetQuizByModuleResponse { + repeated QuizResponse quizzes = 1; +} \ No newline at end of file diff --git a/backend/lms-main-system/proto/quiz/rpc_quiz_update.proto b/backend/lms-main-system/proto/quiz/rpc_quiz_update.proto new file mode 100644 index 0000000..2fdf8bb --- /dev/null +++ b/backend/lms-main-system/proto/quiz/rpc_quiz_update.proto @@ -0,0 +1,11 @@ +syntax = "proto3"; + +package lms.quiz; +option go_package = "github.com/multi-tenant-cms-golang/lms-sys/protogen/quiz"; +import "quiz/quiz.proto"; + +message UpdateQuizRequest { + string question_id = 1; + string question= 2; + repeated AnswerOption answerOptions = 3; +} \ No newline at end of file diff --git a/backend/lms-main-system/proto/quiz/service.quiz.proto b/backend/lms-main-system/proto/quiz/service.quiz.proto new file mode 100644 index 0000000..8758bf9 --- /dev/null +++ b/backend/lms-main-system/proto/quiz/service.quiz.proto @@ -0,0 +1,79 @@ +syntax = "proto3"; +package lms.quiz; +option go_package = "github.com/multi-tenant-cms-golang/lms-sys/protogen/quiz"; +import "protoc-gen-openapiv2/options/annotations.proto"; +import "google/api/annotations.proto"; +import "quiz/rpc_quiz_get.proto"; +import "quiz/rpc_quiz_create.proto"; +import "quiz/rpc_quiz_update.proto"; +import "quiz/rpc_quiz_delete.proto"; +import "quiz/quiz.proto"; +import "google/protobuf/empty.proto"; + +option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { + info: { + title: "LMS Quiz Endpoints"; + version: "1.0"; + description: "APIs for Quiz in the Learning Management System"; + contact: { + name: "LMS Team"; + url: "https://lms.example.com/support"; + email: "support@lms.example.com"; + }; + license: { + name: "Apache 2.0"; + url: "https://www.apache.org/licenses/LICENSE-2.0.html"; + }; + }; + schemes: HTTPS; + schemes: HTTP; + consumes: "application/json"; + produces: "application/json"; + host: "localhost:8086"; + base_path: "/v1"; + security_definitions: { + security: { + key: "Bearer"; + value: { + type: TYPE_API_KEY; + in: IN_HEADER; + name: "Authorization"; + description: "Authentication token, prefixed with Bearer"; + } + } + }; + security: { + security_requirement: { + key: "Bearer"; + value: {}; + } + } +}; + +service QuizService { + rpc CreateQuiz(CreateQuizRequest) returns (QuizResponse) { + option (google.api.http) = { + post: "/lms/v1/quiz" + body: "*" + }; + } + + rpc GetQuizzesByModule(GetQuizByModuleRequest) returns (GetQuizByModuleResponse) { + option (google.api.http) = { + get: "/lms/v1/quiz/modules" + }; + } + + rpc UpdateQuiz(UpdateQuizRequest) returns (Question) { + option (google.api.http) = { + put: "/lms/v1/quiz/{question_id}" + body: "*" + }; + } + + rpc DeleteQuiz(DeleteQuizRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/lms/v1/quiz" + }; + } +} \ No newline at end of file diff --git a/backend/lms-main-system/protogen/authentication/authentication.pb.go b/backend/lms-main-system/protogen/authentication/authentication.pb.go index fe42d28..a6b0be1 100644 --- a/backend/lms-main-system/protogen/authentication/authentication.pb.go +++ b/backend/lms-main-system/protogen/authentication/authentication.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.6 -// protoc v6.30.2 +// protoc-gen-go v1.33.0 +// protoc v3.21.12 // source: authentication/authentication.proto package authentication @@ -12,7 +12,6 @@ import ( timestamppb "google.golang.org/protobuf/types/known/timestamppb" reflect "reflect" sync "sync" - unsafe "unsafe" ) const ( @@ -24,7 +23,10 @@ const ( // Is equal to the LMS USER type SystemUser struct { - state protoimpl.MessageState `protogen:"open.v1"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"` Email string `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"` @@ -36,15 +38,15 @@ type SystemUser struct { RegistrationDate *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=registration_date,json=registrationDate,proto3" json:"registration_date,omitempty"` CreatedAt *timestamppb.Timestamp `protobuf:"bytes,9,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,10,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache } func (x *SystemUser) Reset() { *x = SystemUser{} - mi := &file_authentication_authentication_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_authentication_authentication_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *SystemUser) String() string { @@ -55,7 +57,7 @@ func (*SystemUser) ProtoMessage() {} func (x *SystemUser) ProtoReflect() protoreflect.Message { mi := &file_authentication_authentication_proto_msgTypes[0] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -149,41 +151,61 @@ func (x *SystemUser) GetUpdatedAt() *timestamppb.Timestamp { var File_authentication_authentication_proto protoreflect.FileDescriptor -const file_authentication_authentication_proto_rawDesc = "" + - "\n" + - "#authentication/authentication.proto\x12\x12lms.authentication\x1a\x1fgoogle/protobuf/timestamp.proto\"\xb3\x03\n" + - "\n" + - "SystemUser\x12\x0e\n" + - "\x02id\x18\x01 \x01(\tR\x02id\x12\x1a\n" + - "\busername\x18\x02 \x01(\tR\busername\x12\x14\n" + - "\x05email\x18\x03 \x01(\tR\x05email\x12!\n" + - "\fphone_number\x18\x04 \x01(\tR\vphoneNumber\x12\x18\n" + - "\aaddress\x18\x05 \x01(\tR\aaddress\x12%\n" + - "\x0eemail_verified\x18\x06 \x01(\bR\remailVerified\x12\x1d\n" + - "\n" + - "mfa_enable\x18\a \x01(\bR\tmfaEnable\x12!\n" + - "\fdomain_email\x18\v \x01(\tR\vdomainEmail\x12G\n" + - "\x11registration_date\x18\b \x01(\v2\x1a.google.protobuf.TimestampR\x10registrationDate\x129\n" + - "\n" + - "created_at\x18\t \x01(\v2\x1a.google.protobuf.TimestampR\tcreatedAt\x129\n" + - "\n" + - "updated_at\x18\n" + - " \x01(\v2\x1a.google.protobuf.TimestampR\tupdatedAtBDZBgithub.com/multi-tenant-cms-golang/lms-sys/protogen/authenticationb\x06proto3" +var file_authentication_authentication_proto_rawDesc = []byte{ + 0x0a, 0x23, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x2f, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x6c, 0x6d, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x65, + 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, + 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xb3, 0x03, 0x0a, 0x0a, 0x53, + 0x79, 0x73, 0x74, 0x65, 0x6d, 0x55, 0x73, 0x65, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, + 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, + 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x21, 0x0a, 0x0c, 0x70, + 0x68, 0x6f, 0x6e, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0b, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x18, + 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x65, 0x6d, 0x61, 0x69, + 0x6c, 0x5f, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x0d, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x12, + 0x1d, 0x0a, 0x0a, 0x6d, 0x66, 0x61, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x07, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x09, 0x6d, 0x66, 0x61, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x21, + 0x0a, 0x0c, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x5f, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x0b, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x45, 0x6d, 0x61, 0x69, + 0x6c, 0x12, 0x47, 0x0a, 0x11, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x64, 0x61, 0x74, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x10, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x65, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, + 0x5f, 0x61, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, + 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, + 0x42, 0x44, 0x5a, 0x42, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6d, + 0x75, 0x6c, 0x74, 0x69, 0x2d, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x2d, 0x63, 0x6d, 0x73, 0x2d, + 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2f, 0x6c, 0x6d, 0x73, 0x2d, 0x73, 0x79, 0x73, 0x2f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x67, 0x65, 0x6e, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} var ( file_authentication_authentication_proto_rawDescOnce sync.Once - file_authentication_authentication_proto_rawDescData []byte + file_authentication_authentication_proto_rawDescData = file_authentication_authentication_proto_rawDesc ) func file_authentication_authentication_proto_rawDescGZIP() []byte { file_authentication_authentication_proto_rawDescOnce.Do(func() { - file_authentication_authentication_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_authentication_authentication_proto_rawDesc), len(file_authentication_authentication_proto_rawDesc))) + file_authentication_authentication_proto_rawDescData = protoimpl.X.CompressGZIP(file_authentication_authentication_proto_rawDescData) }) return file_authentication_authentication_proto_rawDescData } var file_authentication_authentication_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_authentication_authentication_proto_goTypes = []any{ +var file_authentication_authentication_proto_goTypes = []interface{}{ (*SystemUser)(nil), // 0: lms.authentication.SystemUser (*timestamppb.Timestamp)(nil), // 1: google.protobuf.Timestamp } @@ -203,11 +225,25 @@ func file_authentication_authentication_proto_init() { if File_authentication_authentication_proto != nil { return } + if !protoimpl.UnsafeEnabled { + file_authentication_authentication_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SystemUser); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_authentication_authentication_proto_rawDesc), len(file_authentication_authentication_proto_rawDesc)), + RawDescriptor: file_authentication_authentication_proto_rawDesc, NumEnums: 0, NumMessages: 1, NumExtensions: 0, @@ -218,6 +254,7 @@ func file_authentication_authentication_proto_init() { MessageInfos: file_authentication_authentication_proto_msgTypes, }.Build() File_authentication_authentication_proto = out.File + file_authentication_authentication_proto_rawDesc = nil file_authentication_authentication_proto_goTypes = nil file_authentication_authentication_proto_depIdxs = nil } diff --git a/backend/lms-main-system/protogen/authentication/rpc_email_verify.pb.go b/backend/lms-main-system/protogen/authentication/rpc_email_verify.pb.go index c41b2dd..1f7b72d 100644 --- a/backend/lms-main-system/protogen/authentication/rpc_email_verify.pb.go +++ b/backend/lms-main-system/protogen/authentication/rpc_email_verify.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.6 -// protoc v6.30.2 +// protoc-gen-go v1.33.0 +// protoc v3.21.12 // source: authentication/rpc_email_verify.proto package authentication @@ -11,7 +11,6 @@ import ( protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" - unsafe "unsafe" ) const ( @@ -22,19 +21,22 @@ const ( ) type EmailVerifyRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Organisation string `protobuf:"bytes,1,opt,name=organisation,proto3" json:"organisation,omitempty"` - Email string `protobuf:"bytes,2,opt,name=email,proto3" json:"email,omitempty"` - Token string `protobuf:"bytes,3,opt,name=token,proto3" json:"token,omitempty"` - unknownFields protoimpl.UnknownFields + state protoimpl.MessageState sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Organisation string `protobuf:"bytes,1,opt,name=organisation,proto3" json:"organisation,omitempty"` + Email string `protobuf:"bytes,2,opt,name=email,proto3" json:"email,omitempty"` + Token string `protobuf:"bytes,3,opt,name=token,proto3" json:"token,omitempty"` } func (x *EmailVerifyRequest) Reset() { *x = EmailVerifyRequest{} - mi := &file_authentication_rpc_email_verify_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_authentication_rpc_email_verify_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *EmailVerifyRequest) String() string { @@ -45,7 +47,7 @@ func (*EmailVerifyRequest) ProtoMessage() {} func (x *EmailVerifyRequest) ProtoReflect() protoreflect.Message { mi := &file_authentication_rpc_email_verify_proto_msgTypes[0] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -82,17 +84,20 @@ func (x *EmailVerifyRequest) GetToken() string { } type EmailVerifyResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` - unknownFields protoimpl.UnknownFields + state protoimpl.MessageState sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` } func (x *EmailVerifyResponse) Reset() { *x = EmailVerifyResponse{} - mi := &file_authentication_rpc_email_verify_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_authentication_rpc_email_verify_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *EmailVerifyResponse) String() string { @@ -103,7 +108,7 @@ func (*EmailVerifyResponse) ProtoMessage() {} func (x *EmailVerifyResponse) ProtoReflect() protoreflect.Message { mi := &file_authentication_rpc_email_verify_proto_msgTypes[1] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -127,30 +132,41 @@ func (x *EmailVerifyResponse) GetMessage() string { var File_authentication_rpc_email_verify_proto protoreflect.FileDescriptor -const file_authentication_rpc_email_verify_proto_rawDesc = "" + - "\n" + - "%authentication/rpc_email_verify.proto\x12\x12lms.authentication\"d\n" + - "\x12EmailVerifyRequest\x12\"\n" + - "\forganisation\x18\x01 \x01(\tR\forganisation\x12\x14\n" + - "\x05email\x18\x02 \x01(\tR\x05email\x12\x14\n" + - "\x05token\x18\x03 \x01(\tR\x05token\"/\n" + - "\x13EmailVerifyResponse\x12\x18\n" + - "\amessage\x18\x01 \x01(\tR\amessageBDZBgithub.com/multi-tenant-cms-golang/lms-sys/protogen/authenticationb\x06proto3" +var file_authentication_rpc_email_verify_proto_rawDesc = []byte{ + 0x0a, 0x25, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x2f, 0x72, 0x70, 0x63, 0x5f, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x5f, 0x76, 0x65, 0x72, 0x69, 0x66, + 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x6c, 0x6d, 0x73, 0x2e, 0x61, 0x75, 0x74, + 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x64, 0x0a, 0x12, 0x45, + 0x6d, 0x61, 0x69, 0x6c, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x22, 0x0a, 0x0c, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x73, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x73, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x74, + 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, + 0x6e, 0x22, 0x2f, 0x0a, 0x13, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x42, 0x44, 0x5a, 0x42, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x2d, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x2d, 0x63, 0x6d, + 0x73, 0x2d, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2f, 0x6c, 0x6d, 0x73, 0x2d, 0x73, 0x79, 0x73, + 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x67, 0x65, 0x6e, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, + 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} var ( file_authentication_rpc_email_verify_proto_rawDescOnce sync.Once - file_authentication_rpc_email_verify_proto_rawDescData []byte + file_authentication_rpc_email_verify_proto_rawDescData = file_authentication_rpc_email_verify_proto_rawDesc ) func file_authentication_rpc_email_verify_proto_rawDescGZIP() []byte { file_authentication_rpc_email_verify_proto_rawDescOnce.Do(func() { - file_authentication_rpc_email_verify_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_authentication_rpc_email_verify_proto_rawDesc), len(file_authentication_rpc_email_verify_proto_rawDesc))) + file_authentication_rpc_email_verify_proto_rawDescData = protoimpl.X.CompressGZIP(file_authentication_rpc_email_verify_proto_rawDescData) }) return file_authentication_rpc_email_verify_proto_rawDescData } var file_authentication_rpc_email_verify_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_authentication_rpc_email_verify_proto_goTypes = []any{ +var file_authentication_rpc_email_verify_proto_goTypes = []interface{}{ (*EmailVerifyRequest)(nil), // 0: lms.authentication.EmailVerifyRequest (*EmailVerifyResponse)(nil), // 1: lms.authentication.EmailVerifyResponse } @@ -167,11 +183,37 @@ func file_authentication_rpc_email_verify_proto_init() { if File_authentication_rpc_email_verify_proto != nil { return } + if !protoimpl.UnsafeEnabled { + file_authentication_rpc_email_verify_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EmailVerifyRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_authentication_rpc_email_verify_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EmailVerifyResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_authentication_rpc_email_verify_proto_rawDesc), len(file_authentication_rpc_email_verify_proto_rawDesc)), + RawDescriptor: file_authentication_rpc_email_verify_proto_rawDesc, NumEnums: 0, NumMessages: 2, NumExtensions: 0, @@ -182,6 +224,7 @@ func file_authentication_rpc_email_verify_proto_init() { MessageInfos: file_authentication_rpc_email_verify_proto_msgTypes, }.Build() File_authentication_rpc_email_verify_proto = out.File + file_authentication_rpc_email_verify_proto_rawDesc = nil file_authentication_rpc_email_verify_proto_goTypes = nil file_authentication_rpc_email_verify_proto_depIdxs = nil } diff --git a/backend/lms-main-system/protogen/authentication/rpc_login.pb.go b/backend/lms-main-system/protogen/authentication/rpc_login.pb.go index 0b4ccfa..756fb06 100644 --- a/backend/lms-main-system/protogen/authentication/rpc_login.pb.go +++ b/backend/lms-main-system/protogen/authentication/rpc_login.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.6 -// protoc v6.30.2 +// protoc-gen-go v1.33.0 +// protoc v3.21.12 // source: authentication/rpc_login.proto package authentication @@ -9,10 +9,8 @@ package authentication import ( protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" - _ "google.golang.org/protobuf/types/known/timestamppb" reflect "reflect" sync "sync" - unsafe "unsafe" ) const ( @@ -23,19 +21,22 @@ const ( ) type LoginRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Organisation string `protobuf:"bytes,1,opt,name=organisation,proto3" json:"organisation,omitempty"` - NamespaceDomainEmail string `protobuf:"bytes,2,opt,name=namespace_domain_email,json=namespaceDomainEmail,proto3" json:"namespace_domain_email,omitempty"` - Password string `protobuf:"bytes,3,opt,name=password,proto3" json:"password,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Organisation string `protobuf:"bytes,1,opt,name=organisation,proto3" json:"organisation,omitempty"` + NamespaceDomainEmail string `protobuf:"bytes,2,opt,name=namespace_domain_email,json=namespaceDomainEmail,proto3" json:"namespace_domain_email,omitempty"` + Password string `protobuf:"bytes,3,opt,name=password,proto3" json:"password,omitempty"` } func (x *LoginRequest) Reset() { *x = LoginRequest{} - mi := &file_authentication_rpc_login_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_authentication_rpc_login_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *LoginRequest) String() string { @@ -46,7 +47,7 @@ func (*LoginRequest) ProtoMessage() {} func (x *LoginRequest) ProtoReflect() protoreflect.Message { mi := &file_authentication_rpc_login_proto_msgTypes[0] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -83,18 +84,21 @@ func (x *LoginRequest) GetPassword() string { } type LoginResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` - MfaEnable bool `protobuf:"varint,2,opt,name=mfa_enable,json=mfaEnable,proto3" json:"mfa_enable,omitempty"` - unknownFields protoimpl.UnknownFields + state protoimpl.MessageState sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` + MfaEnable bool `protobuf:"varint,2,opt,name=mfa_enable,json=mfaEnable,proto3" json:"mfa_enable,omitempty"` } func (x *LoginResponse) Reset() { *x = LoginResponse{} - mi := &file_authentication_rpc_login_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_authentication_rpc_login_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *LoginResponse) String() string { @@ -105,7 +109,7 @@ func (*LoginResponse) ProtoMessage() {} func (x *LoginResponse) ProtoReflect() protoreflect.Message { mi := &file_authentication_rpc_login_proto_msgTypes[1] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -136,32 +140,45 @@ func (x *LoginResponse) GetMfaEnable() bool { var File_authentication_rpc_login_proto protoreflect.FileDescriptor -const file_authentication_rpc_login_proto_rawDesc = "" + - "\n" + - "\x1eauthentication/rpc_login.proto\x12\x12lms.authentication\x1a\x1fgoogle/protobuf/timestamp.proto\"\x84\x01\n" + - "\fLoginRequest\x12\"\n" + - "\forganisation\x18\x01 \x01(\tR\forganisation\x124\n" + - "\x16namespace_domain_email\x18\x02 \x01(\tR\x14namespaceDomainEmail\x12\x1a\n" + - "\bpassword\x18\x03 \x01(\tR\bpassword\"H\n" + - "\rLoginResponse\x12\x18\n" + - "\amessage\x18\x01 \x01(\tR\amessage\x12\x1d\n" + - "\n" + - "mfa_enable\x18\x02 \x01(\bR\tmfaEnableBDZBgithub.com/multi-tenant-cms-golang/lms-sys/protogen/authenticationb\x06proto3" +var file_authentication_rpc_login_proto_rawDesc = []byte{ + 0x0a, 0x1e, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x2f, 0x72, 0x70, 0x63, 0x5f, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x12, 0x12, 0x6c, 0x6d, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x84, 0x01, 0x0a, 0x0c, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x22, 0x0a, 0x0c, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x73, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6f, 0x72, 0x67, + 0x61, 0x6e, 0x69, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x34, 0x0a, 0x16, 0x6e, 0x61, 0x6d, + 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x5f, 0x65, 0x6d, + 0x61, 0x69, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x6e, 0x61, 0x6d, 0x65, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x12, + 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x22, 0x48, 0x0a, 0x0d, 0x4c, + 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, + 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x66, 0x61, 0x5f, 0x65, 0x6e, + 0x61, 0x62, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x6d, 0x66, 0x61, 0x45, + 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x42, 0x44, 0x5a, 0x42, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x2d, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, + 0x2d, 0x63, 0x6d, 0x73, 0x2d, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2f, 0x6c, 0x6d, 0x73, 0x2d, + 0x73, 0x79, 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x67, 0x65, 0x6e, 0x2f, 0x61, 0x75, 0x74, + 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, +} var ( file_authentication_rpc_login_proto_rawDescOnce sync.Once - file_authentication_rpc_login_proto_rawDescData []byte + file_authentication_rpc_login_proto_rawDescData = file_authentication_rpc_login_proto_rawDesc ) func file_authentication_rpc_login_proto_rawDescGZIP() []byte { file_authentication_rpc_login_proto_rawDescOnce.Do(func() { - file_authentication_rpc_login_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_authentication_rpc_login_proto_rawDesc), len(file_authentication_rpc_login_proto_rawDesc))) + file_authentication_rpc_login_proto_rawDescData = protoimpl.X.CompressGZIP(file_authentication_rpc_login_proto_rawDescData) }) return file_authentication_rpc_login_proto_rawDescData } var file_authentication_rpc_login_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_authentication_rpc_login_proto_goTypes = []any{ +var file_authentication_rpc_login_proto_goTypes = []interface{}{ (*LoginRequest)(nil), // 0: lms.authentication.LoginRequest (*LoginResponse)(nil), // 1: lms.authentication.LoginResponse } @@ -178,11 +195,37 @@ func file_authentication_rpc_login_proto_init() { if File_authentication_rpc_login_proto != nil { return } + if !protoimpl.UnsafeEnabled { + file_authentication_rpc_login_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LoginRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_authentication_rpc_login_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LoginResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_authentication_rpc_login_proto_rawDesc), len(file_authentication_rpc_login_proto_rawDesc)), + RawDescriptor: file_authentication_rpc_login_proto_rawDesc, NumEnums: 0, NumMessages: 2, NumExtensions: 0, @@ -193,6 +236,7 @@ func file_authentication_rpc_login_proto_init() { MessageInfos: file_authentication_rpc_login_proto_msgTypes, }.Build() File_authentication_rpc_login_proto = out.File + file_authentication_rpc_login_proto_rawDesc = nil file_authentication_rpc_login_proto_goTypes = nil file_authentication_rpc_login_proto_depIdxs = nil } diff --git a/backend/lms-main-system/protogen/authentication/rpc_logout.pb.go b/backend/lms-main-system/protogen/authentication/rpc_logout.pb.go index e1fb4bd..2d1e3c8 100644 --- a/backend/lms-main-system/protogen/authentication/rpc_logout.pb.go +++ b/backend/lms-main-system/protogen/authentication/rpc_logout.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.6 -// protoc v6.30.2 +// protoc-gen-go v1.33.0 +// protoc v3.21.12 // source: authentication/rpc_logout.proto package authentication @@ -11,7 +11,6 @@ import ( protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" - unsafe "unsafe" ) const ( @@ -22,18 +21,21 @@ const ( ) type LoginOutRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Organisation string `protobuf:"bytes,1,opt,name=organisation,proto3" json:"organisation,omitempty"` - Email string `protobuf:"bytes,2,opt,name=email,proto3" json:"email,omitempty"` - unknownFields protoimpl.UnknownFields + state protoimpl.MessageState sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Organisation string `protobuf:"bytes,1,opt,name=organisation,proto3" json:"organisation,omitempty"` + Email string `protobuf:"bytes,2,opt,name=email,proto3" json:"email,omitempty"` } func (x *LoginOutRequest) Reset() { *x = LoginOutRequest{} - mi := &file_authentication_rpc_logout_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_authentication_rpc_logout_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *LoginOutRequest) String() string { @@ -44,7 +46,7 @@ func (*LoginOutRequest) ProtoMessage() {} func (x *LoginOutRequest) ProtoReflect() protoreflect.Message { mi := &file_authentication_rpc_logout_proto_msgTypes[0] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -74,17 +76,20 @@ func (x *LoginOutRequest) GetEmail() string { } type LogoutResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` - unknownFields protoimpl.UnknownFields + state protoimpl.MessageState sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` } func (x *LogoutResponse) Reset() { *x = LogoutResponse{} - mi := &file_authentication_rpc_logout_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_authentication_rpc_logout_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *LogoutResponse) String() string { @@ -95,7 +100,7 @@ func (*LogoutResponse) ProtoMessage() {} func (x *LogoutResponse) ProtoReflect() protoreflect.Message { mi := &file_authentication_rpc_logout_proto_msgTypes[1] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -119,29 +124,39 @@ func (x *LogoutResponse) GetMessage() string { var File_authentication_rpc_logout_proto protoreflect.FileDescriptor -const file_authentication_rpc_logout_proto_rawDesc = "" + - "\n" + - "\x1fauthentication/rpc_logout.proto\x12\x12lms.authentication\"K\n" + - "\x0fLoginOutRequest\x12\"\n" + - "\forganisation\x18\x01 \x01(\tR\forganisation\x12\x14\n" + - "\x05email\x18\x02 \x01(\tR\x05email\"*\n" + - "\x0eLogoutResponse\x12\x18\n" + - "\amessage\x18\x02 \x01(\tR\amessageBDZBgithub.com/multi-tenant-cms-golang/lms-sys/protogen/authenticationb\x06proto3" +var file_authentication_rpc_logout_proto_rawDesc = []byte{ + 0x0a, 0x1f, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x2f, 0x72, 0x70, 0x63, 0x5f, 0x6c, 0x6f, 0x67, 0x6f, 0x75, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x12, 0x12, 0x6c, 0x6d, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x4b, 0x0a, 0x0f, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x4f, 0x75, + 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x22, 0x0a, 0x0c, 0x6f, 0x72, 0x67, 0x61, + 0x6e, 0x69, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, + 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, + 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, + 0x69, 0x6c, 0x22, 0x2a, 0x0a, 0x0e, 0x4c, 0x6f, 0x67, 0x6f, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x42, 0x44, + 0x5a, 0x42, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6d, 0x75, 0x6c, + 0x74, 0x69, 0x2d, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x2d, 0x63, 0x6d, 0x73, 0x2d, 0x67, 0x6f, + 0x6c, 0x61, 0x6e, 0x67, 0x2f, 0x6c, 0x6d, 0x73, 0x2d, 0x73, 0x79, 0x73, 0x2f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x67, 0x65, 0x6e, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} var ( file_authentication_rpc_logout_proto_rawDescOnce sync.Once - file_authentication_rpc_logout_proto_rawDescData []byte + file_authentication_rpc_logout_proto_rawDescData = file_authentication_rpc_logout_proto_rawDesc ) func file_authentication_rpc_logout_proto_rawDescGZIP() []byte { file_authentication_rpc_logout_proto_rawDescOnce.Do(func() { - file_authentication_rpc_logout_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_authentication_rpc_logout_proto_rawDesc), len(file_authentication_rpc_logout_proto_rawDesc))) + file_authentication_rpc_logout_proto_rawDescData = protoimpl.X.CompressGZIP(file_authentication_rpc_logout_proto_rawDescData) }) return file_authentication_rpc_logout_proto_rawDescData } var file_authentication_rpc_logout_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_authentication_rpc_logout_proto_goTypes = []any{ +var file_authentication_rpc_logout_proto_goTypes = []interface{}{ (*LoginOutRequest)(nil), // 0: lms.authentication.LoginOutRequest (*LogoutResponse)(nil), // 1: lms.authentication.LogoutResponse } @@ -158,11 +173,37 @@ func file_authentication_rpc_logout_proto_init() { if File_authentication_rpc_logout_proto != nil { return } + if !protoimpl.UnsafeEnabled { + file_authentication_rpc_logout_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LoginOutRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_authentication_rpc_logout_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LogoutResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_authentication_rpc_logout_proto_rawDesc), len(file_authentication_rpc_logout_proto_rawDesc)), + RawDescriptor: file_authentication_rpc_logout_proto_rawDesc, NumEnums: 0, NumMessages: 2, NumExtensions: 0, @@ -173,6 +214,7 @@ func file_authentication_rpc_logout_proto_init() { MessageInfos: file_authentication_rpc_logout_proto_msgTypes, }.Build() File_authentication_rpc_logout_proto = out.File + file_authentication_rpc_logout_proto_rawDesc = nil file_authentication_rpc_logout_proto_goTypes = nil file_authentication_rpc_logout_proto_depIdxs = nil } diff --git a/backend/lms-main-system/protogen/authentication/rpc_mfa_setup.pb.go b/backend/lms-main-system/protogen/authentication/rpc_mfa_setup.pb.go index e27d996..6e2a63b 100644 --- a/backend/lms-main-system/protogen/authentication/rpc_mfa_setup.pb.go +++ b/backend/lms-main-system/protogen/authentication/rpc_mfa_setup.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.6 -// protoc v6.30.2 +// protoc-gen-go v1.33.0 +// protoc v3.21.12 // source: authentication/rpc_mfa_setup.proto package authentication @@ -11,7 +11,6 @@ import ( protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" - unsafe "unsafe" ) const ( @@ -22,17 +21,20 @@ const ( ) type MFASetUpRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - DomainEmail string `protobuf:"bytes,1,opt,name=domain_email,json=domainEmail,proto3" json:"domain_email,omitempty"` - unknownFields protoimpl.UnknownFields + state protoimpl.MessageState sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + DomainEmail string `protobuf:"bytes,1,opt,name=domain_email,json=domainEmail,proto3" json:"domain_email,omitempty"` } func (x *MFASetUpRequest) Reset() { *x = MFASetUpRequest{} - mi := &file_authentication_rpc_mfa_setup_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_authentication_rpc_mfa_setup_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *MFASetUpRequest) String() string { @@ -43,7 +45,7 @@ func (*MFASetUpRequest) ProtoMessage() {} func (x *MFASetUpRequest) ProtoReflect() protoreflect.Message { mi := &file_authentication_rpc_mfa_setup_proto_msgTypes[0] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -66,19 +68,22 @@ func (x *MFASetUpRequest) GetDomainEmail() string { } type MFASetUpResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - MfaUrl string `protobuf:"bytes,3,opt,name=mfa_url,json=mfaUrl,proto3" json:"mfa_url,omitempty"` - PhotoString string `protobuf:"bytes,1,opt,name=photoString,proto3" json:"photoString,omitempty"` - ManualEntry string `protobuf:"bytes,2,opt,name=manualEntry,proto3" json:"manualEntry,omitempty"` - unknownFields protoimpl.UnknownFields + state protoimpl.MessageState sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + MfaUrl string `protobuf:"bytes,3,opt,name=mfa_url,json=mfaUrl,proto3" json:"mfa_url,omitempty"` + PhotoString string `protobuf:"bytes,1,opt,name=photoString,proto3" json:"photoString,omitempty"` + ManualEntry string `protobuf:"bytes,2,opt,name=manualEntry,proto3" json:"manualEntry,omitempty"` } func (x *MFASetUpResponse) Reset() { *x = MFASetUpResponse{} - mi := &file_authentication_rpc_mfa_setup_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_authentication_rpc_mfa_setup_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *MFASetUpResponse) String() string { @@ -89,7 +94,7 @@ func (*MFASetUpResponse) ProtoMessage() {} func (x *MFASetUpResponse) ProtoReflect() protoreflect.Message { mi := &file_authentication_rpc_mfa_setup_proto_msgTypes[1] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -127,30 +132,42 @@ func (x *MFASetUpResponse) GetManualEntry() string { var File_authentication_rpc_mfa_setup_proto protoreflect.FileDescriptor -const file_authentication_rpc_mfa_setup_proto_rawDesc = "" + - "\n" + - "\"authentication/rpc_mfa_setup.proto\x12\x12lms.authentication\"4\n" + - "\x0fMFASetUpRequest\x12!\n" + - "\fdomain_email\x18\x01 \x01(\tR\vdomainEmail\"o\n" + - "\x10MFASetUpResponse\x12\x17\n" + - "\amfa_url\x18\x03 \x01(\tR\x06mfaUrl\x12 \n" + - "\vphotoString\x18\x01 \x01(\tR\vphotoString\x12 \n" + - "\vmanualEntry\x18\x02 \x01(\tR\vmanualEntryBDZBgithub.com/multi-tenant-cms-golang/lms-sys/protogen/authenticationb\x06proto3" +var file_authentication_rpc_mfa_setup_proto_rawDesc = []byte{ + 0x0a, 0x22, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x2f, 0x72, 0x70, 0x63, 0x5f, 0x6d, 0x66, 0x61, 0x5f, 0x73, 0x65, 0x74, 0x75, 0x70, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x6c, 0x6d, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, + 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x34, 0x0a, 0x0f, 0x4d, 0x46, 0x41, 0x53, + 0x65, 0x74, 0x55, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x64, + 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x5f, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0b, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x22, 0x6f, + 0x0a, 0x10, 0x4d, 0x46, 0x41, 0x53, 0x65, 0x74, 0x55, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x6d, 0x66, 0x61, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x66, 0x61, 0x55, 0x72, 0x6c, 0x12, 0x20, 0x0a, 0x0b, 0x70, + 0x68, 0x6f, 0x74, 0x6f, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0b, 0x70, 0x68, 0x6f, 0x74, 0x6f, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x12, 0x20, 0x0a, + 0x0b, 0x6d, 0x61, 0x6e, 0x75, 0x61, 0x6c, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0b, 0x6d, 0x61, 0x6e, 0x75, 0x61, 0x6c, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x42, + 0x44, 0x5a, 0x42, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6d, 0x75, + 0x6c, 0x74, 0x69, 0x2d, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x2d, 0x63, 0x6d, 0x73, 0x2d, 0x67, + 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2f, 0x6c, 0x6d, 0x73, 0x2d, 0x73, 0x79, 0x73, 0x2f, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x67, 0x65, 0x6e, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} var ( file_authentication_rpc_mfa_setup_proto_rawDescOnce sync.Once - file_authentication_rpc_mfa_setup_proto_rawDescData []byte + file_authentication_rpc_mfa_setup_proto_rawDescData = file_authentication_rpc_mfa_setup_proto_rawDesc ) func file_authentication_rpc_mfa_setup_proto_rawDescGZIP() []byte { file_authentication_rpc_mfa_setup_proto_rawDescOnce.Do(func() { - file_authentication_rpc_mfa_setup_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_authentication_rpc_mfa_setup_proto_rawDesc), len(file_authentication_rpc_mfa_setup_proto_rawDesc))) + file_authentication_rpc_mfa_setup_proto_rawDescData = protoimpl.X.CompressGZIP(file_authentication_rpc_mfa_setup_proto_rawDescData) }) return file_authentication_rpc_mfa_setup_proto_rawDescData } var file_authentication_rpc_mfa_setup_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_authentication_rpc_mfa_setup_proto_goTypes = []any{ +var file_authentication_rpc_mfa_setup_proto_goTypes = []interface{}{ (*MFASetUpRequest)(nil), // 0: lms.authentication.MFASetUpRequest (*MFASetUpResponse)(nil), // 1: lms.authentication.MFASetUpResponse } @@ -167,11 +184,37 @@ func file_authentication_rpc_mfa_setup_proto_init() { if File_authentication_rpc_mfa_setup_proto != nil { return } + if !protoimpl.UnsafeEnabled { + file_authentication_rpc_mfa_setup_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MFASetUpRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_authentication_rpc_mfa_setup_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MFASetUpResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_authentication_rpc_mfa_setup_proto_rawDesc), len(file_authentication_rpc_mfa_setup_proto_rawDesc)), + RawDescriptor: file_authentication_rpc_mfa_setup_proto_rawDesc, NumEnums: 0, NumMessages: 2, NumExtensions: 0, @@ -182,6 +225,7 @@ func file_authentication_rpc_mfa_setup_proto_init() { MessageInfos: file_authentication_rpc_mfa_setup_proto_msgTypes, }.Build() File_authentication_rpc_mfa_setup_proto = out.File + file_authentication_rpc_mfa_setup_proto_rawDesc = nil file_authentication_rpc_mfa_setup_proto_goTypes = nil file_authentication_rpc_mfa_setup_proto_depIdxs = nil } diff --git a/backend/lms-main-system/protogen/authentication/rpc_refresh.pb.go b/backend/lms-main-system/protogen/authentication/rpc_refresh.pb.go index 7db491f..c02d42a 100644 --- a/backend/lms-main-system/protogen/authentication/rpc_refresh.pb.go +++ b/backend/lms-main-system/protogen/authentication/rpc_refresh.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.6 -// protoc v6.30.2 +// protoc-gen-go v1.33.0 +// protoc v3.21.12 // source: authentication/rpc_refresh.proto package authentication @@ -11,7 +11,6 @@ import ( protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" - unsafe "unsafe" ) const ( @@ -22,16 +21,18 @@ const ( ) type RefreshTokenRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields + state protoimpl.MessageState sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields } func (x *RefreshTokenRequest) Reset() { *x = RefreshTokenRequest{} - mi := &file_authentication_rpc_refresh_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_authentication_rpc_refresh_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *RefreshTokenRequest) String() string { @@ -42,7 +43,7 @@ func (*RefreshTokenRequest) ProtoMessage() {} func (x *RefreshTokenRequest) ProtoReflect() protoreflect.Message { mi := &file_authentication_rpc_refresh_proto_msgTypes[0] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -58,17 +59,20 @@ func (*RefreshTokenRequest) Descriptor() ([]byte, []int) { } type RefreshTokenResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - NewAccessToken string `protobuf:"bytes,1,opt,name=new_access_token,json=newAccessToken,proto3" json:"new_access_token,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + NewAccessToken string `protobuf:"bytes,1,opt,name=new_access_token,json=newAccessToken,proto3" json:"new_access_token,omitempty"` } func (x *RefreshTokenResponse) Reset() { *x = RefreshTokenResponse{} - mi := &file_authentication_rpc_refresh_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_authentication_rpc_refresh_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *RefreshTokenResponse) String() string { @@ -79,7 +83,7 @@ func (*RefreshTokenResponse) ProtoMessage() {} func (x *RefreshTokenResponse) ProtoReflect() protoreflect.Message { mi := &file_authentication_rpc_refresh_proto_msgTypes[1] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -103,27 +107,37 @@ func (x *RefreshTokenResponse) GetNewAccessToken() string { var File_authentication_rpc_refresh_proto protoreflect.FileDescriptor -const file_authentication_rpc_refresh_proto_rawDesc = "" + - "\n" + - " authentication/rpc_refresh.proto\x12\x12lms.authentication\"\x15\n" + - "\x13RefreshTokenRequest\"@\n" + - "\x14RefreshTokenResponse\x12(\n" + - "\x10new_access_token\x18\x01 \x01(\tR\x0enewAccessTokenBDZBgithub.com/multi-tenant-cms-golang/lms-sys/protogen/authenticationb\x06proto3" +var file_authentication_rpc_refresh_proto_rawDesc = []byte{ + 0x0a, 0x20, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x2f, 0x72, 0x70, 0x63, 0x5f, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x12, 0x6c, 0x6d, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x15, 0x0a, 0x13, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, + 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x40, 0x0a, + 0x14, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x28, 0x0a, 0x10, 0x6e, 0x65, 0x77, 0x5f, 0x61, 0x63, 0x63, + 0x65, 0x73, 0x73, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0e, 0x6e, 0x65, 0x77, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x42, + 0x44, 0x5a, 0x42, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6d, 0x75, + 0x6c, 0x74, 0x69, 0x2d, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x2d, 0x63, 0x6d, 0x73, 0x2d, 0x67, + 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2f, 0x6c, 0x6d, 0x73, 0x2d, 0x73, 0x79, 0x73, 0x2f, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x67, 0x65, 0x6e, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} var ( file_authentication_rpc_refresh_proto_rawDescOnce sync.Once - file_authentication_rpc_refresh_proto_rawDescData []byte + file_authentication_rpc_refresh_proto_rawDescData = file_authentication_rpc_refresh_proto_rawDesc ) func file_authentication_rpc_refresh_proto_rawDescGZIP() []byte { file_authentication_rpc_refresh_proto_rawDescOnce.Do(func() { - file_authentication_rpc_refresh_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_authentication_rpc_refresh_proto_rawDesc), len(file_authentication_rpc_refresh_proto_rawDesc))) + file_authentication_rpc_refresh_proto_rawDescData = protoimpl.X.CompressGZIP(file_authentication_rpc_refresh_proto_rawDescData) }) return file_authentication_rpc_refresh_proto_rawDescData } var file_authentication_rpc_refresh_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_authentication_rpc_refresh_proto_goTypes = []any{ +var file_authentication_rpc_refresh_proto_goTypes = []interface{}{ (*RefreshTokenRequest)(nil), // 0: lms.authentication.RefreshTokenRequest (*RefreshTokenResponse)(nil), // 1: lms.authentication.RefreshTokenResponse } @@ -140,11 +154,37 @@ func file_authentication_rpc_refresh_proto_init() { if File_authentication_rpc_refresh_proto != nil { return } + if !protoimpl.UnsafeEnabled { + file_authentication_rpc_refresh_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RefreshTokenRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_authentication_rpc_refresh_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RefreshTokenResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_authentication_rpc_refresh_proto_rawDesc), len(file_authentication_rpc_refresh_proto_rawDesc)), + RawDescriptor: file_authentication_rpc_refresh_proto_rawDesc, NumEnums: 0, NumMessages: 2, NumExtensions: 0, @@ -155,6 +195,7 @@ func file_authentication_rpc_refresh_proto_init() { MessageInfos: file_authentication_rpc_refresh_proto_msgTypes, }.Build() File_authentication_rpc_refresh_proto = out.File + file_authentication_rpc_refresh_proto_rawDesc = nil file_authentication_rpc_refresh_proto_goTypes = nil file_authentication_rpc_refresh_proto_depIdxs = nil } diff --git a/backend/lms-main-system/protogen/authentication/rpc_register.pb.go b/backend/lms-main-system/protogen/authentication/rpc_register.pb.go index 49a9cb7..4a152ef 100644 --- a/backend/lms-main-system/protogen/authentication/rpc_register.pb.go +++ b/backend/lms-main-system/protogen/authentication/rpc_register.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.6 -// protoc v6.30.2 +// protoc-gen-go v1.33.0 +// protoc v3.21.12 // source: authentication/rpc_register.proto package authentication @@ -11,7 +11,6 @@ import ( protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" - unsafe "unsafe" ) const ( @@ -22,23 +21,26 @@ const ( ) type RegisterRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Organisation string `protobuf:"bytes,1,opt,name=organisation,proto3" json:"organisation,omitempty"` - Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"` - Email string `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"` - Password string `protobuf:"bytes,4,opt,name=password,proto3" json:"password,omitempty"` - Address string `protobuf:"bytes,5,opt,name=address,proto3" json:"address,omitempty"` - PhoneNumber string `protobuf:"bytes,6,opt,name=phone_number,json=phoneNumber,proto3" json:"phone_number,omitempty"` - MfaVerificationOption bool `protobuf:"varint,7,opt,name=mfa_verification_option,json=mfaVerificationOption,proto3" json:"mfa_verification_option,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Organisation string `protobuf:"bytes,1,opt,name=organisation,proto3" json:"organisation,omitempty"` + Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"` + Email string `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"` + Password string `protobuf:"bytes,4,opt,name=password,proto3" json:"password,omitempty"` + Address string `protobuf:"bytes,5,opt,name=address,proto3" json:"address,omitempty"` + PhoneNumber string `protobuf:"bytes,6,opt,name=phone_number,json=phoneNumber,proto3" json:"phone_number,omitempty"` + MfaVerificationOption bool `protobuf:"varint,7,opt,name=mfa_verification_option,json=mfaVerificationOption,proto3" json:"mfa_verification_option,omitempty"` } func (x *RegisterRequest) Reset() { *x = RegisterRequest{} - mi := &file_authentication_rpc_register_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_authentication_rpc_register_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *RegisterRequest) String() string { @@ -49,7 +51,7 @@ func (*RegisterRequest) ProtoMessage() {} func (x *RegisterRequest) ProtoReflect() protoreflect.Message { mi := &file_authentication_rpc_register_proto_msgTypes[0] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -114,18 +116,21 @@ func (x *RegisterRequest) GetMfaVerificationOption() bool { } type RegisterResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - RegisteredUser *SystemUser `protobuf:"bytes,1,opt,name=registered_user,json=registeredUser,proto3" json:"registered_user,omitempty"` - Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + RegisteredUser *SystemUser `protobuf:"bytes,1,opt,name=registered_user,json=registeredUser,proto3" json:"registered_user,omitempty"` + Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` } func (x *RegisterResponse) Reset() { *x = RegisterResponse{} - mi := &file_authentication_rpc_register_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_authentication_rpc_register_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *RegisterResponse) String() string { @@ -136,7 +141,7 @@ func (*RegisterResponse) ProtoMessage() {} func (x *RegisterResponse) ProtoReflect() protoreflect.Message { mi := &file_authentication_rpc_register_proto_msgTypes[1] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -167,35 +172,57 @@ func (x *RegisterResponse) GetMessage() string { var File_authentication_rpc_register_proto protoreflect.FileDescriptor -const file_authentication_rpc_register_proto_rawDesc = "" + - "\n" + - "!authentication/rpc_register.proto\x12\x12lms.authentication\x1a#authentication/authentication.proto\"\xf8\x01\n" + - "\x0fRegisterRequest\x12\"\n" + - "\forganisation\x18\x01 \x01(\tR\forganisation\x12\x1a\n" + - "\busername\x18\x02 \x01(\tR\busername\x12\x14\n" + - "\x05email\x18\x03 \x01(\tR\x05email\x12\x1a\n" + - "\bpassword\x18\x04 \x01(\tR\bpassword\x12\x18\n" + - "\aaddress\x18\x05 \x01(\tR\aaddress\x12!\n" + - "\fphone_number\x18\x06 \x01(\tR\vphoneNumber\x126\n" + - "\x17mfa_verification_option\x18\a \x01(\bR\x15mfaVerificationOption\"u\n" + - "\x10RegisterResponse\x12G\n" + - "\x0fregistered_user\x18\x01 \x01(\v2\x1e.lms.authentication.SystemUserR\x0eregisteredUser\x12\x18\n" + - "\amessage\x18\x02 \x01(\tR\amessageBDZBgithub.com/multi-tenant-cms-golang/lms-sys/protogen/authenticationb\x06proto3" +var file_authentication_rpc_register_proto_rawDesc = []byte{ + 0x0a, 0x21, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x2f, 0x72, 0x70, 0x63, 0x5f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x6c, 0x6d, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, + 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x23, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, + 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xf8, 0x01, 0x0a, + 0x0f, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x22, 0x0a, 0x0c, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x73, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, + 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, + 0x72, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, + 0x72, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x21, 0x0a, 0x0c, + 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0b, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, + 0x36, 0x0a, 0x17, 0x6d, 0x66, 0x61, 0x5f, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x15, 0x6d, 0x66, 0x61, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x75, 0x0a, 0x10, 0x52, 0x65, 0x67, 0x69, 0x73, + 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x47, 0x0a, 0x0f, 0x72, + 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x65, 0x64, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6c, 0x6d, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x65, + 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, + 0x55, 0x73, 0x65, 0x72, 0x52, 0x0e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x65, 0x64, + 0x55, 0x73, 0x65, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x42, 0x44, + 0x5a, 0x42, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6d, 0x75, 0x6c, + 0x74, 0x69, 0x2d, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x2d, 0x63, 0x6d, 0x73, 0x2d, 0x67, 0x6f, + 0x6c, 0x61, 0x6e, 0x67, 0x2f, 0x6c, 0x6d, 0x73, 0x2d, 0x73, 0x79, 0x73, 0x2f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x67, 0x65, 0x6e, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} var ( file_authentication_rpc_register_proto_rawDescOnce sync.Once - file_authentication_rpc_register_proto_rawDescData []byte + file_authentication_rpc_register_proto_rawDescData = file_authentication_rpc_register_proto_rawDesc ) func file_authentication_rpc_register_proto_rawDescGZIP() []byte { file_authentication_rpc_register_proto_rawDescOnce.Do(func() { - file_authentication_rpc_register_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_authentication_rpc_register_proto_rawDesc), len(file_authentication_rpc_register_proto_rawDesc))) + file_authentication_rpc_register_proto_rawDescData = protoimpl.X.CompressGZIP(file_authentication_rpc_register_proto_rawDescData) }) return file_authentication_rpc_register_proto_rawDescData } var file_authentication_rpc_register_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_authentication_rpc_register_proto_goTypes = []any{ +var file_authentication_rpc_register_proto_goTypes = []interface{}{ (*RegisterRequest)(nil), // 0: lms.authentication.RegisterRequest (*RegisterResponse)(nil), // 1: lms.authentication.RegisterResponse (*SystemUser)(nil), // 2: lms.authentication.SystemUser @@ -215,11 +242,37 @@ func file_authentication_rpc_register_proto_init() { return } file_authentication_authentication_proto_init() + if !protoimpl.UnsafeEnabled { + file_authentication_rpc_register_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RegisterRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_authentication_rpc_register_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RegisterResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_authentication_rpc_register_proto_rawDesc), len(file_authentication_rpc_register_proto_rawDesc)), + RawDescriptor: file_authentication_rpc_register_proto_rawDesc, NumEnums: 0, NumMessages: 2, NumExtensions: 0, @@ -230,6 +283,7 @@ func file_authentication_rpc_register_proto_init() { MessageInfos: file_authentication_rpc_register_proto_msgTypes, }.Build() File_authentication_rpc_register_proto = out.File + file_authentication_rpc_register_proto_rawDesc = nil file_authentication_rpc_register_proto_goTypes = nil file_authentication_rpc_register_proto_depIdxs = nil } diff --git a/backend/lms-main-system/protogen/authentication/rpc_resend_email_verification.pb.go b/backend/lms-main-system/protogen/authentication/rpc_resend_email_verification.pb.go index fa39e00..3e0d615 100644 --- a/backend/lms-main-system/protogen/authentication/rpc_resend_email_verification.pb.go +++ b/backend/lms-main-system/protogen/authentication/rpc_resend_email_verification.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.6 -// protoc v6.30.2 +// protoc-gen-go v1.33.0 +// protoc v3.21.12 // source: authentication/rpc_resend_email_verification.proto package authentication @@ -11,7 +11,6 @@ import ( protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" - unsafe "unsafe" ) const ( @@ -22,18 +21,21 @@ const ( ) type ResendVerificationRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Organisation string `protobuf:"bytes,1,opt,name=organisation,proto3" json:"organisation,omitempty"` - Email string `protobuf:"bytes,2,opt,name=email,proto3" json:"email,omitempty"` - unknownFields protoimpl.UnknownFields + state protoimpl.MessageState sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Organisation string `protobuf:"bytes,1,opt,name=organisation,proto3" json:"organisation,omitempty"` + Email string `protobuf:"bytes,2,opt,name=email,proto3" json:"email,omitempty"` } func (x *ResendVerificationRequest) Reset() { *x = ResendVerificationRequest{} - mi := &file_authentication_rpc_resend_email_verification_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_authentication_rpc_resend_email_verification_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ResendVerificationRequest) String() string { @@ -44,7 +46,7 @@ func (*ResendVerificationRequest) ProtoMessage() {} func (x *ResendVerificationRequest) ProtoReflect() protoreflect.Message { mi := &file_authentication_rpc_resend_email_verification_proto_msgTypes[0] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -74,18 +76,21 @@ func (x *ResendVerificationRequest) GetEmail() string { } type ResendVerificationResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` - Success bool `protobuf:"varint,2,opt,name=success,proto3" json:"success,omitempty"` - unknownFields protoimpl.UnknownFields + state protoimpl.MessageState sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` + Success bool `protobuf:"varint,2,opt,name=success,proto3" json:"success,omitempty"` } func (x *ResendVerificationResponse) Reset() { *x = ResendVerificationResponse{} - mi := &file_authentication_rpc_resend_email_verification_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_authentication_rpc_resend_email_verification_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ResendVerificationResponse) String() string { @@ -96,7 +101,7 @@ func (*ResendVerificationResponse) ProtoMessage() {} func (x *ResendVerificationResponse) ProtoReflect() protoreflect.Message { mi := &file_authentication_rpc_resend_email_verification_proto_msgTypes[1] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -127,30 +132,43 @@ func (x *ResendVerificationResponse) GetSuccess() bool { var File_authentication_rpc_resend_email_verification_proto protoreflect.FileDescriptor -const file_authentication_rpc_resend_email_verification_proto_rawDesc = "" + - "\n" + - "2authentication/rpc_resend_email_verification.proto\x12\x12lms.authentication\"U\n" + - "\x19ResendVerificationRequest\x12\"\n" + - "\forganisation\x18\x01 \x01(\tR\forganisation\x12\x14\n" + - "\x05email\x18\x02 \x01(\tR\x05email\"P\n" + - "\x1aResendVerificationResponse\x12\x18\n" + - "\amessage\x18\x01 \x01(\tR\amessage\x12\x18\n" + - "\asuccess\x18\x02 \x01(\bR\asuccessBDZBgithub.com/multi-tenant-cms-golang/lms-sys/protogen/authenticationb\x06proto3" +var file_authentication_rpc_resend_email_verification_proto_rawDesc = []byte{ + 0x0a, 0x32, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x2f, 0x72, 0x70, 0x63, 0x5f, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x64, 0x5f, 0x65, 0x6d, 0x61, 0x69, + 0x6c, 0x5f, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x6c, 0x6d, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, + 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x55, 0x0a, 0x19, 0x52, 0x65, 0x73, 0x65, + 0x6e, 0x64, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x22, 0x0a, 0x0c, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x73, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6f, 0x72, 0x67, + 0x61, 0x6e, 0x69, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, + 0x69, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x22, + 0x50, 0x0a, 0x1a, 0x52, 0x65, 0x73, 0x65, 0x6e, 0x64, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, + 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, + 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, + 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, + 0x73, 0x42, 0x44, 0x5a, 0x42, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x2d, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x2d, 0x63, 0x6d, 0x73, + 0x2d, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2f, 0x6c, 0x6d, 0x73, 0x2d, 0x73, 0x79, 0x73, 0x2f, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x67, 0x65, 0x6e, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, + 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} var ( file_authentication_rpc_resend_email_verification_proto_rawDescOnce sync.Once - file_authentication_rpc_resend_email_verification_proto_rawDescData []byte + file_authentication_rpc_resend_email_verification_proto_rawDescData = file_authentication_rpc_resend_email_verification_proto_rawDesc ) func file_authentication_rpc_resend_email_verification_proto_rawDescGZIP() []byte { file_authentication_rpc_resend_email_verification_proto_rawDescOnce.Do(func() { - file_authentication_rpc_resend_email_verification_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_authentication_rpc_resend_email_verification_proto_rawDesc), len(file_authentication_rpc_resend_email_verification_proto_rawDesc))) + file_authentication_rpc_resend_email_verification_proto_rawDescData = protoimpl.X.CompressGZIP(file_authentication_rpc_resend_email_verification_proto_rawDescData) }) return file_authentication_rpc_resend_email_verification_proto_rawDescData } var file_authentication_rpc_resend_email_verification_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_authentication_rpc_resend_email_verification_proto_goTypes = []any{ +var file_authentication_rpc_resend_email_verification_proto_goTypes = []interface{}{ (*ResendVerificationRequest)(nil), // 0: lms.authentication.ResendVerificationRequest (*ResendVerificationResponse)(nil), // 1: lms.authentication.ResendVerificationResponse } @@ -167,11 +185,37 @@ func file_authentication_rpc_resend_email_verification_proto_init() { if File_authentication_rpc_resend_email_verification_proto != nil { return } + if !protoimpl.UnsafeEnabled { + file_authentication_rpc_resend_email_verification_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ResendVerificationRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_authentication_rpc_resend_email_verification_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ResendVerificationResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_authentication_rpc_resend_email_verification_proto_rawDesc), len(file_authentication_rpc_resend_email_verification_proto_rawDesc)), + RawDescriptor: file_authentication_rpc_resend_email_verification_proto_rawDesc, NumEnums: 0, NumMessages: 2, NumExtensions: 0, @@ -182,6 +226,7 @@ func file_authentication_rpc_resend_email_verification_proto_init() { MessageInfos: file_authentication_rpc_resend_email_verification_proto_msgTypes, }.Build() File_authentication_rpc_resend_email_verification_proto = out.File + file_authentication_rpc_resend_email_verification_proto_rawDesc = nil file_authentication_rpc_resend_email_verification_proto_goTypes = nil file_authentication_rpc_resend_email_verification_proto_depIdxs = nil } diff --git a/backend/lms-main-system/protogen/authentication/service.authentication.pb.go b/backend/lms-main-system/protogen/authentication/service.authentication.pb.go index 412f7b3..ca842b2 100644 --- a/backend/lms-main-system/protogen/authentication/service.authentication.pb.go +++ b/backend/lms-main-system/protogen/authentication/service.authentication.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.6 -// protoc v6.30.2 +// protoc-gen-go v1.33.0 +// protoc v3.21.12 // source: authentication/service.authentication.proto package authentication @@ -12,7 +12,6 @@ import ( protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" - unsafe "unsafe" ) const ( @@ -24,81 +23,221 @@ const ( var File_authentication_service_authentication_proto protoreflect.FileDescriptor -const file_authentication_service_authentication_proto_rawDesc = "" + - "\n" + - "+authentication/service.authentication.proto\x12\x12lms.authentication\x1a.protoc-gen-openapiv2/options/annotations.proto\x1a\x1cgoogle/api/annotations.proto\x1a!authentication/rpc_register.proto\x1a%authentication/rpc_email_verify.proto\x1a\x1eauthentication/rpc_login.proto\x1a2authentication/rpc_resend_email_verification.proto\x1a\x1fauthentication/rpc_logout.proto\x1a authentication/rpc_refresh.proto\x1a\"authentication/rpc_mfa_setup.proto2\xb9\x13\n" + - "\x15AuthenticationService\x12\x93\x03\n" + - "\bRegister\x12#.lms.authentication.RegisterRequest\x1a$.lms.authentication.RegisterResponse\"\xbb\x02\x92A\x97\x02\n" + - "\x0eAuthentication\x12\x11Register new user\x1a,Creates a new user account in the LMS systemJI\n" + - "\x03201\x12B\n" + - "\x1cUser successfully registered\x12\"\n" + - " \x1a\x1e#/definitions/RegisterResponseJ#\n" + - "\x03400\x12\x1c\n" + - "\x1aInvalid request parametersJ\x1c\n" + - "\x03409\x12\x15\n" + - "\x13User already existsr6\n" + - "4\n" + - "\x0eX-Organisation\x12\x1eOrganization identifier header\x18\x01(\x01\x82\xd3\xe4\x93\x02\x1a:\x01*\"\x15/lms/v1/auth/register\x12\xac\x03\n" + - "\vVerifyEmail\x12&.lms.authentication.EmailVerifyRequest\x1a'.lms.authentication.EmailVerifyResponse\"\xcb\x02\x92A\x93\x02\n" + - "\x0eAuthentication\x12\x14Verify email address\x1aCVerifies a user's email address using the token sent to their emailJK\n" + - "\x03200\x12D\n" + - "\x1bEmail successfully verified\x12%\n" + - "#\x1a!#/definitions/EmailVerifyResponseJ!\n" + - "\x03400\x12\x1a\n" + - "\x18Invalid or expired tokenr6\n" + - "4\n" + - "\x0eX-Organisation\x12\x1eOrganization identifier header\x18\x01(\x01\x82\xd3\xe4\x93\x02.:\x01*\")/lms/v1/auth/verify-email/{email}/{token}\x12\xd8\x02\n" + - "\x05Login\x12 .lms.authentication.LoginRequest\x1a!.lms.authentication.LoginResponse\"\x89\x02\x92A\xe8\x01\n" + - "\x0eAuthentication\x12\n" + - "User login\x1a8Authenticates user credentials and returns access tokensJ:\n" + - "\x03200\x123\n" + - "\x10Login successful\x12\x1f\n" + - "\x1d\x1a\x1b#/definitions/LoginResponseJ\x1c\n" + - "\x03401\x12\x15\n" + - "\x13Invalid credentialsr6\n" + - "4\n" + - "\x0eX-Organisation\x12\x1eOrganization identifier header\x18\x01(\x01\x82\xd3\xe4\x93\x02\x17:\x01*\"\x12/lms/v1/auth/login\x12\xb6\x03\n" + - "\x17ResendVerificationEmail\x12-.lms.authentication.ResendVerificationRequest\x1a..lms.authentication.ResendVerificationResponse\"\xbb\x02\x92A\x94\x02\n" + - "\x0eAuthentication\x12\x19Resend verification email\x1aCResends the email verification token to the specified email addressJP\n" + - "\x03200\x12I\n" + - "\x19Verification email resent\x12,\n" + - "*\x1a(#/definitions/ResendVerificationResponseJ\x18\n" + - "\x03404\x12\x11\n" + - "\x0fEmail not foundr6\n" + - "4\n" + - "\x0eX-Organisation\x12\x1eOrganization identifier header\x18\x01(\x01\x82\xd3\xe4\x93\x02\x1d\"\x1b/lms/v1/auth/resend/{email}\x12\xe8\x02\n" + - "\x06LogOut\x12#.lms.authentication.LoginOutRequest\x1a\".lms.authentication.LogoutResponse\"\x94\x02\x92A\xf2\x01\n" + - "\x0eAuthentication\x12\vUser logout\x1a,Invalidates the user's authentication tokensJ<\n" + - "\x03200\x125\n" + - "\x11Logout successful\x12 \n" + - "\x1e\x1a\x1c#/definitions/LogoutResponseJ!\n" + - "\x03401\x12\x1a\n" + - "\x18Invalid or missing tokenb\f\n" + - "\n" + - "\n" + - "\x06Bearer\x12\x00r6\n" + - "4\n" + - "\x0eX-Organisation\x12\x1eOrganization identifier header\x18\x01(\x01\x82\xd3\xe4\x93\x02\x18:\x01*\"\x13/lms/v1/auth/logout\x12\x89\x02\n" + - "\aRefresh\x12'.lms.authentication.RefreshTokenRequest\x1a(.lms.authentication.RefreshTokenResponse\"\xaa\x01\x92A\x8a\x01\n" + - "\x0eAuthentication\x12\rRefresh Token\x1a1Check the cookies and returns new access tokensr6\n" + - "4\n" + - "\x0eX-Organisation\x12\x1eOrganization identifier header\x18\x01(\x01\x82\xd3\xe4\x93\x02\x16\"\x14/lms/v1/auth/refresh\x12\xcf\x01\n" + - "\bSetUpMFA\x12#.lms.authentication.MFASetUpRequest\x1a$.lms.authentication.MFASetUpResponse\"x\x92AT\n" + - "\x0eAuthentication\x12\n" + - "Set UP MFAr6\n" + - "4\n" + - "\x0eX-Organisation\x12\x1eOrganization identifier header\x18\x01(\x01\x82\xd3\xe4\x93\x02\x1b:\x01*\"\x16/lms/v1/auth/setup-mfaB\xc9\x03\x92A\x81\x03\x12\xe6\x01\n" + - "\x1aLMS Authentication Service\x12=API for user authentication in the Learning Management System\"D\n" + - "\bLMS Team\x12\x1fhttps://lms.example.com/support\x1a\x17support@lms.example.com*>\n" + - "\n" + - "Apache 2.0\x120https://www.apache.org/licenses/LICENSE-2.0.html2\x031.0\x1a\x0elocalhost:8086\"\x03/v1*\x02\x02\x012\x10application/json:\x10application/jsonZK\n" + - "I\n" + - "\x06Bearer\x12?\b\x02\x12*Authentication token, prefixed with Bearer\x1a\rAuthorization \x02b\f\n" + - "\n" + - "\n" + - "\x06Bearer\x12\x00ZBgithub.com/multi-tenant-cms-golang/lms-sys/protogen/authenticationb\x06proto3" +var file_authentication_service_authentication_proto_rawDesc = []byte{ + 0x0a, 0x2b, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, + 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x6c, + 0x6d, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x6f, 0x70, + 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, + 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, + 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x21, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, + 0x72, 0x70, 0x63, 0x5f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x25, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x2f, 0x72, 0x70, 0x63, 0x5f, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x5f, 0x76, 0x65, 0x72, + 0x69, 0x66, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x61, 0x75, 0x74, 0x68, 0x65, + 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x72, 0x70, 0x63, 0x5f, 0x6c, 0x6f, + 0x67, 0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x32, 0x61, 0x75, 0x74, 0x68, 0x65, + 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x72, 0x70, 0x63, 0x5f, 0x72, 0x65, + 0x73, 0x65, 0x6e, 0x64, 0x5f, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x5f, 0x76, 0x65, 0x72, 0x69, 0x66, + 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x61, + 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x72, 0x70, + 0x63, 0x5f, 0x6c, 0x6f, 0x67, 0x6f, 0x75, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, + 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x72, + 0x70, 0x63, 0x5f, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x22, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x2f, 0x72, 0x70, 0x63, 0x5f, 0x6d, 0x66, 0x61, 0x5f, 0x73, 0x65, 0x74, 0x75, 0x70, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x32, 0xb9, 0x13, 0x0a, 0x15, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, + 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x93, + 0x03, 0x0a, 0x08, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x12, 0x23, 0x2e, 0x6c, 0x6d, + 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x24, 0x2e, 0x6c, 0x6d, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xbb, 0x02, 0x92, 0x41, 0x97, 0x02, 0x0a, 0x0e, 0x41, + 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x11, 0x52, + 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x20, 0x6e, 0x65, 0x77, 0x20, 0x75, 0x73, 0x65, 0x72, + 0x1a, 0x2c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x73, 0x20, 0x61, 0x20, 0x6e, 0x65, 0x77, 0x20, + 0x75, 0x73, 0x65, 0x72, 0x20, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x20, 0x69, 0x6e, 0x20, + 0x74, 0x68, 0x65, 0x20, 0x4c, 0x4d, 0x53, 0x20, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x4a, 0x49, + 0x0a, 0x03, 0x32, 0x30, 0x31, 0x12, 0x42, 0x0a, 0x1c, 0x55, 0x73, 0x65, 0x72, 0x20, 0x73, 0x75, + 0x63, 0x63, 0x65, 0x73, 0x73, 0x66, 0x75, 0x6c, 0x6c, 0x79, 0x20, 0x72, 0x65, 0x67, 0x69, 0x73, + 0x74, 0x65, 0x72, 0x65, 0x64, 0x12, 0x22, 0x0a, 0x20, 0x1a, 0x1e, 0x23, 0x2f, 0x64, 0x65, 0x66, + 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, + 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4a, 0x23, 0x0a, 0x03, 0x34, 0x30, 0x30, + 0x12, 0x1c, 0x0a, 0x1a, 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x20, 0x72, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x20, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x4a, 0x1c, + 0x0a, 0x03, 0x34, 0x30, 0x39, 0x12, 0x15, 0x0a, 0x13, 0x55, 0x73, 0x65, 0x72, 0x20, 0x61, 0x6c, + 0x72, 0x65, 0x61, 0x64, 0x79, 0x20, 0x65, 0x78, 0x69, 0x73, 0x74, 0x73, 0x72, 0x36, 0x0a, 0x34, + 0x0a, 0x0e, 0x58, 0x2d, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x1e, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x69, + 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x20, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, + 0x18, 0x01, 0x28, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1a, 0x3a, 0x01, 0x2a, 0x22, 0x15, 0x2f, + 0x6c, 0x6d, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x72, 0x65, 0x67, 0x69, + 0x73, 0x74, 0x65, 0x72, 0x12, 0xac, 0x03, 0x0a, 0x0b, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x45, + 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x26, 0x2e, 0x6c, 0x6d, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x65, + 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x56, + 0x65, 0x72, 0x69, 0x66, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x6c, + 0x6d, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x2e, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xcb, 0x02, 0x92, 0x41, 0x93, 0x02, 0x0a, 0x0e, 0x41, 0x75, + 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x56, 0x65, + 0x72, 0x69, 0x66, 0x79, 0x20, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x20, 0x61, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x1a, 0x43, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x73, 0x20, 0x61, 0x20, 0x75, + 0x73, 0x65, 0x72, 0x27, 0x73, 0x20, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x20, 0x61, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x20, 0x75, 0x73, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x68, 0x65, 0x20, 0x74, 0x6f, + 0x6b, 0x65, 0x6e, 0x20, 0x73, 0x65, 0x6e, 0x74, 0x20, 0x74, 0x6f, 0x20, 0x74, 0x68, 0x65, 0x69, + 0x72, 0x20, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x4a, 0x4b, 0x0a, 0x03, 0x32, 0x30, 0x30, 0x12, 0x44, + 0x0a, 0x1b, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x20, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x66, + 0x75, 0x6c, 0x6c, 0x79, 0x20, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x12, 0x25, 0x0a, + 0x23, 0x1a, 0x21, 0x23, 0x2f, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2f, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x4a, 0x21, 0x0a, 0x03, 0x34, 0x30, 0x30, 0x12, 0x1a, 0x0a, 0x18, 0x49, + 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x20, 0x6f, 0x72, 0x20, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, + 0x64, 0x20, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x72, 0x36, 0x0a, 0x34, 0x0a, 0x0e, 0x58, 0x2d, 0x4f, + 0x72, 0x67, 0x61, 0x6e, 0x69, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1e, 0x4f, 0x72, 0x67, + 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, + 0x66, 0x69, 0x65, 0x72, 0x20, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x28, 0x01, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x2e, 0x3a, 0x01, 0x2a, 0x22, 0x29, 0x2f, 0x6c, 0x6d, 0x73, 0x2f, 0x76, + 0x31, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 0x2d, 0x65, 0x6d, + 0x61, 0x69, 0x6c, 0x2f, 0x7b, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x7d, 0x2f, 0x7b, 0x74, 0x6f, 0x6b, + 0x65, 0x6e, 0x7d, 0x12, 0xd8, 0x02, 0x0a, 0x05, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x12, 0x20, 0x2e, + 0x6c, 0x6d, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x2e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x21, 0x2e, 0x6c, 0x6d, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x89, 0x02, 0x92, 0x41, 0xe8, 0x01, 0x0a, 0x0e, 0x41, 0x75, 0x74, 0x68, 0x65, + 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x20, + 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x1a, 0x38, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, + 0x61, 0x74, 0x65, 0x73, 0x20, 0x75, 0x73, 0x65, 0x72, 0x20, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, + 0x74, 0x69, 0x61, 0x6c, 0x73, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, + 0x73, 0x20, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x20, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x4a, + 0x3a, 0x0a, 0x03, 0x32, 0x30, 0x30, 0x12, 0x33, 0x0a, 0x10, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x20, + 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x66, 0x75, 0x6c, 0x12, 0x1f, 0x0a, 0x1d, 0x1a, 0x1b, + 0x23, 0x2f, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x4c, 0x6f, + 0x67, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4a, 0x1c, 0x0a, 0x03, 0x34, + 0x30, 0x31, 0x12, 0x15, 0x0a, 0x13, 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x20, 0x63, 0x72, + 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x72, 0x36, 0x0a, 0x34, 0x0a, 0x0e, 0x58, + 0x2d, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1e, 0x4f, + 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x69, 0x64, 0x65, 0x6e, + 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x20, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x28, + 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x3a, 0x01, 0x2a, 0x22, 0x12, 0x2f, 0x6c, 0x6d, 0x73, + 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x12, 0xb6, + 0x03, 0x0a, 0x17, 0x52, 0x65, 0x73, 0x65, 0x6e, 0x64, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x2d, 0x2e, 0x6c, 0x6d, 0x73, + 0x2e, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, + 0x52, 0x65, 0x73, 0x65, 0x6e, 0x64, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x6c, 0x6d, 0x73, 0x2e, + 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, + 0x65, 0x73, 0x65, 0x6e, 0x64, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xbb, 0x02, 0x92, 0x41, 0x94, 0x02, + 0x0a, 0x0e, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x19, 0x52, 0x65, 0x73, 0x65, 0x6e, 0x64, 0x20, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x1a, 0x43, 0x52, 0x65, 0x73, + 0x65, 0x6e, 0x64, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x20, 0x76, + 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x74, 0x6f, 0x6b, 0x65, + 0x6e, 0x20, 0x74, 0x6f, 0x20, 0x74, 0x68, 0x65, 0x20, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, + 0x65, 0x64, 0x20, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x20, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x4a, 0x50, 0x0a, 0x03, 0x32, 0x30, 0x30, 0x12, 0x49, 0x0a, 0x19, 0x56, 0x65, 0x72, 0x69, 0x66, + 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x20, 0x72, 0x65, + 0x73, 0x65, 0x6e, 0x74, 0x12, 0x2c, 0x0a, 0x2a, 0x1a, 0x28, 0x23, 0x2f, 0x64, 0x65, 0x66, 0x69, + 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x52, 0x65, 0x73, 0x65, 0x6e, 0x64, 0x56, 0x65, + 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x4a, 0x18, 0x0a, 0x03, 0x34, 0x30, 0x34, 0x12, 0x11, 0x0a, 0x0f, 0x45, 0x6d, 0x61, + 0x69, 0x6c, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x72, 0x36, 0x0a, 0x34, + 0x0a, 0x0e, 0x58, 0x2d, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x1e, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x69, + 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x20, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, + 0x18, 0x01, 0x28, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1d, 0x22, 0x1b, 0x2f, 0x6c, 0x6d, 0x73, + 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x64, 0x2f, + 0x7b, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x7d, 0x12, 0xe8, 0x02, 0x0a, 0x06, 0x4c, 0x6f, 0x67, 0x4f, + 0x75, 0x74, 0x12, 0x23, 0x2e, 0x6c, 0x6d, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, + 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x4f, 0x75, 0x74, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x6c, 0x6d, 0x73, 0x2e, 0x61, 0x75, + 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4c, 0x6f, 0x67, + 0x6f, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x94, 0x02, 0x92, 0x41, + 0xf2, 0x01, 0x0a, 0x0e, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x0b, 0x55, 0x73, 0x65, 0x72, 0x20, 0x6c, 0x6f, 0x67, 0x6f, 0x75, 0x74, 0x1a, + 0x2c, 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x73, 0x20, 0x74, 0x68, 0x65, + 0x20, 0x75, 0x73, 0x65, 0x72, 0x27, 0x73, 0x20, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x4a, 0x3c, 0x0a, + 0x03, 0x32, 0x30, 0x30, 0x12, 0x35, 0x0a, 0x11, 0x4c, 0x6f, 0x67, 0x6f, 0x75, 0x74, 0x20, 0x73, + 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x66, 0x75, 0x6c, 0x12, 0x20, 0x0a, 0x1e, 0x1a, 0x1c, 0x23, + 0x2f, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x4c, 0x6f, 0x67, + 0x6f, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4a, 0x21, 0x0a, 0x03, 0x34, + 0x30, 0x31, 0x12, 0x1a, 0x0a, 0x18, 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x20, 0x6f, 0x72, + 0x20, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x62, 0x0c, + 0x0a, 0x0a, 0x0a, 0x06, 0x42, 0x65, 0x61, 0x72, 0x65, 0x72, 0x12, 0x00, 0x72, 0x36, 0x0a, 0x34, + 0x0a, 0x0e, 0x58, 0x2d, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x1e, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x69, + 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x20, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, + 0x18, 0x01, 0x28, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x3a, 0x01, 0x2a, 0x22, 0x13, 0x2f, + 0x6c, 0x6d, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x6c, 0x6f, 0x67, 0x6f, + 0x75, 0x74, 0x12, 0x89, 0x02, 0x0a, 0x07, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x12, 0x27, + 0x2e, 0x6c, 0x6d, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x6c, 0x6d, 0x73, 0x2e, 0x61, 0x75, + 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x66, + 0x72, 0x65, 0x73, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0xaa, 0x01, 0x92, 0x41, 0x8a, 0x01, 0x0a, 0x0e, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, + 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0d, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, + 0x68, 0x20, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x1a, 0x31, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x20, 0x74, + 0x68, 0x65, 0x20, 0x63, 0x6f, 0x6f, 0x6b, 0x69, 0x65, 0x73, 0x20, 0x20, 0x61, 0x6e, 0x64, 0x20, + 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, 0x20, 0x6e, 0x65, 0x77, 0x20, 0x20, 0x61, 0x63, 0x63, + 0x65, 0x73, 0x73, 0x20, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x72, 0x36, 0x0a, 0x34, 0x0a, 0x0e, + 0x58, 0x2d, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1e, + 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x69, 0x64, 0x65, + 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x20, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, + 0x28, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x16, 0x22, 0x14, 0x2f, 0x6c, 0x6d, 0x73, 0x2f, 0x76, + 0x31, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x12, 0xcf, + 0x01, 0x0a, 0x08, 0x53, 0x65, 0x74, 0x55, 0x70, 0x4d, 0x46, 0x41, 0x12, 0x23, 0x2e, 0x6c, 0x6d, + 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x2e, 0x4d, 0x46, 0x41, 0x53, 0x65, 0x74, 0x55, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x24, 0x2e, 0x6c, 0x6d, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4d, 0x46, 0x41, 0x53, 0x65, 0x74, 0x55, 0x70, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x78, 0x92, 0x41, 0x54, 0x0a, 0x0e, 0x41, 0x75, 0x74, + 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0a, 0x53, 0x65, 0x74, + 0x20, 0x55, 0x50, 0x20, 0x4d, 0x46, 0x41, 0x72, 0x36, 0x0a, 0x34, 0x0a, 0x0e, 0x58, 0x2d, 0x4f, + 0x72, 0x67, 0x61, 0x6e, 0x69, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1e, 0x4f, 0x72, 0x67, + 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, + 0x66, 0x69, 0x65, 0x72, 0x20, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x28, 0x01, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x1b, 0x3a, 0x01, 0x2a, 0x22, 0x16, 0x2f, 0x6c, 0x6d, 0x73, 0x2f, 0x76, + 0x31, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x73, 0x65, 0x74, 0x75, 0x70, 0x2d, 0x6d, 0x66, 0x61, + 0x42, 0xc9, 0x03, 0x92, 0x41, 0x81, 0x03, 0x12, 0xe6, 0x01, 0x0a, 0x1a, 0x4c, 0x4d, 0x53, 0x20, + 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x53, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x3d, 0x41, 0x50, 0x49, 0x20, 0x66, 0x6f, 0x72, 0x20, + 0x75, 0x73, 0x65, 0x72, 0x20, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x4c, 0x65, 0x61, 0x72, 0x6e, + 0x69, 0x6e, 0x67, 0x20, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x53, + 0x79, 0x73, 0x74, 0x65, 0x6d, 0x22, 0x44, 0x0a, 0x08, 0x4c, 0x4d, 0x53, 0x20, 0x54, 0x65, 0x61, + 0x6d, 0x12, 0x1f, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x6c, 0x6d, 0x73, 0x2e, 0x65, + 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x75, 0x70, 0x70, 0x6f, + 0x72, 0x74, 0x1a, 0x17, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x40, 0x6c, 0x6d, 0x73, 0x2e, + 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2a, 0x3e, 0x0a, 0x0a, 0x41, + 0x70, 0x61, 0x63, 0x68, 0x65, 0x20, 0x32, 0x2e, 0x30, 0x12, 0x30, 0x68, 0x74, 0x74, 0x70, 0x73, + 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x61, 0x70, 0x61, 0x63, 0x68, 0x65, 0x2e, 0x6f, 0x72, + 0x67, 0x2f, 0x6c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x73, 0x2f, 0x4c, 0x49, 0x43, 0x45, 0x4e, + 0x53, 0x45, 0x2d, 0x32, 0x2e, 0x30, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x32, 0x03, 0x31, 0x2e, 0x30, + 0x1a, 0x0e, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73, 0x74, 0x3a, 0x38, 0x30, 0x38, 0x36, + 0x22, 0x03, 0x2f, 0x76, 0x31, 0x2a, 0x02, 0x02, 0x01, 0x32, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x3a, 0x10, 0x61, 0x70, 0x70, + 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x5a, 0x4b, 0x0a, + 0x49, 0x0a, 0x06, 0x42, 0x65, 0x61, 0x72, 0x65, 0x72, 0x12, 0x3f, 0x08, 0x02, 0x12, 0x2a, 0x41, + 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x74, 0x6f, + 0x6b, 0x65, 0x6e, 0x2c, 0x20, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x65, 0x64, 0x20, 0x77, 0x69, + 0x74, 0x68, 0x20, 0x42, 0x65, 0x61, 0x72, 0x65, 0x72, 0x1a, 0x0d, 0x41, 0x75, 0x74, 0x68, 0x6f, + 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x02, 0x62, 0x0c, 0x0a, 0x0a, 0x0a, 0x06, + 0x42, 0x65, 0x61, 0x72, 0x65, 0x72, 0x12, 0x00, 0x5a, 0x42, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x2d, 0x74, 0x65, 0x6e, 0x61, 0x6e, + 0x74, 0x2d, 0x63, 0x6d, 0x73, 0x2d, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2f, 0x6c, 0x6d, 0x73, + 0x2d, 0x73, 0x79, 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x67, 0x65, 0x6e, 0x2f, 0x61, 0x75, + 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, +} -var file_authentication_service_authentication_proto_goTypes = []any{ +var file_authentication_service_authentication_proto_goTypes = []interface{}{ (*RegisterRequest)(nil), // 0: lms.authentication.RegisterRequest (*EmailVerifyRequest)(nil), // 1: lms.authentication.EmailVerifyRequest (*LoginRequest)(nil), // 2: lms.authentication.LoginRequest @@ -152,7 +291,7 @@ func file_authentication_service_authentication_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_authentication_service_authentication_proto_rawDesc), len(file_authentication_service_authentication_proto_rawDesc)), + RawDescriptor: file_authentication_service_authentication_proto_rawDesc, NumEnums: 0, NumMessages: 0, NumExtensions: 0, @@ -162,6 +301,7 @@ func file_authentication_service_authentication_proto_init() { DependencyIndexes: file_authentication_service_authentication_proto_depIdxs, }.Build() File_authentication_service_authentication_proto = out.File + file_authentication_service_authentication_proto_rawDesc = nil file_authentication_service_authentication_proto_goTypes = nil file_authentication_service_authentication_proto_depIdxs = nil } diff --git a/backend/lms-main-system/protogen/authentication/service.authentication_grpc.pb.go b/backend/lms-main-system/protogen/authentication/service.authentication_grpc.pb.go index 2bb187c..280910b 100644 --- a/backend/lms-main-system/protogen/authentication/service.authentication_grpc.pb.go +++ b/backend/lms-main-system/protogen/authentication/service.authentication_grpc.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.5.1 -// - protoc v6.30.2 +// - protoc v3.21.12 // source: authentication/service.authentication.proto package authentication diff --git a/backend/lms-main-system/protogen/files/service.file.pb.go b/backend/lms-main-system/protogen/files/service.file.pb.go index 013ffed..3e79fa6 100644 --- a/backend/lms-main-system/protogen/files/service.file.pb.go +++ b/backend/lms-main-system/protogen/files/service.file.pb.go @@ -1,20 +1,18 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.6 -// protoc v6.30.2 +// protoc-gen-go v1.33.0 +// protoc v3.21.12 // source: files/service.file.proto package files import ( - _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" timestamppb "google.golang.org/protobuf/types/known/timestamppb" reflect "reflect" sync "sync" - unsafe "unsafe" ) const ( @@ -80,21 +78,24 @@ func (FileStatusResponse_Status) EnumDescriptor() ([]byte, []int) { } type UploadFileRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Types that are valid to be assigned to Data: + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Data: // // *UploadFileRequest_Metadata // *UploadFileRequest_Chunk - Data isUploadFileRequest_Data `protobuf_oneof:"data"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + Data isUploadFileRequest_Data `protobuf_oneof:"data"` } func (x *UploadFileRequest) Reset() { *x = UploadFileRequest{} - mi := &file_files_service_file_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_files_service_file_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *UploadFileRequest) String() string { @@ -105,7 +106,7 @@ func (*UploadFileRequest) ProtoMessage() {} func (x *UploadFileRequest) ProtoReflect() protoreflect.Message { mi := &file_files_service_file_proto_msgTypes[0] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -120,27 +121,23 @@ func (*UploadFileRequest) Descriptor() ([]byte, []int) { return file_files_service_file_proto_rawDescGZIP(), []int{0} } -func (x *UploadFileRequest) GetData() isUploadFileRequest_Data { - if x != nil { - return x.Data +func (m *UploadFileRequest) GetData() isUploadFileRequest_Data { + if m != nil { + return m.Data } return nil } func (x *UploadFileRequest) GetMetadata() *FileMetadata { - if x != nil { - if x, ok := x.Data.(*UploadFileRequest_Metadata); ok { - return x.Metadata - } + if x, ok := x.GetData().(*UploadFileRequest_Metadata); ok { + return x.Metadata } return nil } func (x *UploadFileRequest) GetChunk() []byte { - if x != nil { - if x, ok := x.Data.(*UploadFileRequest_Chunk); ok { - return x.Chunk - } + if x, ok := x.GetData().(*UploadFileRequest_Chunk); ok { + return x.Chunk } return nil } @@ -162,19 +159,22 @@ func (*UploadFileRequest_Metadata) isUploadFileRequest_Data() {} func (*UploadFileRequest_Chunk) isUploadFileRequest_Data() {} type FileMetadata struct { - state protoimpl.MessageState `protogen:"open.v1"` - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"` - Labels map[string]string `protobuf:"bytes,3,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - unknownFields protoimpl.UnknownFields + state protoimpl.MessageState sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"` + Labels map[string]string `protobuf:"bytes,3,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` } func (x *FileMetadata) Reset() { *x = FileMetadata{} - mi := &file_files_service_file_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_files_service_file_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *FileMetadata) String() string { @@ -185,7 +185,7 @@ func (*FileMetadata) ProtoMessage() {} func (x *FileMetadata) ProtoReflect() protoreflect.Message { mi := &file_files_service_file_proto_msgTypes[1] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -222,17 +222,20 @@ func (x *FileMetadata) GetLabels() map[string]string { } type UploadFileResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - unknownFields protoimpl.UnknownFields + state protoimpl.MessageState sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` } func (x *UploadFileResponse) Reset() { *x = UploadFileResponse{} - mi := &file_files_service_file_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_files_service_file_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *UploadFileResponse) String() string { @@ -243,7 +246,7 @@ func (*UploadFileResponse) ProtoMessage() {} func (x *UploadFileResponse) ProtoReflect() protoreflect.Message { mi := &file_files_service_file_proto_msgTypes[2] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -266,17 +269,20 @@ func (x *UploadFileResponse) GetId() string { } type GetFileStatusRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - unknownFields protoimpl.UnknownFields + state protoimpl.MessageState sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` } func (x *GetFileStatusRequest) Reset() { *x = GetFileStatusRequest{} - mi := &file_files_service_file_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_files_service_file_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GetFileStatusRequest) String() string { @@ -287,7 +293,7 @@ func (*GetFileStatusRequest) ProtoMessage() {} func (x *GetFileStatusRequest) ProtoReflect() protoreflect.Message { mi := &file_files_service_file_proto_msgTypes[3] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -310,23 +316,26 @@ func (x *GetFileStatusRequest) GetId() string { } type FileStatusResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Status FileStatusResponse_Status `protobuf:"varint,2,opt,name=status,proto3,enum=lms.files.FileStatusResponse_Status" json:"status,omitempty"` - IpfsCid string `protobuf:"bytes,3,opt,name=ipfs_cid,json=ipfsCid,proto3" json:"ipfs_cid,omitempty"` - ErrorMessage string `protobuf:"bytes,4,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"` - QueuedAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=queued_at,json=queuedAt,proto3" json:"queued_at,omitempty"` - StartedAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=started_at,json=startedAt,proto3" json:"started_at,omitempty"` - CompletedAt *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=completed_at,json=completedAt,proto3" json:"completed_at,omitempty"` - unknownFields protoimpl.UnknownFields + state protoimpl.MessageState sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Status FileStatusResponse_Status `protobuf:"varint,2,opt,name=status,proto3,enum=lms.files.FileStatusResponse_Status" json:"status,omitempty"` + IpfsCid string `protobuf:"bytes,3,opt,name=ipfs_cid,json=ipfsCid,proto3" json:"ipfs_cid,omitempty"` + ErrorMessage string `protobuf:"bytes,4,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"` + QueuedAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=queued_at,json=queuedAt,proto3" json:"queued_at,omitempty"` + StartedAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=started_at,json=startedAt,proto3" json:"started_at,omitempty"` + CompletedAt *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=completed_at,json=completedAt,proto3" json:"completed_at,omitempty"` } func (x *FileStatusResponse) Reset() { *x = FileStatusResponse{} - mi := &file_files_service_file_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_files_service_file_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *FileStatusResponse) String() string { @@ -337,7 +346,7 @@ func (*FileStatusResponse) ProtoMessage() {} func (x *FileStatusResponse) ProtoReflect() protoreflect.Message { mi := &file_files_service_file_proto_msgTypes[4] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -403,62 +412,99 @@ func (x *FileStatusResponse) GetCompletedAt() *timestamppb.Timestamp { var File_files_service_file_proto protoreflect.FileDescriptor -const file_files_service_file_proto_rawDesc = "" + - "\n" + - "\x18files/service.file.proto\x12\tlms.files\x1a\x1cgoogle/api/annotations.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a.protoc-gen-openapiv2/options/annotations.proto\"j\n" + - "\x11UploadFileRequest\x125\n" + - "\bmetadata\x18\x01 \x01(\v2\x17.lms.files.FileMetadataH\x00R\bmetadata\x12\x16\n" + - "\x05chunk\x18\x02 \x01(\fH\x00R\x05chunkB\x06\n" + - "\x04data\"\xae\x01\n" + - "\fFileMetadata\x12\x12\n" + - "\x04name\x18\x01 \x01(\tR\x04name\x12\x12\n" + - "\x04type\x18\x02 \x01(\tR\x04type\x12;\n" + - "\x06labels\x18\x03 \x03(\v2#.lms.files.FileMetadata.LabelsEntryR\x06labels\x1a9\n" + - "\vLabelsEntry\x12\x10\n" + - "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + - "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"$\n" + - "\x12UploadFileResponse\x12\x0e\n" + - "\x02id\x18\x01 \x01(\tR\x02id\"&\n" + - "\x14GetFileStatusRequest\x12\x0e\n" + - "\x02id\x18\x01 \x01(\tR\x02id\"\xae\x03\n" + - "\x12FileStatusResponse\x12\x0e\n" + - "\x02id\x18\x01 \x01(\tR\x02id\x12<\n" + - "\x06status\x18\x02 \x01(\x0e2$.lms.files.FileStatusResponse.StatusR\x06status\x12\x19\n" + - "\bipfs_cid\x18\x03 \x01(\tR\aipfsCid\x12#\n" + - "\rerror_message\x18\x04 \x01(\tR\ferrorMessage\x127\n" + - "\tqueued_at\x18\x05 \x01(\v2\x1a.google.protobuf.TimestampR\bqueuedAt\x129\n" + - "\n" + - "started_at\x18\x06 \x01(\v2\x1a.google.protobuf.TimestampR\tstartedAt\x12=\n" + - "\fcompleted_at\x18\a \x01(\v2\x1a.google.protobuf.TimestampR\vcompletedAt\"W\n" + - "\x06Status\x12\x16\n" + - "\x12STATUS_UNSPECIFIED\x10\x00\x12\n" + - "\n" + - "\x06QUEUED\x10\x01\x12\x0e\n" + - "\n" + - "PROCESSING\x10\x02\x12\r\n" + - "\tCOMPLETED\x10\x03\x12\n" + - "\n" + - "\x06FAILED\x10\x042\xe0\x01\n" + - "\vFileService\x12a\n" + - "\n" + - "UploadFile\x12\x1c.lms.files.UploadFileRequest\x1a\x1d.lms.files.UploadFileResponse\"\x14\x82\xd3\xe4\x93\x02\x0e:\x01*\"\t/v1/files(\x01\x12n\n" + - "\rGetFileStatus\x12\x1f.lms.files.GetFileStatusRequest\x1a\x1d.lms.files.FileStatusResponse\"\x1d\x82\xd3\xe4\x93\x02\x17\x12\x15/v1/files/{id}/statusB\n" + - "\n" + - "Apache 2.0\x120https://www.apache.org/licenses/LICENSE-2.0.html2\x031.0\x1a\x0elocalhost:8086\"\x03/v1*\x02\x02\x012\x10application/json:\x10application/jsonZK\n" + - "I\n" + - "\x06Bearer\x12?\b\x02\x12*Authentication token, prefixed with Bearer\x1a\rAuthorization \x02b\f\n" + - "\n" + - "\n" + - "\x06Bearer\x12\x00Z:github.com/multi-tenant-cms-golang/lms-sys/protogen/lessonb\x06proto3" +var file_lesson_service_lesson_proto_rawDesc = []byte{ + 0x0a, 0x1b, 0x6c, 0x65, 0x73, 0x73, 0x6f, 0x6e, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x2e, 0x6c, 0x65, 0x73, 0x73, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x6c, + 0x6d, 0x73, 0x2e, 0x6c, 0x65, 0x73, 0x73, 0x6f, 0x6e, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2f, + 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x6c, 0x65, 0x73, 0x73, 0x6f, 0x6e, 0x2f, + 0x72, 0x70, 0x63, 0x5f, 0x6c, 0x65, 0x73, 0x73, 0x6f, 0x6e, 0x5f, 0x67, 0x65, 0x74, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x6c, 0x65, 0x73, 0x73, 0x6f, 0x6e, 0x2f, 0x72, 0x70, 0x63, + 0x5f, 0x6c, 0x65, 0x73, 0x73, 0x6f, 0x6e, 0x5f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x6c, 0x65, 0x73, 0x73, 0x6f, 0x6e, 0x2f, 0x72, 0x70, 0x63, + 0x5f, 0x6c, 0x65, 0x73, 0x73, 0x6f, 0x6e, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x6c, 0x65, 0x73, 0x73, 0x6f, 0x6e, 0x2f, 0x72, 0x70, 0x63, + 0x5f, 0x6c, 0x65, 0x73, 0x73, 0x6f, 0x6e, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x32, 0xe5, 0x04, 0x0a, 0x0d, 0x4c, 0x65, 0x73, 0x73, 0x6f, 0x6e, 0x53, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x6d, 0x0a, 0x0c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x4c, 0x65, 0x73, 0x73, 0x6f, 0x6e, 0x12, 0x1f, 0x2e, 0x6c, 0x6d, 0x73, 0x2e, 0x6c, 0x65, 0x73, + 0x73, 0x6f, 0x6e, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4c, 0x65, 0x73, 0x73, 0x6f, 0x6e, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x6c, 0x6d, 0x73, 0x2e, 0x6c, 0x65, + 0x73, 0x73, 0x6f, 0x6e, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4c, 0x65, 0x73, 0x73, 0x6f, + 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1a, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x14, 0x3a, 0x01, 0x2a, 0x22, 0x0f, 0x2f, 0x6c, 0x6d, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x6c, 0x65, + 0x73, 0x73, 0x6f, 0x6e, 0x73, 0x12, 0x72, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x4c, 0x65, 0x73, 0x73, + 0x6f, 0x6e, 0x42, 0x79, 0x49, 0x64, 0x12, 0x20, 0x2e, 0x6c, 0x6d, 0x73, 0x2e, 0x6c, 0x65, 0x73, + 0x73, 0x6f, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x65, 0x73, 0x73, 0x6f, 0x6e, 0x42, 0x79, 0x49, + 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x6c, 0x6d, 0x73, 0x2e, 0x6c, + 0x65, 0x73, 0x73, 0x6f, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x65, 0x73, 0x73, 0x6f, 0x6e, 0x42, + 0x79, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1c, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x16, 0x12, 0x14, 0x2f, 0x6c, 0x6d, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x6c, 0x65, 0x73, + 0x73, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x8d, 0x01, 0x0a, 0x17, 0x47, 0x65, + 0x74, 0x41, 0x6c, 0x6c, 0x4c, 0x65, 0x73, 0x73, 0x6f, 0x6e, 0x73, 0x42, 0x79, 0x4d, 0x6f, 0x64, + 0x75, 0x6c, 0x65, 0x49, 0x64, 0x12, 0x27, 0x2e, 0x6c, 0x6d, 0x73, 0x2e, 0x6c, 0x65, 0x73, 0x73, + 0x6f, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x65, 0x73, 0x73, 0x6f, 0x6e, 0x73, 0x42, 0x79, 0x4d, + 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, + 0x2e, 0x6c, 0x6d, 0x73, 0x2e, 0x6c, 0x65, 0x73, 0x73, 0x6f, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x4c, + 0x65, 0x73, 0x73, 0x6f, 0x6e, 0x73, 0x42, 0x79, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x49, 0x64, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, + 0x12, 0x17, 0x2f, 0x6c, 0x6d, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, + 0x73, 0x2f, 0x6c, 0x65, 0x73, 0x73, 0x6f, 0x6e, 0x73, 0x12, 0x72, 0x0a, 0x0c, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x4c, 0x65, 0x73, 0x73, 0x6f, 0x6e, 0x12, 0x1f, 0x2e, 0x6c, 0x6d, 0x73, 0x2e, + 0x6c, 0x65, 0x73, 0x73, 0x6f, 0x6e, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4c, 0x65, 0x73, + 0x73, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x6c, 0x6d, 0x73, + 0x2e, 0x6c, 0x65, 0x73, 0x73, 0x6f, 0x6e, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4c, 0x65, + 0x73, 0x73, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1f, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x19, 0x3a, 0x01, 0x2a, 0x1a, 0x14, 0x2f, 0x6c, 0x6d, 0x73, 0x2f, 0x76, 0x31, + 0x2f, 0x6c, 0x65, 0x73, 0x73, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x6d, 0x0a, + 0x0d, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4c, 0x65, 0x73, 0x73, 0x6f, 0x6e, 0x73, 0x12, 0x20, + 0x2e, 0x6c, 0x6d, 0x73, 0x2e, 0x6c, 0x65, 0x73, 0x73, 0x6f, 0x6e, 0x2e, 0x44, 0x65, 0x6c, 0x65, + 0x74, 0x65, 0x4c, 0x65, 0x73, 0x73, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x21, 0x2e, 0x6c, 0x6d, 0x73, 0x2e, 0x6c, 0x65, 0x73, 0x73, 0x6f, 0x6e, 0x2e, 0x44, 0x65, + 0x6c, 0x65, 0x74, 0x65, 0x4c, 0x65, 0x73, 0x73, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x17, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x11, 0x2a, 0x0f, 0x2f, 0x6c, 0x6d, + 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x6c, 0x65, 0x73, 0x73, 0x6f, 0x6e, 0x73, 0x42, 0xaf, 0x03, 0x92, + 0x41, 0xef, 0x02, 0x12, 0xd4, 0x01, 0x0a, 0x14, 0x4c, 0x4d, 0x53, 0x20, 0x4c, 0x65, 0x73, 0x73, + 0x6f, 0x6e, 0x20, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x31, 0x41, 0x50, + 0x49, 0x73, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x6c, 0x65, 0x73, 0x73, 0x6f, 0x6e, 0x20, 0x69, 0x6e, + 0x20, 0x74, 0x68, 0x65, 0x20, 0x4c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x20, 0x4d, 0x61, + 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x22, + 0x44, 0x0a, 0x08, 0x4c, 0x4d, 0x53, 0x20, 0x54, 0x65, 0x61, 0x6d, 0x12, 0x1f, 0x68, 0x74, 0x74, + 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x6c, 0x6d, 0x73, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x1a, 0x17, 0x73, 0x75, + 0x70, 0x70, 0x6f, 0x72, 0x74, 0x40, 0x6c, 0x6d, 0x73, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, + 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2a, 0x3e, 0x0a, 0x0a, 0x41, 0x70, 0x61, 0x63, 0x68, 0x65, 0x20, + 0x32, 0x2e, 0x30, 0x12, 0x30, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, + 0x2e, 0x61, 0x70, 0x61, 0x63, 0x68, 0x65, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x6c, 0x69, 0x63, 0x65, + 0x6e, 0x73, 0x65, 0x73, 0x2f, 0x4c, 0x49, 0x43, 0x45, 0x4e, 0x53, 0x45, 0x2d, 0x32, 0x2e, 0x30, + 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x32, 0x03, 0x31, 0x2e, 0x30, 0x1a, 0x0e, 0x6c, 0x6f, 0x63, 0x61, + 0x6c, 0x68, 0x6f, 0x73, 0x74, 0x3a, 0x38, 0x30, 0x38, 0x36, 0x22, 0x03, 0x2f, 0x76, 0x31, 0x2a, + 0x02, 0x02, 0x01, 0x32, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x3a, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x5a, 0x4b, 0x0a, 0x49, 0x0a, 0x06, 0x42, 0x65, 0x61, + 0x72, 0x65, 0x72, 0x12, 0x3f, 0x08, 0x02, 0x12, 0x2a, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, + 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x2c, 0x20, 0x70, + 0x72, 0x65, 0x66, 0x69, 0x78, 0x65, 0x64, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x42, 0x65, 0x61, + 0x72, 0x65, 0x72, 0x1a, 0x0d, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x20, 0x02, 0x62, 0x0c, 0x0a, 0x0a, 0x0a, 0x06, 0x42, 0x65, 0x61, 0x72, 0x65, 0x72, + 0x12, 0x00, 0x5a, 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6d, + 0x75, 0x6c, 0x74, 0x69, 0x2d, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x2d, 0x63, 0x6d, 0x73, 0x2d, + 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2f, 0x6c, 0x6d, 0x73, 0x2d, 0x73, 0x79, 0x73, 0x2f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x67, 0x65, 0x6e, 0x2f, 0x6c, 0x65, 0x73, 0x73, 0x6f, 0x6e, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} -var file_lesson_service_lesson_proto_goTypes = []any{ +var file_lesson_service_lesson_proto_goTypes = []interface{}{ (*CreateLessonRequest)(nil), // 0: lms.lesson.CreateLessonRequest (*GetLessonByIdRequest)(nil), // 1: lms.lesson.GetLessonByIdRequest (*GetLessonsByModuleIdRequest)(nil), // 2: lms.lesson.GetLessonsByModuleIdRequest @@ -87,7 +151,7 @@ func file_lesson_service_lesson_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_lesson_service_lesson_proto_rawDesc), len(file_lesson_service_lesson_proto_rawDesc)), + RawDescriptor: file_lesson_service_lesson_proto_rawDesc, NumEnums: 0, NumMessages: 0, NumExtensions: 0, @@ -97,6 +161,7 @@ func file_lesson_service_lesson_proto_init() { DependencyIndexes: file_lesson_service_lesson_proto_depIdxs, }.Build() File_lesson_service_lesson_proto = out.File + file_lesson_service_lesson_proto_rawDesc = nil file_lesson_service_lesson_proto_goTypes = nil file_lesson_service_lesson_proto_depIdxs = nil } diff --git a/backend/lms-main-system/protogen/lesson/service.lesson_grpc.pb.go b/backend/lms-main-system/protogen/lesson/service.lesson_grpc.pb.go index 047d5e2..89dfa6c 100644 --- a/backend/lms-main-system/protogen/lesson/service.lesson_grpc.pb.go +++ b/backend/lms-main-system/protogen/lesson/service.lesson_grpc.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.5.1 -// - protoc v6.30.2 +// - protoc v3.21.12 // source: lesson/service.lesson.proto package lesson diff --git a/backend/lms-main-system/protogen/modules/module.pb.go b/backend/lms-main-system/protogen/modules/module.pb.go index 5784493..171a298 100644 --- a/backend/lms-main-system/protogen/modules/module.pb.go +++ b/backend/lms-main-system/protogen/modules/module.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.6 -// protoc v6.30.2 +// protoc-gen-go v1.33.0 +// protoc v3.21.12 // source: modules/module.proto package module @@ -12,7 +12,6 @@ import ( timestamppb "google.golang.org/protobuf/types/known/timestamppb" reflect "reflect" sync "sync" - unsafe "unsafe" ) const ( @@ -23,22 +22,25 @@ const ( ) type Module struct { - state protoimpl.MessageState `protogen:"open.v1"` - ModuleId string `protobuf:"bytes,1,opt,name=module_id,json=moduleId,proto3" json:"module_id,omitempty"` - ModuleName string `protobuf:"bytes,2,opt,name=module_name,json=moduleName,proto3" json:"module_name,omitempty"` - CourseId string `protobuf:"bytes,3,opt,name=course_id,json=courseId,proto3" json:"course_id,omitempty"` - Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"` - CreatedAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` - UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` - unknownFields protoimpl.UnknownFields + state protoimpl.MessageState sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ModuleId string `protobuf:"bytes,1,opt,name=module_id,json=moduleId,proto3" json:"module_id,omitempty"` + ModuleName string `protobuf:"bytes,2,opt,name=module_name,json=moduleName,proto3" json:"module_name,omitempty"` + CourseId string `protobuf:"bytes,3,opt,name=course_id,json=courseId,proto3" json:"course_id,omitempty"` + Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"` + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` } func (x *Module) Reset() { *x = Module{} - mi := &file_modules_module_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_modules_module_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Module) String() string { @@ -49,7 +51,7 @@ func (*Module) ProtoMessage() {} func (x *Module) ProtoReflect() protoreflect.Message { mi := &file_modules_module_proto_msgTypes[0] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -108,34 +110,48 @@ func (x *Module) GetUpdatedAt() *timestamppb.Timestamp { var File_modules_module_proto protoreflect.FileDescriptor -const file_modules_module_proto_rawDesc = "" + - "\n" + - "\x14modules/module.proto\x12\vlms.modules\x1a\x1fgoogle/protobuf/timestamp.proto\"\xfb\x01\n" + - "\x06Module\x12\x1b\n" + - "\tmodule_id\x18\x01 \x01(\tR\bmoduleId\x12\x1f\n" + - "\vmodule_name\x18\x02 \x01(\tR\n" + - "moduleName\x12\x1b\n" + - "\tcourse_id\x18\x03 \x01(\tR\bcourseId\x12 \n" + - "\vdescription\x18\x04 \x01(\tR\vdescription\x129\n" + - "\n" + - "created_at\x18\x05 \x01(\v2\x1a.google.protobuf.TimestampR\tcreatedAt\x129\n" + - "\n" + - "updated_at\x18\x06 \x01(\v2\x1a.google.protobuf.TimestampR\tupdatedAtB@Z>github.com/multi-tenant-cms-doc-golang/lms-sys/protogen/moduleb\x06proto3" +var file_modules_module_proto_rawDesc = []byte{ + 0x0a, 0x14, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0b, 0x6c, 0x6d, 0x73, 0x2e, 0x6d, 0x6f, 0x64, 0x75, + 0x6c, 0x65, 0x73, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xfb, 0x01, 0x0a, 0x06, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x12, + 0x1b, 0x0a, 0x09, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x08, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, + 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0a, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, + 0x09, 0x63, 0x6f, 0x75, 0x72, 0x73, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x08, 0x63, 0x6f, 0x75, 0x72, 0x73, 0x65, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, + 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x39, 0x0a, 0x0a, + 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, + 0x41, 0x74, 0x42, 0x40, 0x5a, 0x3e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x2d, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x2d, 0x63, 0x6d, + 0x73, 0x2d, 0x64, 0x6f, 0x63, 0x2d, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2f, 0x6c, 0x6d, 0x73, + 0x2d, 0x73, 0x79, 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x67, 0x65, 0x6e, 0x2f, 0x6d, 0x6f, + 0x64, 0x75, 0x6c, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} var ( file_modules_module_proto_rawDescOnce sync.Once - file_modules_module_proto_rawDescData []byte + file_modules_module_proto_rawDescData = file_modules_module_proto_rawDesc ) func file_modules_module_proto_rawDescGZIP() []byte { file_modules_module_proto_rawDescOnce.Do(func() { - file_modules_module_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_modules_module_proto_rawDesc), len(file_modules_module_proto_rawDesc))) + file_modules_module_proto_rawDescData = protoimpl.X.CompressGZIP(file_modules_module_proto_rawDescData) }) return file_modules_module_proto_rawDescData } var file_modules_module_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_modules_module_proto_goTypes = []any{ +var file_modules_module_proto_goTypes = []interface{}{ (*Module)(nil), // 0: lms.modules.Module (*timestamppb.Timestamp)(nil), // 1: google.protobuf.Timestamp } @@ -154,11 +170,25 @@ func file_modules_module_proto_init() { if File_modules_module_proto != nil { return } + if !protoimpl.UnsafeEnabled { + file_modules_module_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Module); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_modules_module_proto_rawDesc), len(file_modules_module_proto_rawDesc)), + RawDescriptor: file_modules_module_proto_rawDesc, NumEnums: 0, NumMessages: 1, NumExtensions: 0, @@ -169,6 +199,7 @@ func file_modules_module_proto_init() { MessageInfos: file_modules_module_proto_msgTypes, }.Build() File_modules_module_proto = out.File + file_modules_module_proto_rawDesc = nil file_modules_module_proto_goTypes = nil file_modules_module_proto_depIdxs = nil } diff --git a/backend/lms-main-system/protogen/modules/rpc_create_module.pb.go b/backend/lms-main-system/protogen/modules/rpc_create_module.pb.go index 7021cd2..84fcdd7 100644 --- a/backend/lms-main-system/protogen/modules/rpc_create_module.pb.go +++ b/backend/lms-main-system/protogen/modules/rpc_create_module.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.6 -// protoc v6.30.2 +// protoc-gen-go v1.33.0 +// protoc v3.21.12 // source: modules/rpc_create_module.proto package module @@ -11,7 +11,6 @@ import ( protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" - unsafe "unsafe" ) const ( @@ -22,19 +21,22 @@ const ( ) type CreateModuleRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - ModuleName string `protobuf:"bytes,1,opt,name=module_name,json=moduleName,proto3" json:"module_name,omitempty"` - CourseId string `protobuf:"bytes,2,opt,name=course_id,json=courseId,proto3" json:"course_id,omitempty"` - Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` - unknownFields protoimpl.UnknownFields + state protoimpl.MessageState sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ModuleName string `protobuf:"bytes,1,opt,name=module_name,json=moduleName,proto3" json:"module_name,omitempty"` + CourseId string `protobuf:"bytes,2,opt,name=course_id,json=courseId,proto3" json:"course_id,omitempty"` + Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` } func (x *CreateModuleRequest) Reset() { *x = CreateModuleRequest{} - mi := &file_modules_rpc_create_module_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_modules_rpc_create_module_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *CreateModuleRequest) String() string { @@ -45,7 +47,7 @@ func (*CreateModuleRequest) ProtoMessage() {} func (x *CreateModuleRequest) ProtoReflect() protoreflect.Message { mi := &file_modules_rpc_create_module_proto_msgTypes[0] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -82,17 +84,20 @@ func (x *CreateModuleRequest) GetDescription() string { } type CreateModuleResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - Module *Module `protobuf:"bytes,1,opt,name=module,proto3" json:"module,omitempty"` - unknownFields protoimpl.UnknownFields + state protoimpl.MessageState sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Module *Module `protobuf:"bytes,1,opt,name=module,proto3" json:"module,omitempty"` } func (x *CreateModuleResponse) Reset() { *x = CreateModuleResponse{} - mi := &file_modules_rpc_create_module_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_modules_rpc_create_module_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *CreateModuleResponse) String() string { @@ -103,7 +108,7 @@ func (*CreateModuleResponse) ProtoMessage() {} func (x *CreateModuleResponse) ProtoReflect() protoreflect.Message { mi := &file_modules_rpc_create_module_proto_msgTypes[1] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -127,31 +132,44 @@ func (x *CreateModuleResponse) GetModule() *Module { var File_modules_rpc_create_module_proto protoreflect.FileDescriptor -const file_modules_rpc_create_module_proto_rawDesc = "" + - "\n" + - "\x1fmodules/rpc_create_module.proto\x12\vlms.modules\x1a\x14modules/module.proto\"u\n" + - "\x13CreateModuleRequest\x12\x1f\n" + - "\vmodule_name\x18\x01 \x01(\tR\n" + - "moduleName\x12\x1b\n" + - "\tcourse_id\x18\x02 \x01(\tR\bcourseId\x12 \n" + - "\vdescription\x18\x03 \x01(\tR\vdescription\"C\n" + - "\x14CreateModuleResponse\x12+\n" + - "\x06module\x18\x01 \x01(\v2\x13.lms.modules.ModuleR\x06moduleB@Z>github.com/multi-tenant-cms-doc-golang/lms-sys/protogen/moduleb\x06proto3" +var file_modules_rpc_create_module_proto_rawDesc = []byte{ + 0x0a, 0x1f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x2f, 0x72, 0x70, 0x63, 0x5f, 0x63, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x12, 0x0b, 0x6c, 0x6d, 0x73, 0x2e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x1a, 0x14, + 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x75, 0x0a, 0x13, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4d, 0x6f, + 0x64, 0x75, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x6d, + 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0a, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, + 0x63, 0x6f, 0x75, 0x72, 0x73, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x08, 0x63, 0x6f, 0x75, 0x72, 0x73, 0x65, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, + 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, + 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x43, 0x0a, 0x14, 0x43, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x2b, 0x0a, 0x06, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6c, 0x6d, 0x73, 0x2e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, + 0x73, 0x2e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x52, 0x06, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, + 0x42, 0x40, 0x5a, 0x3e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6d, + 0x75, 0x6c, 0x74, 0x69, 0x2d, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x2d, 0x63, 0x6d, 0x73, 0x2d, + 0x64, 0x6f, 0x63, 0x2d, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2f, 0x6c, 0x6d, 0x73, 0x2d, 0x73, + 0x79, 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x67, 0x65, 0x6e, 0x2f, 0x6d, 0x6f, 0x64, 0x75, + 0x6c, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} var ( file_modules_rpc_create_module_proto_rawDescOnce sync.Once - file_modules_rpc_create_module_proto_rawDescData []byte + file_modules_rpc_create_module_proto_rawDescData = file_modules_rpc_create_module_proto_rawDesc ) func file_modules_rpc_create_module_proto_rawDescGZIP() []byte { file_modules_rpc_create_module_proto_rawDescOnce.Do(func() { - file_modules_rpc_create_module_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_modules_rpc_create_module_proto_rawDesc), len(file_modules_rpc_create_module_proto_rawDesc))) + file_modules_rpc_create_module_proto_rawDescData = protoimpl.X.CompressGZIP(file_modules_rpc_create_module_proto_rawDescData) }) return file_modules_rpc_create_module_proto_rawDescData } var file_modules_rpc_create_module_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_modules_rpc_create_module_proto_goTypes = []any{ +var file_modules_rpc_create_module_proto_goTypes = []interface{}{ (*CreateModuleRequest)(nil), // 0: lms.modules.CreateModuleRequest (*CreateModuleResponse)(nil), // 1: lms.modules.CreateModuleResponse (*Module)(nil), // 2: lms.modules.Module @@ -171,11 +189,37 @@ func file_modules_rpc_create_module_proto_init() { return } file_modules_module_proto_init() + if !protoimpl.UnsafeEnabled { + file_modules_rpc_create_module_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateModuleRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_modules_rpc_create_module_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateModuleResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_modules_rpc_create_module_proto_rawDesc), len(file_modules_rpc_create_module_proto_rawDesc)), + RawDescriptor: file_modules_rpc_create_module_proto_rawDesc, NumEnums: 0, NumMessages: 2, NumExtensions: 0, @@ -186,6 +230,7 @@ func file_modules_rpc_create_module_proto_init() { MessageInfos: file_modules_rpc_create_module_proto_msgTypes, }.Build() File_modules_rpc_create_module_proto = out.File + file_modules_rpc_create_module_proto_rawDesc = nil file_modules_rpc_create_module_proto_goTypes = nil file_modules_rpc_create_module_proto_depIdxs = nil } diff --git a/backend/lms-main-system/protogen/modules/rpc_delete_modules.pb.go b/backend/lms-main-system/protogen/modules/rpc_delete_modules.pb.go index 980726f..b85d8c4 100644 --- a/backend/lms-main-system/protogen/modules/rpc_delete_modules.pb.go +++ b/backend/lms-main-system/protogen/modules/rpc_delete_modules.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.6 -// protoc v6.30.2 +// protoc-gen-go v1.33.0 +// protoc v3.21.12 // source: modules/rpc_delete_modules.proto package module @@ -11,7 +11,6 @@ import ( protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" - unsafe "unsafe" ) const ( @@ -22,18 +21,21 @@ const ( ) type DeleteModulesRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Ids []string `protobuf:"bytes,1,rep,name=ids,proto3" json:"ids,omitempty"` - ForceDelete bool `protobuf:"varint,2,opt,name=force_delete,json=forceDelete,proto3" json:"force_delete,omitempty"` - unknownFields protoimpl.UnknownFields + state protoimpl.MessageState sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Ids []string `protobuf:"bytes,1,rep,name=ids,proto3" json:"ids,omitempty"` + ForceDelete bool `protobuf:"varint,2,opt,name=force_delete,json=forceDelete,proto3" json:"force_delete,omitempty"` } func (x *DeleteModulesRequest) Reset() { *x = DeleteModulesRequest{} - mi := &file_modules_rpc_delete_modules_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_modules_rpc_delete_modules_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *DeleteModulesRequest) String() string { @@ -44,7 +46,7 @@ func (*DeleteModulesRequest) ProtoMessage() {} func (x *DeleteModulesRequest) ProtoReflect() protoreflect.Message { mi := &file_modules_rpc_delete_modules_proto_msgTypes[0] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -74,17 +76,20 @@ func (x *DeleteModulesRequest) GetForceDelete() bool { } type DeleteModulesResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` - unknownFields protoimpl.UnknownFields + state protoimpl.MessageState sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` } func (x *DeleteModulesResponse) Reset() { *x = DeleteModulesResponse{} - mi := &file_modules_rpc_delete_modules_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_modules_rpc_delete_modules_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *DeleteModulesResponse) String() string { @@ -95,7 +100,7 @@ func (*DeleteModulesResponse) ProtoMessage() {} func (x *DeleteModulesResponse) ProtoReflect() protoreflect.Message { mi := &file_modules_rpc_delete_modules_proto_msgTypes[1] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -119,29 +124,39 @@ func (x *DeleteModulesResponse) GetMessage() string { var File_modules_rpc_delete_modules_proto protoreflect.FileDescriptor -const file_modules_rpc_delete_modules_proto_rawDesc = "" + - "\n" + - " modules/rpc_delete_modules.proto\x12\vlms.modules\"K\n" + - "\x14DeleteModulesRequest\x12\x10\n" + - "\x03ids\x18\x01 \x03(\tR\x03ids\x12!\n" + - "\fforce_delete\x18\x02 \x01(\bR\vforceDelete\"1\n" + - "\x15DeleteModulesResponse\x12\x18\n" + - "\amessage\x18\x01 \x01(\tR\amessageB@Z>github.com/multi-tenant-cms-doc-golang/lms-sys/protogen/moduleb\x06proto3" +var file_modules_rpc_delete_modules_proto_rawDesc = []byte{ + 0x0a, 0x20, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x2f, 0x72, 0x70, 0x63, 0x5f, 0x64, 0x65, + 0x6c, 0x65, 0x74, 0x65, 0x5f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x0b, 0x6c, 0x6d, 0x73, 0x2e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x22, + 0x4b, 0x0a, 0x14, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x69, 0x64, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x03, 0x69, 0x64, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x66, 0x6f, 0x72, + 0x63, 0x65, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x0b, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x22, 0x31, 0x0a, 0x15, + 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x42, + 0x40, 0x5a, 0x3e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6d, 0x75, + 0x6c, 0x74, 0x69, 0x2d, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x2d, 0x63, 0x6d, 0x73, 0x2d, 0x64, + 0x6f, 0x63, 0x2d, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2f, 0x6c, 0x6d, 0x73, 0x2d, 0x73, 0x79, + 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x67, 0x65, 0x6e, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, + 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} var ( file_modules_rpc_delete_modules_proto_rawDescOnce sync.Once - file_modules_rpc_delete_modules_proto_rawDescData []byte + file_modules_rpc_delete_modules_proto_rawDescData = file_modules_rpc_delete_modules_proto_rawDesc ) func file_modules_rpc_delete_modules_proto_rawDescGZIP() []byte { file_modules_rpc_delete_modules_proto_rawDescOnce.Do(func() { - file_modules_rpc_delete_modules_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_modules_rpc_delete_modules_proto_rawDesc), len(file_modules_rpc_delete_modules_proto_rawDesc))) + file_modules_rpc_delete_modules_proto_rawDescData = protoimpl.X.CompressGZIP(file_modules_rpc_delete_modules_proto_rawDescData) }) return file_modules_rpc_delete_modules_proto_rawDescData } var file_modules_rpc_delete_modules_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_modules_rpc_delete_modules_proto_goTypes = []any{ +var file_modules_rpc_delete_modules_proto_goTypes = []interface{}{ (*DeleteModulesRequest)(nil), // 0: lms.modules.DeleteModulesRequest (*DeleteModulesResponse)(nil), // 1: lms.modules.DeleteModulesResponse } @@ -158,11 +173,37 @@ func file_modules_rpc_delete_modules_proto_init() { if File_modules_rpc_delete_modules_proto != nil { return } + if !protoimpl.UnsafeEnabled { + file_modules_rpc_delete_modules_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteModulesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_modules_rpc_delete_modules_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteModulesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_modules_rpc_delete_modules_proto_rawDesc), len(file_modules_rpc_delete_modules_proto_rawDesc)), + RawDescriptor: file_modules_rpc_delete_modules_proto_rawDesc, NumEnums: 0, NumMessages: 2, NumExtensions: 0, @@ -173,6 +214,7 @@ func file_modules_rpc_delete_modules_proto_init() { MessageInfos: file_modules_rpc_delete_modules_proto_msgTypes, }.Build() File_modules_rpc_delete_modules_proto = out.File + file_modules_rpc_delete_modules_proto_rawDesc = nil file_modules_rpc_delete_modules_proto_goTypes = nil file_modules_rpc_delete_modules_proto_depIdxs = nil } diff --git a/backend/lms-main-system/protogen/modules/rpc_get_module.pb.go b/backend/lms-main-system/protogen/modules/rpc_get_module.pb.go index a51cde2..f0cb3b5 100644 --- a/backend/lms-main-system/protogen/modules/rpc_get_module.pb.go +++ b/backend/lms-main-system/protogen/modules/rpc_get_module.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.6 -// protoc v6.30.2 +// protoc-gen-go v1.33.0 +// protoc v3.21.12 // source: modules/rpc_get_module.proto package module @@ -11,7 +11,6 @@ import ( protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" - unsafe "unsafe" ) const ( @@ -22,17 +21,20 @@ const ( ) type GetModuleRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - ModuleId string `protobuf:"bytes,1,opt,name=module_id,json=moduleId,proto3" json:"module_id,omitempty"` - unknownFields protoimpl.UnknownFields + state protoimpl.MessageState sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ModuleId string `protobuf:"bytes,1,opt,name=module_id,json=moduleId,proto3" json:"module_id,omitempty"` } func (x *GetModuleRequest) Reset() { *x = GetModuleRequest{} - mi := &file_modules_rpc_get_module_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_modules_rpc_get_module_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GetModuleRequest) String() string { @@ -43,7 +45,7 @@ func (*GetModuleRequest) ProtoMessage() {} func (x *GetModuleRequest) ProtoReflect() protoreflect.Message { mi := &file_modules_rpc_get_module_proto_msgTypes[0] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -66,17 +68,20 @@ func (x *GetModuleRequest) GetModuleId() string { } type GetModuleResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - Module *Module `protobuf:"bytes,1,opt,name=module,proto3" json:"module,omitempty"` - unknownFields protoimpl.UnknownFields + state protoimpl.MessageState sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Module *Module `protobuf:"bytes,1,opt,name=module,proto3" json:"module,omitempty"` } func (x *GetModuleResponse) Reset() { *x = GetModuleResponse{} - mi := &file_modules_rpc_get_module_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_modules_rpc_get_module_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GetModuleResponse) String() string { @@ -87,7 +92,7 @@ func (*GetModuleResponse) ProtoMessage() {} func (x *GetModuleResponse) ProtoReflect() protoreflect.Message { mi := &file_modules_rpc_get_module_proto_msgTypes[1] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -111,28 +116,39 @@ func (x *GetModuleResponse) GetModule() *Module { var File_modules_rpc_get_module_proto protoreflect.FileDescriptor -const file_modules_rpc_get_module_proto_rawDesc = "" + - "\n" + - "\x1cmodules/rpc_get_module.proto\x12\vlms.modules\x1a\x14modules/module.proto\"/\n" + - "\x10GetModuleRequest\x12\x1b\n" + - "\tmodule_id\x18\x01 \x01(\tR\bmoduleId\"@\n" + - "\x11GetModuleResponse\x12+\n" + - "\x06module\x18\x01 \x01(\v2\x13.lms.modules.ModuleR\x06moduleB@Z>github.com/multi-tenant-cms-doc-golang/lms-sys/protogen/moduleb\x06proto3" +var file_modules_rpc_get_module_proto_rawDesc = []byte{ + 0x0a, 0x1c, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x2f, 0x72, 0x70, 0x63, 0x5f, 0x67, 0x65, + 0x74, 0x5f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0b, + 0x6c, 0x6d, 0x73, 0x2e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x1a, 0x14, 0x6d, 0x6f, 0x64, + 0x75, 0x6c, 0x65, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x22, 0x2f, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5f, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, + 0x49, 0x64, 0x22, 0x40, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2b, 0x0a, 0x06, 0x6d, 0x6f, 0x64, 0x75, 0x6c, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6c, 0x6d, 0x73, 0x2e, 0x6d, 0x6f, + 0x64, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x52, 0x06, 0x6d, 0x6f, + 0x64, 0x75, 0x6c, 0x65, 0x42, 0x40, 0x5a, 0x3e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x2d, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x2d, + 0x63, 0x6d, 0x73, 0x2d, 0x64, 0x6f, 0x63, 0x2d, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2f, 0x6c, + 0x6d, 0x73, 0x2d, 0x73, 0x79, 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x67, 0x65, 0x6e, 0x2f, + 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} var ( file_modules_rpc_get_module_proto_rawDescOnce sync.Once - file_modules_rpc_get_module_proto_rawDescData []byte + file_modules_rpc_get_module_proto_rawDescData = file_modules_rpc_get_module_proto_rawDesc ) func file_modules_rpc_get_module_proto_rawDescGZIP() []byte { file_modules_rpc_get_module_proto_rawDescOnce.Do(func() { - file_modules_rpc_get_module_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_modules_rpc_get_module_proto_rawDesc), len(file_modules_rpc_get_module_proto_rawDesc))) + file_modules_rpc_get_module_proto_rawDescData = protoimpl.X.CompressGZIP(file_modules_rpc_get_module_proto_rawDescData) }) return file_modules_rpc_get_module_proto_rawDescData } var file_modules_rpc_get_module_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_modules_rpc_get_module_proto_goTypes = []any{ +var file_modules_rpc_get_module_proto_goTypes = []interface{}{ (*GetModuleRequest)(nil), // 0: lms.modules.GetModuleRequest (*GetModuleResponse)(nil), // 1: lms.modules.GetModuleResponse (*Module)(nil), // 2: lms.modules.Module @@ -152,11 +168,37 @@ func file_modules_rpc_get_module_proto_init() { return } file_modules_module_proto_init() + if !protoimpl.UnsafeEnabled { + file_modules_rpc_get_module_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetModuleRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_modules_rpc_get_module_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetModuleResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_modules_rpc_get_module_proto_rawDesc), len(file_modules_rpc_get_module_proto_rawDesc)), + RawDescriptor: file_modules_rpc_get_module_proto_rawDesc, NumEnums: 0, NumMessages: 2, NumExtensions: 0, @@ -167,6 +209,7 @@ func file_modules_rpc_get_module_proto_init() { MessageInfos: file_modules_rpc_get_module_proto_msgTypes, }.Build() File_modules_rpc_get_module_proto = out.File + file_modules_rpc_get_module_proto_rawDesc = nil file_modules_rpc_get_module_proto_goTypes = nil file_modules_rpc_get_module_proto_depIdxs = nil } diff --git a/backend/lms-main-system/protogen/modules/rpc_list_modules.pb.go b/backend/lms-main-system/protogen/modules/rpc_list_modules.pb.go index d8ea318..6b94df1 100644 --- a/backend/lms-main-system/protogen/modules/rpc_list_modules.pb.go +++ b/backend/lms-main-system/protogen/modules/rpc_list_modules.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.6 -// protoc v6.30.2 +// protoc-gen-go v1.33.0 +// protoc v3.21.12 // source: modules/rpc_list_modules.proto package module @@ -11,7 +11,6 @@ import ( protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" - unsafe "unsafe" ) const ( @@ -22,17 +21,20 @@ const ( ) type ListModulesResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - Modules []*Module `protobuf:"bytes,1,rep,name=modules,proto3" json:"modules,omitempty"` - unknownFields protoimpl.UnknownFields + state protoimpl.MessageState sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Modules []*Module `protobuf:"bytes,1,rep,name=modules,proto3" json:"modules,omitempty"` } func (x *ListModulesResponse) Reset() { *x = ListModulesResponse{} - mi := &file_modules_rpc_list_modules_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_modules_rpc_list_modules_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ListModulesResponse) String() string { @@ -43,7 +45,7 @@ func (*ListModulesResponse) ProtoMessage() {} func (x *ListModulesResponse) ProtoReflect() protoreflect.Message { mi := &file_modules_rpc_list_modules_proto_msgTypes[0] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -67,26 +69,37 @@ func (x *ListModulesResponse) GetModules() []*Module { var File_modules_rpc_list_modules_proto protoreflect.FileDescriptor -const file_modules_rpc_list_modules_proto_rawDesc = "" + - "\n" + - "\x1emodules/rpc_list_modules.proto\x12\vlms.modules\x1a\x14modules/module.proto\"D\n" + - "\x13ListModulesResponse\x12-\n" + - "\amodules\x18\x01 \x03(\v2\x13.lms.modules.ModuleR\amodulesB@Z>github.com/multi-tenant-cms-doc-golang/lms-sys/protogen/moduleb\x06proto3" +var file_modules_rpc_list_modules_proto_rawDesc = []byte{ + 0x0a, 0x1e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x2f, 0x72, 0x70, 0x63, 0x5f, 0x6c, 0x69, + 0x73, 0x74, 0x5f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x12, 0x0b, 0x6c, 0x6d, 0x73, 0x2e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x1a, 0x14, 0x6d, + 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x22, 0x44, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x6f, 0x64, 0x75, 0x6c, + 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2d, 0x0a, 0x07, 0x6d, 0x6f, + 0x64, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6c, 0x6d, + 0x73, 0x2e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, + 0x52, 0x07, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x42, 0x40, 0x5a, 0x3e, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x2d, 0x74, 0x65, + 0x6e, 0x61, 0x6e, 0x74, 0x2d, 0x63, 0x6d, 0x73, 0x2d, 0x64, 0x6f, 0x63, 0x2d, 0x67, 0x6f, 0x6c, + 0x61, 0x6e, 0x67, 0x2f, 0x6c, 0x6d, 0x73, 0x2d, 0x73, 0x79, 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x67, 0x65, 0x6e, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, +} var ( file_modules_rpc_list_modules_proto_rawDescOnce sync.Once - file_modules_rpc_list_modules_proto_rawDescData []byte + file_modules_rpc_list_modules_proto_rawDescData = file_modules_rpc_list_modules_proto_rawDesc ) func file_modules_rpc_list_modules_proto_rawDescGZIP() []byte { file_modules_rpc_list_modules_proto_rawDescOnce.Do(func() { - file_modules_rpc_list_modules_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_modules_rpc_list_modules_proto_rawDesc), len(file_modules_rpc_list_modules_proto_rawDesc))) + file_modules_rpc_list_modules_proto_rawDescData = protoimpl.X.CompressGZIP(file_modules_rpc_list_modules_proto_rawDescData) }) return file_modules_rpc_list_modules_proto_rawDescData } var file_modules_rpc_list_modules_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_modules_rpc_list_modules_proto_goTypes = []any{ +var file_modules_rpc_list_modules_proto_goTypes = []interface{}{ (*ListModulesResponse)(nil), // 0: lms.modules.ListModulesResponse (*Module)(nil), // 1: lms.modules.Module } @@ -105,11 +118,25 @@ func file_modules_rpc_list_modules_proto_init() { return } file_modules_module_proto_init() + if !protoimpl.UnsafeEnabled { + file_modules_rpc_list_modules_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListModulesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_modules_rpc_list_modules_proto_rawDesc), len(file_modules_rpc_list_modules_proto_rawDesc)), + RawDescriptor: file_modules_rpc_list_modules_proto_rawDesc, NumEnums: 0, NumMessages: 1, NumExtensions: 0, @@ -120,6 +147,7 @@ func file_modules_rpc_list_modules_proto_init() { MessageInfos: file_modules_rpc_list_modules_proto_msgTypes, }.Build() File_modules_rpc_list_modules_proto = out.File + file_modules_rpc_list_modules_proto_rawDesc = nil file_modules_rpc_list_modules_proto_goTypes = nil file_modules_rpc_list_modules_proto_depIdxs = nil } diff --git a/backend/lms-main-system/protogen/modules/rpc_update_module.pb.go b/backend/lms-main-system/protogen/modules/rpc_update_module.pb.go index bdab215..c5cb0be 100644 --- a/backend/lms-main-system/protogen/modules/rpc_update_module.pb.go +++ b/backend/lms-main-system/protogen/modules/rpc_update_module.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.6 -// protoc v6.30.2 +// protoc-gen-go v1.33.0 +// protoc v3.21.12 // source: modules/rpc_update_module.proto package module @@ -11,7 +11,6 @@ import ( protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" - unsafe "unsafe" ) const ( @@ -22,20 +21,23 @@ const ( ) type UpdateModuleRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - ModuleId string `protobuf:"bytes,1,opt,name=module_id,json=moduleId,proto3" json:"module_id,omitempty"` - ModuleName *string `protobuf:"bytes,2,opt,name=module_name,json=moduleName,proto3,oneof" json:"module_name,omitempty"` - CourseId *string `protobuf:"bytes,3,opt,name=course_id,json=courseId,proto3,oneof" json:"course_id,omitempty"` - Description *string `protobuf:"bytes,4,opt,name=description,proto3,oneof" json:"description,omitempty"` - unknownFields protoimpl.UnknownFields + state protoimpl.MessageState sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ModuleId string `protobuf:"bytes,1,opt,name=module_id,json=moduleId,proto3" json:"module_id,omitempty"` + ModuleName *string `protobuf:"bytes,2,opt,name=module_name,json=moduleName,proto3,oneof" json:"module_name,omitempty"` + CourseId *string `protobuf:"bytes,3,opt,name=course_id,json=courseId,proto3,oneof" json:"course_id,omitempty"` + Description *string `protobuf:"bytes,4,opt,name=description,proto3,oneof" json:"description,omitempty"` } func (x *UpdateModuleRequest) Reset() { *x = UpdateModuleRequest{} - mi := &file_modules_rpc_update_module_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_modules_rpc_update_module_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *UpdateModuleRequest) String() string { @@ -46,7 +48,7 @@ func (*UpdateModuleRequest) ProtoMessage() {} func (x *UpdateModuleRequest) ProtoReflect() protoreflect.Message { mi := &file_modules_rpc_update_module_proto_msgTypes[0] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -90,17 +92,20 @@ func (x *UpdateModuleRequest) GetDescription() string { } type UpdateModuleResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - Module *Module `protobuf:"bytes,1,opt,name=module,proto3" json:"module,omitempty"` - unknownFields protoimpl.UnknownFields + state protoimpl.MessageState sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Module *Module `protobuf:"bytes,1,opt,name=module,proto3" json:"module,omitempty"` } func (x *UpdateModuleResponse) Reset() { *x = UpdateModuleResponse{} - mi := &file_modules_rpc_update_module_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_modules_rpc_update_module_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *UpdateModuleResponse) String() string { @@ -111,7 +116,7 @@ func (*UpdateModuleResponse) ProtoMessage() {} func (x *UpdateModuleResponse) ProtoReflect() protoreflect.Message { mi := &file_modules_rpc_update_module_proto_msgTypes[1] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -135,36 +140,50 @@ func (x *UpdateModuleResponse) GetModule() *Module { var File_modules_rpc_update_module_proto protoreflect.FileDescriptor -const file_modules_rpc_update_module_proto_rawDesc = "" + - "\n" + - "\x1fmodules/rpc_update_module.proto\x12\vlms.modules\x1a\x14modules/module.proto\"\xcf\x01\n" + - "\x13UpdateModuleRequest\x12\x1b\n" + - "\tmodule_id\x18\x01 \x01(\tR\bmoduleId\x12$\n" + - "\vmodule_name\x18\x02 \x01(\tH\x00R\n" + - "moduleName\x88\x01\x01\x12 \n" + - "\tcourse_id\x18\x03 \x01(\tH\x01R\bcourseId\x88\x01\x01\x12%\n" + - "\vdescription\x18\x04 \x01(\tH\x02R\vdescription\x88\x01\x01B\x0e\n" + - "\f_module_nameB\f\n" + - "\n" + - "_course_idB\x0e\n" + - "\f_description\"C\n" + - "\x14UpdateModuleResponse\x12+\n" + - "\x06module\x18\x01 \x01(\v2\x13.lms.modules.ModuleR\x06moduleB@Z>github.com/multi-tenant-cms-doc-golang/lms-sys/protogen/moduleb\x06proto3" +var file_modules_rpc_update_module_proto_rawDesc = []byte{ + 0x0a, 0x1f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x2f, 0x72, 0x70, 0x63, 0x5f, 0x75, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x12, 0x0b, 0x6c, 0x6d, 0x73, 0x2e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x1a, 0x14, + 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xcf, 0x01, 0x0a, 0x13, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, + 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, + 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x08, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x49, 0x64, 0x12, 0x24, 0x0a, 0x0b, 0x6d, 0x6f, 0x64, + 0x75, 0x6c, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, + 0x52, 0x0a, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, + 0x20, 0x0a, 0x09, 0x63, 0x6f, 0x75, 0x72, 0x73, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x48, 0x01, 0x52, 0x08, 0x63, 0x6f, 0x75, 0x72, 0x73, 0x65, 0x49, 0x64, 0x88, 0x01, + 0x01, 0x12, 0x25, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x6d, 0x6f, 0x64, + 0x75, 0x6c, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x63, 0x6f, 0x75, + 0x72, 0x73, 0x65, 0x5f, 0x69, 0x64, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x64, 0x65, 0x73, 0x63, 0x72, + 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x43, 0x0a, 0x14, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2b, + 0x0a, 0x06, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, + 0x2e, 0x6c, 0x6d, 0x73, 0x2e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x4d, 0x6f, 0x64, + 0x75, 0x6c, 0x65, 0x52, 0x06, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x42, 0x40, 0x5a, 0x3e, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x2d, + 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x2d, 0x63, 0x6d, 0x73, 0x2d, 0x64, 0x6f, 0x63, 0x2d, 0x67, + 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2f, 0x6c, 0x6d, 0x73, 0x2d, 0x73, 0x79, 0x73, 0x2f, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x67, 0x65, 0x6e, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, +} var ( file_modules_rpc_update_module_proto_rawDescOnce sync.Once - file_modules_rpc_update_module_proto_rawDescData []byte + file_modules_rpc_update_module_proto_rawDescData = file_modules_rpc_update_module_proto_rawDesc ) func file_modules_rpc_update_module_proto_rawDescGZIP() []byte { file_modules_rpc_update_module_proto_rawDescOnce.Do(func() { - file_modules_rpc_update_module_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_modules_rpc_update_module_proto_rawDesc), len(file_modules_rpc_update_module_proto_rawDesc))) + file_modules_rpc_update_module_proto_rawDescData = protoimpl.X.CompressGZIP(file_modules_rpc_update_module_proto_rawDescData) }) return file_modules_rpc_update_module_proto_rawDescData } var file_modules_rpc_update_module_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_modules_rpc_update_module_proto_goTypes = []any{ +var file_modules_rpc_update_module_proto_goTypes = []interface{}{ (*UpdateModuleRequest)(nil), // 0: lms.modules.UpdateModuleRequest (*UpdateModuleResponse)(nil), // 1: lms.modules.UpdateModuleResponse (*Module)(nil), // 2: lms.modules.Module @@ -184,12 +203,38 @@ func file_modules_rpc_update_module_proto_init() { return } file_modules_module_proto_init() - file_modules_rpc_update_module_proto_msgTypes[0].OneofWrappers = []any{} + if !protoimpl.UnsafeEnabled { + file_modules_rpc_update_module_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateModuleRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_modules_rpc_update_module_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateModuleResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_modules_rpc_update_module_proto_msgTypes[0].OneofWrappers = []interface{}{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_modules_rpc_update_module_proto_rawDesc), len(file_modules_rpc_update_module_proto_rawDesc)), + RawDescriptor: file_modules_rpc_update_module_proto_rawDesc, NumEnums: 0, NumMessages: 2, NumExtensions: 0, @@ -200,6 +245,7 @@ func file_modules_rpc_update_module_proto_init() { MessageInfos: file_modules_rpc_update_module_proto_msgTypes, }.Build() File_modules_rpc_update_module_proto = out.File + file_modules_rpc_update_module_proto_rawDesc = nil file_modules_rpc_update_module_proto_goTypes = nil file_modules_rpc_update_module_proto_depIdxs = nil } diff --git a/backend/lms-main-system/protogen/modules/service.module.pb.go b/backend/lms-main-system/protogen/modules/service.module.pb.go index 9cf9bc7..361cf1d 100644 --- a/backend/lms-main-system/protogen/modules/service.module.pb.go +++ b/backend/lms-main-system/protogen/modules/service.module.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.6 -// protoc v6.30.2 +// protoc-gen-go v1.33.0 +// protoc v3.21.12 // source: modules/service.module.proto package module @@ -13,7 +13,6 @@ import ( protoimpl "google.golang.org/protobuf/runtime/protoimpl" emptypb "google.golang.org/protobuf/types/known/emptypb" reflect "reflect" - unsafe "unsafe" ) const ( @@ -25,17 +24,84 @@ const ( var File_modules_service_module_proto protoreflect.FileDescriptor -const file_modules_service_module_proto_rawDesc = "" + - "\n" + - "\x1cmodules/service.module.proto\x12\vlms.modules\x1a.protoc-gen-openapiv2/options/annotations.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1fmodules/rpc_create_module.proto\x1a modules/rpc_delete_modules.proto\x1a\x1cmodules/rpc_get_module.proto\x1a\x1emodules/rpc_list_modules.proto\x1a\x1fmodules/rpc_update_module.proto2\x90\x06\n" + - "\rModuleService\x12\x95\x01\n" + - "\fCreateModule\x12 .lms.modules.CreateModuleRequest\x1a!.lms.modules.CreateModuleResponse\"@\x92A$\x12\rCreate module\x1a\x13Create a new module\x82\xd3\xe4\x93\x02\x13:\x01*\"\x0e/lms/v1/module\x12\xa7\x01\n" + - "\fUpdateModule\x12 .lms.modules.UpdateModuleRequest\x1a!.lms.modules.UpdateModuleResponse\"R\x92A*\x12\rUpdate module\x1a\x19Update an existing module\x82\xd3\xe4\x93\x02\x1f:\x01*\x1a\x1a/lms/v1/module/{module_id}\x12\xa2\x01\n" + - "\rDeleteModules\x12!.lms.modules.DeleteModulesRequest\x1a\".lms.modules.DeleteModulesResponse\"J\x92A1\x12\rDelete module\x1a Delete single or multiple module\x82\xd3\xe4\x93\x02\x10*\x0e/lms/v1/module\x12\x87\x01\n" + - "\vListModules\x12\x16.google.protobuf.Empty\x1a .lms.modules.ListModulesResponse\">\x92A%\x12\x0eGet all module\x1a\x13List/Get all module\x82\xd3\xe4\x93\x02\x10\x12\x0e/lms/v1/module\x12\x8d\x01\n" + - "\tGetModule\x12\x1d.lms.modules.GetModuleRequest\x1a\x1e.lms.modules.GetModuleResponse\"A\x92A\x1c\x12\fGet a module\x1a\fGet a module\x82\xd3\xe4\x93\x02\x1c\x12\x1a/lms/v1/module/{module_id}B@Z>github.com/multi-tenant-cms-doc-golang/lms-sys/protogen/moduleb\x06proto3" +var file_modules_service_module_proto_rawDesc = []byte{ + 0x0a, 0x1c, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x2e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0b, + 0x6c, 0x6d, 0x73, 0x2e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x1a, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, + 0x32, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x2f, + 0x72, 0x70, 0x63, 0x5f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, + 0x2f, 0x72, 0x70, 0x63, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x5f, 0x6d, 0x6f, 0x64, 0x75, + 0x6c, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x6d, 0x6f, 0x64, 0x75, 0x6c, + 0x65, 0x73, 0x2f, 0x72, 0x70, 0x63, 0x5f, 0x67, 0x65, 0x74, 0x5f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, + 0x2f, 0x72, 0x70, 0x63, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x5f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, + 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, + 0x2f, 0x72, 0x70, 0x63, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x6f, 0x64, 0x75, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x90, 0x06, 0x0a, 0x0d, 0x4d, 0x6f, 0x64, + 0x75, 0x6c, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x95, 0x01, 0x0a, 0x0c, 0x43, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x12, 0x20, 0x2e, 0x6c, 0x6d, + 0x73, 0x2e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, + 0x6c, 0x6d, 0x73, 0x2e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x40, 0x92, 0x41, 0x24, 0x12, 0x0d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x20, 0x6d, 0x6f, + 0x64, 0x75, 0x6c, 0x65, 0x1a, 0x13, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x20, 0x61, 0x20, 0x6e, + 0x65, 0x77, 0x20, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x3a, + 0x01, 0x2a, 0x22, 0x0e, 0x2f, 0x6c, 0x6d, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x6f, 0x64, 0x75, + 0x6c, 0x65, 0x12, 0xa7, 0x01, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x6f, 0x64, + 0x75, 0x6c, 0x65, 0x12, 0x20, 0x2e, 0x6c, 0x6d, 0x73, 0x2e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, + 0x73, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x6c, 0x6d, 0x73, 0x2e, 0x6d, 0x6f, 0x64, 0x75, + 0x6c, 0x65, 0x73, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x52, 0x92, 0x41, 0x2a, 0x12, 0x0d, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x20, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x1a, 0x19, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x20, 0x61, 0x6e, 0x20, 0x65, 0x78, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, + 0x20, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x3a, 0x01, 0x2a, + 0x1a, 0x1a, 0x2f, 0x6c, 0x6d, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, + 0x2f, 0x7b, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5f, 0x69, 0x64, 0x7d, 0x12, 0xa2, 0x01, 0x0a, + 0x0d, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x21, + 0x2e, 0x6c, 0x6d, 0x73, 0x2e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x44, 0x65, 0x6c, + 0x65, 0x74, 0x65, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x22, 0x2e, 0x6c, 0x6d, 0x73, 0x2e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x2e, + 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4a, 0x92, 0x41, 0x31, 0x12, 0x0d, 0x44, 0x65, 0x6c, 0x65, + 0x74, 0x65, 0x20, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x1a, 0x20, 0x44, 0x65, 0x6c, 0x65, 0x74, + 0x65, 0x20, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x20, 0x6f, 0x72, 0x20, 0x6d, 0x75, 0x6c, 0x74, + 0x69, 0x70, 0x6c, 0x65, 0x20, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x10, 0x2a, 0x0e, 0x2f, 0x6c, 0x6d, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, + 0x65, 0x12, 0x87, 0x01, 0x0a, 0x0b, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, + 0x73, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x20, 0x2e, 0x6c, 0x6d, 0x73, 0x2e, + 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x6f, 0x64, 0x75, + 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3e, 0x92, 0x41, 0x25, + 0x12, 0x0e, 0x47, 0x65, 0x74, 0x20, 0x61, 0x6c, 0x6c, 0x20, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, + 0x1a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x2f, 0x47, 0x65, 0x74, 0x20, 0x61, 0x6c, 0x6c, 0x20, 0x6d, + 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x10, 0x12, 0x0e, 0x2f, 0x6c, 0x6d, + 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x12, 0x8d, 0x01, 0x0a, 0x09, + 0x47, 0x65, 0x74, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x12, 0x1d, 0x2e, 0x6c, 0x6d, 0x73, 0x2e, + 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x4d, 0x6f, 0x64, 0x75, 0x6c, + 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x6c, 0x6d, 0x73, 0x2e, 0x6d, + 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x41, 0x92, 0x41, 0x1c, 0x12, 0x0c, 0x47, + 0x65, 0x74, 0x20, 0x61, 0x20, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x1a, 0x0c, 0x47, 0x65, 0x74, + 0x20, 0x61, 0x20, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1c, 0x12, + 0x1a, 0x2f, 0x6c, 0x6d, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2f, + 0x7b, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5f, 0x69, 0x64, 0x7d, 0x42, 0x40, 0x5a, 0x3e, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x2d, + 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x2d, 0x63, 0x6d, 0x73, 0x2d, 0x64, 0x6f, 0x63, 0x2d, 0x67, + 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2f, 0x6c, 0x6d, 0x73, 0x2d, 0x73, 0x79, 0x73, 0x2f, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x67, 0x65, 0x6e, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, +} -var file_modules_service_module_proto_goTypes = []any{ +var file_modules_service_module_proto_goTypes = []interface{}{ (*CreateModuleRequest)(nil), // 0: lms.modules.CreateModuleRequest (*UpdateModuleRequest)(nil), // 1: lms.modules.UpdateModuleRequest (*DeleteModulesRequest)(nil), // 2: lms.modules.DeleteModulesRequest @@ -79,7 +145,7 @@ func file_modules_service_module_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_modules_service_module_proto_rawDesc), len(file_modules_service_module_proto_rawDesc)), + RawDescriptor: file_modules_service_module_proto_rawDesc, NumEnums: 0, NumMessages: 0, NumExtensions: 0, @@ -89,6 +155,7 @@ func file_modules_service_module_proto_init() { DependencyIndexes: file_modules_service_module_proto_depIdxs, }.Build() File_modules_service_module_proto = out.File + file_modules_service_module_proto_rawDesc = nil file_modules_service_module_proto_goTypes = nil file_modules_service_module_proto_depIdxs = nil } diff --git a/backend/lms-main-system/protogen/modules/service.module_grpc.pb.go b/backend/lms-main-system/protogen/modules/service.module_grpc.pb.go index 31f55f2..893389f 100644 --- a/backend/lms-main-system/protogen/modules/service.module_grpc.pb.go +++ b/backend/lms-main-system/protogen/modules/service.module_grpc.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.5.1 -// - protoc v6.30.2 +// - protoc v3.21.12 // source: modules/service.module.proto package module diff --git a/backend/lms-main-system/protogen/quiz/quiz.pb.go b/backend/lms-main-system/protogen/quiz/quiz.pb.go new file mode 100644 index 0000000..8364a30 --- /dev/null +++ b/backend/lms-main-system/protogen/quiz/quiz.pb.go @@ -0,0 +1,663 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.33.0 +// protoc v3.21.12 +// source: quiz/quiz.proto + +package quiz + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" +) + +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 Quiz struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + QuizId string `protobuf:"bytes,1,opt,name=quizId,proto3" json:"quizId,omitempty"` + ModuleId string `protobuf:"bytes,2,opt,name=moduleId,proto3" json:"moduleId,omitempty"` + Title string `protobuf:"bytes,3,opt,name=title,proto3" json:"title,omitempty"` + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=createdAt,proto3" json:"createdAt,omitempty"` + UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=updatedAt,proto3" json:"updatedAt,omitempty"` +} + +func (x *Quiz) Reset() { + *x = Quiz{} + if protoimpl.UnsafeEnabled { + mi := &file_quiz_quiz_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Quiz) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Quiz) ProtoMessage() {} + +func (x *Quiz) ProtoReflect() protoreflect.Message { + mi := &file_quiz_quiz_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Quiz.ProtoReflect.Descriptor instead. +func (*Quiz) Descriptor() ([]byte, []int) { + return file_quiz_quiz_proto_rawDescGZIP(), []int{0} +} + +func (x *Quiz) GetQuizId() string { + if x != nil { + return x.QuizId + } + return "" +} + +func (x *Quiz) GetModuleId() string { + if x != nil { + return x.ModuleId + } + return "" +} + +func (x *Quiz) GetTitle() string { + if x != nil { + return x.Title + } + return "" +} + +func (x *Quiz) GetCreatedAt() *timestamppb.Timestamp { + if x != nil { + return x.CreatedAt + } + return nil +} + +func (x *Quiz) GetUpdatedAt() *timestamppb.Timestamp { + if x != nil { + return x.UpdatedAt + } + return nil +} + +type Question struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + QuestionId string `protobuf:"bytes,1,opt,name=questionId,proto3" json:"questionId,omitempty"` + QuizId string `protobuf:"bytes,2,opt,name=quizId,proto3" json:"quizId,omitempty"` + Question string `protobuf:"bytes,3,opt,name=question,proto3" json:"question,omitempty"` + Answers []*Answer `protobuf:"bytes,4,rep,name=answers,proto3" json:"answers,omitempty"` + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=createdAt,proto3" json:"createdAt,omitempty"` + UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=updatedAt,proto3" json:"updatedAt,omitempty"` +} + +func (x *Question) Reset() { + *x = Question{} + if protoimpl.UnsafeEnabled { + mi := &file_quiz_quiz_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Question) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Question) ProtoMessage() {} + +func (x *Question) ProtoReflect() protoreflect.Message { + mi := &file_quiz_quiz_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Question.ProtoReflect.Descriptor instead. +func (*Question) Descriptor() ([]byte, []int) { + return file_quiz_quiz_proto_rawDescGZIP(), []int{1} +} + +func (x *Question) GetQuestionId() string { + if x != nil { + return x.QuestionId + } + return "" +} + +func (x *Question) GetQuizId() string { + if x != nil { + return x.QuizId + } + return "" +} + +func (x *Question) GetQuestion() string { + if x != nil { + return x.Question + } + return "" +} + +func (x *Question) GetAnswers() []*Answer { + if x != nil { + return x.Answers + } + return nil +} + +func (x *Question) GetCreatedAt() *timestamppb.Timestamp { + if x != nil { + return x.CreatedAt + } + return nil +} + +func (x *Question) GetUpdatedAt() *timestamppb.Timestamp { + if x != nil { + return x.UpdatedAt + } + return nil +} + +type Answer struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + AnswerId string `protobuf:"bytes,1,opt,name=answerId,proto3" json:"answerId,omitempty"` + QuestionId string `protobuf:"bytes,2,opt,name=questionId,proto3" json:"questionId,omitempty"` + Answer string `protobuf:"bytes,3,opt,name=answer,proto3" json:"answer,omitempty"` + IsCorrect bool `protobuf:"varint,4,opt,name=isCorrect,proto3" json:"isCorrect,omitempty"` + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=createdAt,proto3" json:"createdAt,omitempty"` + UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=updatedAt,proto3" json:"updatedAt,omitempty"` +} + +func (x *Answer) Reset() { + *x = Answer{} + if protoimpl.UnsafeEnabled { + mi := &file_quiz_quiz_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Answer) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Answer) ProtoMessage() {} + +func (x *Answer) ProtoReflect() protoreflect.Message { + mi := &file_quiz_quiz_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Answer.ProtoReflect.Descriptor instead. +func (*Answer) Descriptor() ([]byte, []int) { + return file_quiz_quiz_proto_rawDescGZIP(), []int{2} +} + +func (x *Answer) GetAnswerId() string { + if x != nil { + return x.AnswerId + } + return "" +} + +func (x *Answer) GetQuestionId() string { + if x != nil { + return x.QuestionId + } + return "" +} + +func (x *Answer) GetAnswer() string { + if x != nil { + return x.Answer + } + return "" +} + +func (x *Answer) GetIsCorrect() bool { + if x != nil { + return x.IsCorrect + } + return false +} + +func (x *Answer) GetCreatedAt() *timestamppb.Timestamp { + if x != nil { + return x.CreatedAt + } + return nil +} + +func (x *Answer) GetUpdatedAt() *timestamppb.Timestamp { + if x != nil { + return x.UpdatedAt + } + return nil +} + +type AnswerOption struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + AnswerId string `protobuf:"bytes,1,opt,name=answerId,proto3" json:"answerId,omitempty"` + Answer string `protobuf:"bytes,2,opt,name=answer,proto3" json:"answer,omitempty"` + IsCorrect bool `protobuf:"varint,3,opt,name=isCorrect,proto3" json:"isCorrect,omitempty"` +} + +func (x *AnswerOption) Reset() { + *x = AnswerOption{} + if protoimpl.UnsafeEnabled { + mi := &file_quiz_quiz_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AnswerOption) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AnswerOption) ProtoMessage() {} + +func (x *AnswerOption) ProtoReflect() protoreflect.Message { + mi := &file_quiz_quiz_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AnswerOption.ProtoReflect.Descriptor instead. +func (*AnswerOption) Descriptor() ([]byte, []int) { + return file_quiz_quiz_proto_rawDescGZIP(), []int{3} +} + +func (x *AnswerOption) GetAnswerId() string { + if x != nil { + return x.AnswerId + } + return "" +} + +func (x *AnswerOption) GetAnswer() string { + if x != nil { + return x.Answer + } + return "" +} + +func (x *AnswerOption) GetIsCorrect() bool { + if x != nil { + return x.IsCorrect + } + return false +} + +type QuestionInput struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Question string `protobuf:"bytes,1,opt,name=question,proto3" json:"question,omitempty"` + AnswerOptions []*AnswerOption `protobuf:"bytes,2,rep,name=answerOptions,proto3" json:"answerOptions,omitempty"` +} + +func (x *QuestionInput) Reset() { + *x = QuestionInput{} + if protoimpl.UnsafeEnabled { + mi := &file_quiz_quiz_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QuestionInput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QuestionInput) ProtoMessage() {} + +func (x *QuestionInput) ProtoReflect() protoreflect.Message { + mi := &file_quiz_quiz_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use QuestionInput.ProtoReflect.Descriptor instead. +func (*QuestionInput) Descriptor() ([]byte, []int) { + return file_quiz_quiz_proto_rawDescGZIP(), []int{4} +} + +func (x *QuestionInput) GetQuestion() string { + if x != nil { + return x.Question + } + return "" +} + +func (x *QuestionInput) GetAnswerOptions() []*AnswerOption { + if x != nil { + return x.AnswerOptions + } + return nil +} + +type QuizResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Quiz *Quiz `protobuf:"bytes,1,opt,name=quiz,proto3" json:"quiz,omitempty"` + Questions []*Question `protobuf:"bytes,2,rep,name=questions,proto3" json:"questions,omitempty"` +} + +func (x *QuizResponse) Reset() { + *x = QuizResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_quiz_quiz_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QuizResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QuizResponse) ProtoMessage() {} + +func (x *QuizResponse) ProtoReflect() protoreflect.Message { + mi := &file_quiz_quiz_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use QuizResponse.ProtoReflect.Descriptor instead. +func (*QuizResponse) Descriptor() ([]byte, []int) { + return file_quiz_quiz_proto_rawDescGZIP(), []int{5} +} + +func (x *QuizResponse) GetQuiz() *Quiz { + if x != nil { + return x.Quiz + } + return nil +} + +func (x *QuizResponse) GetQuestions() []*Question { + if x != nil { + return x.Questions + } + return nil +} + +var File_quiz_quiz_proto protoreflect.FileDescriptor + +var file_quiz_quiz_proto_rawDesc = []byte{ + 0x0a, 0x0f, 0x71, 0x75, 0x69, 0x7a, 0x2f, 0x71, 0x75, 0x69, 0x7a, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x12, 0x08, 0x6c, 0x6d, 0x73, 0x2e, 0x71, 0x75, 0x69, 0x7a, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc4, 0x01, 0x0a, + 0x04, 0x51, 0x75, 0x69, 0x7a, 0x12, 0x16, 0x0a, 0x06, 0x71, 0x75, 0x69, 0x7a, 0x49, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x71, 0x75, 0x69, 0x7a, 0x49, 0x64, 0x12, 0x1a, 0x0a, + 0x08, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x08, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, + 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, + 0x38, 0x0a, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, + 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x38, 0x0a, 0x09, 0x75, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x64, 0x41, 0x74, 0x22, 0xfe, 0x01, 0x0a, 0x08, 0x51, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x1e, 0x0a, 0x0a, 0x71, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x71, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, + 0x12, 0x16, 0x0a, 0x06, 0x71, 0x75, 0x69, 0x7a, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x06, 0x71, 0x75, 0x69, 0x7a, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2a, 0x0a, 0x07, 0x61, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x73, 0x18, + 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x6c, 0x6d, 0x73, 0x2e, 0x71, 0x75, 0x69, 0x7a, + 0x2e, 0x41, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x52, 0x07, 0x61, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x73, + 0x12, 0x38, 0x0a, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, + 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x38, 0x0a, 0x09, 0x75, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x64, 0x41, 0x74, 0x22, 0xee, 0x01, 0x0a, 0x06, 0x41, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x12, + 0x1a, 0x0a, 0x08, 0x61, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x08, 0x61, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0a, 0x71, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x61, + 0x6e, 0x73, 0x77, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x6e, 0x73, + 0x77, 0x65, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x69, 0x73, 0x43, 0x6f, 0x72, 0x72, 0x65, 0x63, 0x74, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x69, 0x73, 0x43, 0x6f, 0x72, 0x72, 0x65, 0x63, + 0x74, 0x12, 0x38, 0x0a, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, + 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x38, 0x0a, 0x09, 0x75, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0x60, 0x0a, 0x0c, 0x41, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x4f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x61, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x49, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x61, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x49, + 0x64, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x06, 0x61, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x69, 0x73, 0x43, + 0x6f, 0x72, 0x72, 0x65, 0x63, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x69, 0x73, + 0x43, 0x6f, 0x72, 0x72, 0x65, 0x63, 0x74, 0x22, 0x69, 0x0a, 0x0d, 0x51, 0x75, 0x65, 0x73, 0x74, + 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3c, 0x0a, 0x0d, 0x61, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x4f, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6c, 0x6d, + 0x73, 0x2e, 0x71, 0x75, 0x69, 0x7a, 0x2e, 0x41, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x4f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x0d, 0x61, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x4f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x22, 0x64, 0x0a, 0x0c, 0x51, 0x75, 0x69, 0x7a, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x22, 0x0a, 0x04, 0x71, 0x75, 0x69, 0x7a, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x0e, 0x2e, 0x6c, 0x6d, 0x73, 0x2e, 0x71, 0x75, 0x69, 0x7a, 0x2e, 0x51, 0x75, 0x69, 0x7a, + 0x52, 0x04, 0x71, 0x75, 0x69, 0x7a, 0x12, 0x30, 0x0a, 0x09, 0x71, 0x75, 0x65, 0x73, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6c, 0x6d, 0x73, 0x2e, + 0x71, 0x75, 0x69, 0x7a, 0x2e, 0x51, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x3a, 0x5a, 0x38, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x2d, 0x74, 0x65, 0x6e, + 0x61, 0x6e, 0x74, 0x2d, 0x63, 0x6d, 0x73, 0x2d, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2f, 0x6c, + 0x6d, 0x73, 0x2d, 0x73, 0x79, 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x67, 0x65, 0x6e, 0x2f, + 0x71, 0x75, 0x69, 0x7a, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_quiz_quiz_proto_rawDescOnce sync.Once + file_quiz_quiz_proto_rawDescData = file_quiz_quiz_proto_rawDesc +) + +func file_quiz_quiz_proto_rawDescGZIP() []byte { + file_quiz_quiz_proto_rawDescOnce.Do(func() { + file_quiz_quiz_proto_rawDescData = protoimpl.X.CompressGZIP(file_quiz_quiz_proto_rawDescData) + }) + return file_quiz_quiz_proto_rawDescData +} + +var file_quiz_quiz_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_quiz_quiz_proto_goTypes = []interface{}{ + (*Quiz)(nil), // 0: lms.quiz.Quiz + (*Question)(nil), // 1: lms.quiz.Question + (*Answer)(nil), // 2: lms.quiz.Answer + (*AnswerOption)(nil), // 3: lms.quiz.AnswerOption + (*QuestionInput)(nil), // 4: lms.quiz.QuestionInput + (*QuizResponse)(nil), // 5: lms.quiz.QuizResponse + (*timestamppb.Timestamp)(nil), // 6: google.protobuf.Timestamp +} +var file_quiz_quiz_proto_depIdxs = []int32{ + 6, // 0: lms.quiz.Quiz.createdAt:type_name -> google.protobuf.Timestamp + 6, // 1: lms.quiz.Quiz.updatedAt:type_name -> google.protobuf.Timestamp + 2, // 2: lms.quiz.Question.answers:type_name -> lms.quiz.Answer + 6, // 3: lms.quiz.Question.createdAt:type_name -> google.protobuf.Timestamp + 6, // 4: lms.quiz.Question.updatedAt:type_name -> google.protobuf.Timestamp + 6, // 5: lms.quiz.Answer.createdAt:type_name -> google.protobuf.Timestamp + 6, // 6: lms.quiz.Answer.updatedAt:type_name -> google.protobuf.Timestamp + 3, // 7: lms.quiz.QuestionInput.answerOptions:type_name -> lms.quiz.AnswerOption + 0, // 8: lms.quiz.QuizResponse.quiz:type_name -> lms.quiz.Quiz + 1, // 9: lms.quiz.QuizResponse.questions:type_name -> lms.quiz.Question + 10, // [10:10] is the sub-list for method output_type + 10, // [10:10] is the sub-list for method input_type + 10, // [10:10] is the sub-list for extension type_name + 10, // [10:10] is the sub-list for extension extendee + 0, // [0:10] is the sub-list for field type_name +} + +func init() { file_quiz_quiz_proto_init() } +func file_quiz_quiz_proto_init() { + if File_quiz_quiz_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_quiz_quiz_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Quiz); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_quiz_quiz_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Question); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_quiz_quiz_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Answer); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_quiz_quiz_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AnswerOption); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_quiz_quiz_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QuestionInput); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_quiz_quiz_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QuizResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_quiz_quiz_proto_rawDesc, + NumEnums: 0, + NumMessages: 6, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_quiz_quiz_proto_goTypes, + DependencyIndexes: file_quiz_quiz_proto_depIdxs, + MessageInfos: file_quiz_quiz_proto_msgTypes, + }.Build() + File_quiz_quiz_proto = out.File + file_quiz_quiz_proto_rawDesc = nil + file_quiz_quiz_proto_goTypes = nil + file_quiz_quiz_proto_depIdxs = nil +} diff --git a/backend/lms-main-system/protogen/quiz/rpc_quiz_create.pb.go b/backend/lms-main-system/protogen/quiz/rpc_quiz_create.pb.go new file mode 100644 index 0000000..e439c08 --- /dev/null +++ b/backend/lms-main-system/protogen/quiz/rpc_quiz_create.pb.go @@ -0,0 +1,161 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.33.0 +// protoc v3.21.12 +// source: quiz/rpc_quiz_create.proto + +package quiz + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +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 CreateQuizRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ModuleId string `protobuf:"bytes,1,opt,name=moduleId,proto3" json:"moduleId,omitempty"` + Quiz []*QuestionInput `protobuf:"bytes,2,rep,name=quiz,proto3" json:"quiz,omitempty"` +} + +func (x *CreateQuizRequest) Reset() { + *x = CreateQuizRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_quiz_rpc_quiz_create_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateQuizRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateQuizRequest) ProtoMessage() {} + +func (x *CreateQuizRequest) ProtoReflect() protoreflect.Message { + mi := &file_quiz_rpc_quiz_create_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateQuizRequest.ProtoReflect.Descriptor instead. +func (*CreateQuizRequest) Descriptor() ([]byte, []int) { + return file_quiz_rpc_quiz_create_proto_rawDescGZIP(), []int{0} +} + +func (x *CreateQuizRequest) GetModuleId() string { + if x != nil { + return x.ModuleId + } + return "" +} + +func (x *CreateQuizRequest) GetQuiz() []*QuestionInput { + if x != nil { + return x.Quiz + } + return nil +} + +var File_quiz_rpc_quiz_create_proto protoreflect.FileDescriptor + +var file_quiz_rpc_quiz_create_proto_rawDesc = []byte{ + 0x0a, 0x1a, 0x71, 0x75, 0x69, 0x7a, 0x2f, 0x72, 0x70, 0x63, 0x5f, 0x71, 0x75, 0x69, 0x7a, 0x5f, + 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x08, 0x6c, 0x6d, + 0x73, 0x2e, 0x71, 0x75, 0x69, 0x7a, 0x1a, 0x0f, 0x71, 0x75, 0x69, 0x7a, 0x2f, 0x71, 0x75, 0x69, + 0x7a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x5c, 0x0a, 0x11, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x51, 0x75, 0x69, 0x7a, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, + 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, + 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x49, 0x64, 0x12, 0x2b, 0x0a, 0x04, 0x71, 0x75, 0x69, 0x7a, + 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6c, 0x6d, 0x73, 0x2e, 0x71, 0x75, 0x69, + 0x7a, 0x2e, 0x51, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x52, + 0x04, 0x71, 0x75, 0x69, 0x7a, 0x42, 0x3a, 0x5a, 0x38, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x2d, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, + 0x2d, 0x63, 0x6d, 0x73, 0x2d, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2f, 0x6c, 0x6d, 0x73, 0x2d, + 0x73, 0x79, 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x67, 0x65, 0x6e, 0x2f, 0x71, 0x75, 0x69, + 0x7a, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_quiz_rpc_quiz_create_proto_rawDescOnce sync.Once + file_quiz_rpc_quiz_create_proto_rawDescData = file_quiz_rpc_quiz_create_proto_rawDesc +) + +func file_quiz_rpc_quiz_create_proto_rawDescGZIP() []byte { + file_quiz_rpc_quiz_create_proto_rawDescOnce.Do(func() { + file_quiz_rpc_quiz_create_proto_rawDescData = protoimpl.X.CompressGZIP(file_quiz_rpc_quiz_create_proto_rawDescData) + }) + return file_quiz_rpc_quiz_create_proto_rawDescData +} + +var file_quiz_rpc_quiz_create_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_quiz_rpc_quiz_create_proto_goTypes = []interface{}{ + (*CreateQuizRequest)(nil), // 0: lms.quiz.CreateQuizRequest + (*QuestionInput)(nil), // 1: lms.quiz.QuestionInput +} +var file_quiz_rpc_quiz_create_proto_depIdxs = []int32{ + 1, // 0: lms.quiz.CreateQuizRequest.quiz:type_name -> lms.quiz.QuestionInput + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_quiz_rpc_quiz_create_proto_init() } +func file_quiz_rpc_quiz_create_proto_init() { + if File_quiz_rpc_quiz_create_proto != nil { + return + } + file_quiz_quiz_proto_init() + if !protoimpl.UnsafeEnabled { + file_quiz_rpc_quiz_create_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateQuizRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_quiz_rpc_quiz_create_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_quiz_rpc_quiz_create_proto_goTypes, + DependencyIndexes: file_quiz_rpc_quiz_create_proto_depIdxs, + MessageInfos: file_quiz_rpc_quiz_create_proto_msgTypes, + }.Build() + File_quiz_rpc_quiz_create_proto = out.File + file_quiz_rpc_quiz_create_proto_rawDesc = nil + file_quiz_rpc_quiz_create_proto_goTypes = nil + file_quiz_rpc_quiz_create_proto_depIdxs = nil +} diff --git a/backend/lms-main-system/protogen/quiz/rpc_quiz_delete.pb.go b/backend/lms-main-system/protogen/quiz/rpc_quiz_delete.pb.go new file mode 100644 index 0000000..67bc4bd --- /dev/null +++ b/backend/lms-main-system/protogen/quiz/rpc_quiz_delete.pb.go @@ -0,0 +1,156 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.33.0 +// protoc v3.21.12 +// source: quiz/rpc_quiz_delete.proto + +package quiz + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +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 DeleteQuizRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Ids []string `protobuf:"bytes,1,rep,name=ids,proto3" json:"ids,omitempty"` + ForceDelete bool `protobuf:"varint,2,opt,name=force_delete,json=forceDelete,proto3" json:"force_delete,omitempty"` +} + +func (x *DeleteQuizRequest) Reset() { + *x = DeleteQuizRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_quiz_rpc_quiz_delete_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteQuizRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteQuizRequest) ProtoMessage() {} + +func (x *DeleteQuizRequest) ProtoReflect() protoreflect.Message { + mi := &file_quiz_rpc_quiz_delete_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteQuizRequest.ProtoReflect.Descriptor instead. +func (*DeleteQuizRequest) Descriptor() ([]byte, []int) { + return file_quiz_rpc_quiz_delete_proto_rawDescGZIP(), []int{0} +} + +func (x *DeleteQuizRequest) GetIds() []string { + if x != nil { + return x.Ids + } + return nil +} + +func (x *DeleteQuizRequest) GetForceDelete() bool { + if x != nil { + return x.ForceDelete + } + return false +} + +var File_quiz_rpc_quiz_delete_proto protoreflect.FileDescriptor + +var file_quiz_rpc_quiz_delete_proto_rawDesc = []byte{ + 0x0a, 0x1a, 0x71, 0x75, 0x69, 0x7a, 0x2f, 0x72, 0x70, 0x63, 0x5f, 0x71, 0x75, 0x69, 0x7a, 0x5f, + 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x08, 0x6c, 0x6d, + 0x73, 0x2e, 0x71, 0x75, 0x69, 0x7a, 0x22, 0x48, 0x0a, 0x11, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, + 0x51, 0x75, 0x69, 0x7a, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x69, + 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x03, 0x69, 0x64, 0x73, 0x12, 0x21, 0x0a, + 0x0c, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x0b, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, + 0x42, 0x3a, 0x5a, 0x38, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6d, + 0x75, 0x6c, 0x74, 0x69, 0x2d, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x2d, 0x63, 0x6d, 0x73, 0x2d, + 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2f, 0x6c, 0x6d, 0x73, 0x2d, 0x73, 0x79, 0x73, 0x2f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x67, 0x65, 0x6e, 0x2f, 0x71, 0x75, 0x69, 0x7a, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_quiz_rpc_quiz_delete_proto_rawDescOnce sync.Once + file_quiz_rpc_quiz_delete_proto_rawDescData = file_quiz_rpc_quiz_delete_proto_rawDesc +) + +func file_quiz_rpc_quiz_delete_proto_rawDescGZIP() []byte { + file_quiz_rpc_quiz_delete_proto_rawDescOnce.Do(func() { + file_quiz_rpc_quiz_delete_proto_rawDescData = protoimpl.X.CompressGZIP(file_quiz_rpc_quiz_delete_proto_rawDescData) + }) + return file_quiz_rpc_quiz_delete_proto_rawDescData +} + +var file_quiz_rpc_quiz_delete_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_quiz_rpc_quiz_delete_proto_goTypes = []interface{}{ + (*DeleteQuizRequest)(nil), // 0: lms.quiz.DeleteQuizRequest +} +var file_quiz_rpc_quiz_delete_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_quiz_rpc_quiz_delete_proto_init() } +func file_quiz_rpc_quiz_delete_proto_init() { + if File_quiz_rpc_quiz_delete_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_quiz_rpc_quiz_delete_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteQuizRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_quiz_rpc_quiz_delete_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_quiz_rpc_quiz_delete_proto_goTypes, + DependencyIndexes: file_quiz_rpc_quiz_delete_proto_depIdxs, + MessageInfos: file_quiz_rpc_quiz_delete_proto_msgTypes, + }.Build() + File_quiz_rpc_quiz_delete_proto = out.File + file_quiz_rpc_quiz_delete_proto_rawDesc = nil + file_quiz_rpc_quiz_delete_proto_goTypes = nil + file_quiz_rpc_quiz_delete_proto_depIdxs = nil +} diff --git a/backend/lms-main-system/protogen/quiz/rpc_quiz_get.pb.go b/backend/lms-main-system/protogen/quiz/rpc_quiz_get.pb.go new file mode 100644 index 0000000..0df6e97 --- /dev/null +++ b/backend/lms-main-system/protogen/quiz/rpc_quiz_get.pb.go @@ -0,0 +1,215 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.33.0 +// protoc v3.21.12 +// source: quiz/rpc_quiz_get.proto + +package quiz + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +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 GetQuizByModuleRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ModuleId string `protobuf:"bytes,1,opt,name=moduleId,proto3" json:"moduleId,omitempty"` +} + +func (x *GetQuizByModuleRequest) Reset() { + *x = GetQuizByModuleRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_quiz_rpc_quiz_get_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetQuizByModuleRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetQuizByModuleRequest) ProtoMessage() {} + +func (x *GetQuizByModuleRequest) ProtoReflect() protoreflect.Message { + mi := &file_quiz_rpc_quiz_get_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetQuizByModuleRequest.ProtoReflect.Descriptor instead. +func (*GetQuizByModuleRequest) Descriptor() ([]byte, []int) { + return file_quiz_rpc_quiz_get_proto_rawDescGZIP(), []int{0} +} + +func (x *GetQuizByModuleRequest) GetModuleId() string { + if x != nil { + return x.ModuleId + } + return "" +} + +type GetQuizByModuleResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Quizzes []*QuizResponse `protobuf:"bytes,1,rep,name=quizzes,proto3" json:"quizzes,omitempty"` +} + +func (x *GetQuizByModuleResponse) Reset() { + *x = GetQuizByModuleResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_quiz_rpc_quiz_get_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetQuizByModuleResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetQuizByModuleResponse) ProtoMessage() {} + +func (x *GetQuizByModuleResponse) ProtoReflect() protoreflect.Message { + mi := &file_quiz_rpc_quiz_get_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetQuizByModuleResponse.ProtoReflect.Descriptor instead. +func (*GetQuizByModuleResponse) Descriptor() ([]byte, []int) { + return file_quiz_rpc_quiz_get_proto_rawDescGZIP(), []int{1} +} + +func (x *GetQuizByModuleResponse) GetQuizzes() []*QuizResponse { + if x != nil { + return x.Quizzes + } + return nil +} + +var File_quiz_rpc_quiz_get_proto protoreflect.FileDescriptor + +var file_quiz_rpc_quiz_get_proto_rawDesc = []byte{ + 0x0a, 0x17, 0x71, 0x75, 0x69, 0x7a, 0x2f, 0x72, 0x70, 0x63, 0x5f, 0x71, 0x75, 0x69, 0x7a, 0x5f, + 0x67, 0x65, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x08, 0x6c, 0x6d, 0x73, 0x2e, 0x71, + 0x75, 0x69, 0x7a, 0x1a, 0x0f, 0x71, 0x75, 0x69, 0x7a, 0x2f, 0x71, 0x75, 0x69, 0x7a, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x34, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x51, 0x75, 0x69, 0x7a, 0x42, + 0x79, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, + 0x0a, 0x08, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x08, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x49, 0x64, 0x22, 0x4b, 0x0a, 0x17, 0x47, 0x65, + 0x74, 0x51, 0x75, 0x69, 0x7a, 0x42, 0x79, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x07, 0x71, 0x75, 0x69, 0x7a, 0x7a, 0x65, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6c, 0x6d, 0x73, 0x2e, 0x71, 0x75, 0x69, + 0x7a, 0x2e, 0x51, 0x75, 0x69, 0x7a, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x07, + 0x71, 0x75, 0x69, 0x7a, 0x7a, 0x65, 0x73, 0x42, 0x3a, 0x5a, 0x38, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x2d, 0x74, 0x65, 0x6e, 0x61, + 0x6e, 0x74, 0x2d, 0x63, 0x6d, 0x73, 0x2d, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2f, 0x6c, 0x6d, + 0x73, 0x2d, 0x73, 0x79, 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x67, 0x65, 0x6e, 0x2f, 0x71, + 0x75, 0x69, 0x7a, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_quiz_rpc_quiz_get_proto_rawDescOnce sync.Once + file_quiz_rpc_quiz_get_proto_rawDescData = file_quiz_rpc_quiz_get_proto_rawDesc +) + +func file_quiz_rpc_quiz_get_proto_rawDescGZIP() []byte { + file_quiz_rpc_quiz_get_proto_rawDescOnce.Do(func() { + file_quiz_rpc_quiz_get_proto_rawDescData = protoimpl.X.CompressGZIP(file_quiz_rpc_quiz_get_proto_rawDescData) + }) + return file_quiz_rpc_quiz_get_proto_rawDescData +} + +var file_quiz_rpc_quiz_get_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_quiz_rpc_quiz_get_proto_goTypes = []interface{}{ + (*GetQuizByModuleRequest)(nil), // 0: lms.quiz.GetQuizByModuleRequest + (*GetQuizByModuleResponse)(nil), // 1: lms.quiz.GetQuizByModuleResponse + (*QuizResponse)(nil), // 2: lms.quiz.QuizResponse +} +var file_quiz_rpc_quiz_get_proto_depIdxs = []int32{ + 2, // 0: lms.quiz.GetQuizByModuleResponse.quizzes:type_name -> lms.quiz.QuizResponse + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_quiz_rpc_quiz_get_proto_init() } +func file_quiz_rpc_quiz_get_proto_init() { + if File_quiz_rpc_quiz_get_proto != nil { + return + } + file_quiz_quiz_proto_init() + if !protoimpl.UnsafeEnabled { + file_quiz_rpc_quiz_get_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetQuizByModuleRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_quiz_rpc_quiz_get_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetQuizByModuleResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_quiz_rpc_quiz_get_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_quiz_rpc_quiz_get_proto_goTypes, + DependencyIndexes: file_quiz_rpc_quiz_get_proto_depIdxs, + MessageInfos: file_quiz_rpc_quiz_get_proto_msgTypes, + }.Build() + File_quiz_rpc_quiz_get_proto = out.File + file_quiz_rpc_quiz_get_proto_rawDesc = nil + file_quiz_rpc_quiz_get_proto_goTypes = nil + file_quiz_rpc_quiz_get_proto_depIdxs = nil +} diff --git a/backend/lms-main-system/protogen/quiz/rpc_quiz_update.pb.go b/backend/lms-main-system/protogen/quiz/rpc_quiz_update.pb.go new file mode 100644 index 0000000..d14b5a8 --- /dev/null +++ b/backend/lms-main-system/protogen/quiz/rpc_quiz_update.pb.go @@ -0,0 +1,172 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.33.0 +// protoc v3.21.12 +// source: quiz/rpc_quiz_update.proto + +package quiz + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +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 UpdateQuizRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + QuestionId string `protobuf:"bytes,1,opt,name=question_id,json=questionId,proto3" json:"question_id,omitempty"` + Question string `protobuf:"bytes,2,opt,name=question,proto3" json:"question,omitempty"` + AnswerOptions []*AnswerOption `protobuf:"bytes,3,rep,name=answerOptions,proto3" json:"answerOptions,omitempty"` +} + +func (x *UpdateQuizRequest) Reset() { + *x = UpdateQuizRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_quiz_rpc_quiz_update_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateQuizRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateQuizRequest) ProtoMessage() {} + +func (x *UpdateQuizRequest) ProtoReflect() protoreflect.Message { + mi := &file_quiz_rpc_quiz_update_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateQuizRequest.ProtoReflect.Descriptor instead. +func (*UpdateQuizRequest) Descriptor() ([]byte, []int) { + return file_quiz_rpc_quiz_update_proto_rawDescGZIP(), []int{0} +} + +func (x *UpdateQuizRequest) GetQuestionId() string { + if x != nil { + return x.QuestionId + } + return "" +} + +func (x *UpdateQuizRequest) GetQuestion() string { + if x != nil { + return x.Question + } + return "" +} + +func (x *UpdateQuizRequest) GetAnswerOptions() []*AnswerOption { + if x != nil { + return x.AnswerOptions + } + return nil +} + +var File_quiz_rpc_quiz_update_proto protoreflect.FileDescriptor + +var file_quiz_rpc_quiz_update_proto_rawDesc = []byte{ + 0x0a, 0x1a, 0x71, 0x75, 0x69, 0x7a, 0x2f, 0x72, 0x70, 0x63, 0x5f, 0x71, 0x75, 0x69, 0x7a, 0x5f, + 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x08, 0x6c, 0x6d, + 0x73, 0x2e, 0x71, 0x75, 0x69, 0x7a, 0x1a, 0x0f, 0x71, 0x75, 0x69, 0x7a, 0x2f, 0x71, 0x75, 0x69, + 0x7a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x8e, 0x01, 0x0a, 0x11, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x51, 0x75, 0x69, 0x7a, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, + 0x0b, 0x71, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0a, 0x71, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x1a, + 0x0a, 0x08, 0x71, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x08, 0x71, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3c, 0x0a, 0x0d, 0x61, 0x6e, + 0x73, 0x77, 0x65, 0x72, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x16, 0x2e, 0x6c, 0x6d, 0x73, 0x2e, 0x71, 0x75, 0x69, 0x7a, 0x2e, 0x41, 0x6e, 0x73, + 0x77, 0x65, 0x72, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0d, 0x61, 0x6e, 0x73, 0x77, 0x65, + 0x72, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x3a, 0x5a, 0x38, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x2d, 0x74, 0x65, 0x6e, + 0x61, 0x6e, 0x74, 0x2d, 0x63, 0x6d, 0x73, 0x2d, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2f, 0x6c, + 0x6d, 0x73, 0x2d, 0x73, 0x79, 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x67, 0x65, 0x6e, 0x2f, + 0x71, 0x75, 0x69, 0x7a, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_quiz_rpc_quiz_update_proto_rawDescOnce sync.Once + file_quiz_rpc_quiz_update_proto_rawDescData = file_quiz_rpc_quiz_update_proto_rawDesc +) + +func file_quiz_rpc_quiz_update_proto_rawDescGZIP() []byte { + file_quiz_rpc_quiz_update_proto_rawDescOnce.Do(func() { + file_quiz_rpc_quiz_update_proto_rawDescData = protoimpl.X.CompressGZIP(file_quiz_rpc_quiz_update_proto_rawDescData) + }) + return file_quiz_rpc_quiz_update_proto_rawDescData +} + +var file_quiz_rpc_quiz_update_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_quiz_rpc_quiz_update_proto_goTypes = []interface{}{ + (*UpdateQuizRequest)(nil), // 0: lms.quiz.UpdateQuizRequest + (*AnswerOption)(nil), // 1: lms.quiz.AnswerOption +} +var file_quiz_rpc_quiz_update_proto_depIdxs = []int32{ + 1, // 0: lms.quiz.UpdateQuizRequest.answerOptions:type_name -> lms.quiz.AnswerOption + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_quiz_rpc_quiz_update_proto_init() } +func file_quiz_rpc_quiz_update_proto_init() { + if File_quiz_rpc_quiz_update_proto != nil { + return + } + file_quiz_quiz_proto_init() + if !protoimpl.UnsafeEnabled { + file_quiz_rpc_quiz_update_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateQuizRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_quiz_rpc_quiz_update_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_quiz_rpc_quiz_update_proto_goTypes, + DependencyIndexes: file_quiz_rpc_quiz_update_proto_depIdxs, + MessageInfos: file_quiz_rpc_quiz_update_proto_msgTypes, + }.Build() + File_quiz_rpc_quiz_update_proto = out.File + file_quiz_rpc_quiz_update_proto_rawDesc = nil + file_quiz_rpc_quiz_update_proto_goTypes = nil + file_quiz_rpc_quiz_update_proto_depIdxs = nil +} diff --git a/backend/lms-main-system/protogen/quiz/service.quiz.pb.go b/backend/lms-main-system/protogen/quiz/service.quiz.pb.go new file mode 100644 index 0000000..2bcef96 --- /dev/null +++ b/backend/lms-main-system/protogen/quiz/service.quiz.pb.go @@ -0,0 +1,154 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.33.0 +// protoc v3.21.12 +// source: quiz/service.quiz.proto + +package quiz + +import ( + _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + emptypb "google.golang.org/protobuf/types/known/emptypb" + reflect "reflect" +) + +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) +) + +var File_quiz_service_quiz_proto protoreflect.FileDescriptor + +var file_quiz_service_quiz_proto_rawDesc = []byte{ + 0x0a, 0x17, 0x71, 0x75, 0x69, 0x7a, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x71, + 0x75, 0x69, 0x7a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x08, 0x6c, 0x6d, 0x73, 0x2e, 0x71, + 0x75, 0x69, 0x7a, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, + 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, + 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x17, 0x71, 0x75, 0x69, 0x7a, 0x2f, 0x72, 0x70, 0x63, 0x5f, 0x71, 0x75, 0x69, 0x7a, + 0x5f, 0x67, 0x65, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1a, 0x71, 0x75, 0x69, 0x7a, + 0x2f, 0x72, 0x70, 0x63, 0x5f, 0x71, 0x75, 0x69, 0x7a, 0x5f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1a, 0x71, 0x75, 0x69, 0x7a, 0x2f, 0x72, 0x70, 0x63, + 0x5f, 0x71, 0x75, 0x69, 0x7a, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x1a, 0x71, 0x75, 0x69, 0x7a, 0x2f, 0x72, 0x70, 0x63, 0x5f, 0x71, 0x75, 0x69, + 0x7a, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0f, + 0x71, 0x75, 0x69, 0x7a, 0x2f, 0x71, 0x75, 0x69, 0x7a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0xa1, 0x03, 0x0a, + 0x0b, 0x51, 0x75, 0x69, 0x7a, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x5a, 0x0a, 0x0a, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x51, 0x75, 0x69, 0x7a, 0x12, 0x1b, 0x2e, 0x6c, 0x6d, 0x73, + 0x2e, 0x71, 0x75, 0x69, 0x7a, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x51, 0x75, 0x69, 0x7a, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x6c, 0x6d, 0x73, 0x2e, 0x71, 0x75, + 0x69, 0x7a, 0x2e, 0x51, 0x75, 0x69, 0x7a, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x17, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x11, 0x3a, 0x01, 0x2a, 0x22, 0x0c, 0x2f, 0x6c, 0x6d, 0x73, + 0x2f, 0x76, 0x31, 0x2f, 0x71, 0x75, 0x69, 0x7a, 0x12, 0x77, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x51, + 0x75, 0x69, 0x7a, 0x7a, 0x65, 0x73, 0x42, 0x79, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x12, 0x20, + 0x2e, 0x6c, 0x6d, 0x73, 0x2e, 0x71, 0x75, 0x69, 0x7a, 0x2e, 0x47, 0x65, 0x74, 0x51, 0x75, 0x69, + 0x7a, 0x42, 0x79, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x21, 0x2e, 0x6c, 0x6d, 0x73, 0x2e, 0x71, 0x75, 0x69, 0x7a, 0x2e, 0x47, 0x65, 0x74, 0x51, + 0x75, 0x69, 0x7a, 0x42, 0x79, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x1c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x16, 0x12, 0x14, 0x2f, 0x6c, 0x6d, + 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x71, 0x75, 0x69, 0x7a, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, + 0x73, 0x12, 0x64, 0x0a, 0x0a, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x51, 0x75, 0x69, 0x7a, 0x12, + 0x1b, 0x2e, 0x6c, 0x6d, 0x73, 0x2e, 0x71, 0x75, 0x69, 0x7a, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x51, 0x75, 0x69, 0x7a, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x6c, + 0x6d, 0x73, 0x2e, 0x71, 0x75, 0x69, 0x7a, 0x2e, 0x51, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, + 0x22, 0x25, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x3a, 0x01, 0x2a, 0x1a, 0x1a, 0x2f, 0x6c, 0x6d, + 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x71, 0x75, 0x69, 0x7a, 0x2f, 0x7b, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x7d, 0x12, 0x57, 0x0a, 0x0a, 0x44, 0x65, 0x6c, 0x65, 0x74, + 0x65, 0x51, 0x75, 0x69, 0x7a, 0x12, 0x1b, 0x2e, 0x6c, 0x6d, 0x73, 0x2e, 0x71, 0x75, 0x69, 0x7a, + 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x51, 0x75, 0x69, 0x7a, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x14, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x0e, 0x2a, 0x0c, 0x2f, 0x6c, 0x6d, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x71, 0x75, 0x69, 0x7a, + 0x42, 0xa9, 0x03, 0x92, 0x41, 0xeb, 0x02, 0x12, 0xd0, 0x01, 0x0a, 0x12, 0x4c, 0x4d, 0x53, 0x20, + 0x51, 0x75, 0x69, 0x7a, 0x20, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x2f, + 0x41, 0x50, 0x49, 0x73, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x51, 0x75, 0x69, 0x7a, 0x20, 0x69, 0x6e, + 0x20, 0x74, 0x68, 0x65, 0x20, 0x4c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x20, 0x4d, 0x61, + 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x22, + 0x44, 0x0a, 0x08, 0x4c, 0x4d, 0x53, 0x20, 0x54, 0x65, 0x61, 0x6d, 0x12, 0x1f, 0x68, 0x74, 0x74, + 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x6c, 0x6d, 0x73, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x1a, 0x17, 0x73, 0x75, + 0x70, 0x70, 0x6f, 0x72, 0x74, 0x40, 0x6c, 0x6d, 0x73, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, + 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2a, 0x3e, 0x0a, 0x0a, 0x41, 0x70, 0x61, 0x63, 0x68, 0x65, 0x20, + 0x32, 0x2e, 0x30, 0x12, 0x30, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, + 0x2e, 0x61, 0x70, 0x61, 0x63, 0x68, 0x65, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x6c, 0x69, 0x63, 0x65, + 0x6e, 0x73, 0x65, 0x73, 0x2f, 0x4c, 0x49, 0x43, 0x45, 0x4e, 0x53, 0x45, 0x2d, 0x32, 0x2e, 0x30, + 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x32, 0x03, 0x31, 0x2e, 0x30, 0x1a, 0x0e, 0x6c, 0x6f, 0x63, 0x61, + 0x6c, 0x68, 0x6f, 0x73, 0x74, 0x3a, 0x38, 0x30, 0x38, 0x36, 0x22, 0x03, 0x2f, 0x76, 0x31, 0x2a, + 0x02, 0x02, 0x01, 0x32, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x3a, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x5a, 0x4b, 0x0a, 0x49, 0x0a, 0x06, 0x42, 0x65, 0x61, + 0x72, 0x65, 0x72, 0x12, 0x3f, 0x08, 0x02, 0x12, 0x2a, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, + 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x2c, 0x20, 0x70, + 0x72, 0x65, 0x66, 0x69, 0x78, 0x65, 0x64, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x42, 0x65, 0x61, + 0x72, 0x65, 0x72, 0x1a, 0x0d, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x20, 0x02, 0x62, 0x0c, 0x0a, 0x0a, 0x0a, 0x06, 0x42, 0x65, 0x61, 0x72, 0x65, 0x72, + 0x12, 0x00, 0x5a, 0x38, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6d, + 0x75, 0x6c, 0x74, 0x69, 0x2d, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x2d, 0x63, 0x6d, 0x73, 0x2d, + 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2f, 0x6c, 0x6d, 0x73, 0x2d, 0x73, 0x79, 0x73, 0x2f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x67, 0x65, 0x6e, 0x2f, 0x71, 0x75, 0x69, 0x7a, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, +} + +var file_quiz_service_quiz_proto_goTypes = []interface{}{ + (*CreateQuizRequest)(nil), // 0: lms.quiz.CreateQuizRequest + (*GetQuizByModuleRequest)(nil), // 1: lms.quiz.GetQuizByModuleRequest + (*UpdateQuizRequest)(nil), // 2: lms.quiz.UpdateQuizRequest + (*DeleteQuizRequest)(nil), // 3: lms.quiz.DeleteQuizRequest + (*QuizResponse)(nil), // 4: lms.quiz.QuizResponse + (*GetQuizByModuleResponse)(nil), // 5: lms.quiz.GetQuizByModuleResponse + (*Question)(nil), // 6: lms.quiz.Question + (*emptypb.Empty)(nil), // 7: google.protobuf.Empty +} +var file_quiz_service_quiz_proto_depIdxs = []int32{ + 0, // 0: lms.quiz.QuizService.CreateQuiz:input_type -> lms.quiz.CreateQuizRequest + 1, // 1: lms.quiz.QuizService.GetQuizzesByModule:input_type -> lms.quiz.GetQuizByModuleRequest + 2, // 2: lms.quiz.QuizService.UpdateQuiz:input_type -> lms.quiz.UpdateQuizRequest + 3, // 3: lms.quiz.QuizService.DeleteQuiz:input_type -> lms.quiz.DeleteQuizRequest + 4, // 4: lms.quiz.QuizService.CreateQuiz:output_type -> lms.quiz.QuizResponse + 5, // 5: lms.quiz.QuizService.GetQuizzesByModule:output_type -> lms.quiz.GetQuizByModuleResponse + 6, // 6: lms.quiz.QuizService.UpdateQuiz:output_type -> lms.quiz.Question + 7, // 7: lms.quiz.QuizService.DeleteQuiz:output_type -> google.protobuf.Empty + 4, // [4:8] is the sub-list for method output_type + 0, // [0:4] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_quiz_service_quiz_proto_init() } +func file_quiz_service_quiz_proto_init() { + if File_quiz_service_quiz_proto != nil { + return + } + file_quiz_rpc_quiz_get_proto_init() + file_quiz_rpc_quiz_create_proto_init() + file_quiz_rpc_quiz_update_proto_init() + file_quiz_rpc_quiz_delete_proto_init() + file_quiz_quiz_proto_init() + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_quiz_service_quiz_proto_rawDesc, + NumEnums: 0, + NumMessages: 0, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_quiz_service_quiz_proto_goTypes, + DependencyIndexes: file_quiz_service_quiz_proto_depIdxs, + }.Build() + File_quiz_service_quiz_proto = out.File + file_quiz_service_quiz_proto_rawDesc = nil + file_quiz_service_quiz_proto_goTypes = nil + file_quiz_service_quiz_proto_depIdxs = nil +} diff --git a/backend/lms-main-system/protogen/quiz/service.quiz.pb.gw.go b/backend/lms-main-system/protogen/quiz/service.quiz.pb.gw.go new file mode 100644 index 0000000..1c15f8c --- /dev/null +++ b/backend/lms-main-system/protogen/quiz/service.quiz.pb.gw.go @@ -0,0 +1,389 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: quiz/service.quiz.proto + +/* +Package quiz is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package quiz + +import ( + "context" + "errors" + "io" + "net/http" + + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" +) + +// Suppress "imported and not used" errors +var ( + _ codes.Code + _ io.Reader + _ status.Status + _ = errors.New + _ = runtime.String + _ = utilities.NewDoubleArray + _ = metadata.Join +) + +func request_QuizService_CreateQuiz_0(ctx context.Context, marshaler runtime.Marshaler, client QuizServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var ( + protoReq CreateQuizRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } + msg, err := client.CreateQuiz(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err +} + +func local_request_QuizService_CreateQuiz_0(ctx context.Context, marshaler runtime.Marshaler, server QuizServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var ( + protoReq CreateQuizRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + msg, err := server.CreateQuiz(ctx, &protoReq) + return msg, metadata, err +} + +var filter_QuizService_GetQuizzesByModule_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} + +func request_QuizService_GetQuizzesByModule_0(ctx context.Context, marshaler runtime.Marshaler, client QuizServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var ( + protoReq GetQuizByModuleRequest + metadata runtime.ServerMetadata + ) + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_QuizService_GetQuizzesByModule_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + msg, err := client.GetQuizzesByModule(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err +} + +func local_request_QuizService_GetQuizzesByModule_0(ctx context.Context, marshaler runtime.Marshaler, server QuizServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var ( + protoReq GetQuizByModuleRequest + metadata runtime.ServerMetadata + ) + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_QuizService_GetQuizzesByModule_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + msg, err := server.GetQuizzesByModule(ctx, &protoReq) + return msg, metadata, err +} + +func request_QuizService_UpdateQuiz_0(ctx context.Context, marshaler runtime.Marshaler, client QuizServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var ( + protoReq UpdateQuizRequest + metadata runtime.ServerMetadata + err error + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } + val, ok := pathParams["question_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "question_id") + } + protoReq.QuestionId, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "question_id", err) + } + msg, err := client.UpdateQuiz(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err +} + +func local_request_QuizService_UpdateQuiz_0(ctx context.Context, marshaler runtime.Marshaler, server QuizServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var ( + protoReq UpdateQuizRequest + metadata runtime.ServerMetadata + err error + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + val, ok := pathParams["question_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "question_id") + } + protoReq.QuestionId, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "question_id", err) + } + msg, err := server.UpdateQuiz(ctx, &protoReq) + return msg, metadata, err +} + +var filter_QuizService_DeleteQuiz_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} + +func request_QuizService_DeleteQuiz_0(ctx context.Context, marshaler runtime.Marshaler, client QuizServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var ( + protoReq DeleteQuizRequest + metadata runtime.ServerMetadata + ) + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_QuizService_DeleteQuiz_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + msg, err := client.DeleteQuiz(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err +} + +func local_request_QuizService_DeleteQuiz_0(ctx context.Context, marshaler runtime.Marshaler, server QuizServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var ( + protoReq DeleteQuizRequest + metadata runtime.ServerMetadata + ) + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_QuizService_DeleteQuiz_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + msg, err := server.DeleteQuiz(ctx, &protoReq) + return msg, metadata, err +} + +// RegisterQuizServiceHandlerServer registers the http handlers for service QuizService to "mux". +// UnaryRPC :call QuizServiceServer directly. +// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQuizServiceHandlerFromEndpoint instead. +// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. +func RegisterQuizServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QuizServiceServer) error { + mux.Handle(http.MethodPost, pattern_QuizService_CreateQuiz_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/lms.quiz.QuizService/CreateQuiz", runtime.WithHTTPPathPattern("/lms/v1/quiz")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_QuizService_CreateQuiz_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + forward_QuizService_CreateQuiz_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) + mux.Handle(http.MethodGet, pattern_QuizService_GetQuizzesByModule_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/lms.quiz.QuizService/GetQuizzesByModule", runtime.WithHTTPPathPattern("/lms/v1/quiz/modules")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_QuizService_GetQuizzesByModule_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + forward_QuizService_GetQuizzesByModule_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) + mux.Handle(http.MethodPut, pattern_QuizService_UpdateQuiz_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/lms.quiz.QuizService/UpdateQuiz", runtime.WithHTTPPathPattern("/lms/v1/quiz/{question_id}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_QuizService_UpdateQuiz_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + forward_QuizService_UpdateQuiz_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) + mux.Handle(http.MethodDelete, pattern_QuizService_DeleteQuiz_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/lms.quiz.QuizService/DeleteQuiz", runtime.WithHTTPPathPattern("/lms/v1/quiz")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_QuizService_DeleteQuiz_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + forward_QuizService_DeleteQuiz_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) + + return nil +} + +// RegisterQuizServiceHandlerFromEndpoint is same as RegisterQuizServiceHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterQuizServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.NewClient(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + return RegisterQuizServiceHandler(ctx, mux, conn) +} + +// RegisterQuizServiceHandler registers the http handlers for service QuizService to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterQuizServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterQuizServiceHandlerClient(ctx, mux, NewQuizServiceClient(conn)) +} + +// RegisterQuizServiceHandlerClient registers the http handlers for service QuizService +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "QuizServiceClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "QuizServiceClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "QuizServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares. +func RegisterQuizServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QuizServiceClient) error { + mux.Handle(http.MethodPost, pattern_QuizService_CreateQuiz_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/lms.quiz.QuizService/CreateQuiz", runtime.WithHTTPPathPattern("/lms/v1/quiz")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_QuizService_CreateQuiz_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + forward_QuizService_CreateQuiz_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) + mux.Handle(http.MethodGet, pattern_QuizService_GetQuizzesByModule_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/lms.quiz.QuizService/GetQuizzesByModule", runtime.WithHTTPPathPattern("/lms/v1/quiz/modules")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_QuizService_GetQuizzesByModule_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + forward_QuizService_GetQuizzesByModule_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) + mux.Handle(http.MethodPut, pattern_QuizService_UpdateQuiz_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/lms.quiz.QuizService/UpdateQuiz", runtime.WithHTTPPathPattern("/lms/v1/quiz/{question_id}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_QuizService_UpdateQuiz_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + forward_QuizService_UpdateQuiz_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) + mux.Handle(http.MethodDelete, pattern_QuizService_DeleteQuiz_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/lms.quiz.QuizService/DeleteQuiz", runtime.WithHTTPPathPattern("/lms/v1/quiz")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_QuizService_DeleteQuiz_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + forward_QuizService_DeleteQuiz_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) + return nil +} + +var ( + pattern_QuizService_CreateQuiz_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"lms", "v1", "quiz"}, "")) + pattern_QuizService_GetQuizzesByModule_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"lms", "v1", "quiz", "modules"}, "")) + pattern_QuizService_UpdateQuiz_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"lms", "v1", "quiz", "question_id"}, "")) + pattern_QuizService_DeleteQuiz_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"lms", "v1", "quiz"}, "")) +) + +var ( + forward_QuizService_CreateQuiz_0 = runtime.ForwardResponseMessage + forward_QuizService_GetQuizzesByModule_0 = runtime.ForwardResponseMessage + forward_QuizService_UpdateQuiz_0 = runtime.ForwardResponseMessage + forward_QuizService_DeleteQuiz_0 = runtime.ForwardResponseMessage +) diff --git a/backend/lms-main-system/protogen/quiz/service.quiz_grpc.pb.go b/backend/lms-main-system/protogen/quiz/service.quiz_grpc.pb.go new file mode 100644 index 0000000..e481293 --- /dev/null +++ b/backend/lms-main-system/protogen/quiz/service.quiz_grpc.pb.go @@ -0,0 +1,236 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.5.1 +// - protoc v3.21.12 +// source: quiz/service.quiz.proto + +package quiz + +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 ( + QuizService_CreateQuiz_FullMethodName = "/lms.quiz.QuizService/CreateQuiz" + QuizService_GetQuizzesByModule_FullMethodName = "/lms.quiz.QuizService/GetQuizzesByModule" + QuizService_UpdateQuiz_FullMethodName = "/lms.quiz.QuizService/UpdateQuiz" + QuizService_DeleteQuiz_FullMethodName = "/lms.quiz.QuizService/DeleteQuiz" +) + +// QuizServiceClient is the client API for QuizService 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 QuizServiceClient interface { + CreateQuiz(ctx context.Context, in *CreateQuizRequest, opts ...grpc.CallOption) (*QuizResponse, error) + GetQuizzesByModule(ctx context.Context, in *GetQuizByModuleRequest, opts ...grpc.CallOption) (*GetQuizByModuleResponse, error) + UpdateQuiz(ctx context.Context, in *UpdateQuizRequest, opts ...grpc.CallOption) (*Question, error) + DeleteQuiz(ctx context.Context, in *DeleteQuizRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) +} + +type quizServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewQuizServiceClient(cc grpc.ClientConnInterface) QuizServiceClient { + return &quizServiceClient{cc} +} + +func (c *quizServiceClient) CreateQuiz(ctx context.Context, in *CreateQuizRequest, opts ...grpc.CallOption) (*QuizResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(QuizResponse) + err := c.cc.Invoke(ctx, QuizService_CreateQuiz_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *quizServiceClient) GetQuizzesByModule(ctx context.Context, in *GetQuizByModuleRequest, opts ...grpc.CallOption) (*GetQuizByModuleResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetQuizByModuleResponse) + err := c.cc.Invoke(ctx, QuizService_GetQuizzesByModule_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *quizServiceClient) UpdateQuiz(ctx context.Context, in *UpdateQuizRequest, opts ...grpc.CallOption) (*Question, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(Question) + err := c.cc.Invoke(ctx, QuizService_UpdateQuiz_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *quizServiceClient) DeleteQuiz(ctx context.Context, in *DeleteQuizRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, QuizService_DeleteQuiz_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// QuizServiceServer is the server API for QuizService service. +// All implementations must embed UnimplementedQuizServiceServer +// for forward compatibility. +type QuizServiceServer interface { + CreateQuiz(context.Context, *CreateQuizRequest) (*QuizResponse, error) + GetQuizzesByModule(context.Context, *GetQuizByModuleRequest) (*GetQuizByModuleResponse, error) + UpdateQuiz(context.Context, *UpdateQuizRequest) (*Question, error) + DeleteQuiz(context.Context, *DeleteQuizRequest) (*emptypb.Empty, error) + mustEmbedUnimplementedQuizServiceServer() +} + +// UnimplementedQuizServiceServer 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 UnimplementedQuizServiceServer struct{} + +func (UnimplementedQuizServiceServer) CreateQuiz(context.Context, *CreateQuizRequest) (*QuizResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateQuiz not implemented") +} +func (UnimplementedQuizServiceServer) GetQuizzesByModule(context.Context, *GetQuizByModuleRequest) (*GetQuizByModuleResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetQuizzesByModule not implemented") +} +func (UnimplementedQuizServiceServer) UpdateQuiz(context.Context, *UpdateQuizRequest) (*Question, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateQuiz not implemented") +} +func (UnimplementedQuizServiceServer) DeleteQuiz(context.Context, *DeleteQuizRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteQuiz not implemented") +} +func (UnimplementedQuizServiceServer) mustEmbedUnimplementedQuizServiceServer() {} +func (UnimplementedQuizServiceServer) testEmbeddedByValue() {} + +// UnsafeQuizServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to QuizServiceServer will +// result in compilation errors. +type UnsafeQuizServiceServer interface { + mustEmbedUnimplementedQuizServiceServer() +} + +func RegisterQuizServiceServer(s grpc.ServiceRegistrar, srv QuizServiceServer) { + // If the following call pancis, it indicates UnimplementedQuizServiceServer 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(&QuizService_ServiceDesc, srv) +} + +func _QuizService_CreateQuiz_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateQuizRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QuizServiceServer).CreateQuiz(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: QuizService_CreateQuiz_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QuizServiceServer).CreateQuiz(ctx, req.(*CreateQuizRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _QuizService_GetQuizzesByModule_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetQuizByModuleRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QuizServiceServer).GetQuizzesByModule(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: QuizService_GetQuizzesByModule_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QuizServiceServer).GetQuizzesByModule(ctx, req.(*GetQuizByModuleRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _QuizService_UpdateQuiz_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateQuizRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QuizServiceServer).UpdateQuiz(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: QuizService_UpdateQuiz_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QuizServiceServer).UpdateQuiz(ctx, req.(*UpdateQuizRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _QuizService_DeleteQuiz_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteQuizRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QuizServiceServer).DeleteQuiz(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: QuizService_DeleteQuiz_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QuizServiceServer).DeleteQuiz(ctx, req.(*DeleteQuizRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// QuizService_ServiceDesc is the grpc.ServiceDesc for QuizService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var QuizService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "lms.quiz.QuizService", + HandlerType: (*QuizServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "CreateQuiz", + Handler: _QuizService_CreateQuiz_Handler, + }, + { + MethodName: "GetQuizzesByModule", + Handler: _QuizService_GetQuizzesByModule_Handler, + }, + { + MethodName: "UpdateQuiz", + Handler: _QuizService_UpdateQuiz_Handler, + }, + { + MethodName: "DeleteQuiz", + Handler: _QuizService_DeleteQuiz_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "quiz/service.quiz.proto", +}