runtime_bun

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2023 License: GPL-3.0 Imports: 8 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithApplicationName

func WithApplicationName(applicationName string) runtime.Configuration[*PostgresqlConnection]

func WithConnectionString

func WithConnectionString(connectionString string) runtime.Configuration[*PostgresqlConnection]

configuration

func WithMaxOpenConnections

func WithMaxOpenConnections(maxOpenConns int) runtime.Configuration[*PostgresqlConnection]

Types

type BunConnection

type BunConnection interface {
	Start() error
	Stop()
	Db() bun.IDB
}

func NewPostgresqlConnection

func NewPostgresqlConnection(configurations ...runtime.Configuration[*PostgresqlConnection]) BunConnection

constructor

type PostgresqlConnection

type PostgresqlConnection struct {
	ConnectionString string
	ApplicationName  string
	MaxOpenConns     int
	// contains filtered or unexported fields
}

implementation

func (*PostgresqlConnection) Db

func (r *PostgresqlConnection) Db() bun.IDB

func (*PostgresqlConnection) Start

func (r *PostgresqlConnection) Start() error

func (*PostgresqlConnection) Stop

func (r *PostgresqlConnection) Stop()

Jump to

Keyboard shortcuts

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