database

package
v0.0.0-alpha1 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrRecordNotFound record not found error
	ErrRecordNotFound = errors.New("record not found")

	// ErrUniqueConstraint duplicate key value violates
	ErrUniqueConstraint = errors.New("unique constraint")
)

Functions

This section is empty.

Types

type ConnectionType

type ConnectionType string

ConnectionType -

const (
	POSTGRES ConnectionType = "postgres"
	MONGO    ConnectionType = "mongo"
)

func (ConnectionType) String

func (c ConnectionType) String() string

String -

type Database

type Database interface {
	IsReady(ctx context.Context) (bool, error)
	GetConnectionType() string
	Close()
}

Database -

func DBFactory

func DBFactory(conf config.Write) (db Database, err error)

DBFactory -

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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