conf

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadConfigFromFile

func LoadConfigFromFile(configPath string, config *ProjectConfig) error

Types

type MigrationConfig

type MigrationConfig struct {
	Locations        []string `yaml:"locations" default:"[\"./migrations\"]"`
	Validate         bool     `yaml:"validate" default:"true"`
	Down             bool     `yaml:"down,omitempty"`
	InTransaction    bool     `yaml:"in-transaction" default:"true"`
	Destination      *uint16  `yaml:"destination,omitempty"`
	Force            bool     `yaml:"force" default:"false"`
	UseRepeatable    bool     `yaml:"use-repeatable" default:"true"`
	UseBefore        bool     `yaml:"use-before" default:"true"`
	UseAfter         bool     `yaml:"use-after" default:"true"`
	UseBeforeEach    bool     `yaml:"use-before-each" default:"true"`
	UseAfterEach     bool     `yaml:"use-after-each" default:"true"`
	UseBeforeVersion bool     `yaml:"use-before-version" default:"true"`
	UseAfterVersion  bool     `yaml:"use-after-version" default:"true"`
}

type ProjectConfig

type ProjectConfig struct {
	Driver   string `yaml:"driver" default:"postgres"`
	Host     string `yaml:"host" default:"localhost"`
	Port     uint16 `yaml:"port" default:"5432"`
	Database string `yaml:"database" default:"postgres"`
	User     string `yaml:"user" default:"postgres"`
	Password string `yaml:"password" default:"postgres"`
	Schema   string `yaml:"schema" default:"public"`

	SSL sslConfig `yaml:"ssl"`

	Migration MigrationConfig `yaml:"migrations"`
}

Jump to

Keyboard shortcuts

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