Documentation ¶
Index ¶
- type Compressor
- type DocumentsSvc
- type FileCoinService
- type GroupAccessService
- type Indexer
- type IpfsService
- type KeyStore
- type Service
- func (s *Service) Create(ctx context.Context, userID, systemID string, ...) (*model.Composition, error)
- func (s *Service) DefaultGroupAccess() *uuid.UUID
- func (s *Service) DeleteByID(ctx context.Context, procRequest *proc.Request, ehrUUID *uuid.UUID, ...) (string, error)
- func (s *Service) GetByID(ctx context.Context, userID, systemID string, ehrUUID *uuid.UUID, ...) (*model.Composition, error)
- func (s *Service) GetLastByBaseID(ctx context.Context, userID, systemID string, ehrUUID *uuid.UUID, ...) (*model.Composition, error)
- func (s *Service) GetList(ctx context.Context, userID, systemID string) ([]*model.EhrDocumentItem, error)
- func (s *Service) IsExist(ctx context.Context, args ...string) (bool, error)
- func (s *Service) Update(ctx context.Context, procRequest *proc.Request, userID, systemID string, ...) (*model.Composition, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Compressor ¶
type DocumentsSvc ¶
type DocumentsSvc interface { GetDocFromStorageByID(ctx context.Context, userID, systemID string, CID *cid.Cid, authData, docIDEncrypted []byte) ([]byte, error) GetDocAccessKey(ctx context.Context, userID, systemID string, CID *cid.Cid) (*chachaPoly.Key, error) DecryptKey(userID string, encryptedKey []byte) (*chachaPoly.Key, error) }
type FileCoinService ¶
type GroupAccessService ¶
type Indexer ¶
type Indexer interface { MultiCallEhrNew() *indexer.MultiCallTx GetDocByVersion(ctx context.Context, ehrUUID *uuid.UUID, docType types.DocumentType, docBaseUIDHash, version *[32]byte) (*model.DocumentMeta, error) AddEhrDoc(docType types.DocumentType, docMeta *model.DocumentMeta, privKey *[32]byte) ([]byte, error) GetDocLastByBaseID(ctx context.Context, userID, systemID string, docType types.DocumentType, docBaseUIDHash *[32]byte) (*model.DocumentMeta, error) DeleteDoc(ctx context.Context, ehrUUID *uuid.UUID, docType types.DocumentType, docBaseUIDHash, version, privKey *[32]byte) (string, error) ListDocByType(ctx context.Context, userID, systemID string, docType types.DocumentType) ([]model.DocumentMeta, error) DataUpdate(ctx context.Context, groupID, dataID, ehrID *uuid.UUID, data []byte) (string, error) SetAccessWrapper(subjectIDHash *[32]byte, accessObj *indexer.AccessObject, userPrivKey *[32]byte) ([]byte, error) }
type IpfsService ¶
type Service ¶
func NewCompositionService ¶
func NewCompositionService( indexer Indexer, ipfs IpfsService, fileCoin FileCoinService, keyStore KeyStore, compressor Compressor, docSvc DocumentsSvc, groupAccessService GroupAccessService, ) *Service
func (*Service) DefaultGroupAccess ¶
func (*Service) DeleteByID ¶
func (*Service) GetLastByBaseID ¶
Click to show internal directories.
Click to hide internal directories.