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 ¶
func ChangeTitle(c echo.Context) error
ChangeTitle is the API handler for PUT /notes/:id/title. It updates the title and renames the file.
func CreateNote ¶
func CreateNote(c echo.Context) error
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 ¶
func ForceNoteSync(c echo.Context) error
ForceNoteSync is the API handler for POST /notes/:id/sync. It forces writing the note to the VFS
func GetImage ¶
func GetImage(c echo.Context) error
GetImage returns the image for a note, possibly resized.
func GetNote ¶
func GetNote(c echo.Context) error
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 ¶
func GetSteps(c echo.Context) error
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 ListNotes ¶
func ListNotes(c echo.Context) error
ListNotes is the API handler for GET /notes. It returns the list of the notes.
func OpenNoteURL ¶
func OpenNoteURL(c echo.Context) error
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 ¶
func PatchNote(c echo.Context) error
PatchNote is the API handler for PATCH /notes/:id. It applies some steps on the note document.
func PutTelepointer ¶
func PutTelepointer(c echo.Context) error
PutTelepointer is the API handler for PUT /notes/:id/telepointer. It updates the position of a pointer.
func Routes ¶
func Routes(router *echo.Group)
Routes sets the routing for the collaborative edition of notes.
func UpdateNoteSchema ¶
func UpdateNoteSchema(c echo.Context) error
UpdateNoteSchema is the API handler for PUT /notes/:id:/schema. It updates the schema of the note and invalidates the previous steps.
func UploadImage ¶
func UploadImage(c echo.Context) error
UploadImage is the API handler for POST /notes/:id/images. It uploads an image for the note.
Types ¶
This section is empty.