category

package
v1.61.0 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2018 License: AGPL-3.0 Imports: 13 Imported by: 0

Documentation

Overview

Package category handles API calls and persistence for categories. Categories sub-divide spaces.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

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

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).

func (*Handler) Update

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

Update saves existing space category.

Directories

Path Synopsis
Package mysql handles data persistence for both category definition and and document/category association.
Package mysql handles data persistence for both category definition and and document/category association.

Jump to

Keyboard shortcuts

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