service

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrorNotFound = errors.New("not found")
)

Functions

This section is empty.

Types

type Service

type Service interface {
	CreateUser(ctx context.Context, name, password string) (*uint, error)
	FindUser(ctx context.Context, name, password string) (*uint, error)

	CreatePrice(ctx context.Context, userId uint, dateTime time.Time, store, product string, price uint, inStock bool) (*entity.Price, error)
	FindPrices(ctx context.Context, userId uint) ([]entity.Price, error)
	FindPrice(ctx context.Context, priceId, userId uint) (*entity.Price, error)
	UpdatePrice(ctx context.Context, priceId, userId uint, dateTime time.Time, store, product string, price uint, inStock bool) (*entity.Price, error)
	DeletePrice(ctx context.Context, priceId, userId uint) error
}

func NewService

func NewService(logger *slog.Logger, r repository.Repository) Service

Jump to

Keyboard shortcuts

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