participant

package
v0.0.0-...-ff62c10 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2022 License: BSD-3-Clause Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AlterSaltAndPasswordHash

func AlterSaltAndPasswordHash(currentParticipant *Participant)

AlterSaltAndPasswordHash to protect against hacking

func CreateAdmin

func CreateAdmin(admin Participant, w http.ResponseWriter)

CreateAdmin insert participant into database

func CreateMoyoNonAdmin

func CreateMoyoNonAdmin(pt Participant, w http.ResponseWriter) (int int64, email string, err error)

CreateNonAdmin insert participant with coordinator privileges into database

func CreateNonAdmin

func CreateNonAdmin(pt Participant, w http.ResponseWriter)

CreateNonAdmin insert participant with coordinator privileges into database

func GetS3PreSignedUrl

func GetS3PreSignedUrl(key string, u UnverifiedBPFileHandler) string

func GetS3PreSignedUrl(bucket string, key string, region string, expiration time.Duration) {

func IsParticipantInDB

func IsParticipantInDB(pt Participant) (isRegistered bool)

func LoginParticipant

func LoginParticipant(currentParticipant *Participant, w http.ResponseWriter)

LoginParticipant check if participant creds match what is in the database

func Password

func Password(ptID int64, currentParticipant *Participant)

Password get current participants password

func Salt

func Salt(currentParticipant *Participant, ptID int64, w http.ResponseWriter)

Salt gets the salt for the participant

Types

type IDGenerationHandler

type IDGenerationHandler struct {
	Name string
	Svc  *s3.S3
}

func (IDGenerationHandler) ServeHTTP

func (idGH IDGenerationHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type ListParticipantsHandler

type ListParticipantsHandler struct {
	Name string
}

func (ListParticipantsHandler) ServeHTTP

func (l ListParticipantsHandler) ServeHTTP(writer http.ResponseWriter, _ *http.Request)

type ListUnverifiedFilesHandler

type ListUnverifiedFilesHandler struct {
	Name string
}

func (ListUnverifiedFilesHandler) ServeHTTP

func (l ListUnverifiedFilesHandler) ServeHTTP(writer http.ResponseWriter, request *http.Request)

type Participant

type Participant struct {
	EmailEncoded []byte
	Email        string
	Phone        []byte
	ID           int64
	Capacity     string
	Salt         string
	PasswordHash string
	Study        string
	IV           []byte
	PhoneIV      []byte
	EmailHash    string
	Password     string
	HasConsented bool
}

Participant data type of users interacting with application

type PasswordRecoveryHTTPRequest

type PasswordRecoveryHTTPRequest struct {
	ParticipantID int64  `json:"participantID"`
	Password      string `json:"password"`
}

type PasswordRecoveryHandler

type PasswordRecoveryHandler struct {
	Name string
}

func (PasswordRecoveryHandler) ServeHTTP

func (pwRch PasswordRecoveryHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type UnverifiedBPFileHandler

type UnverifiedBPFileHandler struct {
	Name string
	Svc  *s3.S3
}

func (UnverifiedBPFileHandler) ServeHTTP

func (u UnverifiedBPFileHandler) ServeHTTP(writer http.ResponseWriter, request *http.Request)

type VitalChartHandler

type VitalChartHandler struct {
	Name string
}

func (VitalChartHandler) ServeHTTP

func (v VitalChartHandler) ServeHTTP(writer http.ResponseWriter, request *http.Request)

type VitalsRequest

type VitalsRequest struct {
	SBP   int
	DBP   int
	Pulse int
}

Jump to

Keyboard shortcuts

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