Documentation ¶
Index ¶
- type BadgeState
- func (b *BadgeState) Clear()
- func (b *BadgeState) Export() (keybase1.BadgeState, error)
- func (b *BadgeState) UpdateWithChat(update chat1.UnreadUpdate, inboxVers chat1.InboxVers)
- func (b *BadgeState) UpdateWithChatFull(update chat1.UnreadUpdateFull)
- func (b *BadgeState) UpdateWithGregor(gstate gregor.State) error
- type Badger
- func (b *Badger) Clear(ctx context.Context)
- func (b *Badger) PushChatUpdate(update chat1.UnreadUpdate, inboxVers chat1.InboxVers)
- func (b *Badger) PushState(state gregor1.State)
- func (b *Badger) Resync(ctx context.Context, remoteClient *chat1.RemoteClient, ...) error
- func (b *Badger) Send() error
- func (b *Badger) State() *BadgeState
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BadgeState ¶
BadgeState represents the number of badges on the app. It's threadsafe. Useable from both the client service and gregor server. See service:Badger for the service part that owns this.
func NewBadgeState ¶
func NewBadgeState(log logger.Logger) *BadgeState
NewBadgeState creates a new empty BadgeState.
func (*BadgeState) Clear ¶
func (b *BadgeState) Clear()
func (*BadgeState) Export ¶
func (b *BadgeState) Export() (keybase1.BadgeState, error)
Exports the state summary
func (*BadgeState) UpdateWithChat ¶
func (b *BadgeState) UpdateWithChat(update chat1.UnreadUpdate, inboxVers chat1.InboxVers)
func (*BadgeState) UpdateWithChatFull ¶
func (b *BadgeState) UpdateWithChatFull(update chat1.UnreadUpdateFull)
func (*BadgeState) UpdateWithGregor ¶
func (b *BadgeState) UpdateWithGregor(gstate gregor.State) error
UpdateWithGregor updates the badge state from a gregor state.
type Badger ¶
type Badger struct { libkb.Contextified // contains filtered or unexported fields }
Badger keeps a BadgeState up to date and broadcasts it to electron. This is the client-specific glue. The state is kept up to date by subscribing to: - All gregor state updates - All chat.activity gregor OOBMs - Logout
func NewBadger ¶
func NewBadger(g *libkb.GlobalContext) *Badger
func (*Badger) PushChatUpdate ¶
func (b *Badger) PushChatUpdate(update chat1.UnreadUpdate, inboxVers chat1.InboxVers)
func (*Badger) Resync ¶
func (b *Badger) Resync(ctx context.Context, remoteClient *chat1.RemoteClient, update *chat1.UnreadUpdateFull) error
func (*Badger) State ¶
func (b *Badger) State() *BadgeState
Click to show internal directories.
Click to hide internal directories.