repository

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCriteriaRepository

func NewCriteriaRepository(conn *pgxpool.Pool) *criteriaRepository

NewCriteriaRepository creates data exchange object with db.

func NewMeasurementRepository

func NewMeasurementRepository(conn *pgxpool.Pool) *measurementRepository

NewMeasurementRepository creates data exchange object with db.

func NewReleaseRepository

func NewReleaseRepository(conn *pgxpool.Pool) *releaseRepository

NewReleaseRepository creates data exchange object with db.

func NewServiceRepository

func NewServiceRepository(conn *pgxpool.Pool) *serviceRepository

NewServiceRepository creates data exchange object with db.

func NewSourceRepository

func NewSourceRepository(conn *pgxpool.Pool) *sourceRepository

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

type ServiceRepository interface {
	Store(title string) error
	GetAll() ([]domain.Service, error)
}

ServiceRepository describes how to manage Service in db.

type SourceRepository added in v0.1.4

type SourceRepository interface {
	Create(title string, kind domain.SourceType, address string) (int64, error)
	Get(identifier int64) (*domain.Source, error)
	GetAll() ([]domain.Source, error)
}

Jump to

Keyboard shortcuts

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