Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type App ¶
type App interface {
Notifications() NotificationService
Arbor() ArborService
Settings() SettingsService
Sprout() SproutService
Theme() ThemeService
Status() StatusService
Haptic() HapticService
}
App bundles core application services into a single convenience type.
type ArborService ¶
type ArborService interface {
Store() store.ExtendedStore
Communities() *ds.CommunityList
}
ArborService provides access to stored arbor data.
type HapticService ¶ added in v0.0.13
type HapticService interface {
UpdateAndroidViewRef(uintptr)
Buzz()
}
HapticService provides access to haptic feedback devices features.
type NotificationService ¶
type NotificationService interface {
Register(store.ExtendedStore)
Notify(title, content string) error
}
NotificationService provides methods to send notifications and to configure notifications for collections of arbor nodes.
type Settings ¶
type Settings struct {
// relay address to connect to
Address string
// user's local identity ID
ActiveIdentity *fields.QualifiedHash
// the version of the disclaimer that the user has accepted
AcknowledgedNoticeVersion int
// whether notifications are accepted. The nil state indicates that
// the user has not changed this value, and should be treated as true.
// TODO(whereswaldon): find a backwards-compatible way to handle this
// elegantly.
NotificationsEnabled *bool
// whether the user wants the app bar anchored at the bottom of the UI
BottomAppBar bool
DarkMode bool
// the UI instead of appearing on top
DockNavDrawer bool
}
type SettingsService ¶
type SettingsService interface {
NotificationsGloballyAllowed() bool
SetNotificationsGloballyAllowed(bool)
AcknowledgedNoticeVersion() int
SetAcknowledgedNoticeVersion(version int)
Address() string
SetAddress(string)
BottomAppBar() bool
SetBottomAppBar(bool)
DarkMode() bool
SetDarkMode(bool)
ActiveArborIdentityID() *fields.QualifiedHash
Identity() (*forest.Identity, error)
GrovePath() string
Persist() error
CreateIdentity(name string) error
Builder() (*forest.Builder, error)
}
SettingsService allows querying, updating, and saving settings.
type SproutService ¶
type StatusService ¶ added in v0.0.12
type StatusService interface {
Register(store.ExtendedStore)
IsActive(*fields.QualifiedHash) bool
}
StatusService provides information on the online status of users.
type ThemeService ¶
type ThemeService interface {
Current() *sprigTheme.Theme
SetDarkMode(bool)
}
ThemeService provides methods to fetch and manipulate the current application theme.
Click to show internal directories.
Click to hide internal directories.