Documentation
¶
Index ¶
- func NewWorker(addr string, done <-chan struct{}, s store.ExtendedStore) (*sprout.Worker, error)
- type App
- type ArborService
- type Banner
- type BannerService
- type HapticService
- type LoadingBanner
- type NotificationService
- type Priority
- type Settings
- type SettingsService
- type SproutService
- type StatusService
- type ThemeService
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
Banner() BannerService
}
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 Banner ¶ added in v0.0.14
Banner is a type that provides details for a persistent on-screen notification banner
type BannerService ¶ added in v0.0.14
type BannerService interface {
// Add establishes a new banner managed by the service.
Add(Banner)
// Top returns the banner that should be displayed right now
Top() Banner
}
BannerService provides methods for creating and managing on-screen persistent banners. The methods must be safe for concurrent use.
func NewBannerService ¶ added in v0.0.14
func NewBannerService() BannerService
type HapticService ¶ added in v0.0.13
type HapticService interface {
UpdateAndroidViewRef(uintptr)
Buzz()
}
HapticService provides access to haptic feedback devices features.
type LoadingBanner ¶ added in v0.0.14
LoadingBanner requests a banner with a loading spinner displayed along with the provided text. It will not disappear until cancelled.
func (*LoadingBanner) BannerPriority ¶ added in v0.0.14
func (l *LoadingBanner) BannerPriority() Priority
func (*LoadingBanner) Cancel ¶ added in v0.0.14
func (l *LoadingBanner) Cancel()
func (*LoadingBanner) IsCancelled ¶ added in v0.0.14
func (l *LoadingBanner) IsCancelled() bool
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.