postgres

package
v0.8.3 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Methods added in v0.4.0

func Methods() []string

Methods returns module methods

func ModuleName added in v0.4.0

func ModuleName(name string) string

ModuleName returns the module name

Types

type Postgres

type Postgres struct {
	// contains filtered or unexported fields
}

Postgres represents the datasource of the type Postgres

func New

func New(cfg postgres.Postgres, sqlConnFunc SQLConnFunc, logger *zap.Logger) (*Postgres, error)

New creates new Postgres datasource

func (*Postgres) GetLoader

func (m *Postgres) GetLoader(_ modules.Job) lua.LGFunction

GetLoader returns the datasource lua loader

func (*Postgres) Name

func (m *Postgres) Name() string

Name returns the datasource name

func (*Postgres) Stop

func (m *Postgres) Stop() error

Stop the datasource

type SQLConnFunc added in v0.7.0

type SQLConnFunc func(string, string) (*sqlx.DB, error)

SQLConnFunc represent SQL connection func

Jump to

Keyboard shortcuts

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