notes

package
v0.0.0-...-4b98c26 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 7, 2021 License: AGPL-3.0 Imports: 17 Imported by: 0

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

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL