Documentation
¶
Index ¶
Constants ¶
const ( // Consent protocol Consent = "consent" // PIURI stores the URI for the message type PIURI = "https://dedis.epfl.ch/consent/1.0" InviteMsgType = PIURI + "/information/invite" // InformationRequestMsgType represents the information request message InformationRequestMsgType = PIURI + "/information/request" // InformationResponseMsgType represents the information response message InformationResponseMsgType = PIURI + "/information/response" // InformationFailureMsgType represents the information failure message InformationFailureMsgType = PIURI + "/information/failure" // ConsentGrantMsgType represents the consent grant message ConsentGrantMsgType = PIURI + "/consent/grant" // ConsentDenyMsgType represents the consent deny message ConsentDenyMsgType = PIURI + "/consent/deny" // DecryptionSuccessMsgType represents the decryption success message DecryptionSuccessMsgType = PIURI + "/decryption/success" // DecryptionFailureMsgType represents the decryption failure message DecryptionFailureMsgType = PIURI + "/decryption/failure" )
const ( // StateInfoRequested marks the info-request phase of consent protocol. StateInfoRequested = "inforequested" // StateInfoSent marks the info-sent phase of the consent protocol. StateInfoSent = "infosent" // StateInfoFailure marks the info-failure phase of the consent protocol. StateInfoFailure = "infofailure" // StateConsentGranted marks the consent-granted phase of the consent protocol. StateConsentGranted = "consentgranted" // StateConsentDenied marks the conent-denied phase of the consent protocol. StateConsentDenied = "consentdenied" // StateDecrypted marks the succesful decryption in consent protocol StateDecrypted = "decrypted" // StateDecryptError marks an error in decryption in consent protocol StateDecryptError = "decrypterror" // StateAbandoned marks the abandoned phase of the did-exchange protocol. StateAbandoned = "abandoned" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConsentDeny ¶
type ConsentDeny struct {
ID string `json:"@id"`
Type string `json:"@type"`
Thread *decorator.Thread `json:"~thread,omitempty"`
}
ConsentDeny denotes consent grant message.
type ConsentGrant ¶
type ConsentGrant struct {
ID string `json:"@id"`
Type string `json:"@type"`
WriteInstanceID string `json:"writeInstanceID"`
Filename string `json:"filename"`
Thread *decorator.Thread `json:"~thread,omitempty"`
}
ConsentGrant denotes consent grant message.
type ConsentInvitation ¶
type ConsentInvitation struct {
ID string `json:"@id"`
Type string `json:"@type"`
Invite didexchange.Invitation `json:"invitation"`
Synopsis string `json:"synopsis"`
CohortID string `json:"cohortID"`
}
type ContinueOptions ¶
type ContinueOptions struct {
InformationResponse *InformationResponse
InformationFailure *InformationFailure
DecryptionSuccess *DecryptionSuccess
DecryptionFailure *DecryptionFailure
}
ContinueOptions represents options that may be passed in the call to `Continue` on an action event.
type DecryptionFailure ¶
type DecryptionFailure struct {
ID string `json:"@id"`
Type string `json:"@type"`
Thread *decorator.Thread `json:"~thread,omitempty"`
}
DecryptionFailure denotes failure decrypting patient's data.
type DecryptionSuccess ¶
type DecryptionSuccess struct {
ID string `json:"@id"`
Type string `json:"@type"`
Thread *decorator.Thread `json:"~thread,omitempty"`
}
DecryptionSuccess denotes success decrypting patient's data.
type InformationFailure ¶
type InformationFailure struct {
ID string `json:"@id"`
Type string `json:"@type"`
Thread *decorator.Thread `json:"~thread,omitempty"`
}
InformationFailure contains the study retrieval failure cause.
type InformationRequest ¶
type InformationRequest struct {
ID string `json:"@id"`
Type string `json:"@type"`
CohortID string `json:"cohortID"`
Thread *decorator.Thread `json:"~thread,omitempty"`
}
InformationRequest contains the paramters for the requested study.
type InformationResponse ¶
type InformationResponse struct {
ID string `json:"@id"`
Type string `json:"@type"`
Synopsis string `json:"synopsis"`
Description string `json:"description"`
MoreInfoLink string `json:"moreInfoLink"`
AcceptText string `json:"acceptText"`
DenyText string `json:"denyText"`
Contact string `json:"contact"`
Thread *decorator.Thread `json:"~thread,omitempty"`
}
InformationResponse contains the detailed study information.
type Service ¶
Service for Consent protocol
func (*Service) HandleInbound ¶
HandleInbound handles incoming DIDComm Messages for the Consent protocol.
func (*Service) HandleOutbound ¶
HandleOutbound handles outbound consent messages.