Documentation
¶
Index ¶
Constants ¶
View Source
const ( PASSWWORD_RESET_MAX_ATTEMPTS = 5 PASSWORD_RESET_TOKEN_TTL = 24 * time.Hour )
View Source
const ( MAX_PROFILES_ALLOWED = 6 MAX_PHONE_NUMBER_VERIFICATION_REQUEST_PER_24H = 10 )
View Source
const ( // MAX_PARTICIPANT_FILE_SIZE is the maximum allowed file size for participant file uploads (20 MB) MAX_PARTICIPANT_FILE_SIZE = 20 * 1024 * 1024 // 20 MB in bytes )
Variables ¶
This section is empty.
Functions ¶
func HealthCheckHandle ¶
Types ¶
type HttpEndpoints ¶
type HttpEndpoints struct {
// contains filtered or unexported fields
}
func NewHTTPHandler ¶
func NewHTTPHandler( tokenSignKey string, studyDBConn *studyDB.StudyDBService, userDBConn *userDB.ParticipantUserDBService, globalInfosDBConn *globalinfosDB.GlobalInfosDBService, messagingDBConn *messagingDB.MessagingDBService, allowedInstanceIDs []string, globalStudySecret string, filestorePath string, maxNewUsersPer5Minute int, ttls TTLs, ) *HttpEndpoints
func (*HttpEndpoints) AddParticipantAuthAPI ¶
func (h *HttpEndpoints) AddParticipantAuthAPI(rg *gin.RouterGroup)
func (*HttpEndpoints) AddPasswordResetAPI ¶
func (h *HttpEndpoints) AddPasswordResetAPI(rg *gin.RouterGroup)
func (*HttpEndpoints) AddStudyServiceAPI ¶
func (h *HttpEndpoints) AddStudyServiceAPI(rg *gin.RouterGroup)
func (*HttpEndpoints) AddUserManagementAPI ¶
func (h *HttpEndpoints) AddUserManagementAPI(rg *gin.RouterGroup)
type LoginWithEmailReq ¶
type MergeVirtualParticipantRequest ¶
type MergeVirtualParticipantRequest struct {
ProfileID string `json:"profileID"`
VirtualParticipantID string `json:"virtualParticipantID"`
LinkingCodeKey string `json:"linkingCodeKey"`
LinkingCodeValue string `json:"linkingCodeValue"`
}
requires profile id, virtual participant id, linking code key, linking code value
type RefreshTokenReq ¶
type RefreshTokenReq struct {
RefreshToken string `json:"refreshToken"`
}
type SignupWithEmailReq ¶
type SignupWithEmailReq struct {
Email string `json:"email"`
Password string `json:"password"`
InstanceID string `json:"instanceId"`
InfoCheck string `json:"infoCheck"`
PreferredLanguage string `json:"preferredLanguage"`
WithAttributes *struct {
Type string `json:"type"`
Attributes map[string]any `json:"attributes"`
} `json:"withAttributes"`
}
type StudyInfo ¶
type StudyInfo struct {
Key string `json:"key"`
Status string `json:"status"`
Props studyTypes.StudyProps `json:"props"`
Stats studyTypes.StudyStats `json:"stats"`
ProfileIds []string `json:"profileIds"`
}
type UserAttributeReqPayload ¶
type VerifyOTPReq ¶
type VerifyOTPReq struct {
Code string `json:"code"`
}
Click to show internal directories.
Click to hide internal directories.