Documentation
¶
Index ¶
- Variables
- func StripHTMLRegex(s string) string
- type ErrorMailService
- type LogMailService
- type MailService
- type ProblemListRequest
- type ProblemListService
- type ProblemStatsService
- type RejudgeService
- type SMTPMailService
- type SQLProblem
- func (s SQLProblem) Get(ctx context.Context, ID int) (*problem.Problem, error)
- func (s SQLProblem) GetAll(ctx context.Context) ([]problem.Problem, error)
- func (s SQLProblem) GetByNames(ctx context.Context, problemset string, problemName string) (*problem.Problem, error)
- func (s SQLProblem) GetStatsData(ctx context.Context, p problem.Problem, userID int) (*problem.StatsData, error)
- type SQLProblemListService
- type SQLStatusPageService
- type SQLSubmission
- type SQLSubmitService
- type SQLTagsService
- type SendgridMailService
- type StatusPageRequest
- type StatusPageService
- type SubmitRequest
- type SubmitService
- type TagsService
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrorUnableToModifyTags = errors.New("user can't modify tags") ErrorNoSuchTag = errors.New("no such tag") )
View Source
var ErrorUnsupportedLanguage = errors.New("unsupported language")
Functions ¶
func StripHTMLRegex ¶
Types ¶
type ErrorMailService ¶
type ErrorMailService struct{}
type LogMailService ¶
type ProblemListRequest ¶
type ProblemListRequest struct {
Problemset string
Pagination pagination.Data
TitleFilter string
TagFilter []string
CategoryFilter problem.CategoryFilter
GETData url.Values
}
func (ProblemListRequest) IsFiltered ¶
func (r ProblemListRequest) IsFiltered() bool
type ProblemListService ¶
type ProblemListService interface {
GetProblemList(ctx context.Context, request ProblemListRequest) (*problem.PaginationList, error)
}
type ProblemStatsService ¶
type SMTPMailService ¶
type SQLProblem ¶
type SQLProblem struct {
// contains filtered or unexported fields
}
func NewSQLProblem ¶
func NewSQLProblem(db *sql.DB, ps problems.Store) *SQLProblem
func (SQLProblem) GetByNames ¶
type SQLProblemListService ¶
type SQLProblemListService struct {
// contains filtered or unexported fields
}
func NewSQLProblemListService ¶
func NewSQLProblemListService(db *sql.DB, ps problems.Store, repo problem.Repository) *SQLProblemListService
func (SQLProblemListService) GetProblemList ¶
func (s SQLProblemListService) GetProblemList(ctx context.Context, request ProblemListRequest) (*problem.PaginationList, error)
type SQLStatusPageService ¶
type SQLStatusPageService struct {
// contains filtered or unexported fields
}
func NewSQLStatusPageService ¶
func NewSQLStatusPageService(db *sql.DB) *SQLStatusPageService
func (SQLStatusPageService) GetStatusPage ¶
func (s SQLStatusPageService) GetStatusPage(ctx context.Context, req StatusPageRequest) (*submission.StatusPage, error)
type SQLSubmission ¶
type SQLSubmission struct {
// contains filtered or unexported fields
}
func NewSQLSubmission ¶
func NewSQLSubmission(db *sql.DB) SQLSubmission
func (SQLSubmission) Get ¶
func (s SQLSubmission) Get(ctx context.Context, ID int) (*submission.Submission, error)
type SQLSubmitService ¶
type SQLSubmitService struct {
// contains filtered or unexported fields
}
func NewSQLSubmitService ¶
func NewSQLSubmitService(db *sql.DB, problemStore problems.Store) *SQLSubmitService
func (*SQLSubmitService) Submit ¶
func (s *SQLSubmitService) Submit(ctx context.Context, req SubmitRequest) (*submission.Submission, error)
type SQLTagsService ¶
type SQLTagsService struct {
// contains filtered or unexported fields
}
func NewSQLTagsService ¶
func NewSQLTagsService(db *sql.DB) *SQLTagsService
type SendgridMailService ¶
type StatusPageRequest ¶
type StatusPageRequest struct {
Pagination pagination.Data
Problemset string
Problem string
Verdict *problems.VerdictName
UserID int
GETValues url.Values
}
type StatusPageService ¶
type StatusPageService interface {
GetStatusPage(ctx context.Context, req StatusPageRequest) (*submission.StatusPage, error)
}
type SubmitRequest ¶
type SubmitService ¶
type SubmitService interface {
Submit(ctx context.Context, subRequest SubmitRequest) (*submission.Submission, error)
}
Click to show internal directories.
Click to hide internal directories.