service

package
v0.0.0-...-e13654e Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2022 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DoctorService

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

func NewDoctorService

func NewDoctorService(storage storage.DoctorStorage) *DoctorService

func (*DoctorService) CreatePrescriptionOffer

func (s *DoctorService) CreatePrescriptionOffer(offerId string, prescription domain.Prescription) (err error)

func (*DoctorService) GetCredentialIdByOfferId

func (s *DoctorService) GetCredentialIdByOfferId(offerId string) (credentialId string, err error)

func (*DoctorService) GetCredentialIdsByDoctorId

func (s *DoctorService) GetCredentialIdsByDoctorId(offerId string) (credentialIds []string, err error)

func (*DoctorService) GetDID

func (s *DoctorService) GetDID(doctorId string) (did string, err error)

func (*DoctorService) GetKMSPassphrase

func (s *DoctorService) GetKMSPassphrase(doctorId string) (kmsPassphrase string, err error)

func (*DoctorService) GetPrescriptionByOfferId

func (s *DoctorService) GetPrescriptionByOfferId(offerId string) (prescription domain.Prescription, err error)

func (*DoctorService) SaveCredentialId

func (s *DoctorService) SaveCredentialId(doctorId string, credentialOfferId string, credentialId string) (err error)

type PatientService

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

func NewPatientService

func NewPatientService(storage storage.PatientStorage) *PatientService

func (*PatientService) AddPatientDID

func (s *PatientService) AddPatientDID(patientId string, did string) (err error)

func (*PatientService) CreatePatient

func (s *PatientService) CreatePatient(username string, password string) (*domain.Patient, error)

func (*PatientService) GetCredentialIdsByPatientId

func (s *PatientService) GetCredentialIdsByPatientId(patientId string) (credentialIds []string, err error)

func (*PatientService) GetDIDs

func (s *PatientService) GetDIDs(patientId string) (dids []string, err error)

func (*PatientService) GetPatientByCredentials

func (s *PatientService) GetPatientByCredentials(username string, password string) (*domain.Patient, error)

func (*PatientService) PatientExists

func (s *PatientService) PatientExists(username string) bool

func (*PatientService) SaveCredentialId

func (s *PatientService) SaveCredentialId(patientId string, credentialId string) (err error)

type PharmacyService

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

func NewPharmacyService

func NewPharmacyService(storage storage.PharmacyStorage) *PharmacyService

func (*PharmacyService) CreatePresentationRequest

func (s *PharmacyService) CreatePresentationRequest(pharmacyId string, requestId string) (err error)

func (*PharmacyService) GetPharmacyIdByRequestId

func (s *PharmacyService) GetPharmacyIdByRequestId(requestId string) (pharmacyId string, err error)

func (*PharmacyService) GetPresentaionIdByRequestId

func (s *PharmacyService) GetPresentaionIdByRequestId(requestId string) (presentationId string, err error)

func (*PharmacyService) GetPresentationIdsByPharmacyId

func (s *PharmacyService) GetPresentationIdsByPharmacyId(pharmacyId string) (presentationIds []string, err error)

func (*PharmacyService) SavePresentationId

func (s *PharmacyService) SavePresentationId(pharmacyId string, requestId string, presentationId string) (err error)

type VCService

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

func NewVCService

func NewVCService(storage storage.VCStorage, issuerAgent vc.Issuer, holderAgent vc.Holder, verifierAgent vc.Verifier, vdr vc.VDR, issuerWallet vc.Wallet, holderWallet vc.Wallet, verifierWallet vc.Wallet) *VCService

func (*VCService) CreateHolderKeyDID

func (s *VCService) CreateHolderKeyDID(userId string, passphrase string) (did string, err error)

func (*VCService) CreateHolderWallet

func (s *VCService) CreateHolderWallet(userId string, passphrase string) (err error)

func (*VCService) ExchangeCredential

func (s *VCService) ExchangeCredential(issuerId string, issuerKMSPassphrase string, holderId string, holderKMSPassphrase string, unsignedCredential domain.Credential) (credential domain.Credential, err error)

func (*VCService) ExchangePresentation

func (s *VCService) ExchangePresentation(verifierId string, holderId string, holderKMSPassphrase string, unsignedPresentation domain.Presentation) (presentation domain.Presentation, err error)

func (*VCService) GetCredentialById

func (s *VCService) GetCredentialById(credentialId string) (domain.Credential, error)

func (*VCService) GetPresentationById

func (s *VCService) GetPresentationById(presentationId string) (domain.Presentation, error)

func (*VCService) HolderWalletExists

func (s *VCService) HolderWalletExists(userId string) bool

func (*VCService) VerifyCredential

func (s *VCService) VerifyCredential(rawCredential json.RawMessage) error

func (*VCService) VerifyPresentation

func (s *VCService) VerifyPresentation(rawPresentation json.RawMessage) error

Jump to

Keyboard shortcuts

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