Documentation ¶
Index ¶
- type CanReadFile
- type Controller
- func (c *Controller) CanReadFile(crf *CanReadFile) (err error)
- func (c *Controller) Close() (err error)
- func (c *Controller) CreateFile(cf *CreateFile) (file models.File, err error)
- func (c *Controller) DeleteFile(df *DeleteFile) (err error)
- func (c *Controller) MoveFile(mf *MoveFile) (err error)
- func (c *Controller) QueryFile(qf *QueryFile) (archive models.Archive, err error)
- func (c *Controller) ShareFile(sr *ShareRequest) (err error)
- func (c *Controller) ShareWithMe(swm *ShareWithMe) (shared []models.SharedFile, err error)
- func (c *Controller) ShareWithWho(sww *ShareWithWho) (shared []models.SharedFile, err error)
- func (c *Controller) UnshareFile(sr *ShareRequest) (err error)
- type CreateFile
- type DeleteFile
- type MoveFile
- type QueryFile
- type ShareRequest
- type ShareWithMe
- type ShareWithWho
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CanReadFile ¶
type Controller ¶
func Default ¶
func Default() (c *Controller, err error)
func (*Controller) CanReadFile ¶
func (c *Controller) CanReadFile(crf *CanReadFile) (err error)
Can read file is inteded to be used internally by other operations of the metadata Will check if user owns the file Or iif user has at least access by share directly or indirectly
func (*Controller) Close ¶
func (c *Controller) Close() (err error)
func (*Controller) CreateFile ¶
func (c *Controller) CreateFile(cf *CreateFile) (file models.File, err error)
Creates a new file in the filesystem index
func (*Controller) DeleteFile ¶
func (c *Controller) DeleteFile(df *DeleteFile) (err error)
Deletes file from the index
func (*Controller) MoveFile ¶
func (c *Controller) MoveFile(mf *MoveFile) (err error)
func (*Controller) QueryFile ¶
func (c *Controller) QueryFile(qf *QueryFile) (archive models.Archive, err error)
Intended to only be used by the Gateway The server checks if the user owns the file. If not the server tries to determine the access to the file by shared files with this account
func (*Controller) ShareFile ¶
func (c *Controller) ShareFile(sr *ShareRequest) (err error)
Use to share a file other users in the system Intended to be called after obtaining the UUID of the account thanks to the authentication service
func (*Controller) ShareWithMe ¶
func (c *Controller) ShareWithMe(swm *ShareWithMe) (shared []models.SharedFile, err error)
Used to list all the files shared with the current user
func (*Controller) ShareWithWho ¶
func (c *Controller) ShareWithWho(sww *ShareWithWho) (shared []models.SharedFile, err error)
Used to query users that have access to a file
func (*Controller) UnshareFile ¶
func (c *Controller) UnshareFile(sr *ShareRequest) (err error)
Work almost the same as the ShareFile but intended to remove files
type CreateFile ¶
type DeleteFile ¶
type ShareRequest ¶
type ShareRequest struct {}
type ShareWithMe ¶
type ShareWithMe struct {
}type ShareWithWho ¶
type ShareWithWho struct {}