config

package
v0.0.1-rc5 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2023 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetStringFromConfigMap

func GetStringFromConfigMap(in map[string]interface{}, key string) (string, error)

Types

type Config

type Config struct {
	App            CoreConfig        `yaml:"app"`
	OutboundConfig []*OutboundConfig `yaml:"outbounds"`
	Aws            map[string]string `yaml:"aws"`
	DatabaseConfig *DatabaseConfig   `yaml:"database-config"`
}

func New

func New() (*Config, error)

func (*Config) GetAWSConfig

func (c *Config) GetAWSConfig() (aws.Config, error)

type CoreConfig

type CoreConfig struct {
	Name string `yaml:"name"`
}

type DatabaseConfig

type DatabaseConfig struct {
	Hostname     string `yaml:"hostname"`
	Port         string `yaml:"port"`
	User         string `yaml:"user"`
	Password     string `yaml:"password"`
	DatabaseName string `yaml:"database-name"`
}

func (*DatabaseConfig) SetFromEnvOrDefault

func (dc *DatabaseConfig) SetFromEnvOrDefault()

type OutboundConfig

type OutboundConfig struct {
	Name    string                 `yaml:"name"`
	Enabled bool                   `yaml:"enabled"`
	Config  map[string]interface{} `yaml:"config"`
}

Jump to

Keyboard shortcuts

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