Documentation ¶
Overview ¶
Package space handles API calls and persistence for spaces. Spaces in Documize contain documents.
Index ¶
- type Handler
- func (h *Handler) AcceptInvitation(w http.ResponseWriter, r *http.Request)
- func (h *Handler) Add(w http.ResponseWriter, r *http.Request)
- func (h *Handler) Delete(w http.ResponseWriter, r *http.Request)
- func (h *Handler) Get(w http.ResponseWriter, r *http.Request)
- func (h *Handler) GetViewable(w http.ResponseWriter, r *http.Request)
- func (h *Handler) Invite(w http.ResponseWriter, r *http.Request)
- func (h *Handler) Manage(w http.ResponseWriter, r *http.Request)
- func (h *Handler) ManageOwner(w http.ResponseWriter, r *http.Request)
- func (h *Handler) Remove(w http.ResponseWriter, r *http.Request)
- func (h *Handler) Update(w http.ResponseWriter, r *http.Request)
- type Store
- func (s Store) Add(ctx domain.RequestContext, sp space.Space) (err error)
- func (s Store) AdminList(ctx domain.RequestContext) (sp []space.Space, err error)
- func (s Store) DecrementCategoryCount(ctx domain.RequestContext, spaceID string) (err error)
- func (s Store) DecrementContentCount(ctx domain.RequestContext, spaceID string) (err error)
- func (s Store) Delete(ctx domain.RequestContext, id string) (rows int64, err error)
- func (s Store) Get(ctx domain.RequestContext, id string) (sp space.Space, err error)
- func (s Store) GetViewable(ctx domain.RequestContext) (sp []space.Space, err error)
- func (s Store) IncrementCategoryCount(ctx domain.RequestContext, spaceID string) (err error)
- func (s Store) IncrementContentCount(ctx domain.RequestContext, spaceID string) (err error)
- func (s Store) PublicSpaces(ctx domain.RequestContext, orgID string) (sp []space.Space, err error)
- func (s Store) Update(ctx domain.RequestContext, sp space.Space) (err error)
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) 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.
type Store ¶ added in v1.71.0
type Store struct { store.Context store.SpaceStorer }
Store provides data access to space information.
func (Store) AdminList ¶ added in v1.76.1
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) GetViewable ¶ added in v1.71.0
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
PublicSpaces returns spaces that anyone can see.