config

package
v0.0.0-...-fc1dba9 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2024 License: Apache-2.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 Config

type Config struct {
	Server      ServerConfig           `yaml:"server"`
	Postgres    DBConfig               `yaml:"postgres"`
	Mysql       DBConfig               `yaml:"mysql"`
	Sqlite      DBConfig               `yaml:"sqlite"`
	Redis       RedisConfig            `yaml:"redis"`
	OAuthConfig map[string]OAuthConfig `yaml:"oauth"`
	Docker      DockerConfig           `yaml:"docker"`
	Kubernetes  KubeConfig             `yaml:"kubernetes"`
}

func Parse

func Parse(appConfig string) (*Config, error)

type DBConfig

type DBConfig struct {
	Host     string `yaml:"host"`
	Port     int    `yaml:"port"`
	Name     string `yaml:"name"`
	User     string `yaml:"user"`
	Password string `yaml:"password"`
	Migrate  bool   `yaml:"migrate"`
	File     string `yaml:"file"`
}

type DockerConfig

type DockerConfig struct {
	Enable bool   `yaml:"enable"`
	Host   string `yaml:"host"`
}

type KubeConfig

type KubeConfig struct {
	Enable         bool     `yaml:"enable"`
	WatchResources []string `yaml:"watchResources"`
}

type OAuthConfig

type OAuthConfig struct {
	AuthType     string `yaml:"authType"`
	ClientId     string `yaml:"clientId"`
	ClientSecret string `yaml:"clientSecret"`
}

type RedisConfig

type RedisConfig struct {
	Enable   bool   `yaml:"enable"`
	Host     string `yaml:"host"`
	Port     int    `yaml:"port"`
	Password string `yaml:"password"`
}

type ServerConfig

type ServerConfig struct {
	ENV                    string                  `yaml:"env"`
	Address                string                  `yaml:"address"`
	Port                   int                     `yaml:"port"`
	GracefulShutdownPeriod int                     `yaml:"gracefulShutdownPeriod"`
	LimitConfigs           []ratelimit.LimitConfig `yaml:"rateLimits"`
	JWTSecret              string                  `yaml:"jwtSecret"`
	DbType                 string                  `yaml:"dbType"`
}

Jump to

Keyboard shortcuts

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