config

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2024 License: MIT 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 struct {
		Port int    `yaml:"port"`
		Host string `yaml:"host"`
		URL  string `yaml:"url"`
	} `yaml:"server"`

	Database struct {
		Host              string `yaml:"host"`
		Port              int    `yaml:"port"`
		Name              string `yaml:"name"`
		User              string `yaml:"user"`
		Password          string `yaml:"password"`
		SSLMode           string `yaml:"ssl_mode"`
		MaxConnections    int    `yaml:"max_connections"`
		ConnectionTimeout int    `yaml:"connection_timeout"`
	} `yaml:"database"`

	Logging struct {
		Level  string `yaml:"level"`
		Format string `yaml:"format"`
	} `yaml:"logging"`
}

Config holds all configuration for our application

func Load

func Load(path string) (*Config, error)

Load reads configuration from file and environment variables

Jump to

Keyboard shortcuts

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