Documentation ¶
Index ¶
- func WithAudit() nodes.Option
- func WithRead() nodes.Option
- type HandlerAudit
- func (h *HandlerAudit) Adapt(c nodes.Handler, options nodes.RouterOptions) nodes.Handler
- func (h *HandlerAudit) CopyObject(ctx context.Context, from *tree.Node, to *tree.Node, ...) (models.ObjectInfo, error)
- func (h *HandlerAudit) CreateNode(ctx context.Context, in *tree.CreateNodeRequest, opts ...grpc.CallOption) (*tree.CreateNodeResponse, error)
- func (h *HandlerAudit) DeleteNode(ctx context.Context, in *tree.DeleteNodeRequest, opts ...grpc.CallOption) (*tree.DeleteNodeResponse, error)
- func (h *HandlerAudit) GetObject(ctx context.Context, node *tree.Node, requestData *models.GetRequestData) (io.ReadCloser, error)
- func (h *HandlerAudit) ListNodes(ctx context.Context, in *tree.ListNodesRequest, opts ...grpc.CallOption) (tree.NodeProvider_ListNodesClient, error)
- func (h *HandlerAudit) MultipartAbort(ctx context.Context, target *tree.Node, uploadID string, ...) error
- func (h *HandlerAudit) MultipartComplete(ctx context.Context, target *tree.Node, uploadID string, ...) (models.ObjectInfo, error)
- func (h *HandlerAudit) MultipartCreate(ctx context.Context, target *tree.Node, ...) (string, error)
- func (h *HandlerAudit) MultipartList(ctx context.Context, prefix string, requestData *models.MultipartRequestData) (models.ListMultipartUploadsResult, error)
- func (h *HandlerAudit) MultipartListObjectParts(ctx context.Context, target *tree.Node, uploadID string, partNumberMarker int, ...) (models.ListObjectPartsResult, error)
- func (h *HandlerAudit) MultipartPutObjectPart(ctx context.Context, target *tree.Node, uploadID string, partNumberMarker int, ...) (models.MultipartObjectPart, error)
- func (h *HandlerAudit) PutObject(ctx context.Context, node *tree.Node, reader io.Reader, ...) (models.ObjectInfo, error)
- func (h *HandlerAudit) ReadNode(ctx context.Context, in *tree.ReadNodeRequest, opts ...grpc.CallOption) (*tree.ReadNodeResponse, error)
- func (h *HandlerAudit) UpdateNode(ctx context.Context, in *tree.UpdateNodeRequest, opts ...grpc.CallOption) (*tree.UpdateNodeResponse, error)
- type HandlerRead
- func (h *HandlerRead) Adapt(c nodes.Handler, options nodes.RouterOptions) nodes.Handler
- func (h *HandlerRead) GetObject(ctx context.Context, node *tree.Node, requestData *models.GetRequestData) (io.ReadCloser, error)
- func (h *HandlerRead) ListNodes(ctx context.Context, in *tree.ListNodesRequest, opts ...grpc.CallOption) (tree.NodeProvider_ListNodesClient, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type HandlerAudit ¶
HandlerAudit is responsible for auditing all events on Nodes as soon as the router's option flag "AuditEvent" is set to true.
func (*HandlerAudit) Adapt ¶
func (h *HandlerAudit) Adapt(c nodes.Handler, options nodes.RouterOptions) nodes.Handler
func (*HandlerAudit) CopyObject ¶
func (h *HandlerAudit) CopyObject(ctx context.Context, from *tree.Node, to *tree.Node, requestData *models.CopyRequestData) (models.ObjectInfo, error)
func (*HandlerAudit) CreateNode ¶
func (h *HandlerAudit) CreateNode(ctx context.Context, in *tree.CreateNodeRequest, opts ...grpc.CallOption) (*tree.CreateNodeResponse, error)
CreateNode logs an audit message on each call after having transferred the call to following handlers.
func (*HandlerAudit) DeleteNode ¶
func (h *HandlerAudit) DeleteNode(ctx context.Context, in *tree.DeleteNodeRequest, opts ...grpc.CallOption) (*tree.DeleteNodeResponse, error)
DeleteNode logs an audit message on each call after having transferred the call to following handlers.
func (*HandlerAudit) GetObject ¶
func (h *HandlerAudit) GetObject(ctx context.Context, node *tree.Node, requestData *models.GetRequestData) (io.ReadCloser, error)
GetObject logs an audit message on each GetObject Events after calling following handlers.
func (*HandlerAudit) ListNodes ¶
func (h *HandlerAudit) ListNodes(ctx context.Context, in *tree.ListNodesRequest, opts ...grpc.CallOption) (tree.NodeProvider_ListNodesClient, error)
ListNodes logs an audit message on each call after having transferred the call to following handlers.
func (*HandlerAudit) MultipartAbort ¶
func (h *HandlerAudit) MultipartAbort(ctx context.Context, target *tree.Node, uploadID string, requestData *models.MultipartRequestData) error
func (*HandlerAudit) MultipartComplete ¶
func (h *HandlerAudit) MultipartComplete(ctx context.Context, target *tree.Node, uploadID string, uploadedParts []models.MultipartObjectPart) (models.ObjectInfo, error)
func (*HandlerAudit) MultipartCreate ¶
func (h *HandlerAudit) MultipartCreate(ctx context.Context, target *tree.Node, requestData *models.MultipartRequestData) (string, error)
func (*HandlerAudit) MultipartList ¶
func (h *HandlerAudit) MultipartList(ctx context.Context, prefix string, requestData *models.MultipartRequestData) (models.ListMultipartUploadsResult, error)
func (*HandlerAudit) MultipartListObjectParts ¶
func (*HandlerAudit) MultipartPutObjectPart ¶
func (h *HandlerAudit) MultipartPutObjectPart(ctx context.Context, target *tree.Node, uploadID string, partNumberMarker int, reader io.Reader, requestData *models.PutRequestData) (models.MultipartObjectPart, error)
func (*HandlerAudit) PutObject ¶
func (h *HandlerAudit) PutObject(ctx context.Context, node *tree.Node, reader io.Reader, requestData *models.PutRequestData) (models.ObjectInfo, error)
PutObject logs an audit message after calling following handlers.
func (*HandlerAudit) ReadNode ¶
func (h *HandlerAudit) ReadNode(ctx context.Context, in *tree.ReadNodeRequest, opts ...grpc.CallOption) (*tree.ReadNodeResponse, error)
ReadNode only forwards call to Next handler, it call too often to provide useful audit info.
func (*HandlerAudit) UpdateNode ¶
func (h *HandlerAudit) UpdateNode(ctx context.Context, in *tree.UpdateNodeRequest, opts ...grpc.CallOption) (*tree.UpdateNodeResponse, error)
UpdateNode logs an audit message on each call after having transferred the call to following handlers.
type HandlerRead ¶
HandlerRead publishes events after reading files.
func (*HandlerRead) Adapt ¶
func (h *HandlerRead) Adapt(c nodes.Handler, options nodes.RouterOptions) nodes.Handler
func (*HandlerRead) GetObject ¶
func (h *HandlerRead) GetObject(ctx context.Context, node *tree.Node, requestData *models.GetRequestData) (io.ReadCloser, error)
func (*HandlerRead) ListNodes ¶
func (h *HandlerRead) ListNodes(ctx context.Context, in *tree.ListNodesRequest, opts ...grpc.CallOption) (tree.NodeProvider_ListNodesClient, error)