forked from ebhomengo/niki
26 lines
632 B
Go
26 lines
632 B
Go
|
package adminkindboxservice
|
||
|
|
||
|
import (
|
||
|
"context"
|
||
|
|
||
|
entity "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)
|
||
|
GetKindBox(ctx context.Context, kindBox uint) (entity.KindBox, error)
|
||
|
}
|
||
|
|
||
|
type Service struct {
|
||
|
repo Repository
|
||
|
}
|
||
|
|
||
|
func New(repository Repository) Service {
|
||
|
return Service{
|
||
|
repo: repository,
|
||
|
}
|
||
|
}
|