Documentation ¶
Index ¶
- Variables
- type ErrorImpl
- type SSIMPMockImpl
- func (*SSIMPMockImpl) GetV1DoctorsDoctorIdPrescriptionsCredentialOffersCredentialOfferId(ctx echo.Context, doctorId string, credentialOfferId string) error
- func (*SSIMPMockImpl) GetV1DoctorsDoctorIdPrescriptionsCredentialOffersCredentialOfferIdCredential(ctx echo.Context, doctorId string, credentialOfferId string) error
- func (*SSIMPMockImpl) GetV1PatientsPatientIdDids(ctx echo.Context, patientId string) error
- func (*SSIMPMockImpl) GetV1PatientsPatientIdPrescriptionsCredentials(ctx echo.Context, patientId string) error
- func (*SSIMPMockImpl) GetV1PatientsPatientIdPrescriptionsCredentialsCredentialId(ctx echo.Context, patientId string, credentialId string) error
- func (*SSIMPMockImpl) GetV1PharmaciesPharmacyIdPrescriptionsPresentationRequestsPresentationRequestId(ctx echo.Context, pharmacyId string, presentationRequestId string) error
- func (*SSIMPMockImpl) GetV1PharmaciesPharmacyIdPrescriptionsPresentationRequestsPresentationRequestIdPresentation(ctx echo.Context, pharmacyId string, presentationRequestId string) error
- func (*SSIMPMockImpl) PostV1DoctorsDoctorIdPrescriptionsCredentialOffers(ctx echo.Context, doctorId string) error
- func (h *SSIMPMockImpl) PostV1PatientsLogin(ctx echo.Context) error
- func (*SSIMPMockImpl) PostV1PatientsPatientIdPrescriptionsCredentials(ctx echo.Context, patientId string) error
- func (*SSIMPMockImpl) PostV1PatientsPatientIdPrescriptionsPresentations(ctx echo.Context, patientId string) error
- func (h *SSIMPMockImpl) PostV1PatientsRegister(ctx echo.Context) error
- func (*SSIMPMockImpl) PostV1PharmaciesPharmacyIdPrescriptionsPresentationRequests(ctx echo.Context, pharmacyId string) error
- func (*SSIMPMockImpl) PostV1VcVerifyCredential(ctx echo.Context) error
- func (*SSIMPMockImpl) PostV1VcVerifyPresentation(ctx echo.Context) error
Constants ¶
This section is empty.
Variables ¶
var CreatePresentationRequestResponseInfo = rest.CreatePresentationRequestResponse{
PresentationRequestId: &presentationRequestId,
}
Create presentation request response info
var CredentialOfferResponseInfo = rest.CredentialOfferResponse{
CredentialOfferId: &credentialOfferResponse,
}
Credential offer response info
var CredentialResponseInfo = rest.Credential{ Context: &[]string{ context1, context2, context3, }, Type: &type1, Id: &verifiableId, Issuer: &id, IssuanceDate: &issuanceDate, ExpirationDate: &expirationDate, CredentialSubject: &struct { Id *string "json:\"id,omitempty\"" Name *string "json:\"name,omitempty\"" Prescription *rest.Prescription "json:\"prescription,omitempty\"" }{ Id: &patientID, Name: &patientName, Prescription: GetCredentialOfferResponseInfo.Prescription, }, Proof: &rest.CredentialProof{ Created: &created, Jws: &jws, ProofPurpose: &proofPurpose, Type: &typeSignature, VerificationMethod: &verificationMethod, }, }
Credential response info
var DoctorDID = "did:cheqd:testnet:z265BXc422gE9cvzYFHvbnFkASeTU5mn"
var DoctorID = "d0001"
var DoctorKMSPassphrase = "Np6VR4Yg6PPL"
var GetAllDidsResponseInfo = rest.GetAllDidsResponse{ Dids: &[]string{ dids1, dids2, dids3, }, }
Get all DIDs response info
var GetAllPrescriptionCredentialResponseInfo = rest.GetAllPrescriptionCredentialResponse{ Credentials: &[]rest.Credential{CredentialResponseInfo}, }
Get all prescription credential response info
var GetCredentialOfferResponseInfo = rest.GetCredentialOfferResponse{ Prescription: &rest.Prescription{ PatientInfo: &struct { Birthday *string "json:\"birthday,omitempty\"" Name *string "json:\"name,omitempty\"" Sex *string "json:\"sex,omitempty\"" }{ Birthday: &patientBirthday, Name: &patientName, Sex: &patientSex, }, IssuanceInfo: &struct { ExpirationDate *string "json:\"expirationDate,omitempty\"" IssuanceDate *string "json:\"issuanceDate,omitempty\"" }{ IssuanceDate: &issuanceDate, ExpirationDate: &expirationDate, }, HospitalInfo: &struct { DoctorName *string "json:\"doctorName,omitempty\"" DoctorSignatureStamp *string "json:\"doctorSignatureStamp,omitempty\"" HospitalName *string "json:\"hospitalName,omitempty\"" Location *string "json:\"location,omitempty\"" MedicalInstitutionNumber *float32 "json:\"medicalInstitutionNumber,omitempty\"" Phone *string "json:\"phone,omitempty\"" PrefectureNumber *float32 "json:\"prefectureNumber,omitempty\"" ScoreVoteNumber *float32 "json:\"scoreVoteNumber,omitempty\"" }{ DoctorName: &doctorName, DoctorSignatureStamp: &doctorSignatureStamp, HospitalName: &hospitalName, Location: &location, MedicalInstitutionNumber: &medicalInstitutionNumber, Phone: &phone, PrefectureNumber: &prefectureNumber, ScoreVoteNumber: &scoreVoteNumber, }, Drugs: &[]rest.Drug{ { DrugName: &drugName, DrugNumber: &drugNumber, DrugType: &drugType, Info: &OintmentDrugInfoI, RefillAvailability: &refillAvailability, }, { DrugName: &drugName, DrugNumber: &drugNumber, DrugType: &drugType, Info: &TabletDrugInfoI, RefillAvailability: &refillAvailability, }, }, }, }
Get credential offer response info
var GetPrescriptionCredentialResponseInfo = rest.CredentialResponse{ Credential: &CredentialResponseInfo, }
Get prescription credential response info
var GetPresentationRequestResponseInfo = rest.GetPresentationRequestResponse{
Challenge: &challenge,
PresentationRequestId: &presentationRequestId,
}
Get presentation request response info
var GetVerifiablePresentationResponseInfo = rest.GetVerifiablePresentationResponse{ Presentation: &PresentationInfo, VerificationComment: &verificationComment, VerificationStatus: &verificationStatus, }
Get verifiable presentation response info
var Host = "http://localhost:8888/v1"
Global constants for integration tests.
var OintmentDrugInfoI interface{} = rest.OintmentDrugInfo{
AmountOfMedicine: &amountOfMedicine,
UseArea: &useArea,
ApplicationFrequency: &applicationFrequency,
Usage: &usage,
}
Ointment drug info
var PatientLoginResponse = struct { PatientId string `json:"patientId"` }{ PatientId: patientID, }
Patient login response info
var PatientRegistrationResponse = struct { PatientId string `json:"patientId"` DID string `json:"did"` }{ PatientId: patientID, DID: dids1, }
Patient registration response info
var PharmacyID = "v0001"
var PharmacyKMSPassphrase = "Np6VR4Yg6PPL"
var PresentationInfo = rest.Presentation{ Context: &[]string{ context1, context2, context3, }, Type: &type1, VerifiableCredential: &[]rest.Credential{ CredentialResponseInfo, }, Proof: &[]rest.PresentationProof{ { Type: &typeSignature, Created: &created, ProofPurpose: &proofPurpose, VerificationMethod: &verificationMethod, Jws: &jws, }, }, }
Presentation info
var TabletDrugInfoI interface{} = rest.TabletDrugInfo{
NumberOfDrug: &numberOfDrug,
NumberOfDoses: &numberOfDoses,
DaysOfMedication: &daysOfMedication,
TimingToTakeMedicine: &timingToTakeMedicine,
}
Tablet drug info
Functions ¶
This section is empty.
Types ¶
type SSIMPMockImpl ¶
type SSIMPMockImpl struct{}
func (*SSIMPMockImpl) GetV1DoctorsDoctorIdPrescriptionsCredentialOffersCredentialOfferId ¶
func (*SSIMPMockImpl) GetV1DoctorsDoctorIdPrescriptionsCredentialOffersCredentialOfferId(ctx echo.Context, doctorId string, credentialOfferId string) error
Gets credential offer by id (GET /v1/doctors/{doctorId}/prescriptions/credential-offers/{credentialOfferId})
func (*SSIMPMockImpl) GetV1DoctorsDoctorIdPrescriptionsCredentialOffersCredentialOfferIdCredential ¶
func (*SSIMPMockImpl) GetV1DoctorsDoctorIdPrescriptionsCredentialOffersCredentialOfferIdCredential(ctx echo.Context, doctorId string, credentialOfferId string) error
Gets credential issued for given credential offer (GET /v1/doctors/{doctorId}/prescriptions/credential-offers/{credentialOfferId}/credential)
func (*SSIMPMockImpl) GetV1PatientsPatientIdDids ¶
func (*SSIMPMockImpl) GetV1PatientsPatientIdDids(ctx echo.Context, patientId string) error
Gets all dids belonging to given patient (GET /v1/patients/{patientId}/dids)
func (*SSIMPMockImpl) GetV1PatientsPatientIdPrescriptionsCredentials ¶
func (*SSIMPMockImpl) GetV1PatientsPatientIdPrescriptionsCredentials(ctx echo.Context, patientId string) error
Gets all prescription credentials issued for given patient (GET /v1/patients/{patientId}/prescriptions/credentials)
func (*SSIMPMockImpl) GetV1PatientsPatientIdPrescriptionsCredentialsCredentialId ¶
func (*SSIMPMockImpl) GetV1PatientsPatientIdPrescriptionsCredentialsCredentialId(ctx echo.Context, patientId string, credentialId string) error
Gets prescription credential by id issued for given patient (GET /v1/patients/{patientId}/prescriptions/credentials/{credentialId})
func (*SSIMPMockImpl) GetV1PharmaciesPharmacyIdPrescriptionsPresentationRequestsPresentationRequestId ¶
func (*SSIMPMockImpl) GetV1PharmaciesPharmacyIdPrescriptionsPresentationRequestsPresentationRequestId(ctx echo.Context, pharmacyId string, presentationRequestId string) error
Gets presentation request for prescription by request id (GET /v1/pharmacies/{pharmacyId}/prescriptions/presentation-requests/{presentationRequestId})
func (*SSIMPMockImpl) GetV1PharmaciesPharmacyIdPrescriptionsPresentationRequestsPresentationRequestIdPresentation ¶
func (*SSIMPMockImpl) GetV1PharmaciesPharmacyIdPrescriptionsPresentationRequestsPresentationRequestIdPresentation(ctx echo.Context, pharmacyId string, presentationRequestId string) error
Gets verifiable presentation for given presentation request (GET /v1/pharmacies/{pharmacyId}/prescriptions/presentation-requests/{presentationRequestId}/presentation)
func (*SSIMPMockImpl) PostV1DoctorsDoctorIdPrescriptionsCredentialOffers ¶
func (*SSIMPMockImpl) PostV1DoctorsDoctorIdPrescriptionsCredentialOffers(ctx echo.Context, doctorId string) error
Creates credential offer for prescription (generates a link for QR code) (POST /v1/doctors/{doctorId}/prescriptions/credential-offers/)
func (*SSIMPMockImpl) PostV1PatientsLogin ¶
func (h *SSIMPMockImpl) PostV1PatientsLogin(ctx echo.Context) error
Login patient (POST /v1/patients/login)
func (*SSIMPMockImpl) PostV1PatientsPatientIdPrescriptionsCredentials ¶
func (*SSIMPMockImpl) PostV1PatientsPatientIdPrescriptionsCredentials(ctx echo.Context, patientId string) error
Creates credential in response to credential offer from doctor (POST /v1/patients/{patientId}/prescriptions/credentials/)
func (*SSIMPMockImpl) PostV1PatientsPatientIdPrescriptionsPresentations ¶
func (*SSIMPMockImpl) PostV1PatientsPatientIdPrescriptionsPresentations(ctx echo.Context, patientId string) error
Creates verifiable presentation in response to prescription presentation request from pharmacy (POST /v1/patients/{patientId}/prescriptions/presentations/)
func (*SSIMPMockImpl) PostV1PatientsRegister ¶
func (h *SSIMPMockImpl) PostV1PatientsRegister(ctx echo.Context) error
Register new patient (POST /v1/patients/register)
func (*SSIMPMockImpl) PostV1PharmaciesPharmacyIdPrescriptionsPresentationRequests ¶
func (*SSIMPMockImpl) PostV1PharmaciesPharmacyIdPrescriptionsPresentationRequests(ctx echo.Context, pharmacyId string) error
Creates presentation request for prescription (generates link for a QR code) (POST /v1/pharmacies/{pharmacyId}/prescriptions/presentation-requests)
func (*SSIMPMockImpl) PostV1VcVerifyCredential ¶
func (*SSIMPMockImpl) PostV1VcVerifyCredential(ctx echo.Context) error
Verify Credential (POST /v1/vc/verify-credential)
func (*SSIMPMockImpl) PostV1VcVerifyPresentation ¶
func (*SSIMPMockImpl) PostV1VcVerifyPresentation(ctx echo.Context) error
Verify Credential (POST /v1/vc/verify-presentation)