Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetConnection ¶
Types ¶
type Database ¶
type Database struct { Connection *gorm.DB RiverRepo RiverRepository GaugeRepo GaugeRepository MetricRepo MetricRepository }
func GetDatabase ¶
type GaugeRepository ¶
type GaugeRepository interface { GetAll() (*[]model.Gauge, error) GetRiverGauges(riverId uuid.UUID) (*[]model.Gauge, error) Get(uuid.UUID) (*model.Gauge, error) Create(river *model.Gauge) error Update(river *model.Gauge) error Delete(uuid.UUID) error }
func GetGaugeRepository ¶
func GetGaugeRepository(db *gorm.DB) GaugeRepository
type MetricRepository ¶
type MetricRepository interface { GetAll() (*[]model.Metric, error) GetGaugeMetrics(gaugeId uuid.UUID) (*[]model.Metric, error) Get(uuid.UUID) (*model.Metric, error) Create(Metric *model.Metric) error Update(Metric *model.Metric) error Delete(uuid.UUID) error DeleteOldMetrics() error }
func GetMetricRepository ¶
func GetMetricRepository(db *gorm.DB) MetricRepository
Click to show internal directories.
Click to hide internal directories.