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) }