Documentation ¶
Index ¶
- type Cache
- func (c *Cache) Copy(storage interface{}, sourcePath, targetPath string) (int, error)
- func (c *Cache) CreateStorage(id string) (int, error)
- func (c *Cache) Delete(storage interface{}, user, path, trashPath string) error
- func (c *Cache) DeleteRecycleItem(user, path string, timestamp int) error
- func (c *Cache) EmptyRecycle(user string) error
- func (c *Cache) Get(s interface{}, p string) (*File, error)
- func (c *Cache) GetNumericStorageID(id string) (int, error)
- func (c *Cache) GetRecycleItem(user, path string, timestamp int) (*TrashItem, error)
- func (c *Cache) GetStorageOwner(numericID interface{}) (string, error)
- func (c *Cache) GetStorageOwnerByFileID(numericID interface{}) (string, error)
- func (c *Cache) InsertOrUpdate(storage interface{}, data map[string]interface{}, allowEmptyParent bool) (int, error)
- func (c *Cache) List(storage interface{}, p string) ([]*File, error)
- func (c *Cache) Move(storage interface{}, sourcePath, targetPath string) error
- func (c *Cache) Path(id interface{}) (string, error)
- func (c *Cache) Permissions(storage interface{}, p string) (*provider.ResourcePermissions, error)
- func (c *Cache) Purge(storage interface{}, path string) error
- func (c *Cache) PurgeRecycleItem(user, path string, timestamp int, isVersionFile bool) error
- func (c *Cache) SetEtag(storage interface{}, path, etag string) error
- type File
- type Scannable
- type TrashItem
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache struct {
// contains filtered or unexported fields
}
Cache represents a oc10-style file cache
func (*Cache) CreateStorage ¶
CreateStorage creates a new storage and returns its numeric id
func (*Cache) DeleteRecycleItem ¶
DeleteRecycleItem deletes the specified item from the trash
func (*Cache) EmptyRecycle ¶
EmptyRecycle clears the recycle bin for the given user
func (*Cache) GetNumericStorageID ¶
GetNumericStorageID returns the database id for the given storage
func (*Cache) GetRecycleItem ¶
GetRecycleItem returns the specified recycle item
func (*Cache) GetStorageOwner ¶
GetStorageOwner returns the username of the owner of the given storage
func (*Cache) GetStorageOwnerByFileID ¶
GetStorageOwnerByFileID returns the username of the owner of the given entry
func (*Cache) InsertOrUpdate ¶
func (c *Cache) InsertOrUpdate(storage interface{}, data map[string]interface{}, allowEmptyParent bool) (int, error)
InsertOrUpdate creates or updates a cache entry
func (*Cache) Permissions ¶
func (c *Cache) Permissions(storage interface{}, p string) (*provider.ResourcePermissions, error)
Permissions returns the permissions for the specified storage/path
func (*Cache) Purge ¶
Purge removes the specified storage/path from the cache without putting it into the trash
func (*Cache) PurgeRecycleItem ¶
PurgeRecycleItem deletes the specified item from the filecache and the trash
type File ¶
type File struct { ID int Storage int Parent int MimePart int MimeType int MimeTypeString string Size int MTime int StorageMTime int UnencryptedSize int Permissions int Encrypted bool Path string Name string Etag string Checksum string }
File represents an entry of the file cache