2024-11-28 00:02:27 -06:00
|
|
|
package forgepb
|
|
|
|
|
2024-11-28 19:56:46 -06:00
|
|
|
import (
|
2024-11-28 23:00:29 -06:00
|
|
|
sync "sync"
|
|
|
|
|
2024-11-28 19:56:46 -06:00
|
|
|
"go.wit.com/lib/protobuf/gitpb"
|
|
|
|
"go.wit.com/lib/protobuf/zoopb"
|
|
|
|
)
|
2024-11-28 08:35:39 -06:00
|
|
|
|
2024-11-28 00:02:27 -06:00
|
|
|
// maybe an interface someday?
|
|
|
|
type Forge struct {
|
2024-11-28 23:00:29 -06:00
|
|
|
// one-time initialized data
|
|
|
|
initOnce sync.Once
|
|
|
|
initErr error // init error, if any
|
|
|
|
|
2024-12-17 01:15:17 -06:00
|
|
|
goSrc string // the path to go/src
|
|
|
|
goWork bool // means the user is currently using a go.work file
|
|
|
|
Config *ForgeConfigs // config repos for readonly, private, etc
|
|
|
|
Repos *gitpb.Repos
|
|
|
|
Machine *zoopb.Machine
|
|
|
|
configSave bool
|
2024-11-28 00:02:27 -06:00
|
|
|
}
|
2024-11-28 08:54:30 -06:00
|
|
|
|
|
|
|
func (f *Forge) GetGoSrc() string {
|
|
|
|
return f.goSrc
|
|
|
|
}
|
2024-12-07 16:50:04 -06:00
|
|
|
|
|
|
|
func (f *Forge) IsGoWork() bool {
|
|
|
|
return f.goWork
|
|
|
|
}
|