summaryrefslogtreecommitdiff
path: root/structs.go
blob: 2b262dd997ff7a44640c8226c440f813c1db23f5 (plain)
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
package main

import (
	"go.wit.com/gui"
	"go.wit.com/lib/gadgets"
	"go.wit.com/lib/gui/repostatus"
)

var me *autoType

// this app's variables
type autoType struct {
	allrepos map[string]*repo
	myGui    *gui.Node

	autotypistWindow *gui.Node

	reposwin *gadgets.BasicWindow
	reposbox *gui.Node
	reposgrid *gui.Node
	reposgroup *gui.Node

	// #### autotypist Global Display Options
	autoHidePerfect  *gui.Node
	autoHideReadOnly *gui.Node

	// #### autotypist Global Build Options
	// what to change all the branches to
	// so, as a developer, you can move all the repos
	// to the 'devel' branch and then test a devel branch build
	// then switch back to your 'username' branch and do a build there
	toMoveToBranch string

	// displays the preferred names used for the repo tree state
	mainBranch  *gadgets.BasicCombobox
	develBranch *gadgets.BasicCombobox
	userBranch  *gadgets.BasicCombobox

	// this button will regenerate everyones go.mod & go.sum
	rerunGoMod *gui.Node

	// if checked, will stop trying to os.Exec() things after failure
	stopOnErrors *gui.Node

	// button to attempt to autorebuild
	autoRebuildButton *gui.Node

	// checkbox for --dry-run
	autoDryRun *gui.Node

	// checkbox for intermittent scanning
	scanEveryMinute *gui.Node

	// The current working directory
	autoWorkingPwd *gadgets.OneLiner

	// what is being used as your home dir
	userHomePwd *gadgets.OneLiner

	// what is being used as ~/go/src
	goSrcPwd *gadgets.OneLiner

	downloadEverythingButton *gui.Node

	// delete ~/go/src & ~/go/pkg buttons
	deleteGoSrcPkgB *gui.Node
}

type repo struct {
	hidden     bool
	path       string
	lasttagrev string
	lasttag    string

	pLabel *gui.Node // path label

	lastTag     *gui.Node // last tagged version label
	vLabel      *gui.Node // version label
	dirtyLabel  *gui.Node // git state (dirty or not?)
	goSumStatus *gui.Node // what is the state of the go.sum file

	masterVersion *gui.Node // the master branch version
	develVersion  *gui.Node // the devel branch version
	userVersion   *gui.Node // the user branch version

	statusButton *gui.Node // opens up the status window

	status *repostatus.RepoStatus
}