feat: scaffold go backend foundation
This commit is contained in:
66
internal/workflows/runner.go
Normal file
66
internal/workflows/runner.go
Normal file
@@ -0,0 +1,66 @@
|
||||
package workflows
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
)
|
||||
|
||||
var ErrNotImplemented = errors.New("workflow runner not implemented")
|
||||
|
||||
type DiagnosticInput struct {
|
||||
UserID string
|
||||
Track string
|
||||
TargetRole string
|
||||
Stack []string
|
||||
}
|
||||
|
||||
type Runner interface {
|
||||
DiagnoseJobSeeker(context.Context, DiagnosticInput) (DiagnosticResult, error)
|
||||
GradeInterviewAnswer(context.Context, GradeAnswerInput) (GradedAnswer, error)
|
||||
ExtractLearningMemory(context.Context, GradedAnswer) (MemoryUpdateCandidate, error)
|
||||
SelectNextChallenge(context.Context, NextChallengeInput) (NextChallenge, error)
|
||||
UpdateReadinessMap(context.Context, ReadinessUpdateInput) (ReadinessUpdate, error)
|
||||
}
|
||||
|
||||
type GradeAnswerInput struct {
|
||||
UserID string
|
||||
QuestionID string
|
||||
AnswerID string
|
||||
AnswerText string
|
||||
}
|
||||
|
||||
type NextChallengeInput struct {
|
||||
UserID string
|
||||
Track string
|
||||
}
|
||||
|
||||
type ReadinessUpdateInput struct {
|
||||
UserID string
|
||||
Track string
|
||||
}
|
||||
|
||||
type StubRunner struct{}
|
||||
|
||||
func NewStubRunner() StubRunner {
|
||||
return StubRunner{}
|
||||
}
|
||||
|
||||
func (StubRunner) DiagnoseJobSeeker(context.Context, DiagnosticInput) (DiagnosticResult, error) {
|
||||
return DiagnosticResult{}, ErrNotImplemented
|
||||
}
|
||||
|
||||
func (StubRunner) GradeInterviewAnswer(context.Context, GradeAnswerInput) (GradedAnswer, error) {
|
||||
return GradedAnswer{}, ErrNotImplemented
|
||||
}
|
||||
|
||||
func (StubRunner) ExtractLearningMemory(context.Context, GradedAnswer) (MemoryUpdateCandidate, error) {
|
||||
return MemoryUpdateCandidate{}, ErrNotImplemented
|
||||
}
|
||||
|
||||
func (StubRunner) SelectNextChallenge(context.Context, NextChallengeInput) (NextChallenge, error) {
|
||||
return NextChallenge{}, ErrNotImplemented
|
||||
}
|
||||
|
||||
func (StubRunner) UpdateReadinessMap(context.Context, ReadinessUpdateInput) (ReadinessUpdate, error) {
|
||||
return ReadinessUpdate{}, ErrNotImplemented
|
||||
}
|
||||
Reference in New Issue
Block a user