blob: 6f06860e8cfd29e8af439a826cd0909845cb02d0 (
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
|
package eduvpn
type VPNState struct {
// Info passed by the client
ConfigDirectory string `json:"-"`
Name string `json:"-"`
// The chosen server
Server *Server `json:"server"`
}
func Register(state *VPNState, name string, directory string, stateCallback func(string, string, string)) error {
state.Name = name
state.ConfigDirectory = directory
stateCallback("START", "REGISTERED", "test data")
return nil
}
var VPNStateInstance *VPNState
func GetVPNState() *VPNState {
if VPNStateInstance == nil {
VPNStateInstance = &VPNState{}
}
return VPNStateInstance
}
|