-
Notifications
You must be signed in to change notification settings - Fork 1
/
config.go
23 lines (20 loc) · 654 Bytes
/
config.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
package cloud
import (
"fyne.io/cloud/internal/settings"
"fyne.io/fyne/v2"
)
// Configurable interface describes the functions required for a cloud provider to store configuration.
type Configurable interface {
// Configure requests that the cloud provider show some configuration options as a dialog on the specified window.
// It returns a serialised configuration or an error.
Configure(fyne.App, fyne.Window) (string, error)
// SetConfig is used to apply a previous configuration to this provider.
SetConfig(string)
}
func currentProviderName() string {
store := settings.Load()
if store == nil {
return ""
}
return store.CloudName
}