postgres

package
v0.0.0-...-cb2c959 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2018 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(db *sql.DB) report.Service

New creates a new report service.

Types

type Service

type Service struct {
	// contains filtered or unexported fields
}

Service is used for getting information about a report from a postgres database.

func (*Service) GetNotesByEventAndTeam

func (s *Service) GetNotesByEventAndTeam(eventKey, team string) (map[string]string, error)

GetNotesByEventAndTeam gets all notes from reports of a certain team at a certain event.

func (*Service) GetReportedOn

func (s *Service) GetReportedOn(eventKey string) (reportedOn []string, err error)

GetReportedOn gets all teams that have been reported on at an event.

func (*Service) GetReporterStats

func (s *Service) GetReporterStats() (map[string]int, error)

GetReporterStats gets a map of all reporters to the amount of reports they have submitted.

func (*Service) GetReportsByEventAndTeam

func (s *Service) GetReportsByEventAndTeam(eventKey, team string) ([]report.Report, error)

GetReportsByEventAndTeam gets all reports on a certain team at a certain event.

func (*Service) GetReportsByTeam

func (s *Service) GetReportsByTeam(team string) ([]report.Report, error)

GetReportsByTeam gets all reports on a certain team from all events.

func (*Service) GetStatsByEventAndTeam

func (s *Service) GetStatsByEventAndTeam(eventKey, team string) ([]analysis.Data, error)

GetStatsByEventAndTeam gets all statistics from reports of a certain team at a certain event.

func (*Service) Upsert

func (s *Service) Upsert(rep report.Report, as alliance.Service) error

Upsert upserts (creates if the resource doesn't exist, otherwise updates) a report into the postgresql database.

Jump to

Keyboard shortcuts

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