app

package
v0.0.0-...-4c80adf Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2022 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConsentsGet

func ConsentsGet(ctx *gin.Context)

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 Payload

type Payload struct {
	AdminID string `json:"admin_id"`
	Role    string `json:"role"`
}

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

Jump to

Keyboard shortcuts

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