service

package
v0.0.0-...-4eea697 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2023 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DefaultDocumentService

type DefaultDocumentService struct {
	Infra *infrastructure.Infra
	Proc  *processing.Proc
}

func NewDefaultDocumentService

func NewDefaultDocumentService(cfg *config.Config, infra *infrastructure.Infra) *DefaultDocumentService

func (*DefaultDocumentService) ContentFromAttributes

func (d *DefaultDocumentService) ContentFromAttributes(docMeta *model.DocumentMeta, key *chachaPoly.Key) ([]byte, error)

func (*DefaultDocumentService) DecryptKey

func (d *DefaultDocumentService) DecryptKey(userID string, encryptedKey []byte) (*chachaPoly.Key, error)

func (*DefaultDocumentService) GenerateID

func (d *DefaultDocumentService) GenerateID() string

func (*DefaultDocumentService) GetDocAccessKey

func (d *DefaultDocumentService) GetDocAccessKey(ctx context.Context, userID, systemID string, CID *cid.Cid) (*chachaPoly.Key, error)

func (*DefaultDocumentService) GetDocFromStorageByID

func (d *DefaultDocumentService) GetDocFromStorageByID(ctx context.Context, userID, systemID string, CID *cid.Cid, authData, docIDEncrypted []byte) ([]byte, error)

func (*DefaultDocumentService) GetSystemID

func (d *DefaultDocumentService) GetSystemID() string

func (*DefaultDocumentService) KeyFromAttribures

func (d *DefaultDocumentService) KeyFromAttribures(docMeta *model.DocumentMeta, userPubKey, userPrivKey *[32]byte) (*chachaPoly.Key, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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