/
types.go
57 lines (50 loc) · 1.3 KB
/
types.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
package lib
// DatabaseType is the type of database to be used.
type DatabaseType string
const (
// DatabaseTypeMysql is the MySQL flavor of database
DatabaseTypeMysql DatabaseType = "mysql"
// DatabaseTypeSqlite is the Sqlite flavor of database
DatabaseTypeSqlite DatabaseType = "sqlite"
)
// Options are the available runtime flags
type Options uint
// Command is the command line functionality
type Command struct {
Options Options
}
// Changeset represents all of the changes in an environment and their changes
type Changeset struct {
ChangeFiles map[string]ChangeFile
Signature string
}
// ChangeFile represents both a physical file on the local file system
// along with the entry in the changefile database
type ChangeFile struct {
ID int64
DateCreated int64
Hash string
Name string
DVCSetID int64
IsRun bool
IsDeleted bool
Content string
FullPath string
Ordinal int
}
const (
// OptLogInfo triggers verbose logging
OptLogInfo = 1 << iota
// OptLogDebug triggers extremely verbose logging
OptLogDebug
// OptSilent suppresses all logging
OptSilent
// OptReverse reverses the function
OptReverse
// OptSummary shows a summary of the actions instead of a raw stdout dump
OptSummary
// OptClean cleans
OptClean
// OptForce forces
OptForce
)