Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConsentsGet ¶
ConsentsGet is the API Handler for responding to GET /consents requests from participants. Extracts the Bearer token and JWT from the Authorization header, decodes and verifies the JWT, and returns a canned consent payload. TODO: This endpoint should lookup the admin from the KeyFile and request the consents from the consents service
Types ¶
type Consents ¶
type Consents struct { DefaultConsent DefaultConsent `json:"default_consent"` ProjectConsents []ProjectConsent `json:"project_consents"` }
Consents is a simple struct that enables the json marshalling and unmarshalling as described by the API
type DefaultConsent ¶
type DefaultConsent struct { GeneticConsentStyle string `json:"genetic_consent_style"` ClinicalConsentStyle string `json:"clinical_consent_style"` }
DefaultConsent is a simple struct that enables the json marshalling and unmarshalling as described by the API
type ParticipantsRequestHeader ¶
type ParticipantsRequestHeader struct {
AuthorizationHeader string `header:"Authorization"`
}
ParticipantsRequestHeader is used by gin to bind header information into.
type ProjectConsent ¶
type ProjectConsent struct { ProjectApplicationID int `json:"project_application_id"` GeneticConsent bool `json:"genetic_consent"` ClinicalConsent bool `json:"clinical_consent"` }
ProjectConsent is a simple struct that enables the json marshalling and unmarshalling as described by the API