database

package
v0.0.0-alpha6 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2022 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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

	// ErrUniqueConstraint duplicate key value violates
	ErrUniqueConstraint errors.Kind = "unique constraint"

	// ErrBuilder query builder error
	ErrBuilder errors.Kind = "query builder"

	// ErrExecution -
	ErrExecution errors.Kind = "execution"

	// ErrScan -
	ErrScan errors.Kind = "scan"

	// ErrMigration -
	ErrMigration errors.Kind = "migration"
)

KindToHttpStatus -

Functions

func GetKindToHttpStatus

func GetKindToHttpStatus(kind errors.Kind) int

GetKindToHttpStatus -

Types

type Database

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

Database -

type Engine

type Engine string

Engine -

const (
	POSTGRES Engine = "postgres"
	MONGO    Engine = "mongo"
	MEMORY   Engine = "memory"
)

func (Engine) String

func (c Engine) String() string

String -

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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