Documentation
¶
Index ¶
- type Cache
- func (c *Cache) Add(ctx context.Context, storageID, spaceID, shareID string, ...) error
- func (c *Cache) Get(storageID, spaceID, shareID string) *collaboration.Share
- func (c *Cache) ListSpace(storageID, spaceID string) *Shares
- func (c *Cache) Persist(ctx context.Context, storageID, spaceID string) error
- func (c *Cache) PersistWithTime(ctx context.Context, storageID, spaceID string, mtime time.Time) error
- func (c *Cache) Remove(ctx context.Context, storageID, spaceID, shareID string) error
- func (c *Cache) Sync(ctx context.Context, storageID, spaceID string) error
- type Shares
- type Spaces
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
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(storageID, spaceID, shareID string) *collaboration.Share
Get returns one entry from the cache
func (*Cache) PersistWithTime ¶
func (c *Cache) PersistWithTime(ctx context.Context, storageID, spaceID string, mtime time.Time) error
PersistWithTime persists the data of one space if it has not been modified since the given mtime
type Shares ¶
type Shares struct { // contains filtered or unexported fields }
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.