events

package
v4.3.2-rc1 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2023 License: AGPL-3.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithAudit

func WithAudit() nodes.Option

func WithRead

func WithRead() nodes.Option

Types

type HandlerAudit

type HandlerAudit struct {
	abstract.Handler
}

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

CreateNode logs an audit message on each call after having transferred the call to following handlers.

func (*HandlerAudit) DeleteNode

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

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 (h *HandlerAudit) MultipartListObjectParts(ctx context.Context, target *tree.Node, uploadID string, partNumberMarker int, maxParts int) (models.ListObjectPartsResult, error)

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

ReadNode only forwards call to Next handler, it call too often to provide useful audit info.

func (*HandlerAudit) UpdateNode

UpdateNode logs an audit message on each call after having transferred the call to following handlers.

type HandlerRead

type HandlerRead struct {
	abstract.Handler
}

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

Jump to

Keyboard shortcuts

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