config

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 7, 2021 License: GPL-3.0 Imports: 5 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 {
	// the server port. Defaults to 8080
	ServerPort int `yaml:"server_port" env:"SERVER_PORT"`
	// JWT signing key. required.
	JWTSigningKey string `yaml:"jwt_signing_key" env:"JWT_SIGNING_KEY,secret"`
	// JWT expiration in hours. Defaults to 72 hours (3 days)
	JWTExpiration int `yaml:"jwt_expiration" env:"JWT_EXPIRATION"`
	// the dental clinics file path
	DentalClinicsFilePath string `yaml:"dental_clinics_file_path"`
	// the vet clinics file path
	VetClinicsFilePath string `yaml:"vet_clinics_file_path"`
}

Config represents an application configuration.

func Load

func Load(file string, logger log.Logger) (*Config, error)

Load returns an application configuration which is populated from the given configuration file and environment variables.

func (Config) Validate

func (c Config) Validate() error

Validate validates the application configuration.

Jump to

Keyboard shortcuts

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