ui

package
v0.0.10 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatError added in v0.0.10

func FormatError(err error) string

FormatError converts known error types into user-friendly messages

func ShowError added in v0.0.10

func ShowError(err error)

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

func NewPresenterWithWriter(w io.Writer) *Presenter

NewPresenterWithWriter creates a new Presenter with a custom writer (useful for testing)

func (*Presenter) ShowAlreadyLoggedIn added in v0.0.10

func (p *Presenter) ShowAlreadyLoggedIn(username string)

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

func (p *Presenter) ShowLanguageNotSupported(language string)

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

func (p *Presenter) ShowOpeningConfigFile(path string)

ShowOpeningConfigFile displays a message when opening the config file

func (*Presenter) ShowPaywalledProblem added in v0.0.10

func (p *Presenter) ShowPaywalledProblem(title, slug string)

ShowPaywalledProblem displays a message when a free user tries to access a premium problem

func (*Presenter) ShowProblemAlreadyExists added in v0.0.10

func (p *Presenter) ShowProblemAlreadyExists(title, path, slug string)

ShowProblemAlreadyExists displays a message when a problem already exists

func (*Presenter) ShowProblemDoesNotExist added in v0.0.10

func (p *Presenter) ShowProblemDoesNotExist(title, path, slug string)

ShowProblemDoesNotExist displays a message when attempting to retry a non-existent problem

func (*Presenter) ShowProblemFetched added in v0.0.10

func (p *Presenter) ShowProblemFetched(title string)

ShowProblemFetched displays a success message for fetched problems

func (*Presenter) ShowProblemNotFound added in v0.0.10

func (p *Presenter) ShowProblemNotFound(problemName string)

ShowProblemNotFound displays an error when a problem is not found

func (*Presenter) ShowQuizResult added in v0.0.10

func (p *Presenter) ShowQuizResult(problem *domain.Problem) error

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

func (p *Presenter) ShowSolutionNotFound(title, languageName string)

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

func (*Presenter) ShowWaitForResults added in v0.0.10

func (p *Presenter) ShowWaitForResults(start time.Time, wait time.Duration, done <-chan struct{})

ShowWaitForResults displays a progress indicator while waiting for results

Jump to

Keyboard shortcuts

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