Documentation ¶
Index ¶
- func NewMockNodeKeyManagerClient() encryption.NodeKeyManagerClient
- func WithEncryption() nodes.Option
- type Handler
- func (e *Handler) Adapt(h nodes.Handler, options nodes.RouterOptions) nodes.Handler
- func (e *Handler) CopyObject(ctx context.Context, from *tree.Node, to *tree.Node, ...) (int64, error)
- func (e *Handler) GetObject(ctx context.Context, node *tree.Node, requestData *models.GetRequestData) (io.ReadCloser, error)
- func (e *Handler) MultipartCreate(ctx context.Context, target *tree.Node, ...) (string, error)
- func (e *Handler) MultipartPutObjectPart(ctx context.Context, target *tree.Node, uploadID string, partNumberMarker int, ...) (models.MultipartObjectPart, error)
- func (e *Handler) PutObject(ctx context.Context, node *tree.Node, reader io.Reader, ...) (int64, error)
- func (e *Handler) SetNodeKeyManagerClient(nodeKeyManagerClient encryption.NodeKeyManagerClient)
- func (e *Handler) SetUserKeyTool(keyTool UserKeyTool)
- type UserKeyTool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMockNodeKeyManagerClient ¶
func NewMockNodeKeyManagerClient() encryption.NodeKeyManagerClient
func WithEncryption ¶
Types ¶
type Handler ¶
Handler encryption node middleware
func (*Handler) CopyObject ¶
func (e *Handler) CopyObject(ctx context.Context, from *tree.Node, to *tree.Node, requestData *models.CopyRequestData) (int64, error)
CopyObject enriches request metadata for CopyObject with Encryption Materials, if required by the datasource
func (*Handler) GetObject ¶
func (e *Handler) GetObject(ctx context.Context, node *tree.Node, requestData *models.GetRequestData) (io.ReadCloser, error)
GetObject enriches request metadata for GetObject with Encryption Materials, if required by the datasource.
func (*Handler) MultipartCreate ¶
func (*Handler) MultipartPutObjectPart ¶
func (*Handler) PutObject ¶
func (e *Handler) PutObject(ctx context.Context, node *tree.Node, reader io.Reader, requestData *models.PutRequestData) (int64, error)
PutObject enriches request metadata for PutObject with Encryption Materials, if required by datasource.
func (*Handler) SetNodeKeyManagerClient ¶
func (e *Handler) SetNodeKeyManagerClient(nodeKeyManagerClient encryption.NodeKeyManagerClient)
func (*Handler) SetUserKeyTool ¶
func (e *Handler) SetUserKeyTool(keyTool UserKeyTool)
type UserKeyTool ¶
type UserKeyTool interface { GetEncrypted(ctx context.Context, keyID string, data []byte) ([]byte, error) GetDecrypted(ctx context.Context, keyID string, data []byte) ([]byte, error) }
UserKeyTool describes a tool that can encrypt/decrypt data based on user context
func GetUserKeyTool ¶
func GetUserKeyTool(user string, pass []byte) UserKeyTool
GetUserKeyTool creates a keytool based on specified @user and @pass
func MasterKeyTool ¶
func MasterKeyTool(ctx context.Context) (UserKeyTool, error)
MasterKeyTool creates the admin key tool
func NewMockUserKeyTool ¶
func NewMockUserKeyTool() UserKeyTool
Click to show internal directories.
Click to hide internal directories.