{"modulePath":"github.com/nsip/dev-nrt","version":"v0.0.1","isLatest":false,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package codeframe\n\nprocessing of data withitn the context of the codeframe, e.g. inserting user results into the overall structure of tests, testlets and items for a given domain is complex and repetitive.\n\nThis package created to provide a single encapsulated helper that can be fed once with the codeframe data and then answer all codeframe related formatting and data extraction needs.\n\n## Types\n\n```go\ntype Helper struct {\n\t// contains filtered or unexported fields\n}\n```\nEncapsulates data and helper methods to make working with codeframe objects easier\n\n```go\nfunc NewHelper(r *repository.BadgerRepo) (Helper, error)\n```\nCreates a new codeframe helper instance. r - a repository containing the rrd data\n\n```go\nfunc (cfh Helper) GetCodeframeObjectValueString(refid, queryPath string) string\n```\npass a json path to retrieve the value at that location as a string refid - the identifier of the object to be queried queryPath the gjson query string to apply to the object\n\n```go\nfunc (cfh Helper) GetContainersForItem(refid string) map[string][]string\n```\nreturn the refids of the test/testlet combinations that use a particular item refid - the refid of a test item\n\nreturns a map of pairs where key is the testlet refid and value is the test refid\n\n```go\nfunc (cfh Helper) GetDACs() []string\n```\nget the list of Disability Adjustment Codes supported for this naplan cycle\n\n```go\nfunc (cfh Helper) GetExpectedTestletItems(testRefId, testletRefId string) map[string]struct{}\n```\nFor given test/testlet combination returns list of expected items - returned is a map\\[string]struct{} so acts as a set that can have lookups performed against it to test for presence of members the contents of the set are the refids of the expected items\n\n```go\nfunc (cfh Helper) GetItem(refid string) (bool, []byte)\n```\nreturn the json block for a given testitem refid boolean return value indicates if a value was found\n\n```go\nfunc (cfh Helper) GetItemTestletSequenceNumber(itemrefid, testletrefid string) string\n```\nreturns the sequnce number for a test item within a testlet\n\n```go\nfunc (cfh Helper) GetTestletLocationInStage(testletrefid string) string\n```\nfind location in stage for testlet comes from codeframe not testlet object\n\n```go\nfunc (cfh Helper) IsSubstituteItem(itemRefid string) (map[string]struct{}, bool)\n```\nfor a given item refid, returns the set of refids (string) of the item this item substitutes for, returned as a set (map\\[string]struct{}) so can be tested for membership. boolean return can be used simply to determine if this item is a substitute\n\n```go\nfunc (cfh Helper) ProcessCodeframeRecords(in chan *records.CodeframeRecord) chan *records.CodeframeRecord\n```\nimplement the codeframe pipe interface, so this can be attached to a codeframe emitter.\n\n```go\nfunc (cfh Helper) WritingRubricTypes() []string\n```\nreturns ordered list of writing rubrics\n\n```go\nfunc (cfh Helper) WritingSubscoreTypes() []string\n```\nalias for writing rubrics, known as subscores in results\n\n","path":"github.com/nsip/dev-nrt/codeframe","name":"codeframe","synopsis":"processing of data withitn the context of the codeframe, e.g.","isRedistributable":true}
