Documentation ¶
Overview ¶
Package category handles API calls and persistence for categories. Categories sub-divide spaces.
Index ¶
- type Handler
- func (h *Handler) Add(w http.ResponseWriter, r *http.Request)
- func (h *Handler) Delete(w http.ResponseWriter, r *http.Request)
- func (h *Handler) FetchSpaceData(w http.ResponseWriter, r *http.Request)
- func (h *Handler) Get(w http.ResponseWriter, r *http.Request)
- func (h *Handler) GetAll(w http.ResponseWriter, r *http.Request)
- func (h *Handler) GetDocumentCategoryMembership(w http.ResponseWriter, r *http.Request)
- func (h *Handler) GetSpaceCategoryMembers(w http.ResponseWriter, r *http.Request)
- func (h *Handler) GetSummary(w http.ResponseWriter, r *http.Request)
- func (h *Handler) SetDocumentCategoryMembership(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 ¶
This section is empty.
Types ¶
type Handler ¶
Handler contains the runtime information such as logging and database.
func (*Handler) Add ¶
func (h *Handler) Add(w http.ResponseWriter, r *http.Request)
Add saves space category.
func (*Handler) Delete ¶
func (h *Handler) Delete(w http.ResponseWriter, r *http.Request)
Delete removes category and associated member records.
func (*Handler) FetchSpaceData ¶
func (h *Handler) FetchSpaceData(w http.ResponseWriter, r *http.Request)
FetchSpaceData returns: 1. categories that user can see for given space 2. summary data for each category 3. category viewing membership records
func (*Handler) Get ¶
func (h *Handler) Get(w http.ResponseWriter, r *http.Request)
Get returns categories visible to user within a space.
func (*Handler) GetAll ¶
func (h *Handler) GetAll(w http.ResponseWriter, r *http.Request)
GetAll returns categories within a space, disregarding permissions. Used in admin screens, lists, functions.
func (*Handler) GetDocumentCategoryMembership ¶
func (h *Handler) GetDocumentCategoryMembership(w http.ResponseWriter, r *http.Request)
GetDocumentCategoryMembership returns user viewable categories associated with a given document.
func (*Handler) GetSpaceCategoryMembers ¶
func (h *Handler) GetSpaceCategoryMembers(w http.ResponseWriter, r *http.Request)
GetSpaceCategoryMembers returns category/document associations within space.
func (*Handler) GetSummary ¶
func (h *Handler) GetSummary(w http.ResponseWriter, r *http.Request)
GetSummary returns number of documents and users for space categories.
func (*Handler) SetDocumentCategoryMembership ¶
func (h *Handler) SetDocumentCategoryMembership(w http.ResponseWriter, r *http.Request)
SetDocumentCategoryMembership will link/unlink document from categories (query string switch mode=link or mode=unlink).