crud_province_usecase

package
v0.0.0-...-01f7578 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2023 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrDatabaseError = errors.New("Database Error")
View Source
var ErrRecordNotFound = errors.New("Record Not Found")

Functions

This section is empty.

Types

type Repository

type Repository interface {
	GetByPrimaryKey(id int) (*entity.Province, error)
	GetAll() ([]*entity.Province, error)
	Create(in entity.Province) (*entity.Province, error)
	Update(in entity.Province) (*entity.Province, error)
	Delete(id int) error
}

type UseCase

type UseCase interface {
	GetByPrimaryKey(id int) (*entity.Province, error)
	GetAll() ([]*entity.Province, error)
	Create(in entity.Province) (*entity.Province, error)
	Update(in entity.Province) (*entity.Province, error)
	Delete(id int) error
}

func New

func New(province_repo repository.ProvinceRepository) UseCase

Jump to

Keyboard shortcuts

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