reworking database, init and add commands
This commit is contained in:
@@ -5,11 +5,26 @@ import (
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"time"
|
||||
|
||||
"github.com/asdine/storm"
|
||||
"github.com/rs/zerolog"
|
||||
)
|
||||
|
||||
type DB struct {
|
||||
*storm.DB
|
||||
*zerolog.Logger
|
||||
}
|
||||
|
||||
// GVCInfo stores the basic information about when the repo was init'd and some basic information
|
||||
type GVCInfo struct {
|
||||
GVCVersion string `storm:"id"`
|
||||
InitTime string
|
||||
RepoName string
|
||||
}
|
||||
|
||||
// Commit stores all the necessary information for a commit
|
||||
type Commit struct {
|
||||
CommitHash []byte // The hash of the commit (generated by hashing commit author name, time, the previous commit, and more? TODO: Not sure what else)
|
||||
CommitHash []byte `storm:"index,unique"` // The hash of the commit (generated by hashing commit author name, time, the previous commit, and more? TODO: Not sure what else)
|
||||
TrackedFiles []File // All of the tracked files for this commit
|
||||
Date string
|
||||
Version string //User can tag a commit with a version number
|
||||
|
||||
Reference in New Issue
Block a user