document

package
v1.59.2 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2018 License: AGPL-3.0 Imports: 26 Imported by: 5 modules, 6 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CopyDocument added in v1.59.0

func CopyDocument(ctx domain.RequestContext, s domain.Store, documentID string) (newDocumentID string, err error)

CopyDocument clones an existing document

func FilterCategoryProtected added in v1.59.0

func FilterCategoryProtected(docs []doc.Document, cats []category.Category, members []category.Member, viewDrafts bool) (filtered []doc.Document)

FilterCategoryProtected removes documents that cannot be seen by user due to document cateogory viewing permissions.

func FilterLastVersion added in v1.59.0

func FilterLastVersion(docs []doc.Document) (filtered []doc.Document)

FilterLastVersion returns the latest version of each document by removing all previous versions. If a document is not versioned, it is returned as-is.

Types

type BulkDocumentData added in v1.56.0

type BulkDocumentData struct {
	Document    doc.Document      `json:"document"`
	Permissions pm.Record         `json:"permissions"`
	Roles       pm.DocumentRecord `json:"roles"`
	Spaces      []space.Space     `json:"folders"`
	Links       []link.Link       `json:"links"`
	Versions    []doc.Version     `json:"versions"`
}

BulkDocumentData represents all data associated for a single document. Used by FetchDocumentData() bulk data load call.

type Handler

type Handler struct {
	Runtime *env.Runtime
	Store   *domain.Store
	Indexer indexer.Indexer
}

Handler contains the runtime information such as logging and database.

func (*Handler) BySpace

func (h *Handler) BySpace(w http.ResponseWriter, r *http.Request)

BySpace is an endpoint that returns the documents for given space.

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 (h *Handler) DocumentLinks(w http.ResponseWriter, r *http.Request)

DocumentLinks is an endpoint returning the links for a document.

func (*Handler) FetchDocumentData added in v1.54.0

func (h *Handler) FetchDocumentData(w http.ResponseWriter, r *http.Request)

FetchDocumentData returns all document data in single API call.

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.

func (*Handler) Update

func (h *Handler) Update(w http.ResponseWriter, r *http.Request)

Update updates an existing document using the format described in NewDocumentModel() encoded as JSON in the request.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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