space

package
v2.3.0+incompatible Latest Latest
Warning

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

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

Documentation

Overview

Package space handles API calls and persistence for spaces. Spaces in Documize contain documents.

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   *store.Store
}

Handler contains the runtime information such as logging and database.

func (*Handler) AcceptInvitation

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

AcceptInvitation records the fact that a user has completed space onboard process.

func (*Handler) Add

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

Add creates a new space.

func (*Handler) Delete

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

Delete removes space.

func (*Handler) Get

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

Get returns the requested space.

func (*Handler) GetViewable added in v1.54.0

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

GetViewable returns spaces the user can see.

func (*Handler) Invite

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

Invite sends users space invitation emails.

func (*Handler) Manage added in v1.76.1

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

Manage returns all shared spaces and orphaned spaces that have no owner.

func (*Handler) ManageOwner added in v1.76.1

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

ManageOwner adds current user as space owner. Requires admin rights.

func (*Handler) Remove

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

Remove moves documents to another space before deleting it

func (*Handler) Update

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

Update processes request to save space object to the database

type Store added in v1.71.0

type Store struct {
	store.Context
	store.SpaceStorer
}

Store provides data access to space information.

func (Store) Add added in v1.71.0

func (s Store) Add(ctx domain.RequestContext, sp space.Space) (err error)

Add adds new folder into the store.

func (Store) AdminList added in v1.76.1

func (s Store) AdminList(ctx domain.RequestContext) (sp []space.Space, err error)

AdminList returns all shared spaces and orphaned spaces that have no owner.

func (Store) DecrementCategoryCount

func (s Store) DecrementCategoryCount(ctx domain.RequestContext, spaceID string) (err error)

DecrementCategoryCount decrements usage counter for space category.

func (Store) DecrementContentCount

func (s Store) DecrementContentCount(ctx domain.RequestContext, spaceID string) (err error)

DecrementContentCount decrements usage counter for space category.

func (Store) Delete added in v1.71.0

func (s Store) Delete(ctx domain.RequestContext, id string) (rows int64, err error)

Delete removes space from the store.

func (Store) Get added in v1.71.0

func (s Store) Get(ctx domain.RequestContext, id string) (sp space.Space, err error)

Get returns a space from the store.

func (Store) GetViewable added in v1.71.0

func (s Store) GetViewable(ctx domain.RequestContext) (sp []space.Space, err error)

GetViewable returns spaces that the user can see. Also handles which spaces can be seen by anonymous users.

func (Store) IncrementCategoryCount

func (s Store) IncrementCategoryCount(ctx domain.RequestContext, spaceID string) (err error)

IncrementCategoryCount increments usage counter for space category.

func (Store) IncrementContentCount

func (s Store) IncrementContentCount(ctx domain.RequestContext, spaceID string) (err error)

IncrementContentCount increments usage counter for space category.

func (Store) PublicSpaces added in v1.71.0

func (s Store) PublicSpaces(ctx domain.RequestContext, orgID string) (sp []space.Space, err error)

PublicSpaces returns spaces that anyone can see.

func (Store) Update added in v1.71.0

func (s Store) Update(ctx domain.RequestContext, sp space.Space) (err error)

Update saves space changes.

Jump to

Keyboard shortcuts

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