ms-tester/internal/contests/pg_repository.go

17 lines
597 B
Go

package contests
import (
"context"
"git.sch9.ru/new_gate/ms-tester/internal/models"
)
type ContestRepository interface {
CreateContest(ctx context.Context, title string) (int32, error)
ReadContestById(ctx context.Context, id int32) (*models.Contest, error)
DeleteContest(ctx context.Context, id int32) error
AddTask(ctx context.Context, contestId int32, taskId int32) (int32, error)
DeleteTask(ctx context.Context, taskId int32) error
AddParticipant(ctx context.Context, contestId int32, userId int32) (int32, error)
DeleteParticipant(ctx context.Context, participantId int32) error
}