chores: refactor struct and structure project

This commit is contained in:
ericprd
2025-03-05 21:21:44 +08:00
parent 13a8481f22
commit 567e0e32ca
103 changed files with 1125 additions and 731 deletions
+9 -5
View File
@@ -1,15 +1,19 @@
package subscribesvc
import subscriberepository "legalgo-BE-go/internal/accessor/subscribe"
import (
subscriberepository "legalgo-BE-go/internal/accessor/subscribe"
userdomain "legalgo-BE-go/internal/domain/user"
)
type SubsSvc struct {
type impl struct {
subsRepo subscriberepository.SubsIntf
}
type SubsIntf interface {
type Subscribe interface {
Create(string) (string, error)
Update(string, userdomain.UserSubsUpdate) error
}
func New(subsRepo subscriberepository.SubsIntf) SubsIntf {
return &SubsSvc{subsRepo}
func New(subsRepo subscriberepository.SubsIntf) Subscribe {
return &impl{subsRepo}
}