Documentation ¶
Index ¶
- func NewCriteriaRepository(conn *pgxpool.Pool) *criteriaRepository
- func NewMeasurementRepository(conn *pgxpool.Pool) *measurementRepository
- func NewReleaseRepository(conn *pgxpool.Pool) *releaseRepository
- func NewServiceRepository(conn *pgxpool.Pool) *serviceRepository
- func NewSourceRepository(conn *pgxpool.Pool) *sourceRepository
- type CriteriaRepository
- type MeasurementRepository
- type ReleaseRepository
- type ServiceRepository
- type SourceRepository
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCriteriaRepository ¶
NewCriteriaRepository creates data exchange object with db.
func NewMeasurementRepository ¶
NewMeasurementRepository creates data exchange object with db.
func NewReleaseRepository ¶
NewReleaseRepository creates data exchange object with db.
func NewServiceRepository ¶
NewServiceRepository creates data exchange object with db.
func NewSourceRepository ¶
NewSourceRepository creates data exchange object with db.
Types ¶
type CriteriaRepository ¶ added in v0.1.4
type CriteriaRepository interface { Create( serviceName, title string, selector string, expectedDir domain.DynamicDirType, interval domain.GroupingIntervalType, ) (int64, error) GetAll(serviceName string) ([]domain.Criteria, error) GetByID(identifier int64) (domain.Criteria, error) }
CriteriaRepository describe methods for managing Criteria in db.
type MeasurementRepository ¶ added in v0.1.4
type MeasurementRepository interface { Store(sourceID, criteriaID int64, moment time.Time, value float64) error StoreBatch(sourceID, criteriaID int64, measurements []domain.MeasurementRow) error GetBy(sourceID, criteriaID int64, from, till time.Time) ([]domain.MeasurementRow, error) Count(sourceID, criteriaID int64, from, till time.Time) (int64, error) GetForPoints(sourceID, criteriaID int64, points []time.Time) ([]domain.MeasurementRow, error) }
MeasurementRepository describes methods how manage MeasurementRow in db.
type ReleaseRepository ¶ added in v0.1.4
type ReleaseRepository interface { Store(serviceName string, releaseName string, startAt time.Time) error GetReleases(serviceName string, from, till time.Time) ([]domain.Release, error) GetByName(serviceName, releaseName string) (*domain.Release, error) GetNextAfter(serviceName, releaseName string) (*domain.Release, error) GetLast(serviceName string) (*domain.Release, error) GetNLasts(serviceName string, count uint) ([]domain.Release, error) GetAll(serviceName string) ([]domain.Release, error) }
ReleaseRepository describes how to manage Release in db.
type ServiceRepository ¶ added in v0.1.4
ServiceRepository describes how to manage Service in db.
Click to show internal directories.
Click to hide internal directories.