question

package
v1.0.15 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 12, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FetchDefaultLimit = 100
	FetchMaxLimit     = 500
	TestMaxLimit      = 40
	MaxOrders         = 3
)

Variables

This section is empty.

Functions

This section is empty.

Types

type FetchConfig

type FetchConfig struct {
	Filter *model.QuestionFilter
	Offset int
	Limit  int
	Sort   []string
	Count  bool
}

type GenerateTestConfig

type GenerateTestConfig struct {
	Qualifications []int
	Limit          int
}

type Repository

type Repository interface {
	Store(ctx context.Context, input *model.QuestionInput) (*model.Question, error)
	UpdateOneByID(ctx context.Context, id int, input *model.QuestionInput) (*model.Question, error)
	Delete(ctx context.Context, f *model.QuestionFilter) ([]*model.Question, error)
	Fetch(ctx context.Context, cfg *FetchConfig) ([]*model.Question, int, error)
	GenerateTest(ctx context.Context, cfg *GenerateTestConfig) ([]*model.Question, error)
}

type Usecase

type Usecase interface {
	Store(ctx context.Context, input *model.QuestionInput) (*model.Question, error)
	UpdateOneByID(ctx context.Context, id int, input *model.QuestionInput) (*model.Question, error)
	Delete(ctx context.Context, f *model.QuestionFilter) ([]*model.Question, error)
	Fetch(ctx context.Context, cfg *FetchConfig) ([]*model.Question, int, error)
	GetByID(ctx context.Context, id int) (*model.Question, error)
	GenerateTest(ctx context.Context, cfg *GenerateTestConfig) ([]*model.Question, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL