postgres_gorm

package module
v0.0.0-...-1fd2eb7 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2025 License: Apache-2.0 Imports: 17 Imported by: 1 module, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PostgresPingChecker

func PostgresPingChecker(database *sql.DB, timeout time.Duration) probes.HandleFunc

Types

type Config

type Config struct {
	DSN           string `` /* 143-byte string literal not displayed */
	Host          string `env:"HOST" envDefault:"127.0.0.1"  comment:"The host to connect to (required)"`
	Port          int32  `env:"PORT" envDefault:"5432" comment:"The port to bind to (default: 5432)"`
	Database      string `env:"DATABASE" comment:"Database to be selected after connecting to the server."`
	Username      string `env:"USERNAME" comment:"The username to connect with. Not required if using IntegratedSecurity"`
	Password      string `env:"PASSWORD" comment:"The password to connect with. Not required if using IntegratedSecurity"`
	SSLMode       string `env:"SSLMODE"  comment:" Whether or not to use SSL mode (disable, allow, prefer, require, verify-ca, verify-full)"`
	TimeZone      string `env:"TIMEZONE" comment:"Sets the session timezone"`
	MigrationsDir string `env:"MIGRATIONS_DIR" comment:"Migrations directory to run migration when plugin is started"`
	Debug         string `env:"DEBUG" envDefault:"" comment:"Debug sql records requests, default error (info, warn, error)"`
}

type Options

type Options struct {
	Name string
}

type Plugin

type Plugin interface {
	toolkit.Plugin
	DB() *gorm.DB
	Info()
	RunMigration() error
}

func NewPlugin

func NewPlugin(runtime runtime.Runtime, opts *Options) Plugin

Jump to

Keyboard shortcuts

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