ui

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2022 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	RepoName   string
	ExecName   string
	Cloned     bool // Planning to use this to determine when to exit the spinner when the repo is cloned.
	LinuxLoc   string
	MacLoc     string
	WindowsLoc string // Bruh
)

I put all the globals here :shrug:

View Source
var DefaultKeyMap = KeyMap{
	Up: key.NewBinding(
		key.WithKeys("k", "up"),
		key.WithHelp("↑/k", "move up"),
	),
	Down: key.NewBinding(
		key.WithKeys("j", "down"),
		key.WithHelp("↓/j", "move down"),
	),
}

Functions

func CloneRepo

func CloneRepo(stagePath string, repo string) string

CloneRepo clones a repo into the specified location.

func GetRepoName

func GetRepoName() tea.Msg

func Run

func Run()

func StartClone

func StartClone(repo string) tea.Cmd

Types

type ExecModel

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

func NewExecModel

func NewExecModel() ExecModel

func (ExecModel) Init

func (m ExecModel) Init() tea.Cmd

func (ExecModel) Update

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

func (ExecModel) View

func (m ExecModel) View() string

type GitProgress

type GitProgress struct {
	Progress int
}

func (GitProgress) Write

func (g GitProgress) Write(raw []byte) (n int, err error)

Write intercepts the content and updates the percentage

type InitialModel

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

func NewInitialModel

func NewInitialModel() InitialModel

func (InitialModel) Init

func (m InitialModel) Init() tea.Cmd

func (InitialModel) Update

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

func (InitialModel) View

func (m InitialModel) View() string

type InstallModel

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

func NewInstallModel

func NewInstallModel() InstallModel

func (InstallModel) Init

func (m InstallModel) Init() tea.Cmd

func (InstallModel) RenderView

func (m InstallModel) RenderView() string

func (InstallModel) Update

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

func (InstallModel) View

func (m InstallModel) View() string

type KeyMap

type KeyMap struct {
	Up   key.Binding
	Down key.Binding
}

you don't need these keymaps but they can be helpful for generating the help menu for you

type ProgressWrapper

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

func NewProgressBar

func NewProgressBar() ProgressWrapper

func (ProgressWrapper) Init

func (m ProgressWrapper) Init() tea.Cmd

func (ProgressWrapper) Update

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

func (ProgressWrapper) View

func (m ProgressWrapper) View() string

type SpinnerParent

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

func NewSpinnerParent

func NewSpinnerParent() *SpinnerParent

func (SpinnerParent) Init

func (m SpinnerParent) Init() tea.Cmd

func (SpinnerParent) Update

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

func (SpinnerParent) View

func (m SpinnerParent) View() string

Jump to

Keyboard shortcuts

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