Documentation ¶
Index ¶
- type Entry
- type Index
- func (i Index) CalculateChanges(files []model.FileWithContent) model.Changes
- func (i Index) Clear() error
- func (i Index) CommitAdd(changeId string, file model.HashedFile) error
- func (i Index) CommitDelete(changeId string, file model.HashedFile) error
- func (i Index) IsChanged(file model.FileWithContent) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Index ¶
type Index struct {
// contains filtered or unexported fields
}
Index tracks changes made in files
func LoadIndexFile ¶
LoadIndexFile loads entries from a specified path or creates a new index file
func (Index) CalculateChanges ¶
func (i Index) CalculateChanges(files []model.FileWithContent) model.Changes
CalculateChanges for a given list of files, finds model.Changes for those files comparing to version stored in Index
func (Index) CommitAdd ¶
func (i Index) CommitAdd(changeId string, file model.HashedFile) error
CommitAdd marks change as complete.
func (Index) CommitDelete ¶
func (i Index) CommitDelete(changeId string, file model.HashedFile) error
CommitDelete marks change as complete.
Click to show internal directories.
Click to hide internal directories.