quiz

package
v0.0.0-...-32c9b99 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2024 License: MIT Imports: 29 Imported by: 0

Documentation

Index

Constants

View Source
const (
	THEME       string = "theme"
	SET         string = "set"
	SEGMENT     string = "segment"
	QUIZTYPE    string = "quizType"
	GREENGORDER string = "gre-eng"
	ENGGREORDER string = "eng-gre"
)

Variables

This section is empty.

Functions

func InitRoutes

func InitRoutes(sokratesHandler *SokratesHandler) *mux.Router

InitRoutes to start up a mux router and return the routes

Types

type SokratesHandler

type SokratesHandler struct {
	Elastic            elastic.Client
	Randomizer         randomizer.Random
	Client             service.OdysseiaClient
	SearchWord         string
	Index              string
	QuizAttempts       chan models.QuizAttempt
	AggregatedAttempts map[string]models.QuizAttempt
	Ticker             *time.Ticker
	Streamer           pb.TraceService_ChorusClient
	Cancel             context.CancelFunc
	Aggregator         pba.Aristarchos_CreateNewEntryClient
	StreamerCancel     context.CancelFunc
	AggregatorCancel   context.CancelFunc
	AggregatorClient   *aristarchos.ClientAggregator
}

func CreateNewConfig

func CreateNewConfig(ctx context.Context) (*SokratesHandler, error)

func (*SokratesHandler) Check

func (s *SokratesHandler) Check(w http.ResponseWriter, req *http.Request)

func (*SokratesHandler) Create

func (s *SokratesHandler) Create(w http.ResponseWriter, req *http.Request)

func (*SokratesHandler) Health

func (s *SokratesHandler) Health(w http.ResponseWriter, req *http.Request)

func (*SokratesHandler) Options

func (s *SokratesHandler) Options(w http.ResponseWriter, req *http.Request)

Jump to

Keyboard shortcuts

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