feat: tag routes
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
package tagsvc
|
||||
|
||||
import tagdomain "legalgo-BE-go/internal/domain/tag"
|
||||
|
||||
func (i *impl) Create(spec tagdomain.TagReq) error {
|
||||
return i.TagRepo.Create(spec)
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
package tagsvc
|
||||
|
||||
import tagdomain "legalgo-BE-go/internal/domain/tag"
|
||||
|
||||
func (i *impl) GetAll() ([]tagdomain.Tag, error) {
|
||||
return i.TagRepo.GetAll()
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package tagsvc
|
||||
|
||||
import (
|
||||
tagrepository "legalgo-BE-go/internal/accessor/tag"
|
||||
tagdomain "legalgo-BE-go/internal/domain/tag"
|
||||
)
|
||||
|
||||
type impl struct {
|
||||
TagRepo tagrepository.TagAccessor
|
||||
}
|
||||
|
||||
type TagIntf interface {
|
||||
Create(tagdomain.TagReq) error
|
||||
GetAll() ([]tagdomain.Tag, error)
|
||||
}
|
||||
|
||||
func New(
|
||||
tagRepo tagrepository.TagAccessor,
|
||||
) TagIntf {
|
||||
return &impl{
|
||||
TagRepo: tagRepo,
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user