Upstream sync
This commit is contained in:
25
domain/service/zipcode.go
Normal file
25
domain/service/zipcode.go
Normal file
@@ -0,0 +1,25 @@
|
||||
package service
|
||||
|
||||
import (
|
||||
"bitbucket.org/nemt/nemt-portal-api/domain/entity"
|
||||
)
|
||||
|
||||
// userService is the domain service for user operations
|
||||
type zipcodeService struct {
|
||||
svc *Service
|
||||
}
|
||||
|
||||
// newUserService returns an instance of userService
|
||||
func newZipcodeService(svc *Service) *zipcodeService {
|
||||
return &zipcodeService{
|
||||
svc: svc,
|
||||
}
|
||||
}
|
||||
|
||||
func (s *zipcodeService) GetAll() ([]entity.Zipcode, error) {
|
||||
return s.svc.db.Zipcodes().GetAll()
|
||||
}
|
||||
|
||||
func (s *zipcodeService) GetByParticipatingZipcode(zipcode string) (entity.Zipcode, error) {
|
||||
return s.svc.db.Zipcodes().GetByParticipatingZipcode(zipcode)
|
||||
}
|
||||
Reference in New Issue
Block a user