config

package
v1.18.1 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DBProvider

type DBProvider interface {
	GetDatabaseConfig() DatabaseConfig
}

type DatabaseConfig

type DatabaseConfig struct {
	Driver     DatabaseDriver `mapstructure:"driver"`
	Name       string         `mapstructure:"name"`
	Host       string         `mapstructure:"host"`
	Port       int            `mapstructure:"port"`
	Username   string         `mapstructure:"username"`
	Password   string         `mapstructure:"password"`
	SSLMode    string         `mapstructure:"ssl_mode"`
	DataSource string
}

func (*DatabaseConfig) BuildDataSource

func (d *DatabaseConfig) BuildDataSource()

func (*DatabaseConfig) Validate

func (d *DatabaseConfig) Validate() error

type DatabaseDriver

type DatabaseDriver string
const (
	DatabaseDriverPostgres DatabaseDriver = "postgres"
	DatabaseDriverYugabyte DatabaseDriver = "yugabyte"
)

func (DatabaseDriver) IsValid

func (d DatabaseDriver) IsValid() bool

Jump to

Keyboard shortcuts

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