shares

package
v2.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2022 License: Apache-2.0 Imports: 48 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GatewayClient

type GatewayClient interface {
	Authenticate(ctx context.Context, in *gateway.AuthenticateRequest, opts ...grpc.CallOption) (*gateway.AuthenticateResponse, error)

	Stat(ctx context.Context, in *provider.StatRequest, opts ...grpc.CallOption) (*provider.StatResponse, error)
	ListContainer(ctx context.Context, in *provider.ListContainerRequest, opts ...grpc.CallOption) (*provider.ListContainerResponse, error)
	GetPath(ctx context.Context, in *provider.GetPathRequest, opts ...grpc.CallOption) (*provider.GetPathResponse, error)

	ListShares(ctx context.Context, in *collaboration.ListSharesRequest, opts ...grpc.CallOption) (*collaboration.ListSharesResponse, error)
	GetShare(ctx context.Context, in *collaboration.GetShareRequest, opts ...grpc.CallOption) (*collaboration.GetShareResponse, error)
	GetReceivedShare(ctx context.Context, in *collaboration.GetReceivedShareRequest, opts ...grpc.CallOption) (*collaboration.GetReceivedShareResponse, error)
	CreateShare(ctx context.Context, in *collaboration.CreateShareRequest, opts ...grpc.CallOption) (*collaboration.CreateShareResponse, error)
	RemoveShare(ctx context.Context, in *collaboration.RemoveShareRequest, opts ...grpc.CallOption) (*collaboration.RemoveShareResponse, error)
	ListReceivedShares(ctx context.Context, in *collaboration.ListReceivedSharesRequest, opts ...grpc.CallOption) (*collaboration.ListReceivedSharesResponse, error)
	UpdateReceivedShare(ctx context.Context, in *collaboration.UpdateReceivedShareRequest, opts ...grpc.CallOption) (*collaboration.UpdateReceivedShareResponse, error)

	GetGroup(ctx context.Context, in *grouppb.GetGroupRequest, opts ...grpc.CallOption) (*grouppb.GetGroupResponse, error)
	GetGroupByClaim(ctx context.Context, in *grouppb.GetGroupByClaimRequest, opts ...grpc.CallOption) (*grouppb.GetGroupByClaimResponse, error)
	GetUser(ctx context.Context, in *userpb.GetUserRequest, opts ...grpc.CallOption) (*userpb.GetUserResponse, error)
	GetUserByClaim(ctx context.Context, in *userpb.GetUserByClaimRequest, opts ...grpc.CallOption) (*userpb.GetUserByClaimResponse, error)
}

GatewayClient is the interface to the gateway service

type GatewayClientGetter

type GatewayClientGetter func() (GatewayClient, error)

GatewayClientGetter is the function being used to retrieve a gateway client instance

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

Handler implements the shares part of the ownCloud sharing API

func (*Handler) AcceptReceivedShare

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

AcceptReceivedShare handles Post Requests on /apps/files_sharing/api/v1/shares/{shareid}

func (*Handler) CreateShare

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

CreateShare handles POST requests on /apps/files_sharing/api/v1/shares

func (*Handler) GetFederatedShare

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

GetFederatedShare handles GET requests on /apps/files_sharing/api/v1/shares/remote_shares/{shareid}

func (*Handler) GetShare

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

GetShare handles GET requests on /apps/files_sharing/api/v1/shares/(shareid)

func (*Handler) Init

func (h *Handler) Init(c *config.Config)

Init initializes the handler using default values

func (*Handler) InitWithGetter

func (h *Handler) InitWithGetter(c *config.Config, clientGetter GatewayClientGetter)

InitWithGetter initializes the handler and adds the clientGetter

func (*Handler) ListFederatedShares

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

ListFederatedShares handles GET requests on /apps/files_sharing/api/v1/shares/remote_shares

func (*Handler) ListShares

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

ListShares handles GET requests on /apps/files_sharing/api/v1/shares

func (*Handler) RejectReceivedShare

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

RejectReceivedShare handles DELETE Requests on /apps/files_sharing/api/v1/shares/{shareid}

func (*Handler) RemoveShare

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

RemoveShare handles DELETE requests on /apps/files_sharing/api/v1/shares/(shareid)

func (*Handler) UpdateShare

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

UpdateShare handles PUT requests on /apps/files_sharing/api/v1/shares/(shareid)

type PublicShareContextName

type PublicShareContextName string

PublicShareContextName represent cross boundaries context for the name of the public share

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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