12345678910111213141516171819202122232425262728293031323334353637 |
- package admin
- import (
- "context"
- v1 "github.com/go-nunu/nunu-layout-advanced/api/v1"
- admin "github.com/go-nunu/nunu-layout-advanced/api/v1/admin"
- "github.com/go-nunu/nunu-layout-advanced/internal/model"
- adminRep "github.com/go-nunu/nunu-layout-advanced/internal/repository/admin"
- "github.com/go-nunu/nunu-layout-advanced/internal/service"
- )
- type WafLogService interface {
- GetWafLog(ctx context.Context, id int64) (*model.Log, error)
- GetWafLogList(ctx context.Context, req admin.SearchWafLogParams) (*v1.PaginatedResponse[model.Log], error)
- }
- func NewWafLogService(
- service *service.Service,
- wafLogRepository adminRep.WafLogRepository,
- ) WafLogService {
- return &wafLogService{
- Service: service,
- wafLogRepository: wafLogRepository,
- }
- }
- type wafLogService struct {
- *service.Service
- wafLogRepository adminRep.WafLogRepository
- }
- func (s *wafLogService) GetWafLog(ctx context.Context, id int64) (*model.Log, error) {
- return s.wafLogRepository.GetWafLog(ctx, id)
- }
- func (s *wafLogService) GetWafLogList(ctx context.Context, req admin.SearchWafLogParams) (*v1.PaginatedResponse[model.Log], error) {
- return s.wafLogRepository.GetWafLogList(ctx, req)
- }
|