chores: refactor struct and structure project
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
package subscribesvc
|
||||
|
||||
func (s *SubsSvc) Create(subsPlanId string) (string, error) {
|
||||
func (s *impl) Create(subsPlanId string) (string, error) {
|
||||
subsId, err := s.subsRepo.Create(subsPlanId)
|
||||
if err != nil {
|
||||
return "", err
|
||||
|
||||
@@ -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}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
package subscribesvc
|
||||
|
||||
import (
|
||||
userdomain "legalgo-BE-go/internal/domain/user"
|
||||
)
|
||||
|
||||
func (i *impl) Update(id string, spec userdomain.UserSubsUpdate) error {
|
||||
return nil
|
||||
}
|
||||
Reference in New Issue
Block a user