diff options
Diffstat (limited to 'state.go')
| -rw-r--r-- | state.go | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -27,6 +27,9 @@ type VPNState struct { // Whether to enable debugging Debug bool `json:"-"` + + // Serialized connection identifier + Identifier string `json:"identifier"` } func (state *VPNState) Register(name string, directory string, stateCallback func(string, string, string), debug bool) error { @@ -194,6 +197,14 @@ func (state *VPNState) SetProfileID(profileID string) error { return nil } +func (state *VPNState) GetIdentifier() string { + return state.Identifier +} + +func (state *VPNState) SetIdentifier(identifier string) { + state.Identifier = identifier +} + func (state *VPNState) SetConnected() error { if !state.FSM.HasTransition(fsm.CONNECTED) { return fsm.WrongStateTransitionError{Got: state.FSM.Current, Want: fsm.CONNECTED}.CustomError() |
