provide a way to run app
This commit is contained in:
@ -34,18 +34,23 @@ func (r *repository) StatsRepository() statsRepository {
|
||||
}
|
||||
}
|
||||
|
||||
func (r *repository) Close() error {
|
||||
r.db.Close()
|
||||
return nil
|
||||
}
|
||||
|
||||
type statsRepository struct {
|
||||
db *pgxpool.Pool
|
||||
}
|
||||
|
||||
type deviceStatsDB struct {
|
||||
UpdatedAt time.Time
|
||||
DeviceID string
|
||||
IncomingTraffic int
|
||||
OutgoingTraffic int
|
||||
IncomingRPS int
|
||||
ReadRPS int
|
||||
WriteRPS int
|
||||
UpdatedAt time.Time
|
||||
}
|
||||
|
||||
func (s deviceStatsDB) asDomain() entities.DeviceStatistics {
|
||||
|
||||
Reference in New Issue
Block a user