explore

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildFileView

func BuildFileView() *tview.TextView

func BuildSearchView

func BuildSearchView(repo string) *tview.InputField

func BuildTreeView

func BuildTreeView(repo string, gt GitTree) *tview.TreeView

func RetrieveDefaultBranch

func RetrieveDefaultBranch(client api.RESTClient, repo string) (string, error)

func RetrieveFileContent

func RetrieveFileContent(client api.RESTClient, repo, branch, filePath string) ([]byte, error)

func SearchTreeView

func SearchTreeView(repo string, gt GitTree, treeView *tview.TreeView) func(string)

func SelectTreeNode

func SelectTreeNode(client api.RESTClient, repo, branch string, fileView *tview.TextView) func(*tview.TreeNode)

Types

type GitTree

type GitTree []GitTreeNode

func RetrieveGitTree

func RetrieveGitTree(client api.RESTClient, repo, branch string) (GitTree, error)

type GitTreeNode

type GitTreeNode struct {
	Path string `json:"path"`
	Mode string `json:"mode"`
	Type string `json:"type"`
	Size int64  `json:"size"`
	SHA  string `json:"sha"`
	URL  string `json:"url"`
}

func (*GitTreeNode) Dir

func (gtn *GitTreeNode) Dir() string

func (*GitTreeNode) Ext

func (gtn *GitTreeNode) Ext() string

func (*GitTreeNode) IsDir

func (gtn *GitTreeNode) IsDir() bool

func (*GitTreeNode) Name

func (gtn *GitTreeNode) Name() string

Jump to

Keyboard shortcuts

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