Back to

Package rest

Latest Go to latest

The latest major version is .

Published: Jul 9, 2019 | License: AGPL-3.0 | Module:


Package rest exposes a REST API to manage shared rooms.

Package rest implements all the share logic for Cells and Links.

It is a high-level service using many other services for crud-ing shares through the REST API.


type SharesHandler

type SharesHandler struct {

SharesHandler implements handler methods for the share REST service.

func NewSharesHandler

func NewSharesHandler() *SharesHandler

NewSharesHandler simply creates a new SharesHandler.

func (*SharesHandler) DeleteCell

func (h *SharesHandler) DeleteCell(req *restful.Request, rsp *restful.Response)

DeleteCell loads the workspace and its root nodes and eventually removes room root totally.

func (h *SharesHandler) DeleteShareLink(req *restful.Request, rsp *restful.Response)

DeleteShareLink deletes a link information.

func (*SharesHandler) Filter

func (h *SharesHandler) Filter() func(string) string

Filter returns a function to filter the swagger path.

func (*SharesHandler) GetCell

func (h *SharesHandler) GetCell(req *restful.Request, rsp *restful.Response)

GetCell simply retrieves a shared room from its UUID.

func (h *SharesHandler) GetShareLink(req *restful.Request, rsp *restful.Response)

GetShareLink loads link information.

func (*SharesHandler) IdmUserFromClaims

func (h *SharesHandler) IdmUserFromClaims(ctx context.Context) *idm.User

func (*SharesHandler) ListSharedResources

func (h *SharesHandler) ListSharedResources(req *restful.Request, rsp *restful.Response)

ListSharedResources implements the corresponding Rest API operation

func (*SharesHandler) LoadAdminRootNodes

func (h *SharesHandler) LoadAdminRootNodes(ctx context.Context, detectedRoots []string) (rootNodes map[string]*tree.Node)

LoadDetectedRootNodes find actual nodes in the tree, and enrich their metadata if they appear in many workspaces for the current user.

func (*SharesHandler) PutCell

func (h *SharesHandler) PutCell(req *restful.Request, rsp *restful.Response)

PutCell creates or updates a shared room (a.k.a a Cell) via REST API.

func (h *SharesHandler) PutShareLink(req *restful.Request, rsp *restful.Response)

PutShareLink creates or updates a link to a shared item.

func (*SharesHandler) SwaggerTags

func (h *SharesHandler) SwaggerTags() []string

SwaggerTags list the names of the service tags declared in the swagger json implemented by this service.

func (*SharesHandler) UpdateSharePolicies

func (h *SharesHandler) UpdateSharePolicies(req *restful.Request, rsp *restful.Response)

UpdateSharePolicies updates policies associated to the underlying workspace

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier