package
0.0.0-20250226171102-4db14ec44d68
Repository: https://github.com/cozy/cozy-stack.git
Documentation: pkg.go.dev

# Functions

AddBulkNotSynchronizedOn add some not_synchronized_on for a device POST /data/:type/:id/relationships/not_synchronizing Beware, this is actually used in the web/data Routes.
No description provided by the author
AddNotSynchronizedOn is the echo.handler for adding not_synchronized_on to a directory POST /files/:file-id/relationships/not_synchronized_on.
AddReferencedHandler is the echo.handler for adding referenced_by to a file POST /files/:file-id/relationships/referenced_by.
AddReferencesHandler add some files references to a doc POST /data/:type/:id/relationships/references Beware, this is actually used in the web/data Routes.
ArchiveDownloadCreateHandler handles requests to /files/archive and stores the paremeters with a secret to be used in download handler below.s.
ArchiveDownloadHandler handles requests to /files/archive/:secret/whatever.zip and creates on the fly zip archive from the parameters linked to secret.
ChangesFeed is the handler for GET /files/_changes.
CheckIfMatch checks if the revision provided matches the revision number given in the request, in the header and/or the query.
ClearOldVersions is the handler for DELETE /files/versions.
ClearTrashHandler handles DELETE request to clear the trash.
CopyVersionHandler handles POST requests on /files/:file-id/versions.
CozyMetadataFromClaims returns a FilesCozyMetadata struct, with the app fields filled with information from the permission claims.
CreationHandler handle all POST requests on /files/:file-id aiming at creating a new document in the FS.
DeleteFileVersionMetadata handles DELETE requests on /files/:file-id/:version-id It can be used to delete an old version of a file.
DestroyFileHandler handles DELETE request to clear one element from the trash.
FileCopyHandler handles POST requests on /files/:file-id/copy It is used to duplicate the given file and its metadata except for relationships.
FileData returns a jsonapi representation of the given file.
FileDocFromReq creates a FileDoc from an incoming request.
FileDownloadCreateHandler stores the required path into a secret usable for download handler below.
FileDownloadHandler send a file that have previously be defined through FileDownloadCreateHandler.
FindFilesMango is the route POST /files/_find used to retrieve files and their metadata from a mango query.
GetAllDocs is the handler for POST /files/_all_docs.
GetChildrenHandler returns a list of children of a folder.
GetDirSize returns the size of a directory (the sum of the size of the files in this directory, including those in subdirectories).
HeadDirOrFile handles HEAD requests on directory or file to check their existence.
IconHandler serves icon for the PDFs.
ListNotSynchronizedOn list all directories not synchronized on a device GET /data/:type/:id/relationships/not_synchronizing Beware, this is actually used in the web/data Routes.
ListReferencesHandler list all files referenced by a doc GET /data/:type/:id/relationships/references Beware, this is actually used in the web/data Routes.
ModifyFileVersionMetadata handles PATCH requests on /files/:file-id/:version-id It can be used to modify tags on an old version of a file.
ModifyMetadataByIDHandler handles PATCH requests on /files/:file-id It can be used to modify the file or directory metadata, as well as moving and renaming it in the filesystem.
ModifyMetadataByIDInBatchHandler handles PATCH requests on /files/.
ModifyMetadataByPathHandler handles PATCH requests on /files/metadata It can be used to modify the file or directory metadata, as well as moving and renaming it in the filesystem.
NewFile creates an instance of file struct from a vfs.FileDoc document.
NewNoteImage creates an object that can be used to serialize an image for a note to JSON-API.
NotSynchronizedOnRoutes adds the /data/:doctype/:docid/relationships/not_synchronizing routes.
OverwriteFileContentHandler handles PUT requests on /files/:file-id to overwrite the content of a file given its identifier.
PreviewHandler serves preview images for the PDFs.
ReadFileContentFromIDHandler handles all GET requests on /files/:file-id aiming at downloading a file given its ID.
ReadFileContentFromPathHandler handles all GET request on /files/download aiming at downloading a file given its path.
ReadFileContentFromVersion handles the download of an old version of the file content.
ReadMetadataFromIDHandler handles all GET requests on /files/:file- id aiming at getting file metadata from its id.
ReadMetadataFromPathHandler handles all GET requests on /files/metadata aiming at getting file metadata from its path.
ReadTrashFilesHandler handle GET requests on /files/trash and return the list of trashed files and directories.
ReferencesRoutes adds the /data/:doctype/:docid/relationships/references routes.
RemoveBulkNotSynchronizedOn removes some not_synchronized_on for several directories.
RemoveNotSynchronizedOn is the echo.handler for removing not_synchronized_on to a directory DELETE /files/:file-id/relationships/not_synchronized_on.
RemoveReferencedHandler is the echo.handler for removing referenced_by to a file DELETE /files/:file-id/relationships/referenced_by.
RemoveReferencesHandler remove some files references from a doc DELETE /data/:type/:id/relationships/references Beware, this is actually used in the web/data Routes.
RestoreTrashFileHandler handle POST requests on /files/trash/file-id and can be used to restore a file or directory from the trash.
RevertFileVersion restores an old version of the file content.
Routes sets the routing for the files service.
SharedDrivesCreationHandler is the handler for POST /files/drives.
ThumbnailHandler serves thumbnails of the images/photos.
TrashHandler handles all DELETE requests on /files/:file-id and moves the file or directory with the specified file-id to the trash.
UploadMetadataHandler accepts a metadata objet and persist it, so that it can be used in a future file upload.
WrapVfsError returns a formatted error from a golang error emitted by the vfs.

# Constants

TagSeparator is the character separating tags.

# Variables

ErrDocTypeInvalid is used when the document type sent is not recognized.