models

package
v0.0.0-...-97ff38e Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2021 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Association

type Association struct {
	Enrolments    []Enrolment `json:"enrolments"`
	Name          string      `json:"name"`
	ID            string      `json:"id"`
	SampleUnitRef string      `json:"sampleUnitRef"`
}

Association represents a single business associated to a respondent

type Attributes

type Attributes struct {
	EmailAddress string `json:"emailAddress"`
	ID           string `json:"id"`
	FirstName    string `json:"firstName"`
	LastName     string `json:"lastName"`
	Telephone    string `json:"telephone"`
}

Attributes represents the attributes of a single respondent

type Case

type Case struct {
	ID         string    `json:"id"`
	BusinessID string    `json:"partyId"`
	CaseGroup  CaseGroup `json:"caseGroup"`
}

Case represents the response from the Case service's GET /cases/{id} It does not represent the full response, just what we end up using

type CaseGroup

type CaseGroup struct {
	ID                   string `json:"id"`
	CollectionExerciseID string `json:"collectionExerciseId"`
}

CaseGroup represents information about a case's case group, including collection exercise information It does not represent the full response, just what we end up using

type CollectionExercise

type CollectionExercise struct {
	ID       string `json:"id"`
	SurveyID string `json:"surveyId"`
}

CollectionExercise represents the response from the Collection Exercise service's GET /collectionexercises/{id} It does not represent the full response, just what we end up using

type Enrolment

type Enrolment struct {
	EnrolmentStatus string `json:"enrolmentStatus"`
	SurveyID        string `json:"surveyId"`
}

Enrolment respresents a single survey enrolment for the respondent

type Error

type Error struct {
	Error string `json:"error"`
}

Error represents any erroneous response

type IAC

type IAC struct {
	IAC         string `json:"iac"`
	Active      bool   `json:"active"`
	LastUsed    string `json:"lastUsedTimeDate"`
	CaseID      string `json:"caseId"`
	QuestionSet string `json:"questionSet"`
}

IAC represents the response from the IAC service's GET /iacs/{code}

type Info

type Info struct {
	Name    string `json:"name"`
	Version string `json:"version"`
}

Info represents the response from 'GET /info'

type PostRespondents

type PostRespondents struct {
	Data           Respondent `json:"data"`
	EnrolmentCodes []string   `json:"enrolmentCodes"`
}

PostRespondents represents the expected format of a POST /respondents Request-Body

type Respondent

type Respondent struct {
	Attributes   Attributes    `json:"attributes"`
	Status       string        `json:"status"`
	Associations []Association `json:"associations"`
}

Respondent respresents a single respondent

type Respondents

type Respondents struct {
	Data []Respondent `json:"data"`
}

Respondents represents the response from all non-DELETE /respondents endpoints

Jump to

Keyboard shortcuts

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