feat: authenticate users and agents requests

This commit is contained in:
2023-03-07 23:10:42 +01:00
parent bd0d5a621a
commit ee69644699
31 changed files with 590 additions and 125 deletions

View File

@ -31,9 +31,9 @@ func openPostgresPool(ctx context.Context, dsn string) (*pgxpool.Pool, error) {
return postgresPool, nil
}
func NewAgentRepository(ctx context.Context, conf *config.Config) (datastore.AgentRepository, error) {
driver := string(conf.Database.Driver)
dsn := string(conf.Database.DSN)
func NewAgentRepository(ctx context.Context, conf config.DatabaseConfig) (datastore.AgentRepository, error) {
driver := string(conf.Driver)
dsn := string(conf.DSN)
var agentRepository datastore.AgentRepository