Documentation
¶
Index ¶
- func FormatError(err error) string
- func ShowError(err error)
- func ShowWarnings(warnings []string)
- type Presenter
- func (p *Presenter) ShowAlreadyLoggedIn(username string)
- func (p *Presenter) ShowAuthenticationSuccess()
- func (p *Presenter) ShowLanguageNotSupported(language string)
- func (p *Presenter) ShowLoginResult(username string, stats repository.GetStatsRow) error
- func (p *Presenter) ShowNoEligibleProblems()
- func (p *Presenter) ShowOpeningConfigFile(path string)
- func (p *Presenter) ShowPaywalledProblem(title, slug string)
- func (p *Presenter) ShowProblemAlreadyExists(title, path, slug string)
- func (p *Presenter) ShowProblemDoesNotExist(title, path, slug string)
- func (p *Presenter) ShowProblemFetched(title string)
- func (p *Presenter) ShowProblemNotFound(problemName string)
- func (p *Presenter) ShowQuizResult(problem *domain.Problem) error
- func (p *Presenter) ShowRenderResults(result *render.RenderResult, slug string, force bool)
- func (p *Presenter) ShowRunningTests()
- func (p *Presenter) ShowSolutionFailed()
- func (p *Presenter) ShowSolutionNotFound(title, languageName string)
- func (p *Presenter) ShowSubmissionResults(result *leetcode.SubmissionResult)
- func (p *Presenter) ShowSubmittingSolution()
- func (p *Presenter) ShowTestResults(result *leetcode.SubmissionResult, problem *domain.Problem)
- func (p *Presenter) ShowWaitForResults(start time.Time, wait time.Duration, done <-chan struct{})
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatError ¶ added in v0.0.10
FormatError converts known error types into user-friendly messages
func ShowWarnings ¶ added in v0.0.10
func ShowWarnings(warnings []string)
ShowWarnings displays a list of warning messages
Types ¶
type Presenter ¶ added in v0.0.10
type Presenter struct {
// contains filtered or unexported fields
}
Presenter handles all UI output and formatting
func NewPresenter ¶ added in v0.0.10
func NewPresenter() *Presenter
NewPresenter creates a new Presenter instance
func NewPresenterWithWriter ¶ added in v0.0.10
NewPresenterWithWriter creates a new Presenter with a custom writer (useful for testing)
func (*Presenter) ShowAlreadyLoggedIn ¶ added in v0.0.10
ShowAlreadyLoggedIn displays a message when user is already logged in
func (*Presenter) ShowAuthenticationSuccess ¶ added in v0.0.10
func (p *Presenter) ShowAuthenticationSuccess()
ShowAuthenticationSuccess displays a success message after successful authentication
func (*Presenter) ShowLanguageNotSupported ¶ added in v0.0.10
ShowLanguageNotSupported displays an error for unsupported languages
func (*Presenter) ShowLoginResult ¶ added in v0.0.10
func (p *Presenter) ShowLoginResult(username string, stats repository.GetStatsRow) error
ShowLoginResult displays the login result with user stats
func (*Presenter) ShowNoEligibleProblems ¶ added in v0.0.10
func (p *Presenter) ShowNoEligibleProblems()
ShowNoEligibleProblems displays a helpful message when no problems are available for quiz
func (*Presenter) ShowOpeningConfigFile ¶ added in v0.0.10
ShowOpeningConfigFile displays a message when opening the config file
func (*Presenter) ShowPaywalledProblem ¶ added in v0.0.10
ShowPaywalledProblem displays a message when a free user tries to access a premium problem
func (*Presenter) ShowProblemAlreadyExists ¶ added in v0.0.10
ShowProblemAlreadyExists displays a message when a problem already exists
func (*Presenter) ShowProblemDoesNotExist ¶ added in v0.0.10
ShowProblemDoesNotExist displays a message when attempting to retry a non-existent problem
func (*Presenter) ShowProblemFetched ¶ added in v0.0.10
ShowProblemFetched displays a success message for fetched problems
func (*Presenter) ShowProblemNotFound ¶ added in v0.0.10
ShowProblemNotFound displays an error when a problem is not found
func (*Presenter) ShowQuizResult ¶ added in v0.0.10
ShowQuizResult displays the quiz result using a template
func (*Presenter) ShowRenderResults ¶ added in v0.0.10
func (p *Presenter) ShowRenderResults(result *render.RenderResult, slug string, force bool)
ShowRenderResults displays the results of rendering/stubbing a problem
func (*Presenter) ShowRunningTests ¶ added in v0.0.10
func (p *Presenter) ShowRunningTests()
ShowRunningTests displays a message indicating tests are running
func (*Presenter) ShowSolutionFailed ¶ added in v0.0.10
func (p *Presenter) ShowSolutionFailed()
ShowSolutionFailed displays an error when a solution fails
func (*Presenter) ShowSolutionNotFound ¶ added in v0.0.10
ShowSolutionNotFound displays an error when a solution file doesn't exist
func (*Presenter) ShowSubmissionResults ¶ added in v0.0.10
func (p *Presenter) ShowSubmissionResults(result *leetcode.SubmissionResult)
ShowSubmissionResults displays submission results
func (*Presenter) ShowSubmittingSolution ¶ added in v0.0.10
func (p *Presenter) ShowSubmittingSolution()
ShowSubmittingSolution displays a message indicating solution is being submitted
func (*Presenter) ShowTestResults ¶ added in v0.0.10
func (p *Presenter) ShowTestResults(result *leetcode.SubmissionResult, problem *domain.Problem)
ShowTestResults displays test execution results