package service

import (
	"context"

	"gitlab.com/tensorsecurity-rd/waf-console/internal/model"
)

type Service interface {
	GetWaf(ctx context.Context, regionCode, namespace, gatewayName string) (*WafService, error)
	ListWafs(ctx context.Context) ([]WafService, error)
	GetWafGatewayInfo(ctx context.Context, req *GetWafGatewayInfoReq) (*WafService, error)
	CreateWaf(ctx context.Context, req *CreateWafReq) (*WafService, error)
	UpdateMode(ctx context.Context, req *UpdateModeReq) (*WafService, error)
	UpdateRule(ctx context.Context, req *RuleRequest) error
	SaveRuleCategoryToDB(ctx context.Context) error
	EnableListenerWaf(ctx context.Context, req *EnableListenerWafReq) error
	EnableGatewayWaf(ctx context.Context, req *EnableGatewayWafReq) error
	DeleteGatewayWaf(ctx context.Context, req *GatewateInfo) error
	DeleteListenerWaf(ctx context.Context, req *DeleteListenerReq) error
	EnableListenerWafs(ctx context.Context, req *EnableListenerWafsReq) error
	ListAttackLogs(ctx context.Context, req *AttackLogFilter) ([]AttackLog, string, error)
	GetAttackLogDetails(ctx context.Context, uuid string) (*AttackLog, error)
	GetAttackLogRsp(ctx context.Context, uuid string, length uint32) (*AttackRsp, error)
	ListRules(ctx context.Context, regionCode, namespace, gatewayName, language, name string) ([]RuleGroupResp, error)
	CreateBlackWhiteList(ctx context.Context, req *MatcherExpr) error
	UpdateBlackWhiteList(ctx context.Context, req *MatcherExpr) error
	EnableBlackWhiteList(ctx context.Context, req *MatcherExpr) error
	DeleteBlackWhiteList(ctx context.Context, ID uint32) error
	GetBlackWhiteLists(ctx context.Context, query *MatchExprQueryOption, limit int, offset int) ([]MatcherExpr, int, error)
	ListListenerHistory(ctx context.Context, query *WafListenerHistoryOption, limit, offset int) ([]model.WafListenerHistory, int, error)
	ListAttackClasses(ctx context.Context, lang string) []AttackClasses
}
