forked from ebhomengo/niki
26 lines
624 B
Go
26 lines
624 B
Go
package kindboxservice
|
|
|
|
import (
|
|
"context"
|
|
|
|
"git.gocasts.ir/ebhomengo/niki/entity"
|
|
)
|
|
|
|
type Repository interface {
|
|
AddKindBox(ctx context.Context, kindBox entity.KindBox) (entity.KindBox, error)
|
|
EditKindBox(ctx context.Context, kindBoxID uint, kindBoxInput entity.KindBox) (entity.KindBox, error)
|
|
DeleteKindBox(ctx context.Context, kindBoxID uint) error
|
|
GetAllKindBox(ctx context.Context) ([]entity.KindBox, error)
|
|
GetKindBoxByID(ctx context.Context, kindBox uint) (entity.KindBox, error)
|
|
}
|
|
|
|
type Service struct {
|
|
repo Repository
|
|
}
|
|
|
|
func New(repository Repository) Service {
|
|
return Service{
|
|
repo: repository,
|
|
}
|
|
}
|