Documentation ¶
Overview ¶
Package space handles API calls and persistence for spaces. Spaces in Documize contain documents.
Package space handles API calls and persistence for spaces. Spaces in Documize contain documents.
Index ¶
- func CanViewSpace(ctx domain.RequestContext, s domain.Store, spaceID string) (hasPermission bool)
- func CanViewSpaceDocuments(ctx domain.RequestContext, s domain.Store, spaceID string) (hasPermission bool)
- 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) GetAll(w http.ResponseWriter, r *http.Request)
- func (h *Handler) GetPermissions(w http.ResponseWriter, r *http.Request)
- func (h *Handler) GetSpaceViewers(w http.ResponseWriter, r *http.Request)
- func (h *Handler) Invite(w http.ResponseWriter, r *http.Request)
- func (h *Handler) Remove(w http.ResponseWriter, r *http.Request)
- func (h *Handler) SetPermissions(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 ¶
func CanViewSpace ¶
CanViewSpace returns if the user has permission to view the given spaceID.
func CanViewSpaceDocuments ¶
func CanViewSpaceDocuments(ctx domain.RequestContext, s domain.Store, spaceID string) (hasPermission bool)
CanViewSpaceDocuments returns if the user has permission to view a document within the specified space.
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 deletes empty space.
func (*Handler) Get ¶
func (h *Handler) Get(w http.ResponseWriter, r *http.Request)
Get returns the requested space.
func (*Handler) GetAll ¶
func (h *Handler) GetAll(w http.ResponseWriter, r *http.Request)
GetAll returns spaces the user can see.
func (*Handler) GetPermissions ¶
func (h *Handler) GetPermissions(w http.ResponseWriter, r *http.Request)
GetPermissions returns user permissions for the requested folder.
func (*Handler) GetSpaceViewers ¶
func (h *Handler) GetSpaceViewers(w http.ResponseWriter, r *http.Request)
GetSpaceViewers returns the users that can see the shared spaces.
func (*Handler) Invite ¶
func (h *Handler) Invite(w http.ResponseWriter, r *http.Request)
Invite sends users folder invitation emails.
func (*Handler) Remove ¶
func (h *Handler) Remove(w http.ResponseWriter, r *http.Request)
Remove moves documents to another folder before deleting it
func (*Handler) SetPermissions ¶
func (h *Handler) SetPermissions(w http.ResponseWriter, r *http.Request)
SetPermissions persists specified spac3 permissions