summaryrefslogtreecommitdiff
path: root/structs.go
blob: 08aa464f522bb8a3944af9cac34cf11d0773e81f (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
package forgepb

import (
	sync "sync"

	"go.wit.com/lib/protobuf/gitpb"
)

// maybe an interface someday?
type Forge struct {
	// one-time initialized data
	once       sync.Once
	Config     *ForgeConfigs // config repos for readonly, private, etc
	Repos      *gitpb.Repos  // the repo protobufs
	Patchsets  *Patchsets    // patches that are in progress
	configSave bool          // if you need to save the config because things changed
	hostname   string        // your hostname
	rillX      int           // used for Rill()
	rillY      int           // used for Rill()
	goWork     bool          // means the user is currently using a go.work file
	// goSrc      string        // the path to go/src
	// forgeURL    string        // URL to use to forge.wit.com
	// configDir   string        // normally ~/.config/forge
	// patchDir    string        // where patches are stored
}

func (f *Forge) IsGoWork() bool {
	return f.goWork
}