config

package
v0.2.4-fork.0 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const Path = ".godb.yaml"

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Database   Database   `yaml:"database"`
	Migrations Migrations `yaml:"migrations"`
	// contains filtered or unexported fields
}

func Load

func Load() (Config, error)

func LoadByPath

func LoadByPath(path string) (Config, error)

type Database

type Database struct {
	Driver   string `yaml:"driver"`
	Host     string `yaml:"host"`
	Port     int    `yaml:"port"`
	User     string `yaml:"user"`
	Password string `yaml:"password"`
	Name     string `yaml:"name"`
}

func (*Database) URL

func (cfg *Database) URL() (string, error)

type Migrations

type Migrations struct {
	Dir string `yaml:"dir"`
	Ext string `yaml:"ext"`
	Seq bool   `yaml:"seq"`
}

Jump to

Keyboard shortcuts

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