repo

package
v0.4.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CopyUrlMsg

type CopyUrlMsg struct{}

CopyUrlMsg is a message to copy the URL of the current repository.

type FileContentMsg

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

FileContentMsg is a message that contains the content of a file.

type FileItem

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

FileItem is a list item for a file.

func (FileItem) Description

func (i FileItem) Description() string

Description returns the description of the file item.

func (FileItem) FilterValue

func (i FileItem) FilterValue() string

FilterValue implements list.Item.

func (FileItem) ID

func (i FileItem) ID() string

ID returns the ID of the file item.

func (FileItem) Mode

func (i FileItem) Mode() fs.FileMode

Mode returns the mode of the file item.

func (FileItem) Title

func (i FileItem) Title() string

Title returns the title of the file item.

type FileItemDelegate

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

FileItemDelegate is the delegate for the file item list.

func (FileItemDelegate) Height

func (d FileItemDelegate) Height() int

Height returns the height of the file item list. Implements list.ItemDelegate.

func (FileItemDelegate) Render

func (d FileItemDelegate) Render(w io.Writer, m list.Model, index int, listItem list.Item)

Render implements list.ItemDelegate.

func (FileItemDelegate) Spacing

func (d FileItemDelegate) Spacing() int

Spacing returns the spacing of the file item list. Implements list.ItemDelegate.

func (FileItemDelegate) Update

func (d FileItemDelegate) Update(msg tea.Msg, m *list.Model) tea.Cmd

Update implements list.ItemDelegate.

type FileItems

type FileItems []FileItem

FileItems is a list of file items.

func (FileItems) Len

func (cl FileItems) Len() int

Len implements sort.Interface.

func (FileItems) Less

func (cl FileItems) Less(i, j int) bool

Less implements sort.Interface.

func (FileItems) Swap

func (cl FileItems) Swap(i, j int)

Swap implements sort.Interface.

type FileItemsMsg

type FileItemsMsg []selector.IdentifiableItem

FileItemsMsg is a message that contains a list of files.

type Files

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

Files is the model for the files view.

func NewFiles

func NewFiles(common common.Common) *Files

NewFiles creates a new files model.

func (*Files) FullHelp

func (f *Files) FullHelp() [][]key.Binding

FullHelp implements help.KeyMap.

func (*Files) Init

func (f *Files) Init() tea.Cmd

Init implements tea.Model.

func (*Files) SetSize

func (f *Files) SetSize(width, height int)

SetSize implements common.Component.

func (*Files) ShortHelp

func (f *Files) ShortHelp() []key.Binding

ShortHelp implements help.KeyMap.

func (*Files) StatusBarInfo

func (f *Files) StatusBarInfo() string

StatusBarInfo returns the status bar info.

func (*Files) StatusBarValue

func (f *Files) StatusBarValue() string

StatusBarValue returns the status bar value.

func (*Files) Update

func (f *Files) Update(msg tea.Msg) (tea.Model, tea.Cmd)

Update implements tea.Model.

func (*Files) View

func (f *Files) View() string

View implements tea.Model.

type Log

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

Log is a model that displays a list of commits and their diffs.

func NewLog

func NewLog(common common.Common) *Log

NewLog creates a new Log model.

func (*Log) FullHelp

func (l *Log) FullHelp() [][]key.Binding

FullHelp implements help.KeyMap.

func (*Log) Init

func (l *Log) Init() tea.Cmd

Init implements tea.Model.

func (*Log) SetSize

func (l *Log) SetSize(width, height int)

SetSize implements common.Component.

func (*Log) ShortHelp

func (l *Log) ShortHelp() []key.Binding

ShortHelp implements help.KeyMap.

func (*Log) StatusBarInfo

func (l *Log) StatusBarInfo() string

StatusBarInfo returns the status bar info.

func (*Log) StatusBarValue

func (l *Log) StatusBarValue() string

StatusBarValue returns the status bar value.

func (*Log) Update

func (l *Log) Update(msg tea.Msg) (tea.Model, tea.Cmd)

Update implements tea.Model.

func (*Log) View

func (l *Log) View() string

View implements tea.Model.

type LogCommitMsg

type LogCommitMsg *ggit.Commit

LogCommitMsg is a message that contains a git commit.

type LogCountMsg

type LogCountMsg int64

LogCountMsg is a message that contains the number of commits in a repo.

type LogDiffMsg

type LogDiffMsg *ggit.Diff

LogDiffMsg is a message that contains a git diff.

type LogItem

type LogItem struct {
	*git.Commit
	// contains filtered or unexported fields
}

LogItem is a item in the log list that displays a git commit.

func (LogItem) Description

func (i LogItem) Description() string

Description returns the item description. Implements list.DefaultItem.

func (LogItem) FilterValue

func (i LogItem) FilterValue() string

FilterValue implements list.Item.

func (LogItem) Hash

func (i LogItem) Hash() string

func (LogItem) ID

func (i LogItem) ID() string

ID implements selector.IdentifiableItem.

func (LogItem) Title

func (i LogItem) Title() string

Title returns the item title. Implements list.DefaultItem.

type LogItemDelegate

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

LogItemDelegate is the delegate for LogItem.

func (LogItemDelegate) Height

func (d LogItemDelegate) Height() int

Height returns the item height. Implements list.ItemDelegate.

func (LogItemDelegate) Render

func (d LogItemDelegate) Render(w io.Writer, m list.Model, index int, listItem list.Item)

Render renders the item. Implements list.ItemDelegate.

func (LogItemDelegate) Spacing

func (d LogItemDelegate) Spacing() int

Spacing returns the item spacing. Implements list.ItemDelegate.

func (LogItemDelegate) Update

