connection

package
v1.2.1-beta.1 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Mysql    = "mysql"
	Postgres = "postgres"
	Sqlite   = "sqlite3"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type EntConnection

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

func NewEntConnection

func NewEntConnection(connectionURL string, connector SQLConnector, logger zerolog.Logger) (*EntConnection, error)

func (*EntConnection) DB

func (c *EntConnection) DB() *ent.Client

func (*EntConnection) Migrate

func (c *EntConnection) Migrate() error

type EntConnector

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

func NewEntConnector

func NewEntConnector(logger zerolog.Logger) *EntConnector

func (EntConnector) Connect

func (c EntConnector) Connect(driver string, connectionURL string) (*ent.Client, error)

type SQLConnector

type SQLConnector interface {
	Connect(driver string, connectionURL string) (*ent.Client, error)
}

Directories

Path Synopsis
Package mock_connection is a generated GoMock package.
Package mock_connection is a generated GoMock package.

Jump to

Keyboard shortcuts

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