summaryrefslogtreecommitdiff
path: root/structs.go
blob: 9e33d1a8e43dfae2afd1e29bcf1537bb8692c4ea (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
package repolist

import (
	"sync"

	"go.wit.com/gui"
	"go.wit.com/lib/gui/repostatus"
	"go.wit.com/lib/protobuf/forgepb"
	"go.wit.com/lib/protobuf/gitpb"
)

var me *RepoList

func (b *RepoList) Disable() {
	b.reposbox.Disable()
}

func (b *RepoList) Enable() {
	b.reposbox.Enable()
}

// this app's variables
type RepoList struct {
	sync.RWMutex

	// the main window and box
	mainWindow *gui.Node
	mainbox    *gui.Node

	onlyMe   bool
	goSrcPwd string
	allrepos map[string]*RepoRow
	viewName string
	cfgfile  string

	forge *forgepb.Forge

	reposbox   *gui.Node
	reposgrid  *gui.Node
	reposgroup *gui.Node

	// put things here that can't be seen
	blind *gui.Node

	shownCount   *gui.Node
	hideFunction func(*RepoRow)
	duration     *gui.Node

	rows []*RepoRow
}

type RepoRow struct {
	hidden     bool
	lasttagrev string
	// lasttag    string
	giturl string
	pb     *gitpb.Repo

	pLabel *gui.Node // path label

	targetV        *gui.Node // the target version
	lastTag        *gui.Node // last tagged version label
	currentName    *gui.Node // current branch name
	currentVersion *gui.Node // current branch version
	gitState       *gui.Node // git state (dirty or not?)
	// goState        *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

	endBox       *gui.Node // a general box at the end of the row
	statusButton *gui.Node // opens up the status window
	diffButton   *gui.Node // opens up the status window

	Status *repostatus.RepoStatus
}