This repository was archived by the owner on Nov 7, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed
platform/backend_connectors Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -41,7 +41,27 @@ func (p *HydrolixBackendConnector) Open() error {
4141 return nil
4242}
4343
44+ func checkHydrolixConfig (cfg * config.RelationalDbConfiguration ) error {
45+ if cfg .Url == nil {
46+ return fmt .Errorf ("Hydrolix URL is not set" )
47+ }
48+ if cfg .HydrolixToken == "" {
49+ return fmt .Errorf ("Hydrolix token is not set" )
50+ }
51+ if cfg .HydrolixOrgId == "" {
52+ return fmt .Errorf ("Hydrolix organization ID is not set" )
53+ }
54+ if cfg .HydrolixProjectId == "" {
55+ return fmt .Errorf ("Hydrolix project ID is not set" )
56+ }
57+ return nil
58+ }
59+
4460func NewHydrolixBackendConnector (configuration * config.RelationalDbConfiguration ) * HydrolixBackendConnector {
61+ if err := checkHydrolixConfig (configuration ); err != nil {
62+ logger .Error ().Msgf ("Invalid Hydrolix configuration: %v" , err )
63+ return nil
64+ }
4565 return & HydrolixBackendConnector {
4666 cfg : configuration ,
4767 client : & http.Client {
@@ -55,6 +75,10 @@ func NewHydrolixBackendConnector(configuration *config.RelationalDbConfiguration
5575}
5676
5777func NewHydrolixBackendConnectorWithConnection (configuration * config.RelationalDbConfiguration , conn * sql.DB ) * HydrolixBackendConnector {
78+ if err := checkHydrolixConfig (configuration ); err != nil {
79+ logger .Error ().Msgf ("Invalid Hydrolix configuration: %v" , err )
80+ return nil
81+ }
5882 return & HydrolixBackendConnector {
5983 BasicSqlBackendConnector : BasicSqlBackendConnector {
6084 connection : conn ,
You can’t perform that action at this time.
0 commit comments