Documentation
¶
Index ¶
- func NewInCache(db chat.Store) chat.Store
- type Cache
- func (c *Cache) AdvanceLastMessage(ctx context.Context, chatID *commonpb.ChatId, messageID *messagingpb.MessageId, ...) (bool, error)
- func (c *Cache) GetChatByID(ctx context.Context, chatID *commonpb.ChatId) (*chat.Chat, error)
- func (c *Cache) GetDmFeedPage(ctx context.Context, userID *commonpb.UserId, snapshot time.Time, ...) ([]*chat.Chat, error)
- func (c *Cache) GetMembers(ctx context.Context, chatID *commonpb.ChatId) ([]*commonpb.UserId, error)
- func (c *Cache) IsMember(ctx context.Context, chatID *commonpb.ChatId, userID *commonpb.UserId) (bool, error)
- func (c *Cache) PutChat(ctx context.Context, ch *chat.Chat) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Cache ¶
type Cache struct {
// contains filtered or unexported fields
}
Cache wraps a chat.Store, caching membership checks. Membership is fixed at chat creation and never changes, so a confirmed member is safe to cache; the rest of the store is passed straight through.
func (*Cache) AdvanceLastMessage ¶
func (*Cache) GetChatByID ¶
func (*Cache) GetDmFeedPage ¶
func (*Cache) GetMembers ¶
Click to show internal directories.
Click to hide internal directories.