Documentation ¶
Index ¶
- type Database
- func (d *Database) Close() error
- func (d *Database) CountProjects() (uint, error)
- func (d *Database) CountReports() (uint, error)
- func (d *Database) CountReportsForProject(pid uint) (uint, error)
- func (d *Database) CreateDetailsBatch(rid uint, s []*model.Detail) (uint, uint)
- func (d *Database) CreateHistogram(h *model.Histogram) error
- func (d *Database) CreateOptions(o *model.Options) error
- func (d *Database) CreateProject(p *model.Project) error
- func (d *Database) CreateReport(r *model.Report) error
- func (d *Database) DeleteProject(p *model.Project) error
- func (d *Database) DeleteReport(r *model.Report) error
- func (d *Database) DeleteReportBulk(ids []uint) (int, error)
- func (d *Database) FindLatestReportForProject(pid uint) (*model.Report, error)
- func (d *Database) FindPreviousReport(rid uint) (*model.Report, error)
- func (d *Database) FindProjectByID(id uint) (*model.Project, error)
- func (d *Database) FindReportByID(id uint) (*model.Report, error)
- func (d *Database) GetHistogramForReport(rid uint) (*model.Histogram, error)
- func (d *Database) GetOptionsForReport(rid uint) (*model.Options, error)
- func (d *Database) ListAllDetailsForReport(rid uint) ([]*model.Detail, error)
- func (d *Database) ListProjects(limit, page uint, sortField, order string) ([]*model.Project, error)
- func (d *Database) ListReports(limit, page uint, sortField, order string) ([]*model.Report, error)
- func (d *Database) ListReportsForProject(pid, limit, page uint, sortField, order string) ([]*model.Report, error)
- func (d *Database) UpdateProject(p *model.Project) error
- func (d *Database) UpdateProjectStatus(pid uint, status model.Status) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Database ¶
Database is a wrapper for the gorm framework.
func (*Database) CountProjects ¶
CountProjects returns the number of projects
func (*Database) CountReports ¶
CountReports returns the number of reports
func (*Database) CountReportsForProject ¶
CountReportsForProject returns the number of reports
func (*Database) CreateDetailsBatch ¶
CreateDetailsBatch creates a batch of details Returns the number successfully created, and the number failed
func (*Database) CreateHistogram ¶
CreateHistogram creates a new report
func (*Database) CreateOptions ¶
CreateOptions creates a new report
func (*Database) CreateProject ¶
CreateProject creates a new project
func (*Database) CreateReport ¶
CreateReport creates a new report
func (*Database) DeleteProject ¶
DeleteProject deletas an existing project
func (*Database) DeleteReport ¶
DeleteReport deletes an existing report
func (*Database) DeleteReportBulk ¶
DeleteReportBulk performans a bulk of deletes
func (*Database) FindLatestReportForProject ¶
FindLatestReportForProject returns the latest / most recent report for project
func (*Database) FindPreviousReport ¶
FindPreviousReport find previous report for the report id
func (*Database) FindProjectByID ¶
FindProjectByID gets the project by id
func (*Database) FindReportByID ¶
FindReportByID gets the report by id
func (*Database) GetHistogramForReport ¶
GetHistogramForReport creates a new report
func (*Database) GetOptionsForReport ¶
GetOptionsForReport creates a new report
func (*Database) ListAllDetailsForReport ¶
ListAllDetailsForReport lists all details for report
func (*Database) ListProjects ¶
func (d *Database) ListProjects(limit, page uint, sortField, order string) ([]*model.Project, error)
ListProjects lists projects using sorting
func (*Database) ListReports ¶
ListReports lists reports using sorting
func (*Database) ListReportsForProject ¶
func (d *Database) ListReportsForProject(pid, limit, page uint, sortField, order string) ([]*model.Report, error)
ListReportsForProject lists reports using sorting
func (*Database) UpdateProject ¶
UpdateProject update a project