at master 31 lines 594 B view raw
1package types 2 3import "tangled.org/core/appview/filetree" 4 5type DiffRenderer interface { 6 // list of file affected by these diffs 7 ChangedFiles() []DiffFileRenderer 8 9 // filetree 10 FileTree() *filetree.FileTreeNode 11 12 Stats() DiffStat 13} 14 15type DiffFileRenderer interface { 16 // html ID for each file in the diff 17 Id() string 18 19 // produce a splitdiff 20 Split() SplitDiff 21 22 // stats for this single file 23 Stats() DiffFileStat 24 25 // old and new name of file 26 Names() DiffFileName 27 28 // whether this diff can be displayed, 29 // returns a reason if not, and the empty string if it can 30 CanRender() string 31}