tui

package
v0.0.0-...-db60b1e Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2022 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertBytesToSizeString

func ConvertBytesToSizeString(size int64) string

ConvertBytesToSizeString converts a byte count to a human readable string.

func CreateItemListModel

func CreateItemListModel(dirPath string, sftpClient *sftp.Client) []list.Item

Create the list of item by fetching the server

func StartProgram

func StartProgram(username, privateKeyPath, password, host, port, knownHostsPath string)

Types

type Model

type Model struct {
	List       list.Model   // the list of items
	SftpClient *sftp.Client // the sftp client
	// contains filtered or unexported fields
}

Holds the state of the tui

func (Model) Init

func (m Model) Init() tea.Cmd

func (Model) Update

func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (Model) View

func (m Model) View() string

type PreviousDir

type PreviousDir struct{}

Rapresent the ".." dir

func (*PreviousDir) IsDir

func (p *PreviousDir) IsDir() bool

func (*PreviousDir) ModTime

func (p *PreviousDir) ModTime() time.Time

func (*PreviousDir) Mode

func (p *PreviousDir) Mode() fs.FileMode

func (*PreviousDir) Name

func (p *PreviousDir) Name() string

func (*PreviousDir) Size

func (p *PreviousDir) Size() int64

func (*PreviousDir) Sys

func (p *PreviousDir) Sys() any

Jump to

Keyboard shortcuts

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