func (d LogItemDelegate) Update(msg tea.Msg, m *list.Model) tea.Cmd

Update updates the item. Implements list.ItemDelegate.

type LogItemsMsg

type LogItemsMsg []selector.IdentifiableItem

LogItemsMsg is a message that contains a slice of LogItem.

type Readme

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

Readme is the readme component page.

func NewReadme

func NewReadme(common common.Common) *Readme

NewReadme creates a new readme model.

func (*Readme) FullHelp

func (r *Readme) FullHelp() [][]key.Binding

FullHelp implements help.KeyMap.

func (*Readme) Init

func (r *Readme) Init() tea.Cmd

Init implements tea.Model.

func (*Readme) SetSize

func (r *Readme) SetSize(width, height int)

SetSize implements common.Component.

func (*Readme) ShortHelp

func (r *Readme) ShortHelp() []key.Binding

ShortHelp implements help.KeyMap.

func (*Readme) StatusBarInfo

func (r *Readme) StatusBarInfo() string

StatusBarInfo implements statusbar.StatusBar.

func (*Readme) StatusBarValue

func (r *Readme) StatusBarValue() string

StatusBarValue implements statusbar.StatusBar.

func (*Readme) Update

func (r *Readme) Update(msg tea.Msg) (tea.Model, tea.Cmd)

Update implements tea.Model.

func (*Readme) View

func (r *Readme) View() string

View implements tea.Model.

type ReadmeMsg

type ReadmeMsg struct{}

type RefItem

type RefItem struct {
	*git.Reference
}

RefItem is a git reference item.

func (RefItem) Description

func (i RefItem) Description() string

Description implements list.DefaultItem.

func (RefItem) FilterValue

func (i RefItem) FilterValue() string

FilterValue implements list.Item.

func (RefItem) ID

func (i RefItem) ID() string

ID implements selector.IdentifiableItem.

func (RefItem) Short

func (i RefItem) Short() string

Short returns the short name of the reference.

func (RefItem) Title

func (i RefItem) Title() string

Title implements list.DefaultItem.

type RefItemDelegate

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

RefItemDelegate is the delegate for the ref item.

func (RefItemDelegate) Height

func (d RefItemDelegate) Height() int

Height implements list.ItemDelegate.

func (RefItemDelegate) Render

func (d RefItemDelegate) Render(w io.Writer, m list.Model, index int, listItem list.Item)

Render implements list.ItemDelegate.

func (RefItemDelegate) Spacing

func (d RefItemDelegate) Spacing() int

Spacing implements list.ItemDelegate.

func (RefItemDelegate) Update

func (d RefItemDelegate) Update(msg tea.Msg, m *list.Model) tea.Cmd

Update implements list.ItemDelegate.

type RefItems

type RefItems []RefItem

RefItems is a list of git references.

func (RefItems) Len

func (cl RefItems) Len() int

Len implements sort.Interface.

func (RefItems) Less

func (cl RefItems) Less(i, j int) bool

Less implements sort.Interface.

func (RefItems) Swap

func (cl RefItems) Swap(i, j int)

Swap implements sort.Interface.

type RefItemsMsg

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

RefItemsMsg is a message that contains a list of RefItem.

type RefMsg

type RefMsg *ggit.Reference

RefMsg is a message that contains a git.Reference.

type Refs

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

Refs is a component that displays a list of references.

func NewRefs

func NewRefs(common common.Common, refPrefix string) *Refs

NewRefs creates a new Refs component.

func (*Refs) FullHelp

func (r *Refs) FullHelp() [][]key.Binding

FullHelp implements help.KeyMap.

func (*Refs) Init

func (r *Refs) Init() tea.Cmd

Init implements tea.Model.

func (*Refs) SetSize

func (r *Refs) SetSize(width, height int)

SetSize implements common.Component.

func (*Refs) ShortHelp

func (r *Refs) ShortHelp() []key.Binding

ShortHelp implements help.KeyMap.

func (*Refs) StatusBarInfo

func (r *Refs) StatusBarInfo() string

StatusBarInfo implements statusbar.StatusBar.

func (*Refs) StatusBarValue

func (r *Refs) StatusBarValue() string

StatusBarValue implements statusbar.StatusBar.

func (*Refs) Update

func (r *Refs) Update(msg tea.Msg) (tea.Model, tea.Cmd)

Update implements tea.Model.

func (*Refs) View

func (r *Refs) View() string

View implements tea.Model.

type Repo

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

Repo is a view for a git repository.

func New

func New(cfg *config.Config, c common.Common) *Repo

New returns a new Repo.

func (*Repo) FullHelp

func (r *Repo) FullHelp() [][]key.Binding

FullHelp implements help.KeyMap.

func (*Repo) Init

func (r *Repo) Init() tea.Cmd

Init implements tea.View.

func (*Repo) SetSize

func (r *Repo) SetSize(width, height int)

SetSize implements common.Component.

func (*Repo) ShortHelp

func (r *Repo) ShortHelp() []key.Binding

ShortHelp implements help.KeyMap.

func (*Repo) Update

func (r *Repo) Update(msg tea.Msg) (tea.Model, tea.Cmd)

Update implements tea.Model.

func (*Repo) View

func (r *Repo) View() string

View implements tea.Model.

type RepoMsg

type RepoMsg git.GitRepo

RepoMsg is a message that contains a git.Repository.

type ResetUrlMsg

type ResetUrlMsg struct{}

ResetUrlMsg is a message to reset the URL string.

type UpdateStatusBarMsg

type UpdateStatusBarMsg struct{}

UpdateStatusBarMsg updates the status bar.

Jump to

Keyboard shortcuts

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