gatewayip.go 749 B

1234567891011121314151617181920212223242526272829
  1. package service
  2. import (
  3. "context"
  4. "github.com/go-nunu/nunu-layout-advanced/internal/model"
  5. "github.com/go-nunu/nunu-layout-advanced/internal/repository"
  6. )
  7. type GatewayipService interface {
  8. GetGatewayip(ctx context.Context, id int64) (*model.Gatewayip, error)
  9. }
  10. func NewGatewayipService(
  11. service *Service,
  12. gatewayipRepository repository.GatewayipRepository,
  13. ) GatewayipService {
  14. return &gatewayipService{
  15. Service: service,
  16. gatewayipRepository: gatewayipRepository,
  17. }
  18. }
  19. type gatewayipService struct {
  20. *Service
  21. gatewayipRepository repository.GatewayipRepository
  22. }
  23. func (s *gatewayipService) GetGatewayip(ctx context.Context, id int64) (*model.Gatewayip, error) {
  24. return s.gatewayipRepository.GetGatewayip(ctx, id)
  25. }