cleaning up manager, tying it to add files

This commit is contained in:
2020-06-19 17:12:21 -04:00
parent 7610e3f168
commit e75991da22
11 changed files with 140 additions and 148 deletions

View File

@@ -22,10 +22,10 @@ type CommitMeta struct {
// File represents a tracked file
type File struct {
ID int `storm:"id,increment"`
Path string `storm:"index"`
Name string
BkpLocation string //TODO: Needed?
ID int `storm:"id,increment"`
Path string `storm:"index"`
Name string
//BkpLocation string //TODO: Needed?
CurrentBase string
CurrentHash [16]byte `storm:"index,unique"`
CreatedAt time.Time
@@ -44,20 +44,20 @@ type FileIndex struct {
// DiffObject store the information for each diff that is made
type DiffObject struct {
ID int `storm:"id,increment"`
Subject string `storm:"index"`
Object string `storm:"index"`
SubjectHash [16]byte `storm:"index"`
ObjectHash [16]byte `storm:"index"`
Watching string //name of the file being watched
DiffPath string //path of the diff/patch
ID int `storm:"id,increment"`
Target string `storm:"index"`
DiffObject string `storm:"index"`
TargetHash [16]byte `storm:"index"`
DiffObjectHash [16]byte `storm:"index"`
//Watching string //name of the file being watched
DiffPath string //path of the diff/patch //path would be .gvc/hashofcommit/
//Label string //store a comment if the user wants to (user written)
//Screenshot string //path to the screen shot when the diff was made
Fs bool //whether it was written to the directly
Description string //record of forward or backward (just a quick helper)
E error //a record of the error when it was created. Maybe able to optimize out later
Diff *[]byte //the diff itself (incase we want to store in memory) - unused as of now
DiffSize int64 //the size of the diff in bytes
StartTime time.Time //when was the diff created (can take a while to create)
Message string //any message we want to store against the diff while its created
//Fs bool //whether it was written to the directly
//Description string //record of forward or backward (just a quick helper)
E error //a record of the error when it was created. Maybe able to optimize out later
Diff *[]byte //the diff itself (incase we want to store in memory)
DiffSize int64 //the size of the diff in bytes
StartTime time.Time //when was the diff created (can take a while to create)
Message string //any message we want to store against the diff while its created
}