db

package
v1.0.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// Host of the database.
	Host string `env:"HOST,required"`
	// Port of the database.
	Port string `env:"PORT,required"`
	// User of the database.
	User string `env:"USER" envDefault:"user"`
	// Password of the database.
	Password string `env:"PASSWORD,nonempty"`

	SslConfig `envPrefix:"SSL_"`
}

Config holds the configuration for the database.

type SslConfig

type SslConfig struct {
	// SslMode of the database.
	SslMode string `env:"MODE" envDefault:"disable"`
	// SslCert of the database.
	SslCert string `env:"CERT"`
	// SslKey of the database.
	SslKey string `env:"KEY"`
}

SslConfig holds the configuration for the SSL of the database.

Jump to

Keyboard shortcuts

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