Documentation ¶
Index ¶
- Constants
- type CollapsedPaths
- type CommitFileManager
- func (m *CommitFileManager) ExpandToPath(path string)
- func (m *CommitFileManager) GetAllFiles() []*models.CommitFile
- func (m *CommitFileManager) GetAllItems() []*CommitFileNode
- func (m *CommitFileManager) GetIndexForPath(path string) (int, bool)
- func (m *CommitFileManager) GetItemAtIndex(index int) *CommitFileNode
- func (m *CommitFileManager) GetItemsLength() int
- func (m *CommitFileManager) GetParent() string
- func (m *CommitFileManager) IsCollapsed(path string) bool
- func (m *CommitFileManager) Render(diffName string, patchManager *patch.PatchManager) []string
- func (m *CommitFileManager) SetFiles(files []*models.CommitFile, parent string)
- func (m *CommitFileManager) SetTree()
- func (m *CommitFileManager) ToggleCollapsed(path string)
- func (m *CommitFileManager) ToggleShowTree()
- type CommitFileNode
- func (s *CommitFileNode) Any(test func(node *CommitFileNode) bool) bool
- func (s *CommitFileNode) AnyFile(test func(file *models.CommitFile) bool) bool
- func (s *CommitFileNode) Compress()
- func (s *CommitFileNode) Description() string
- func (s *CommitFileNode) Every(test func(node *CommitFileNode) bool) bool
- func (s *CommitFileNode) EveryFile(test func(file *models.CommitFile) bool) bool
- func (n *CommitFileNode) Flatten(collapsedPaths map[string]bool) []*CommitFileNode
- func (s *CommitFileNode) ForEachFile(cb func(*models.CommitFile) error) error
- func (s *CommitFileNode) GetChildren() []INode
- func (s *CommitFileNode) GetCompressionLevel() int
- func (node *CommitFileNode) GetIndexForPath(path string, collapsedPaths map[string]bool) (int, bool)
- func (s *CommitFileNode) GetLeaves() []*CommitFileNode
- func (node *CommitFileNode) GetNodeAtIndex(index int, collapsedPaths map[string]bool) *CommitFileNode
- func (s *CommitFileNode) GetPath() string
- func (node *CommitFileNode) GetPathsMatching(test func(*CommitFileNode) bool) []string
- func (s *CommitFileNode) ID() string
- func (s *CommitFileNode) IsLeaf() bool
- func (s *CommitFileNode) NameAtDepth(depth int) string
- func (s *CommitFileNode) SetChildren(children []INode)
- func (s *CommitFileNode) SetCompressionLevel(level int)
- func (node *CommitFileNode) Size(collapsedPaths map[string]bool) int
- func (s *CommitFileNode) Sort()
- type FileManager
- func (m *FileManager) ExpandToPath(path string)
- func (m *FileManager) GetAllFiles() []*models.File
- func (m *FileManager) GetAllItems() []*FileNode
- func (m *FileManager) GetIndexForPath(path string) (int, bool)
- func (m *FileManager) GetItemAtIndex(index int) *FileNode
- func (m *FileManager) GetItemsLength() int
- func (m *FileManager) InTreeMode() bool
- func (m *FileManager) IsCollapsed(path string) bool
- func (m *FileManager) Render(diffName string, submoduleConfigs []*models.SubmoduleConfig) []string
- func (m *FileManager) SetFiles(files []*models.File)
- func (m *FileManager) SetTree()
- func (m *FileManager) ToggleCollapsed(path string)
- func (m *FileManager) ToggleShowTree()
- type FileNode
- func (s *FileNode) Any(test func(node *FileNode) bool) bool
- func (s *FileNode) AnyFile(test func(file *models.File) bool) bool
- func (s *FileNode) Compress()
- func (s *FileNode) Description() string
- func (n *FileNode) Flatten(collapsedPaths map[string]bool) []*FileNode
- func (s *FileNode) ForEachFile(cb func(*models.File) error) error
- func (s *FileNode) GetChildren() []INode
- func (s *FileNode) GetCompressionLevel() int
- func (s *FileNode) GetHasInlineMergeConflicts() bool
- func (s *FileNode) GetHasStagedChanges() bool
- func (s *FileNode) GetHasUnstagedChanges() bool
- func (node *FileNode) GetIndexForPath(path string, collapsedPaths map[string]bool) (int, bool)
- func (s *FileNode) GetIsTracked() bool
- func (s *FileNode) GetLeaves() []*FileNode
- func (node *FileNode) GetNodeAtIndex(index int, collapsedPaths map[string]bool) *FileNode
- func (s *FileNode) GetPath() string
- func (node *FileNode) GetPathsMatching(test func(*FileNode) bool) []string
- func (s *FileNode) ID() string
- func (s *FileNode) IsLeaf() bool
- func (s *FileNode) NameAtDepth(depth int) string
- func (s *FileNode) SetChildren(children []INode)
- func (s *FileNode) SetCompressionLevel(level int)
- func (node *FileNode) Size(collapsedPaths map[string]bool) int
- func (s *FileNode) Sort()
- type INode
Constants ¶
View Source
const COLLAPSED_ARROW = "►"
View Source
const EXPANDED_ARROW = "▼"
View Source
const INNER_ITEM = "├─ "
View Source
const LAST_ITEM = "└─ "
View Source
const NESTED = "│ "
View Source
const NOTHING = " "
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CollapsedPaths ¶
func (CollapsedPaths) ExpandToPath ¶
func (cp CollapsedPaths) ExpandToPath(path string)
func (CollapsedPaths) IsCollapsed ¶
func (cp CollapsedPaths) IsCollapsed(path string) bool
func (CollapsedPaths) ToggleCollapsed ¶
func (cp CollapsedPaths) ToggleCollapsed(path string)
type CommitFileManager ¶
type CommitFileManager struct {
// contains filtered or unexported fields
}
func NewCommitFileManager ¶
func NewCommitFileManager(files []*models.CommitFile, log *logrus.Entry, showTree bool) *CommitFileManager
func (*CommitFileManager) ExpandToPath ¶
func (m *CommitFileManager) ExpandToPath(path string)
func (*CommitFileManager) GetAllFiles ¶
func (m *CommitFileManager) GetAllFiles() []*models.CommitFile
func (*CommitFileManager) GetAllItems ¶
func (m *CommitFileManager) GetAllItems() []*CommitFileNode
func (*CommitFileManager) GetIndexForPath ¶
func (m *CommitFileManager) GetIndexForPath(path string) (int, bool)
func (*CommitFileManager) GetItemAtIndex ¶
func (m *CommitFileManager) GetItemAtIndex(index int) *CommitFileNode
func (*CommitFileManager) GetItemsLength ¶
func (m *CommitFileManager) GetItemsLength() int
func (*CommitFileManager) GetParent ¶
func (m *CommitFileManager) GetParent() string
func (*CommitFileManager) IsCollapsed ¶
func (m *CommitFileManager) IsCollapsed(path string) bool
func (*CommitFileManager) Render ¶
func (m *CommitFileManager) Render(diffName string, patchManager *patch.PatchManager) []string
func (*CommitFileManager) SetFiles ¶
func (m *CommitFileManager) SetFiles(files []*models.CommitFile, parent string)
func (*CommitFileManager) SetTree ¶
func (m *CommitFileManager) SetTree()
func (*CommitFileManager) ToggleCollapsed ¶
func (m *CommitFileManager) ToggleCollapsed(path string)
func (*CommitFileManager) ToggleShowTree ¶
func (m *CommitFileManager) ToggleShowTree()
type CommitFileNode ¶
type CommitFileNode struct { Children []*CommitFileNode File *models.CommitFile Path string // e.g. '/path/to/mydir' CompressionLevel int // equal to the number of forward slashes you'll see in the path when it's rendered in tree mode }
func BuildFlatTreeFromCommitFiles ¶
func BuildFlatTreeFromCommitFiles(files []*models.CommitFile) *CommitFileNode
func BuildTreeFromCommitFiles ¶
func BuildTreeFromCommitFiles(files []*models.CommitFile) *CommitFileNode
func (*CommitFileNode) Any ¶
func (s *CommitFileNode) Any(test func(node *CommitFileNode) bool) bool
func (*CommitFileNode) AnyFile ¶
func (s *CommitFileNode) AnyFile(test func(file *models.CommitFile) bool) bool
func (*CommitFileNode) Compress ¶
func (s *CommitFileNode) Compress()
func (*CommitFileNode) Description ¶
func (s *CommitFileNode) Description() string
func (*CommitFileNode) Every ¶
func (s *CommitFileNode) Every(test func(node *CommitFileNode) bool) bool
func (*CommitFileNode) EveryFile ¶
func (s *CommitFileNode) EveryFile(test func(file *models.CommitFile) bool) bool
func (*CommitFileNode) Flatten ¶
func (n *CommitFileNode) Flatten(collapsedPaths map[string]bool) []*CommitFileNode
func (*CommitFileNode) ForEachFile ¶
func (s *CommitFileNode) ForEachFile(cb func(*models.CommitFile) error) error
func (*CommitFileNode) GetChildren ¶
func (s *CommitFileNode) GetChildren() []INode
func (*CommitFileNode) GetCompressionLevel ¶
func (s *CommitFileNode) GetCompressionLevel() int
func (*CommitFileNode) GetIndexForPath ¶
func (*CommitFileNode) GetLeaves ¶
func (s *CommitFileNode) GetLeaves() []*CommitFileNode
func (*CommitFileNode) GetNodeAtIndex ¶
func (node *CommitFileNode) GetNodeAtIndex(index int, collapsedPaths map[string]bool) *CommitFileNode
func (*CommitFileNode) GetPath ¶
func (s *CommitFileNode) GetPath() string
func (*CommitFileNode) GetPathsMatching ¶
func (node *CommitFileNode) GetPathsMatching(test func(*CommitFileNode) bool) []string
This ignores the root
func (*CommitFileNode) ID ¶
func (s *CommitFileNode) ID() string
func (*CommitFileNode) IsLeaf ¶
func (s *CommitFileNode) IsLeaf() bool
func (*CommitFileNode) NameAtDepth ¶
func (s *CommitFileNode) NameAtDepth(depth int) string
func (*CommitFileNode) SetChildren ¶
func (s *CommitFileNode) SetChildren(children []INode)
func (*CommitFileNode) SetCompressionLevel ¶
func (s *CommitFileNode) SetCompressionLevel(level int)
func (*CommitFileNode) Sort ¶
func (s *CommitFileNode) Sort()
type FileManager ¶
func NewFileManager ¶
func (*FileManager) ExpandToPath ¶
func (m *FileManager) ExpandToPath(path string)
func (*FileManager) GetAllFiles ¶
func (m *FileManager) GetAllFiles() []*models.File
func (*FileManager) GetAllItems ¶
func (m *FileManager) GetAllItems() []*FileNode
func (*FileManager) GetIndexForPath ¶
func (m *FileManager) GetIndexForPath(path string) (int, bool)
func (*FileManager) GetItemAtIndex ¶
func (m *FileManager) GetItemAtIndex(index int) *FileNode
func (*FileManager) GetItemsLength ¶
func (m *FileManager) GetItemsLength() int
func (*FileManager) InTreeMode ¶
func (m *FileManager) InTreeMode() bool
func (*FileManager) IsCollapsed ¶
func (m *FileManager) IsCollapsed(path string) bool
func (*FileManager) Render ¶
func (m *FileManager) Render(diffName string, submoduleConfigs []*models.SubmoduleConfig) []string
func (*FileManager) SetFiles ¶
func (m *FileManager) SetFiles(files []*models.File)
func (*FileManager) SetTree ¶
func (m *FileManager) SetTree()
func (*FileManager) ToggleCollapsed ¶
func (m *FileManager) ToggleCollapsed(path string)
func (*FileManager) ToggleShowTree ¶
func (m *FileManager) ToggleShowTree()
type FileNode ¶
type FileNode struct { Children []*FileNode File *models.File Path string // e.g. '/path/to/mydir' CompressionLevel int // equal to the number of forward slashes you'll see in the path when it's rendered in tree mode }
func BuildFlatTreeFromFiles ¶
func BuildTreeFromFiles ¶
func (*FileNode) Description ¶
func (*FileNode) GetChildren ¶
func (*FileNode) GetCompressionLevel ¶
func (*FileNode) GetHasInlineMergeConflicts ¶
func (*FileNode) GetHasStagedChanges ¶
func (*FileNode) GetHasUnstagedChanges ¶
func (*FileNode) GetIndexForPath ¶
func (*FileNode) GetIsTracked ¶
func (*FileNode) GetNodeAtIndex ¶
func (*FileNode) GetPathsMatching ¶
This ignores the root
func (*FileNode) NameAtDepth ¶
func (*FileNode) SetChildren ¶
func (*FileNode) SetCompressionLevel ¶
Click to show internal directories.
Click to hide internal directories.