summaryrefslogtreecommitdiff
path: root/pkg/backend/api.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/backend/api.go')
-rw-r--r--pkg/backend/api.go18
1 files changed, 13 insertions, 5 deletions
diff --git a/pkg/backend/api.go b/pkg/backend/api.go
index a19fd40..fea38db 100644
--- a/pkg/backend/api.go
+++ b/pkg/backend/api.go
@@ -45,10 +45,18 @@ func SubscribeToEvent(event string, f unsafe.Pointer) {
subscribe(event, f)
}
-func InitializeBitmaskContext() {
+type InitOpts struct {
+ Provider string
+ AppName string
+ SkipLaunch bool
+}
+
+func InitializeBitmaskContext(opts *InitOpts) {
p := bitmask.GetConfiguredProvider()
+ opts.Provider = p.Provider
+ opts.AppName = p.AppName
- initOnce.Do(func() { initializeContext(p.Provider, p.AppName) })
+ initOnce.Do(func() { initializeContext(opts) })
runDonationReminder()
go ctx.updateStatus()
}
@@ -62,7 +70,7 @@ func InstallHelpers() {
pickle.InstallHelpers()
}
-func MockUIInteraction() {
- log.Println("mocking ui interaction on port 8080. \nTry 'curl localhost:8080/{on|off|failed}' to toggle status.")
- go mockUI()
+func EnableMockBackend() {
+ log.Println("[+] Mocking ui interaction on port 8080. \nTry 'curl localhost:8080/{on|off|failed}' to toggle status.")
+ go enableMockBackend()
}