Documentation ¶
Index ¶
- type Cache
- func (c *Cache) Add(ctx context.Context, storageID, spaceID, shareID string, ...) error
- func (c *Cache) Get(ctx context.Context, storageID, spaceID, shareID string, skipSync bool) (*collaboration.Share, error)
- func (c *Cache) ListSpace(ctx context.Context, storageID, spaceID string) (*Shares, error)
- func (c *Cache) LockSpace(spaceID string) func()
- func (c *Cache) Persist(ctx context.Context, storageID, spaceID string) error
- func (c *Cache) Remove(ctx context.Context, storageID, spaceID, shareID string) error
- type Shares
- type Spaces
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache struct { Providers mtimesyncedcache.Map[string, *Spaces] // contains filtered or unexported fields }
Cache holds share information structured by provider and space
func (*Cache) Add ¶
func (c *Cache) Add(ctx context.Context, storageID, spaceID, shareID string, share *collaboration.Share) error
Add adds a share to the cache
func (*Cache) Get ¶
func (c *Cache) Get(ctx context.Context, storageID, spaceID, shareID string, skipSync bool) (*collaboration.Share, error)
Get returns one entry from the cache
func (*Cache) LockSpace ¶ added in v2.15.0
LockSpace locks the cache for a given space and returns an unlock function
type Shares ¶
type Shares struct {}
Shares holds the share information of one space
func (*Shares) UnmarshalJSON ¶
UnmarshalJSON overrides the default unmarshaling Shares are tricky to unmarshal because they contain an interface (Grantee) which makes the json Unmarshal bail out To work around that problem we unmarshal into json.RawMessage in a first step and then try to manually unmarshal into the specific types in a second step.
Click to show internal directories.
Click to hide internal directories.