Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BuildInfo ¶
func GetBuildInfo ¶
func GetBuildInfo() BuildInfo
type Config ¶
type Config struct { Core `mapstructure:",squash"` Serv `mapstructure:",squash"` // contains filtered or unexported fields }
Config struct holds the GraphJin config values
func ReadInConfig ¶
ReadInConfig function reads in the config file for the environment specified in the GO_ENV environment variable. This is the best way to create a new GraphJin config.
type Serv ¶
type Serv struct { AppName string `mapstructure:"app_name"` Production bool LogLevel string `mapstructure:"log_level"` LogFormat string `mapstructure:"log_format"` HostPort string `mapstructure:"host_port"` Host string Port string HTTPGZip bool `mapstructure:"http_compress"` WebUI bool `mapstructure:"web_ui"` EnableTracing bool `mapstructure:"enable_tracing"` WatchAndReload bool `mapstructure:"reload_on_config_change"` AuthFailBlock bool `mapstructure:"auth_fail_block"` SeedFile string `mapstructure:"seed_file"` MigrationsPath string `mapstructure:"migrations_path"` AllowedOrigins []string `mapstructure:"cors_allowed_origins"` AllowedHeaders []string `mapstructure:"cors_allowed_headers"` DebugCORS bool `mapstructure:"cors_debug"` APIPath string `mapstructure:"api_path"` CacheControl string `mapstructure:"cache_control"` // Telemetry struct contains OpenCensus metrics and tracing related config Telemetry struct { Debug bool Interval *time.Duration Metrics struct { Exporter string Endpoint string Namespace string Key string } Tracing struct { Exporter string Endpoint string Sample string IncludeQuery bool `mapstructure:"include_query"` IncludeParams bool `mapstructure:"include_params"` } } Auth auth.Auth Auths []auth.Auth // DB struct contains db config DB struct { Type string Host string Port uint16 DBName string User string Password string Schema string PoolSize int32 `mapstructure:"pool_size"` MaxRetries int `mapstructure:"max_retries"` PingTimeout time.Duration `mapstructure:"ping_timeout"` EnableTLS bool `mapstructure:"enable_tls"` ServerName string `mapstructure:"server_name"` ServerCert string `mapstructure:"server_cert"` ClientCert string `mapstructure:"client_cert"` ClientKey string `mapstructure:"client_key"` } `mapstructure:"database"` Actions []Action RateLimiter struct { Rate float64 Bucket int IPHeader string `mapstructure:"ip_header"` } `mapstructure:"rate_limiter"` }
Serv struct contains config values used by the GraphJin service
Source Files ¶
Click to show internal directories.
Click to hide internal directories.