dbhandler

package
v0.0.0-...-dd49a2e Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrDuplicate = errors.New("duplicate record")
	ErrNotFound  = errors.New("not found")
)

Functions

This section is empty.

Types

type Handler

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

func New

func New(db *sqlx.DB) *Handler

func (*Handler) AddNewProduct

func (h *Handler) AddNewProduct(ctx context.Context, name, description string) (int64, error)

func (*Handler) GetProduct

func (h *Handler) GetProduct(ctx context.Context, name string) (*model.Product, error)

Jump to

Keyboard shortcuts

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