diff options
| author | Jeroen Wijenbergh <jeroenwijenbergh@protonmail.com> | 2022-04-29 15:08:32 +0200 |
|---|---|---|
| committer | jwijenbergh <jeroenwijenbergh@protonmail.com> | 2022-04-29 15:08:32 +0200 |
| commit | 0e1f9826f2aea1a059529f9c3d1c921d7d4ac3d4 (patch) | |
| tree | 2d26bd6dbd33abde910bff00078f520dad890a4d /internal/fsm.go | |
| parent | 6c7a1c7a9245cf457a86fd15bdc14bc93b55d508 (diff) | |
Secure Internet: Basic implementation and add support to cli
Diffstat (limited to 'internal/fsm.go')
| -rw-r--r-- | internal/fsm.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/internal/fsm.go b/internal/fsm.go index 6997d92..1bcc479 100644 --- a/internal/fsm.go +++ b/internal/fsm.go @@ -4,8 +4,8 @@ import ( "fmt" "os" "os/exec" - "sort" "path" + "sort" ) type ( @@ -94,7 +94,7 @@ type FSM struct { Current FSMStateID // Info to be passed from the parent state - Name string + Name string StateCallback func(string, string, string) Logger *FileLogger Directory string @@ -107,7 +107,7 @@ func (fsm *FSM) Init(name string, callback func(string, string, string), logger NO_SERVER: {{CHOSEN_SERVER, "User chooses a server"}}, CHOSEN_SERVER: {{AUTHORIZED, "Found tokens in config"}, {OAUTH_STARTED, "No tokens found in config"}}, OAUTH_STARTED: {{AUTHORIZED, "User authorizes with browser"}, {CHOSEN_SERVER, "Cancel OAuth"}}, - AUTHORIZED: {{OAUTH_STARTED, "Re-authorize with OAuth"}, {REQUEST_CONFIG, "Client requests a config"}}, + AUTHORIZED: {{OAUTH_STARTED, "Re-authorize with OAuth"}, {REQUEST_CONFIG, "Client requests a config"}}, REQUEST_CONFIG: {{ASK_PROFILE, "Multiple profiles found"}, {HAS_CONFIG, "Success, only one profile"}}, ASK_PROFILE: {{HAS_CONFIG, "User chooses profile and success"}}, HAS_CONFIG: {{CONNECTED, "OS reports connected"}}, |
