Documentation ¶
Index ¶
- type CategoryTag
- type Compliance
- type DB
- func (db *DB) AllCategoryTags(lang interface{}) ([]*CategoryTag, error)
- func (db *DB) AllCompliances(lang interface{}) ([]*Compliance, error)
- func (db *DB) AllParagraphs(lang interface{}) ([]*Paragraph, error)
- func (db *DB) AllReports(lang interface{}) ([]*Report, error)
- func (db *DB) AllSOPs(lang interface{}) ([]*SOP, error)
- func (db *DB) AllSpecificTags(lang interface{}) ([]*SpecificTag, error)
- func (db *DB) GetCategoryTag(lang interface{}, categoryTag CategoryTag) (*CategoryTag, error)
- func (db *DB) GetCategoryTagsByParagraph(lang interface{}, paragraph Paragraph) ([]*CategoryTag, error)
- func (db *DB) GetCompliancesByParagraph(lang interface{}, paragraph Paragraph) ([]*Compliance, error)
- func (db *DB) GetCompliancesByReport(lang interface{}, report Report) ([]*Compliance, error)
- func (db *DB) GetParagraph(lang interface{}, paragraph Paragraph) (*Paragraph, error)
- func (db *DB) GetParagraphsByCategoryTag(lang interface{}, categoryTag CategoryTag) ([]*Paragraph, error)
- func (db *DB) GetParagraphsBySpecificTag(lang interface{}, specificTag SpecificTag) ([]*Paragraph, error)
- func (db *DB) GetReport(lang interface{}, report Report) (*Report, error)
- func (db *DB) GetSOP(lang interface{}, sop SOP) (*SOP, error)
- func (db *DB) GetSOPsByCategoryTag(lang interface{}, categoryTag CategoryTag) ([]*SOP, error)
- func (db *DB) GetSOPsByParagraph(lang interface{}, paragraph Paragraph) ([]*SOP, error)
- func (db *DB) GetSOPsBySpecificTag(lang interface{}, specificTag SpecificTag) ([]*SOP, error)
- func (db *DB) GetSpecificTag(lang interface{}, specificTag SpecificTag) (*SpecificTag, error)
- func (db *DB) GetSpecificTagsByParagraph(lang interface{}, paragraph Paragraph) ([]*SpecificTag, error)
- type Datastore
- type Paragraph
- type Report
- type SOP
- type SpecificTag
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CategoryTag ¶
type CategoryTag struct { ID int `json:"id"` Value string `json:"value"` SpecificTags []*SpecificTag `json:"specificTags,omitempty"` }
CategoryTag model for category tags
type Compliance ¶
type Compliance struct { ReportID int `json:"reportId"` ParagraphID int `json:"paragraphId,omitempty"` PrimaryCompliance string `json:"primaryCompliance"` OperationCompliance string `json:"operationalCompliance"` SecondaryCompliance string `json:"secondaryCompliance"` Pages json.RawMessage `json:"pages"` }
Compliance model for compliances
type DB ¶
func (*DB) AllCategoryTags ¶
func (db *DB) AllCategoryTags(lang interface{}) ([]*CategoryTag, error)
AllCategoryTags returns a slice with all Category Tags
func (*DB) AllCompliances ¶
func (db *DB) AllCompliances(lang interface{}) ([]*Compliance, error)
AllCompliances returns a slice with all paragraphs
func (*DB) AllParagraphs ¶
AllParagraphs returns a slice with all paragraphs
func (*DB) AllReports ¶
AllReports returns a slice with all reports
func (*DB) AllSpecificTags ¶
func (db *DB) AllSpecificTags(lang interface{}) ([]*SpecificTag, error)
AllSpecificTags returns a slice with all Specific Tags
func (*DB) GetCategoryTag ¶
func (db *DB) GetCategoryTag(lang interface{}, categoryTag CategoryTag) (*CategoryTag, error)
GetCategoryTag returns a Category Tag given a CategoryTag.ID
func (*DB) GetCategoryTagsByParagraph ¶
func (db *DB) GetCategoryTagsByParagraph(lang interface{}, paragraph Paragraph) ([]*CategoryTag, error)
GetCategoryTagsByParagraph returns a slice with category tags given a Paragraph.ID
func (*DB) GetCompliancesByParagraph ¶
func (db *DB) GetCompliancesByParagraph(lang interface{}, paragraph Paragraph) ([]*Compliance, error)
GetCompliancesByParagraph Returns a slice of Compliances given a Paragraph.ParagraphNumber
func (*DB) GetCompliancesByReport ¶
func (db *DB) GetCompliancesByReport(lang interface{}, report Report) ([]*Compliance, error)
GetCompliancesByReport Returns a slice of Compliances given a Report.ID
func (*DB) GetParagraph ¶
GetParagraph Returns a single paragraph given a Paragraph.ID
func (*DB) GetParagraphsByCategoryTag ¶
func (db *DB) GetParagraphsByCategoryTag(lang interface{}, categoryTag CategoryTag) ([]*Paragraph, error)
GetParagraphsByCategoryTag returns a slice with all paragraphs given a CategoryTag.ID
func (*DB) GetParagraphsBySpecificTag ¶
func (db *DB) GetParagraphsBySpecificTag(lang interface{}, specificTag SpecificTag) ([]*Paragraph, error)
GetParagraphsBySpecificTag returns a slice with all paragraphs given a SpecificTag.ID
func (*DB) GetSOPsByCategoryTag ¶
func (db *DB) GetSOPsByCategoryTag(lang interface{}, categoryTag CategoryTag) ([]*SOP, error)
GetSOPsByCategoryTag returns SOPs given a categoryTag.ID
func (*DB) GetSOPsByParagraph ¶
GetSOPSByParagraph returns SOPs given a paragraph.ID
func (*DB) GetSOPsBySpecificTag ¶
func (db *DB) GetSOPsBySpecificTag(lang interface{}, specificTag SpecificTag) ([]*SOP, error)
GetSOPsBySpecficTag returns SOPs given a specificTag.ID
func (*DB) GetSpecificTag ¶
func (db *DB) GetSpecificTag(lang interface{}, specificTag SpecificTag) (*SpecificTag, error)
GetSpecificTag returns a Category Tag given a SpecificTag.ID
func (*DB) GetSpecificTagsByParagraph ¶
func (db *DB) GetSpecificTagsByParagraph(lang interface{}, paragraph Paragraph) ([]*SpecificTag, error)
GetSpecificTagsByParagraph returns a slice with specific tags given a Paragraph.ID
type Datastore ¶
type Datastore interface { AllParagraphs(lang interface{}) ([]*Paragraph, error) GetParagraph(lang interface{}, paragraph Paragraph) (*Paragraph, error) GetParagraphsBySpecificTag(lang interface{}, specificTag SpecificTag) ([]*Paragraph, error) GetParagraphsByCategoryTag(lang interface{}, categoryTag CategoryTag) ([]*Paragraph, error) AllCompliances(lang interface{}) ([]*Compliance, error) //GetCompliance(lang interface{}, compliance Compliance) (*Compliance, error) GetCompliancesByParagraph(lang interface{}, paragraph Paragraph) ([]*Compliance, error) GetCompliancesByReport(lang interface{}, report Report) ([]*Compliance, error) AllReports(lang interface{}) ([]*Report, error) GetReport(lang interface{}, report Report) (*Report, error) AllCategoryTags(lang interface{}) ([]*CategoryTag, error) GetCategoryTag(lang interface{}, categoryTag CategoryTag) (*CategoryTag, error) GetCategoryTagsByParagraph(lang interface{}, paragraph Paragraph) ([]*CategoryTag, error) AllSpecificTags(lang interface{}) ([]*SpecificTag, error) GetSpecificTag(lang interface{}, specificTag SpecificTag) (*SpecificTag, error) GetSpecificTagsByParagraph(lang interface{}, paragraph Paragraph) ([]*SpecificTag, error) }
type Paragraph ¶
type Paragraph struct { UUID string `json:"-"` ID int `json:"id"` ParagraphNumber int `json:"paragraphNumber"` ParagraphTitle string `json:"paragraphTitle"` ParagraphText string `json:"paragraphText"` }
Paragraph model for CASA paragraphs
type Report ¶
type Report struct { UUID string `json:"-"` ID int `json:"id"` ReportName string `json:"reportName"` ReportTitle string `json:"reportTitle"` PublishDate string `json:"publishDate"` PeriodBegin string `json:"periodBegin"` PeriodEnd string `json:"periodEnd"` }
Report model for Independent monitoring reports
type SOP ¶
type SOP struct { UUID string `json:"-"` ID string `json:"id"` Name string `json:"name"` Title string `json:"title"` Current bool `json:"current"` EffectiveDate string `json:"effective_date"` ReviewDate string `json:"review_date"` ReplacesDate string `json:"replaces_date"` }
SOP model for Independent monitoring reports
type SpecificTag ¶
type SpecificTag struct { ID int `json:"id"` Value string `json:"value"` CategoryID int `json:"categoryId,omitempty"` }
SpecificTag model for specific tags