configs

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package configs contains the configuration for the application

Index

Constants

View Source
const (
	DriverPostgres        = "pgx"
	DriverMySQL           = "mysql"
	DriverSQLite          = "sqlite"
	EnvDevelopment string = "development"
	EnvProduction  string = "production"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	DBString        string `env:"DBSTRING" env-required:"true"`
	Server          ServerConfig
	Driver          string
	MaxItemsPerPage int    `env:"MAX_ITEMS_PER_PAGE" env-default:"10"`
	Env             string `env:"ENV" env-default:"production"`
	LogFilePath     string `env:"LOG_FILE_PATH" env-default:"~/.rowsql/rowsql.log"`
}

func MustLoad

func MustLoad(envPath ...string) *Config

type ServerConfig

type ServerConfig struct {
	Host string `env:"HOST"`
	Port string `env:"PORT" env-required:"true"`
}

Jump to

Keyboard shortcuts

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