config

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package config provides configuration types for the jone migration tool.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Client     string
	Connection Connection
	Pool       Pool
	Migrations Migrations
}

Config holds the main configuration for jone.

type Connection

type Connection struct {
	Host     string
	Port     string
	User     string
	Password string
	Database string
	SSLMode  string // disable, require, verify-full
}

Connection holds database connection parameters.

type Migrations

type Migrations struct {
	TableName string
}

Migrations holds migration-specific configuration.

type Pool added in v0.2.0

type Pool struct {
	MaxOpenConns    int           // Maximum number of open connections. 0 means unlimited.
	MaxIdleConns    int           // Maximum number of idle connections. 0 means default (2).
	ConnMaxLifetime time.Duration // Maximum time a connection may be reused. 0 means no limit.
	ConnMaxIdleTime time.Duration // Maximum time a connection may be idle. 0 means no limit.
}

Pool holds connection pool configuration. Zero values preserve database/sql defaults.

Jump to

Keyboard shortcuts

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