Documentation ¶
Index ¶
- type Cache
- func (c *Cache) Add(ctx context.Context, userID, spaceID string, rs *collaboration.ReceivedShare) error
- func (c *Cache) Get(ctx context.Context, userID, spaceID, shareID string) (*State, error)
- func (c *Cache) List(ctx context.Context, userID string) (map[string]*Space, error)
- func (c *Cache) Remove(ctx context.Context, userID, spaceID, shareID string) error
- type Space
- type Spaces
- type State
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache struct { ReceivedSpaces mtimesyncedcache.Map[string, *Spaces] // contains filtered or unexported fields }
Cache stores the list of received shares and their states It functions as an in-memory cache with a persistence layer The storage is sharded by user
func (*Cache) Add ¶
func (c *Cache) Add(ctx context.Context, userID, spaceID string, rs *collaboration.ReceivedShare) error
Add adds a new entry to the cache
type State ¶
type State struct { State collaboration.ShareState MountPoint *provider.Reference Hidden bool }
State holds the state information of a received share
Click to show internal directories.
Click to hide internal directories.