remove problem.go
This commit is contained in:
parent
3c0f01630f
commit
6488f597fd
1 changed files with 0 additions and 50 deletions
|
@ -1,50 +0,0 @@
|
|||
package services
|
||||
|
||||
import (
|
||||
"context"
|
||||
"git.sch9.ru/new_gate/ms-auth/internal/lib"
|
||||
"git.sch9.ru/new_gate/ms-auth/internal/models"
|
||||
)
|
||||
|
||||
type ProblemStorage interface {
|
||||
CreateProblem(ctx context.Context, problem models.Problem) (int32, error)
|
||||
ReadProblemById(ctx context.Context, id int32) (*models.Problem, error)
|
||||
UpdateProblem(ctx context.Context, problem *models.Problem) error
|
||||
DeleteProblem(ctx context.Context, id int32) error
|
||||
}
|
||||
|
||||
type ProblemService struct {
|
||||
problemProvider ProblemStorage
|
||||
cfg lib.Config
|
||||
}
|
||||
|
||||
func NewProblemService(
|
||||
problemProvider ProblemStorage,
|
||||
cfg lib.Config,
|
||||
) *ProblemService {
|
||||
return &ProblemService{
|
||||
ProblemProvider: problemProvider,
|
||||
cfg: cfg,
|
||||
}
|
||||
}
|
||||
|
||||
func (u *ProblemService) CreateProblem(ctx context.Context, problem *models.Problem) (int32, error) {
|
||||
panic("can't check access")
|
||||
return u.problemProvider.CreateProblem(ctx, problem)
|
||||
}
|
||||
|
||||
func (u *ProblemService) ReadProblemById(ctx context.Context, id int32) (*models.Problem,error) {
|
||||
panic("can't check access")
|
||||
return u.problemProvider.ReadProblemById(ctx, id)
|
||||
}
|
||||
|
||||
func (u *ProblemService) UpdateProblem(ctx context.Context, problem *models.Problem) error {
|
||||
panic("can't check access")
|
||||
return u.problemProvider.UpdateProblem(ctx, problem)
|
||||
}
|
||||
|
||||
func (u *ProblemService) DeleteProblem(ctx context.Context, id int32) error {
|
||||
panic("can't check access")
|
||||
return u.problemProvider.DeleteProblem(ctx, id)
|
||||
}
|
||||
|
Loading…
Reference in a new issue