sqlrepository

package
v0.0.0-...-e5577f4 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2024 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TestDB

func TestDB(t *testing.T, databaseURL string) (*sql.DB, func(...string))

Types

type EventRepository

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

func NewEventRepository

func NewEventRepository(db *sql.DB) *EventRepository

func (*EventRepository) AddMetricsToEvent

func (r *EventRepository) AddMetricsToEvent(eventID int, metrics []*entity.AddMetric) error

func (*EventRepository) Create

func (r *EventRepository) Create(e *entity.Event) error

func (*EventRepository) GetMetricValuesForTimePeriod

func (r *EventRepository) GetMetricValuesForTimePeriod(serviceID int, p [2]*entity.CustomTime, m *entity.Metric) (interface{}, error)

type MetricRepository

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

func NewMetricRepository

func NewMetricRepository(db *sql.DB) *MetricRepository

func (*MetricRepository) Create

func (r *MetricRepository) Create(m *entity.Metric) error

func (*MetricRepository) FindByID

func (r *MetricRepository) FindByID(metricID int) (*entity.Metric, error)

type ServiceRepository

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

func NewServiceRepository

func NewServiceRepository(db *sql.DB) *ServiceRepository

func (*ServiceRepository) Create

func (r *ServiceRepository) Create(s *entity.Service) error

func (*ServiceRepository) FindByID

func (r *ServiceRepository) FindByID(serviceID int) (*entity.Service, error)

Jump to

Keyboard shortcuts

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