key

package
v4.4.0 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2024 License: AGPL-3.0 Imports: 13 Imported by: 0

Documentation

Overview

Package key implements a keystore for managing encryption keys attached to files.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDAO

func NewDAO(ctx context.Context, o dao.DAO) (dao.DAO, error)

Types

type DAO

type DAO interface {
	dao.DAO

	ListEncryptedBlockInfo(nodeUuid string) (QueryResultCursor, error)
	SaveEncryptedBlockInfo(nodeUuid string, b *RangedBlocks) error
	GetEncryptedLegacyBlockInfo(nodeUuid string) (*RangedBlocks, error)
	ClearNodeEncryptedPartBlockInfo(nodeUuid string, partId int) error
	ClearNodeEncryptedBlockInfo(nodeUuid string) error

	CopyNode(srcUuid, targetUuid string) error

	SaveNode(node *encryption.Node) error
	UpgradeNodeVersion(nodeUuid string) error
	GetNode(nodeUuid string) (*encryption.Node, error)
	DeleteNode(nodeUuid string) error

	SaveNodeKey(nodeKey *encryption.NodeKey) error
	GetNodeKey(node string, user string) (*encryption.NodeKey, error)
	DeleteNodeKey(nodeKey *encryption.NodeKey) error
}

type DBCursor

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

DBCursor wraps sql scanner

func (*DBCursor) Close

func (c *DBCursor) Close() error

func (*DBCursor) HasNext

func (c *DBCursor) HasNext() bool

func (*DBCursor) Next

func (c *DBCursor) Next() (interface{}, error)

type QueryResultCursor

type QueryResultCursor interface {
	Close() error
	HasNext() bool
	Next() (interface{}, error)
}

func NewDBCursor

func NewDBCursor(rows *sqldb.Rows, scanner dbRowScanner) QueryResultCursor

type RangedBlocks

type RangedBlocks struct {
	OwnerId    string
	PartId     uint32
	SeqStart   uint32
	SeqEnd     uint32
	HeaderSize uint32
	BlockSize  uint32
	Nonce      []byte
}

Directories

Path Synopsis
Package grpc provides a pydio GRPC service for managing files encryption keys
Package grpc provides a pydio GRPC service for managing files encryption keys

Jump to

Keyboard shortcuts

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