Skip to content

Commit

Permalink
url-tenant config
Browse files Browse the repository at this point in the history
  • Loading branch information
thslopes committed May 30, 2023
1 parent 1afe064 commit f26028e
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions internal/platform/conf/conf.go
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
package conf

import (
"github.com/caarlos0/env/v6"
"gopkg.in/yaml.v2"
"io/ioutil"
"log"
"os"
"path/filepath"
"strings"
"time"

"github.com/caarlos0/env/v6"
"gopkg.in/yaml.v2"
)

const configFileName = "restql.yml"
Expand Down Expand Up @@ -39,6 +40,10 @@ type requestCancellationConf struct {
WatchInterval time.Duration `yaml:"watchInterval"`
}

type urlTenantConf struct {
Enable bool `yaml:"enable" env:"RESTQL_URL_TENANTS_ENABLED"`
}

// Config represents all parameters allowed in restQL runtime.
type Config struct {
HTTP struct {
Expand Down Expand Up @@ -67,6 +72,7 @@ type Config struct {
Timeout timeoutConf `yaml:"timeout"`
Cors corsConf `yaml:"cors"`
RequestCancellation requestCancellationConf `yaml:"requestCancellation"`
URLTenant urlTenantConf `yaml:"urlTenant"`
} `yaml:"middlewares"`
} `yaml:"server"`

Expand Down

0 comments on commit f26028e

Please sign in to comment.