configs

package
v0.1.3 Latest Latest
Warning

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

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

Documentation

Overview

Package configs contains the configuration for the application

Index

Constants

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

Variables

This section is empty.

Functions

This section is empty.

Types

type AutoUpdateConfig added in v0.1.3

type AutoUpdateConfig struct {
	DisableAutoUpdate bool `env:"DISABLE_AUTO_UPDATE" env-default:"false"`
}

type Config

type Config struct {
	DBString        string `env:"DBSTRING" env-required:"true"`
	Server          ServerConfig
	Update          AutoUpdateConfig
	Driver          Driver
	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 Driver added in v0.1.3

type Driver string

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