Commit Graph

148 Commits

Author SHA1 Message Date
59db7cfc85
fix: rename postgresql constraints 2021-01-30 16:51:21 +01:00
366dccde12
fix: use go-migrate pkg to init or update db schema
Instead to implement own logic how the database scheme should be updated
or migrated to a newer or older version flucky use now instead the
go-migrate package.
2021-01-30 15:44:21 +01:00
23695b4513
fix: update rows when already exist during an import
When rows in the table devices, sensors, humidities, pressures and
temperatures already exist, they will only be updated.
2020-12-14 20:54:20 +01:00
522fe2746a
fix: add or update devices, sensors and measured values
Add additional functions to the repository to add or update devices,
sensors or measured values. Furthermore the test has been adapt to the
new functions.
2020-12-14 20:54:20 +01:00
Markus Pesch
d0cfdd7102
fix: exclude dockerutils and testutils package 2020-11-07 23:03:11 +01:00
Markus Pesch
675af77965
feat: import from sqlite or postgresql 2020-11-07 22:59:48 +01:00
Markus Pesch
a2e66ce08b
fix: sqlite and postgres, close rows and pass nothing instead nil 2020-11-06 23:07:10 +01:00
Markus Pesch
1701db7b8e
fix: define cache values
The number of measured values in the cache before they are stored in the
database can not be defined over the flag --cached-values.
2020-10-07 23:59:27 +02:00
Markus Pesch
0fc4aa7c28
fix: postgres columns with timezone
Add timezone for the columns creation_date and update_date, otherwise
it's difficult to compare the times correctly in the unit test.

Furthermore the default value of the creation_date will now be defined
by the postgres implementation of the database interface.
2020-10-07 23:38:27 +02:00
3a090d190e
fix: cli temperature read
changes:
- fix: read temperature values without daemon
  Add subcommand to read temperature values without starting the daemon

- fix: implement measured value types
  Replace measured value types with constants

- fix: add sensor pipelines
  Add functions which returns a channel with measured values

- fix: filter measured values from a channel
  Add functions to filter measured values by sensor id or measured
  value types.
2020-09-21 20:05:37 +02:00
7cbd80c726
fix: remove obsolete attributes from config.json
changes:
- removed unused attributes from config.json
2020-09-07 19:12:30 +02:00
8c1bd57ad5
fix: gnu-cc, missing humidity table, restrict repository select 2020-06-27 21:12:00 +02:00
92a776f6ce
fix: missing package import 2020-06-27 18:14:49 +02:00
9ee9742aff
fix: use own dht pkg 2020-06-21 18:42:33 +02:00
ec7cad4555
feat: add pkg to start postgres container 2020-06-18 21:37:09 +02:00
fa45125b49
fix: dockerutils - add env to container 2020-06-14 22:08:07 +02:00
0384bbd574
fix: move sql driver import into main.go 2020-06-10 21:25:52 +02:00
a49546bd6d
fix: migrate to gitea 2020-06-10 21:13:05 +02:00
940e04371c
feat: dockerutils lib to start container images 2020-06-10 09:42:40 +02:00
4931c63c10
fix: add postgres backend
changes:
- Add postgres backend
- Modified or added table attributes.
  UpdateDate, ForeignKeys, Booleans
- Fix test for sqlite and postgres. Compare json instead the struct.
2020-06-01 22:50:05 +02:00
10069568f9
fix: renamed storage endpoint into dsn
Changes:
- Renamed storage endpoint into dsn (data source name).
- Add additional dsn fallback property. This dsn will be used in futes
  to store informations, if the main dsn backend does not work
  correctly. For example, if no connection can be established over the
  network to a database.
2020-06-01 12:41:48 +02:00
43e9d00dcb
fix: implement repository test
changes:
- Implement repository test for the sqlite backend
- Add testutils package to start container images
- Remove deprecated till_date in measured values
- Renamed columns of the table humidities, pressures and temperatures
2020-06-01 00:56:04 +02:00
11717679bc
fix: daemon load sensors from repo instead config 2020-05-22 07:45:14 +02:00
d0e238e64a
fix: use repository instead db package 2020-05-21 20:07:32 +02:00
8f1c7b10f7
fix: implement repository pkg 2020-05-21 17:40:24 +02:00
fb916c94ae
fix: add, rename and remove sensor
changes:
- Implement function to add, rename and remove sensors
2020-05-17 13:00:51 +02:00
fb8d4dd5eb
fix: new implementation
changes:
- Remove cli
  Some cli commands are not complete tested and are deprecated.

- Daemon
  - Old version has a very bad implementation of how to verify, if the
    device or the sensors are in the database insert. The current
    implementation can be improved but this one is betten then the old
    one.
  - Remove complete the cache store implementation. Use a normal array
    and query the length and capacity to determine how the array cache
    must be cleaned.

- Type
  Remove unused types and functions
2020-05-03 14:09:22 +02:00
8cc232adc1
fix:_renamed import path to volker-raschek 2020-01-19 13:30:47 +01:00
671a3eb748
fix(pkg/server): logging and save values into postgres 2020-01-18 14:55:43 +01:00
6f45c2957a
test(postgres): add missing tests 2020-01-18 14:42:15 +01:00
3581424bd2
fix(pkg/storage): write creation date in storage pkg 2020-01-18 14:40:47 +01:00
c266117785
fix(pkg/storage/logfile): remove func append - dead code 2020-01-13 22:45:51 +01:00
0765bd29d1
refac(cmd): mergeing, ordering and outsourcing cmd subcommands 2020-01-13 22:32:00 +01:00
12246aae0c
fix(pkg/daemon): write values into logfile 2020-01-11 17:24:18 +01:00
002f3e9e25
fix(cmd/sensor): set tick duration for new sensors 2020-01-11 13:18:38 +01:00
40857249c4
test(pkg/cli): Implementation of test to stabilize the code 2020-01-11 13:03:58 +01:00
b595cf1ac8
fix(pkg/cli): GetSensorIDsByMeasuredValues 2020-01-11 12:10:26 +01:00
2cd2188dcb
refac(pkg/types): remove deprecated prefix name of struct attributes 2020-01-10 22:03:49 +01:00
95fb1f6745
fix(pkg/sensor): reduce interface functions for better error handling 2020-01-10 19:42:19 +01:00
b125bf432c
fix(cli/db): remove obsolete db subcommand 2019-12-08 12:49:21 +01:00
dbef4f8241
fix(pkg/config): use storage endpoints
changes:
- Only one storage endpoint can be defined. This consists of a URL which
  can be used to specify whether the data is to be stored in a file or
  in a database.
2019-12-08 12:49:21 +01:00
afe55b3d33
fix(pkg/daemon): compression and rounding 2019-12-08 12:49:21 +01:00
25dd99cd3d
test(pkg/storage): add test for compression and rounding 2019-12-08 12:49:21 +01:00
86f598bc7d
fix(test): goldenFiles 2019-12-08 12:49:20 +01:00
a7722e028a
fix(pkg/storage/logfile): create logfile if not exists 2019-12-08 12:49:20 +01:00
ea83d43cd6
fix(pkg/logger): exclude logger library into an own repository 2019-12-08 12:49:20 +01:00
04bc3baffe
fix(pkg/daemon): save measured values into postgres database if defined 2019-12-08 12:49:19 +01:00
6223f4e79b
fix(pkg/db): create or upgrade postgres schema based on semver 2019-12-08 12:49:14 +01:00
d19e26d971
fix(pkg/db/postgres): error handling 2019-08-25 20:58:45 +02:00
60ee044b88
feat(pkg/db): postgres database 2019-08-25 13:16:21 +02:00