Documentation ¶
Index ¶
- type DefaultDocumentService
- func (d *DefaultDocumentService) ContentFromAttributes(docMeta *model.DocumentMeta, key *chachaPoly.Key) ([]byte, error)
- func (d *DefaultDocumentService) DecryptKey(userID string, encryptedKey []byte) (*chachaPoly.Key, error)
- func (d *DefaultDocumentService) GenerateID() string
- func (d *DefaultDocumentService) GetDocAccessKey(ctx context.Context, userID, systemID string, CID *cid.Cid) (*chachaPoly.Key, error)
- func (d *DefaultDocumentService) GetDocFromStorageByID(ctx context.Context, userID, systemID string, CID *cid.Cid, ...) ([]byte, error)
- func (d *DefaultDocumentService) GetSystemID() string
- func (d *DefaultDocumentService) KeyFromAttribures(docMeta *model.DocumentMeta, userPubKey, userPrivKey *[32]byte) (*chachaPoly.Key, error)
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 (*DefaultDocumentService) GetSystemID ¶
func (d *DefaultDocumentService) GetSystemID() string
func (*DefaultDocumentService) KeyFromAttribures ¶
func (d *DefaultDocumentService) KeyFromAttribures(docMeta *model.DocumentMeta, userPubKey, userPrivKey *[32]byte) (*chachaPoly.Key, error)
Click to show internal directories.
Click to hide internal directories.