ui

package
v0.0.0-...-b556d1f Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ProgressBar

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

ProgressBar provides progress tracking functionality

func NewProgressBar

func NewProgressBar(totalSize int64, description string) *ProgressBar

NewProgressBar creates a new progress bar with the given total size and description

func (*ProgressBar) Add

func (p *ProgressBar) Add(size int64) error

Add increments the progress bar by the given amount

type Prompt

type Prompt struct{}

Prompt provides methods for interactive command-line prompts

func NewPrompt

func NewPrompt() *Prompt

NewPrompt creates a new Prompt instance

func (*Prompt) ChooseFile

func (p *Prompt) ChooseFile(files []string) (string, error)

ChooseFile prompts the user to select a file from the provided list

func (*Prompt) ConfirmFileOverwrite

func (p *Prompt) ConfirmFileOverwrite(path string) (bool, error)

ConfirmFileOverwrite prompts the user to confirm overwriting an existing file

func (*Prompt) ConfirmFileRemoval

func (p *Prompt) ConfirmFileRemoval(path, message string) (bool, constants.DeleteOption, error)

ConfirmFileRemoval prompts for confirmation and deletion method for file removal

func (*Prompt) GetDecryptionPassword

func (p *Prompt) GetDecryptionPassword() (string, error)

GetDecryptionPassword prompts for a password for decryption

func (*Prompt) GetEncryptionPassword

func (p *Prompt) GetEncryptionPassword() (string, error)

GetEncryptionPassword prompts for and confirms a password for encryption

func (*Prompt) GetProcessingMode

func (p *Prompt) GetProcessingMode() (constants.ProcessorMode, error)

GetProcessingMode prompts the user to select a processing operation

func (*Prompt) ShowFileInfo

func (p *Prompt) ShowFileInfo(files []constants.FileInfo)

ShowFileInfo displays information about files to be processed

func (*Prompt) ShowInfo

func (p *Prompt) ShowInfo(message string)

ShowInfo displays an informational message to the user

func (*Prompt) ShowProcessingInfo

func (p *Prompt) ShowProcessingInfo(mode constants.ProcessorMode, file string)

ShowProcessingInfo displays information about the processing pipeline

func (*Prompt) ShowSuccess

func (p *Prompt) ShowSuccess(message string)

ShowSuccess displays a success message to the user

func (*Prompt) ShowWarning

func (p *Prompt) ShowWarning(message string)

ShowWarning displays a warning message to the user

type Terminal

type Terminal struct{}

Terminal provides terminal control functionality

func NewTerminal

func NewTerminal() *Terminal

NewTerminal creates a new Terminal instance

func (*Terminal) Cleanup

func (t *Terminal) Cleanup()

Cleanup performs terminal cleanup operations

func (*Terminal) Clear

func (t *Terminal) Clear()

Clear clears the terminal screen

func (*Terminal) MoveTopLeft

func (t *Terminal) MoveTopLeft()

MoveTopLeft moves the cursor to the top-left corner

func (*Terminal) PrintBanner

func (t *Terminal) PrintBanner()

PrintBanner prints the application banner

func (*Terminal) PrintError

func (t *Terminal) PrintError(message string)

PrintError prints an error message with formatting

func (*Terminal) PrintInfo

func (t *Terminal) PrintInfo(message string)

PrintInfo prints an info message with formatting

func (*Terminal) PrintSeparator

func (t *Terminal) PrintSeparator()

PrintSeparator prints a visual separator

func (*Terminal) PrintSuccess

func (t *Terminal) PrintSuccess(message string)

PrintSuccess prints a success message with formatting

func (*Terminal) PrintWarning

func (t *Terminal) PrintWarning(message string)

PrintWarning prints a warning message with formatting

func (*Terminal) SetTitle

func (t *Terminal) SetTitle(title string)

SetTitle sets the terminal window title

func (*Terminal) ShowCursor

func (t *Terminal) ShowCursor()

ShowCursor shows the terminal cursor

Jump to

Keyboard shortcuts

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