infrastructure

package
v2.3.0 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConnectPostgresDB

func ConnectPostgresDB(connection string) (*sql.DB, error)

ConnectPostgresDB connect to PostgresDB

Types

type PostgresRepository

type PostgresRepository interface {
	Create(ctx context.Context, entity interface{}) (interface{}, error)
	Get(ctx context.Context, where string) (interface{}, error)
	GetByID(ctx context.Context, ID int) (interface{}, error)
	Update(ctx context.Context, ID int, entity interface{}) (interface{}, error)
	Delete(ctx context.Context, ID int) error
	Transaction(tx *sql.Tx) error
}

PostgresRepository interface represents a postgres repository

Jump to

Keyboard shortcuts

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