usecase

package
v0.0.0-...-b401549 Latest Latest
Warning

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

Go to latest
Published: May 29, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AnswerUseCase

type AnswerUseCase struct {
	pb.AnswerClient
	// contains filtered or unexported fields
}

func NewAnswer

func NewAnswer(l *slog.Logger, addr string) *AnswerUseCase

func (*AnswerUseCase) CheckAnswer

func (uc *AnswerUseCase) CheckAnswer(ctx context.Context, in *pb.AnswerRequest) (*pb.AnswerResponse, error)

type QuestionCache

type QuestionCache interface {
	Put(ctx context.Context, value *models.Question) error
	GetRandom(ctx context.Context) (*models.Question, error)
}

type QuestionUseCase

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

func (*QuestionUseCase) GetRandom

func (u *QuestionUseCase) GetRandom(ctx context.Context) (*models.Question, error)

type QuestionWebAPI

type QuestionWebAPI interface {
	GetOneQuestion() (*models.Question, error)
	GetAllQuestions() ([]*models.Question, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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