Documentation
¶
Index ¶
- Variables
- type CodeframeRecord
- type Emitter
- type EventOrientedRecord
- func (eor *EventOrientedRecord) GetValueString(queryPath string) string
- func (eor *EventOrientedRecord) IsWritingResponse() bool
- func (eor *EventOrientedRecord) NAPTestRefId() string
- func (eor *EventOrientedRecord) ParticipatedInTest() bool
- func (eor *EventOrientedRecord) SchoolInfoRefId() string
- func (eor *EventOrientedRecord) StudentPersonalRefId() string
- type ObjectRecord
- type Option
- type RecordType
- type StudentOrientedRecord
- func (sor *StudentOrientedRecord) AddEvent(jsonNAPEventStudentLink []byte) error
- func (sor *StudentOrientedRecord) AddResponse(jsonNAPStudentResponseSet []byte) error
- func (sor *StudentOrientedRecord) AddScoreSummary(jsonNAPTestScoreSummary []byte) error
- func (sor *StudentOrientedRecord) AddTest(jsonNAPTest []byte) error
- func (sor *StudentOrientedRecord) GetEventsByDomain() map[string][]byte
- func (sor *StudentOrientedRecord) GetNAPTestRefIds() []string
- func (sor *StudentOrientedRecord) GetResponsesByDomain() map[string][]byte
- func (sor *StudentOrientedRecord) GetScoreSummariesByDomain() map[string][]byte
- func (sor *StudentOrientedRecord) GetValueString(queryPath string) string
- func (sor *StudentOrientedRecord) SchoolInfoRefId() string
- func (sor *StudentOrientedRecord) StudentPersonalRefId() string
Constants ¶
This section is empty.
Variables ¶
var ( // event errors ErrMissingStudent = errors.New("No student found for event") ErrMissingSchool = errors.New("No school found for event") ErrMissingTest = errors.New("No test found for event") ErrMissingResponse = errors.New("No student response found for event") // student errors ErrMissingEvent = errors.New("No events found for student") ErrMissingSummary = errors.New("No test summary found for student") )
Functions ¶
This section is empty.
Types ¶
type CodeframeRecord ¶
simple wrapper for objects associated with the codeframe, can be tests, testlets and testitems
func (*CodeframeRecord) GetValueString ¶
func (cfr *CodeframeRecord) GetValueString(queryPath string) string
pass a json path to retrieve the value at that location as a string
func (*CodeframeRecord) RefId ¶
func (cfr *CodeframeRecord) RefId() string
type Emitter ¶
type Emitter struct {
// contains filtered or unexported fields
}
iterates datastore and emits stream of results records. event-oriented are one data collection per test event student-oriented would be one record per student, but all test results for that student
func NewEmitter ¶
create a new emitter, accepts data repository via options
func (*Emitter) CodeframeStream ¶
func (e *Emitter) CodeframeStream() chan *CodeframeRecord
provides channel iterator for event-oriented records
func (*Emitter) EventBasedStream ¶
func (e *Emitter) EventBasedStream() chan *EventOrientedRecord
provides channel iterator for event-oriented records each record contains; student, school, test, event and response information
func (*Emitter) ObjectStream ¶
func (e *Emitter) ObjectStream() chan *ObjectRecord
provides channel iterator for simple object records
func (*Emitter) StudentBasedStream ¶
func (e *Emitter) StudentBasedStream() chan *StudentOrientedRecord
provides channel iterator for student-oriented records, each record has; student, school, all tests seen by student, all responses and all events in one record.
type EventOrientedRecord ¶
type EventOrientedRecord struct { NAPEventStudentLink []byte StudentPersonal []byte SchoolInfo []byte NAPTest []byte NAPStudentResponseSet []byte CalculatedFields []byte Err error HasNAPEventStudentLink bool HasStudentPersonal bool HasSchoolInfo bool HasNAPTest bool HasNAPStudentResponseSet bool }
For a given nap test event, pulls together all of the relevant data artefacts for processing by the various reports
func NewEventOrientedRecord ¶
func NewEventOrientedRecord() *EventOrientedRecord
func (*EventOrientedRecord) GetValueString ¶
func (eor *EventOrientedRecord) GetValueString(queryPath string) string
pass a json path to retrieve the value at that location as a string
func (*EventOrientedRecord) IsWritingResponse ¶
func (eor *EventOrientedRecord) IsWritingResponse() bool
func (*EventOrientedRecord) NAPTestRefId ¶
func (eor *EventOrientedRecord) NAPTestRefId() string
func (*EventOrientedRecord) ParticipatedInTest ¶
func (eor *EventOrientedRecord) ParticipatedInTest() bool
func (*EventOrientedRecord) SchoolInfoRefId ¶
func (eor *EventOrientedRecord) SchoolInfoRefId() string
func (*EventOrientedRecord) StudentPersonalRefId ¶
func (eor *EventOrientedRecord) StudentPersonalRefId() string
type ObjectRecord ¶
simple wrapper for data objects used for reports that simply format data-objects into csv tables
func (*ObjectRecord) GetValueString ¶
func (cfr *ObjectRecord) GetValueString(queryPath string) string
pass a gjson path to retrieve the value at that location as a string
func (*ObjectRecord) RefId ¶
func (cfr *ObjectRecord) RefId() string
type Option ¶
func EmitterRepository ¶
func EmitterRepository(repo *repo.BadgerRepo) Option
Data source for the emitter. Pass in an existing/opened repository.
type RecordType ¶
type RecordType int
As this record aggregates, these aliases and constants are used to create a data structure that holds artefacts by domain, where structure is [NAPTest RefId][record type - event, response,...] = json blob
type StudentOrientedRecord ¶
type StudentOrientedRecord struct { StudentPersonal []byte CalculatedFields []byte SchoolInfo []byte Err error HasStudentPersonal bool HasSchoolInfo bool // contains filtered or unexported fields }
For each student accumulates all responses, events etc. for processing by reports.
func NewStudentOrientedRecord ¶
func NewStudentOrientedRecord() *StudentOrientedRecord
returns a new empty student record If you choose to initialise an instance manually rather than with this method remember to instantiate the naplanOuptuts map to avoid nil pointer errors
func (*StudentOrientedRecord) AddEvent ¶
func (sor *StudentOrientedRecord) AddEvent(jsonNAPEventStudentLink []byte) error
Adds a NAPTestEvent to the record
func (*StudentOrientedRecord) AddResponse ¶
func (sor *StudentOrientedRecord) AddResponse(jsonNAPStudentResponseSet []byte) error
Adds a NAPStudentResponseSet to the record
func (*StudentOrientedRecord) AddScoreSummary ¶
func (sor *StudentOrientedRecord) AddScoreSummary(jsonNAPTestScoreSummary []byte) error
Adds a ScoreSummary to the record
func (*StudentOrientedRecord) AddTest ¶
func (sor *StudentOrientedRecord) AddTest(jsonNAPTest []byte) error
Adds a NAPTest to the record
func (*StudentOrientedRecord) GetEventsByDomain ¶
func (sor *StudentOrientedRecord) GetEventsByDomain() map[string][]byte
Returns a map of events for this student where map key is the CamelCase name of the test doamin map value is the json blob of the event
func (*StudentOrientedRecord) GetNAPTestRefIds ¶
func (sor *StudentOrientedRecord) GetNAPTestRefIds() []string
returns the refids of the tests taken by this student
func (*StudentOrientedRecord) GetResponsesByDomain ¶
func (sor *StudentOrientedRecord) GetResponsesByDomain() map[string][]byte
Returns a map of test responses for this student where map key is the CamelCase name of the test doamin map value is the json blob of the response
func (*StudentOrientedRecord) GetScoreSummariesByDomain ¶
func (sor *StudentOrientedRecord) GetScoreSummariesByDomain() map[string][]byte
Returns a map of test responses for this student where map key is the CamelCase name of the test doamin map value is the json blob of the response
func (*StudentOrientedRecord) GetValueString ¶
func (sor *StudentOrientedRecord) GetValueString(queryPath string) string
pass a json path to retrieve the value at that location as a string
func (*StudentOrientedRecord) SchoolInfoRefId ¶
func (sor *StudentOrientedRecord) SchoolInfoRefId() string
returns a school identifier for this student
func (*StudentOrientedRecord) StudentPersonalRefId ¶
func (sor *StudentOrientedRecord) StudentPersonalRefId() string
returns the refid of the student represented in this record