Documentation ¶
Index ¶
- func CanChangeDocument(ctx domain.RequestContext, s domain.Store, documentID string) (hasPermission bool)
- func CanUploadDocument(ctx domain.RequestContext, s domain.Store, folderID string) (hasPermission bool)
- func CanViewDocument(ctx domain.RequestContext, s domain.Store, documentID string) (hasPermission bool)
- func CanViewDocumentInFolder(ctx domain.RequestContext, s domain.Store, labelID string) (hasPermission bool)
- type Handler
- func (h *Handler) Activity(w http.ResponseWriter, r *http.Request)
- func (h *Handler) BySpace(w http.ResponseWriter, r *http.Request)
- func (h *Handler) ByTag(w http.ResponseWriter, r *http.Request)
- func (h *Handler) Delete(w http.ResponseWriter, r *http.Request)
- func (h *Handler) DocumentLinks(w http.ResponseWriter, r *http.Request)
- func (h *Handler) Get(w http.ResponseWriter, r *http.Request)
- func (h *Handler) SearchDocuments(w http.ResponseWriter, r *http.Request)
- func (h *Handler) Update(w http.ResponseWriter, r *http.Request)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CanChangeDocument ¶
func CanChangeDocument(ctx domain.RequestContext, s domain.Store, documentID string) (hasPermission bool)
CanChangeDocument returns if the clinet has permission to change a given document.
func CanUploadDocument ¶
func CanUploadDocument(ctx domain.RequestContext, s domain.Store, folderID string) (hasPermission bool)
CanUploadDocument returns if the client has permission to upload documents to the given folderID.
func CanViewDocument ¶
func CanViewDocument(ctx domain.RequestContext, s domain.Store, documentID string) (hasPermission bool)
CanViewDocument returns if the clinet has permission to view a given document.
func CanViewDocumentInFolder ¶
func CanViewDocumentInFolder(ctx domain.RequestContext, s domain.Store, labelID string) (hasPermission bool)
CanViewDocumentInFolder returns if the user has permission to view a document within the specified folder.
Types ¶
type Handler ¶
Handler contains the runtime information such as logging and database.
func (*Handler) Activity ¶
func (h *Handler) Activity(w http.ResponseWriter, r *http.Request)
Activity is an endpoint returning the activity logs for specified document.
func (*Handler) BySpace ¶
func (h *Handler) BySpace(w http.ResponseWriter, r *http.Request)
BySpace is an endpoint that returns the documents in a given folder.
func (*Handler) ByTag ¶
func (h *Handler) ByTag(w http.ResponseWriter, r *http.Request)
ByTag is an endpoint that returns the documents with a given tag.
func (*Handler) Delete ¶
func (h *Handler) Delete(w http.ResponseWriter, r *http.Request)
Delete is an endpoint that deletes a document specified by documentID.
func (*Handler) DocumentLinks ¶
func (h *Handler) DocumentLinks(w http.ResponseWriter, r *http.Request)
DocumentLinks is an endpoint returning the links for a document.
func (*Handler) Get ¶
func (h *Handler) Get(w http.ResponseWriter, r *http.Request)
Get is an endpoint that returns the document-level information for a given documentID.
func (*Handler) SearchDocuments ¶
func (h *Handler) SearchDocuments(w http.ResponseWriter, r *http.Request)
SearchDocuments endpoint takes a list of keywords and returns a list of document references matching those keywords.