tests

package
v0.0.0-...-34ab1a3 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNothingFound = errors.New("nothing found")

Functions

This section is empty.

Types

type DBPassages

type DBPassages interface {
	SearchUserPassages(ctx context.Context, userID, testID primitive.ObjectID) ([]*models.Passage, error)
	SearchLastUserPassage(ctx context.Context, userID, testID primitive.ObjectID) (*models.Passage, error)
}

type DBTests

type DBTests interface {
	ReadByPath(ctx context.Context, path string) (*models.Test, error)
	Search(
		ctx context.Context, name string, class constants.ClassNumber, complexity constants.ComplexityType, page int64,
	) ([]*models.Test, error)
	SearchCountPages(
		ctx context.Context, name string, class constants.ClassNumber, complexity constants.ComplexityType,
	) (int64, error)
}

type DBUsers

type DBUsers interface {
	ReadByAccessToken(ctx context.Context, accessToken string) (*models.User, error)
}

type ErrorDefault

type ErrorDefault struct {
	Code    string `json:"code"`
	Message string `json:"message"`
}

type Service

type Service struct {
	// contains filtered or unexported fields
}

func New

func New(dbUsers DBUsers, dbTests DBTests, dbPassages DBPassages) *Service

func (*Service) Landing

func (s *Service) Landing(c *gin.Context)

func (*Service) Search

func (s *Service) Search(c *gin.Context)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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