Open zahin-mohammad opened 3 years ago
Currently defined as:
package impl import ( influxdb2 "github.com/influxdata/influxdb-client-go/v2" "github.com/jmoiron/sqlx" "github.com/mochahub/coinprice-scraper/config" ) type RepositoryImpl struct { db *sqlx.DB influxClient *influxdb2.Client influxOrg string ohlcBucket string } func NewRepositoryImpl( config *config.Secrets, db *sqlx.DB, influxClient *influxdb2.Client, ) *RepositoryImpl { return &RepositoryImpl{ db: db, influxClient: influxClient, influxOrg: config.Org, ohlcBucket: config.Bucket, } }
Instead of a single repository type, maybe we should have a repository per data model. This would result in more files but seems cleaner.
Currently defined as:
Instead of a single repository type, maybe we should have a repository per data model. This would result in more files but seems cleaner.