repository

package
v0.0.0-...-b072c33 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Repository

type Repository interface {
	Save(*entity.Product) (*entity.Product, error)
	FindByID(uuid.UUID) (*entity.Product, error)
	FindAll() ([]entity.Product, error)
	Update(*entity.Product) error
	Delete(uuid.UUID) error
	CloseDB()
}

Repository is responsible for DB operation on Product entity

func NewPG

func NewPG() Repository

NewPG creates a new PostgreSQL repository

func NewSQLite

func NewSQLite() Repository

NewSQLite creates a new SQL lite repository

Jump to

Keyboard shortcuts

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