config

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package config parses and validates the configuration needed to run vulcan-tracker.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseLogLvl

func ParseLogLvl(lvl string) log.Lvl

ParseLogLvl parses the level of a log from a string to a log.Lvl object.

Types

type AwsConfig

type AwsConfig struct {
	ServerCredentialsKey string `toml:"server_credentials_key"`
	Region               string `toml:"region"`
}

AwsConfig stores the AWS configuration.

type Config

type Config struct {
	API  apiConfig          `toml:"api"`
	Log  logConfig          `toml:"log"`
	PSQL postgresql.ConnStr `toml:"postgresql"`
	AWS  AwsConfig          `toml:"aws"`
}

Config represents all the configuration needed to run the project.

func ParseConfig

func ParseConfig(cfgFilePath string) (*Config, error)

ParseConfig parses de config file and set default values when it is needed.

Jump to

Keyboard shortcuts

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