memory

package
v1.6.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 27, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewInMemory

func NewInMemory() activity.Store

Types

type InMemoryStore

type InMemoryStore struct {
	// contains filtered or unexported fields
}

func (*InMemoryStore) GetLatestNotifications

func (m *InMemoryStore) GetLatestNotifications(ctx context.Context, activityFeedType activitypb.ActivityFeedType, userID *commonpb.UserId, limit int) ([]*activitypb.Notification, error)

func (*InMemoryStore) SaveNotification

func (m *InMemoryStore) SaveNotification(ctx context.Context, activityFeedType activitypb.ActivityFeedType, userID *commonpb.UserId, notification *activitypb.Notification) (*activitypb.Notification, error)

type NotificationsByTimestamp

type NotificationsByTimestamp []*activitypb.Notification

func (NotificationsByTimestamp) Len

func (a NotificationsByTimestamp) Len() int

func (NotificationsByTimestamp) Less

func (a NotificationsByTimestamp) Less(i, j int) bool

func (NotificationsByTimestamp) Swap

func (a NotificationsByTimestamp) Swap(i, j int)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL