api

package
v0.0.0-...-1351168 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2025 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FinishInterviewResponse

type FinishInterviewResponse struct {
	Score   int32    `json:"score"`
	Reviews []string `json:"reviews"`
}

type GenerateInterviewRequest

type GenerateInterviewRequest struct {
	QuestionCount   int    `json:"questionCount" validate:"required,min=1,max=20"`
	CreationMessage string `json:"creationMessage" validate:"max=1000"`
}

type InterviewAnswers

type InterviewAnswers struct {
	Answers []string `json:"answers"`
}

Parse current answers

type InterviewQuestion

type InterviewQuestion struct {
	Topic          string `json:"topic"`
	Content        string `json:"content"`
	ExpectedAnswer string `json:"expectedAnswer"`
	TextOutput     bool   `json:"textOutput"`
}

Interview generation structures

type InterviewResponse

type InterviewResponse struct {
	UUID            uuid.UUID        `json:"uuid"`
	UserID          int32            `json:"user_id"`
	InterviewSchema InterviewSchema  `json:"interview_schema"`
	Answers         InterviewAnswers `json:"answers"`
	Review          InterviewReview  `json:"review"`
	Score           int32            `json:"score"`
	StepNumber      int32            `json:"step_number"`
	CreatedAt       time.Time        `json:"created_at"`
	UpdatedAt       time.Time        `json:"updated_at"`
	CreationMessage string           `json:"creation_message"`
}

type InterviewReview

type InterviewReview struct {
	Reviews []string `json:"reviews"`
}

type InterviewSchema

type InterviewSchema struct {
	Questions []InterviewQuestion `json:"questions"`
}

type ListInterviewsResponse

type ListInterviewsResponse struct {
	Interviews []InterviewResponse `json:"interviews"`

	Total  int64 `json:"total"`
	Limit  int32 `json:"limit"`
	Offset int32 `json:"offset"`
}

type Server

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

func NewServer

func NewServer(queries *db.Queries, authSvc *auth.Service, gptClient gpt.GPTClient, sttClient stt.STTClient, ttsClient tts.Synthesizer) *Server

func (*Server) SetupRoutes

func (s *Server) SetupRoutes(e *echo.Echo)

type SpeechConfig

type SpeechConfig struct {
	SampleRate int64 `json:"sampleRate"`
}

type SpeechRecognitionMessage

type SpeechRecognitionMessage struct {
	Type   string        `json:"type"` // "audio" or "config"
	Data   []byte        `json:"data,omitempty"`
	Config *SpeechConfig `json:"config,omitempty"`
}

type SpeechRecognitionResponse

type SpeechRecognitionResponse struct {
	Type   string `json:"type"` // "text", "error", or "status"
	Text   string `json:"text,omitempty"`
	Error  string `json:"error,omitempty"`
	Status string `json:"status,omitempty"`
}

type SubmitAnswerRequest

type SubmitAnswerRequest struct {
	StepNumber int32  `json:"stepNumber" validate:"min=0"`
	Answer     string `json:"answer" validate:"required"`
}

type SubmitAnswerResponse

type SubmitAnswerResponse struct {
	Success    bool              `json:"success"`
	StepNumber int32             `json:"stepNumber"`
	Interview  InterviewResponse `json:"interview"`
}

type TTSMessage

type TTSMessage struct {
	Type string `json:"type"` // "text"
	Text string `json:"text,omitempty"`
}

type TTSResponse

type TTSResponse struct {
	Type   string `json:"type"` // "audio", "error", or "status"
	Data   []byte `json:"data,omitempty"`
	Error  string `json:"error,omitempty"`
	Status string `json:"status,omitempty"`
}

type UpdateUserCVRequest

type UpdateUserCVRequest struct {
	CV string `json:"cv" validate:"required"`
}

type UpdateUserRoleRequest

type UpdateUserRoleRequest struct {
	Role string `json:"role" validate:"required,oneof=company jobseeker"`
}

Jump to

Keyboard shortcuts

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