Documentation ¶
Index ¶
- func WithPutInterceptor() nodes.Option
- func WithUploadLimiter() nodes.Option
- type Handler
- func (m *Handler) Adapt(c nodes.Handler, options nodes.RouterOptions) nodes.Handler
- func (m *Handler) CreateNode(ctx context.Context, in *tree.CreateNodeRequest, opts ...grpc.CallOption) (*tree.CreateNodeResponse, error)
- func (m *Handler) MultipartAbort(ctx context.Context, target *tree.Node, uploadID string, ...) error
- func (m *Handler) MultipartCreate(ctx context.Context, node *tree.Node, requestData *models.MultipartRequestData) (string, error)
- func (m *Handler) PutObject(ctx context.Context, node *tree.Node, reader io.Reader, ...) (int64, error)
- type UploadLimitFilter
- func (a *UploadLimitFilter) Adapt(c nodes.Handler, options nodes.RouterOptions) nodes.Handler
- func (a *UploadLimitFilter) MultipartPutObjectPart(ctx context.Context, target *tree.Node, uploadID string, partNumberMarker int, ...) (models.MultipartObjectPart, error)
- func (a *UploadLimitFilter) PutObject(ctx context.Context, node *tree.Node, reader io.Reader, ...) (int64, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithPutInterceptor ¶
func WithUploadLimiter ¶
Types ¶
type Handler ¶
Handler handles Put requests by creating temporary files in the index before forwarding data to the object service. This temporary entry is updated later on by the sync service, once the object is written. It is deleted if the Put operation fails.
func (*Handler) CreateNode ¶
func (m *Handler) CreateNode(ctx context.Context, in *tree.CreateNodeRequest, opts ...grpc.CallOption) (*tree.CreateNodeResponse, error)
CreateNode recursively creates parents if they do not already exist Only applicable to COLLECTION inside a structured storage (need to create .pydio hidden files)
func (*Handler) MultipartAbort ¶
func (*Handler) MultipartCreate ¶
func (m *Handler) MultipartCreate(ctx context.Context, node *tree.Node, requestData *models.MultipartRequestData) (string, error)
MultipartCreate registers a node in the virtual fs with size 0 and ETag: temporary (we do not have the real size at this point because we are using streams.)
type UploadLimitFilter ¶
UploadLimitFilter restricts atomic uploads by extension and maximum size, based on the front plugins configuration.
func (*UploadLimitFilter) Adapt ¶
func (a *UploadLimitFilter) Adapt(c nodes.Handler, options nodes.RouterOptions) nodes.Handler
func (*UploadLimitFilter) MultipartPutObjectPart ¶
func (a *UploadLimitFilter) MultipartPutObjectPart(ctx context.Context, target *tree.Node, uploadID string, partNumberMarker int, reader io.Reader, requestData *models.PutRequestData) (models.MultipartObjectPart, error)
MultipartPutObjectPart checks Upload Limits (size, extension) defined in the frontend on MultipartPutObjectPart