Skip to content

Commit 9da1c33

Browse files
committed
add temporal columns
1 parent 554f998 commit 9da1c33

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

internal/conf/config.go

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ func setDefaultConfig() {
4545
viper.SetDefault("Database.TableExcludes", []string{})
4646
viper.SetDefault("Database.FunctionIncludes", []string{"postgisftw"})
4747

48+
viper.SetDefault("Temporal.InstantColumns", []string{"time"})
49+
viper.SetDefault("Temporal.StartColumns", []string{"start_time"})
50+
viper.SetDefault("Temporal.EndColumns", []string{"end_time"})
51+
4852
viper.SetDefault("Paging.LimitDefault", 10)
4953
viper.SetDefault("Paging.LimitMax", 1000)
5054

@@ -61,6 +65,7 @@ type Config struct {
6165
Metadata Metadata
6266
Database Database
6367
Website Website
68+
Temporal Temporal
6469
}
6570

6671
// Server config
@@ -106,6 +111,12 @@ type Website struct {
106111
BasemapUrl string
107112
}
108113

114+
type Temporal struct {
115+
InstantColumns []string
116+
StartColumns []string
117+
EndColumns []string
118+
}
119+
109120
// IsHTTPSEnabled tests whether HTTPS is enabled
110121
func (conf *Config) IsTLSEnabled() bool {
111122
return conf.Server.TlsServerCertificateFile != "" && conf.Server.TlsServerPrivateKeyFile != ""
@@ -180,4 +191,7 @@ func DumpConfig() {
180191
log.Debugf(" TableExcludes = %v", Configuration.Database.TableExcludes)
181192
log.Debugf(" FunctionIncludes = %v", Configuration.Database.FunctionIncludes)
182193
log.Debugf(" TransformFunctions = %v", Configuration.Server.TransformFunctions)
194+
log.Debugf(" Temporal.InstantColumns = %v", Configuration.Temporal.InstantColumns)
195+
log.Debugf(" Temporal.StartColumns = %v", Configuration.Temporal.StartColumns)
196+
log.Debugf(" Temporal.EndColumns = %v", Configuration.Temporal.EndColumns)
183197
}

0 commit comments

Comments
 (0)