Documentation
¶
Overview ¶
Package notes is about the documents of cozy-notes. The notes are persisted as files, but they also have some specific routes for enabling collaborative edition.
Index ¶
- func ChangeTitle(c echo.Context) error
- func CreateNote(c echo.Context) error
- func ForceNoteSync(c echo.Context) error
- func GetImage(c echo.Context) error
- func GetNote(c echo.Context) error
- func GetSteps(c echo.Context) error
- func ListNotes(c echo.Context) error
- func OpenNoteURL(c echo.Context) error
- func PatchNote(c echo.Context) error
- func PutTelepointer(c echo.Context) error
- func Routes(router *echo.Group)
- func UpdateNoteSchema(c echo.Context) error
- func UploadImage(c echo.Context) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ChangeTitle ¶
ChangeTitle is the API handler for PUT /notes/:id/title. It updates the title and renames the file.
func CreateNote ¶
CreateNote is the API handler for POST /notes. It creates a note, aka a file with a set of metadata to enable collaborative edition.
func ForceNoteSync ¶
ForceNoteSync is the API handler for POST /notes/:id/sync. It forces writing the note to the VFS
func GetNote ¶
GetNote is the API handler for GET /notes/:id. It fetches the file with the given id, and also includes the changes in the content that have been accepted by the stack but not yet persisted on the file.
func GetSteps ¶
GetSteps is the API handler for GET /notes/:id/steps?Version=xxx. It returns the steps since the given version. If the version is too old, and the steps are no longer available, it returns a 412 response with the whole document for the note.
func OpenNoteURL ¶
OpenNoteURL is the API handler for GET /notes/:id/open. It returns the parameters to build the URL where the note can be opened.
func PatchNote ¶
PatchNote is the API handler for PATCH /notes/:id. It applies some steps on the note document.
func PutTelepointer ¶
PutTelepointer is the API handler for PUT /notes/:id/telepointer. It updates the position of a pointer.
func UpdateNoteSchema ¶
UpdateNoteSchema is the API handler for PUT /notes/:id:/schema. It updates the schema of the note and invalidates the previous steps.
func UploadImage ¶
UploadImage is the API handler for POST /notes/:id/images. It uploads an image for the note.
Types ¶
This section is empty.