console

package
v0.0.0-...-ba4a4a7 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2022 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Repov1 = `` /* 957-byte string literal not displayed */

	Repov = `` /* 960-byte string literal not displayed */

)
View Source
const (
	LineLineCommit = line('┼')
)

https://en.wikipedia.org/wiki/List_of_Unicode_characters Foreground text colors

Variables

This section is empty.

Functions

func NewDetailsVM

func NewDetailsVM(view cui.View) *detailsVM

func ShowAboutDlg

func ShowAboutDlg(ui cui.UI)

func ShowHelpDlg

func ShowHelpDlg(ui cui.UI)

Types

type BranchDlg

type BranchDlg interface {
	Show()
}

type CloneDlg

type CloneDlg interface {
	Show()
}

type CommitView

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

func NewCommitView

func NewCommitView(ui cui.UI, committer Committer, repoID, branchName string, changes int) *CommitView

func (*CommitView) Close

func (h *CommitView) Close()

func (*CommitView) Show

func (h *CommitView) Show(text string)

type Committer

type Committer interface {
	GetCommitDiff(info api.CommitDiffInfoReq) (api.CommitDiff, error)
	GetFileDiff(info api.FileDiffInfoReq) ([]api.CommitDiff, error)
	Commit(info api.CommitInfoReq) error
}

type DetailsView

type DetailsView struct {
	cui.View
	// contains filtered or unexported fields
}

func NewDetailsView

func NewDetailsView(ui cui.UI, repoView *RepoView) *DetailsView

func (*DetailsView) SetCurrentLine

func (t *DetailsView) SetCurrentLine(line int, repo api.Repo, repoId string, api api.Api)

func (*DetailsView) SetCurrentView

func (t *DetailsView) SetCurrentView()

type DiffGetter

type DiffGetter interface {
	GetCommitDiff(info api.CommitDiffInfoReq) (api.CommitDiff, error)
	GetFileDiff(info api.FileDiffInfoReq) ([]api.CommitDiff, error)
}

type DiffView

type DiffView interface {
	Show()
	SetTop()
	SetCurrentView()
	Close()
	NotifyChanged()
}

func NewCommitDiffView

func NewCommitDiffView(ui cui.UI, diffGetter DiffGetter, repoID string, commitID string) DiffView

func NewFileDiffView

func NewFileDiffView(ui cui.UI, diffGetter DiffGetter, repoID string, path string) DiffView

type MainWindow

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

func NewMainWindow

func NewMainWindow(ui cui.UI, configService *config.Service) *MainWindow

func (*MainWindow) Close

func (t *MainWindow) Close()

func (*MainWindow) OpenRepoMenuItems

func (t *MainWindow) OpenRepoMenuItems() []cui.MenuItem

func (*MainWindow) Show

func (t *MainWindow) Show(api api.Api, path string)

func (*MainWindow) ShowRepo

func (t *MainWindow) ShowRepo(path string)
type Menus interface {
	GetMainMenu(currentLineIndex int) cui.Menu
	GetShowBranchesMenu(selectedIndex int) cui.Menu
	GetHideBranchesMenu() cui.Menu
}

type RepoGraph

type RepoGraph struct {
}

func NewRepoGraph

func NewRepoGraph() *RepoGraph

func (*RepoGraph) WriteGraph

func (t *RepoGraph) WriteGraph(sb *strings.Builder, row api.GraphRow)

type RepoView

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

func NewRepoView

func NewRepoView(ui cui.UI, api api.Api, mainService mainService, configService *config.Service, repoID string) *RepoView

func (*RepoView) Close

func (t *RepoView) Close()

func (*RepoView) CloseSearch

func (t *RepoView) CloseSearch()

func (*RepoView) NotifyChanged

func (t *RepoView) NotifyChanged()

func (*RepoView) OpenRepoMenuItems

func (t *RepoView) OpenRepoMenuItems() []cui.MenuItem

func (*RepoView) ScrollVertical

func (t *RepoView) ScrollVertical(scroll int)

func (*RepoView) Search

func (t *RepoView) Search(text string)

func (*RepoView) SetCurrentView

func (t *RepoView) SetCurrentView()

func (*RepoView) Show

func (t *RepoView) Show()

func (*RepoView) ShowCommitDetails

func (t *RepoView) ShowCommitDetails()

func (*RepoView) ShowLineAtTop

func (t *RepoView) ShowLineAtTop(line int)

func (*RepoView) ShowRepo

func (t *RepoView) ShowRepo(path string)

func (*RepoView) ShowSearchView

func (t *RepoView) ShowSearchView()

type RepoViewer

type RepoViewer interface {
	NotifyChanged()
	ShowLineAtTop(line int)
	OpenRepoMenuItems() []cui.MenuItem
	ShowRepo(path string)
	ShowSearchView()
	ShowCommitDetails()
}

type SearchView

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

func NewSearchView

func NewSearchView(ui cui.UI, searcher Searcher) *SearchView

func (*SearchView) Close

func (t *SearchView) Close()

func (*SearchView) SetCurrentView

func (t *SearchView) SetCurrentView()

func (*SearchView) Show

func (t *SearchView) Show()

type Searcher

type Searcher interface {
	Search(text string)
	CloseSearch()
	ScrollVertical(scroll int)
	SetCurrentView()
}

Jump to

Keyboard shortcuts

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