config

package
v0.0.18 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 9, 2023 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIConfig

type APIConfig struct {
	Addr string    `yaml:"addr"`
	SSL  SSLConfig `yaml:"ssl"`
}

APIConfig holds the API server configuration

type AuthConfig added in v0.0.14

type AuthConfig struct {
	AuthType       string     `json:"type" yaml:"type"`
	UserDataHeader string     `json:"userDataHeader" yaml:"userDataHeader"`
	JWT            *JWTConfig `json:"jwt" yaml:"jwt"`
}

Auth config

type Config

type Config struct {
	GlobalConfig  GlobalConfig  `yaml:"global"`
	APIConfig     APIConfig     `yaml:"api"`
	GatewayConfig GatewayConfig `yaml:"gateway"`
	LoggingConfig LoggingConfig `yaml:"logging"`
	PluginConfig  PluginConfig  `yaml:"plugins"`
}

Config holds the complete application configuration

func LoadConfig

func LoadConfig(filename string) (*Config, error)

LoadConfig loads the application configuration from a YAML file and environment variables

type GatewayConfig

type GatewayConfig struct {
	Addr string    `yaml:"addr"`
	SSL  SSLConfig `yaml:"ssl"`
}

GatewayConfig holds the gateway server configuration

type GlobalConfig

type GlobalConfig struct {
	ServiceType         string `yaml:"service_type"`
	ServicesFile        string `yaml:"services_file"`
	RedisURI            string `yaml:"redis_uri"`
	RedisNamespace      string `yaml:"redis_namespace"`
	MongoURI            string `yaml:"mongo_uri"`
	MongoDatabaseName   string `yaml:"mongo_db_name"`
	MongoCollectionName string `yaml:"mongo_collection_name"`
}

GlobalConfig holds the global application configuration GlobalConfig holds the global configuration

type JWTConfig added in v0.0.14

type JWTConfig struct {
	Audience string `json:"audience" yaml:"audience"`
	Issuer   string `json:"issuer" yaml:"issuer"`
	KeysUrl  string `json:"keysUrl" yaml:"keysUrl"`
}

type LoggingConfig

type LoggingConfig struct {
	Level string `yaml:"level"`
}

LoggingConfig holds the logging configuration

type PluginConfig

type PluginConfig struct {
	Enabled bool     `yaml:"enabled"`
	Order   []string `yaml:"order"`
}

PluginConfig holds the plugin configuration

type SSLConfig

type SSLConfig struct {
	Enabled bool   `yaml:"enabled"`
	Cert    string `yaml:"cert"`
	Key     string `yaml:"key"`
}

SSLConfig holds the SSL configuration

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL