Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
qiuqunfeng
waf-console
Commits
1fd0a160
Commit
1fd0a160
authored
Feb 07, 2025
by
qiuqunfeng
Browse files
commit
parent
f8f6b0d9
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
5 deletions
+1
-5
db/migrations/create_waf_tables.sql
db/migrations/create_waf_tables.sql
+1
-3
internal/model/waf.go
internal/model/waf.go
+0
-2
No files found.
db/migrations/create_waf_tables.sql
View file @
1fd0a160
...
...
@@ -2,14 +2,12 @@
CREATE
TABLE
waf_services
(
id
SERIAL
PRIMARY
KEY
,
gateway_name
VARCHAR
(
255
)
NOT
NULL
,
port
INTEGER
NOT
NULL
,
namespace
VARCHAR
(
255
)
NOT
NULL
,
region_code
VARCHAR
(
50
)
NOT
NULL
,
host
TEXT
NOT
NULL
,
-- Stored as comma-separated string
mode
VARCHAR
(
50
)
NOT
NULL
,
rule_num
INTEGER
DEFAULT
0
,
attack_num
INTEGER
DEFAULT
0
,
rule_category_status
JSON
NOT
NULL
rule_category_status
JSON
);
-- Create waf_rules table
...
...
internal/model/waf.go
View file @
1fd0a160
...
...
@@ -43,10 +43,8 @@ func (r *RuleCategoryStatusList) Scan(src interface{}) error {
type
WafService
struct
{
ID
uint
`gorm:"column:id;primaryKey;autoIncrement"`
GatewayName
string
`gorm:"column:gateway_name"`
Port
int
`gorm:"column:port"`
Namespace
string
`gorm:"column:namespace"`
RegionCode
string
`gorm:"column:region_code"`
Host
HostList
`gorm:"column:host"`
Mode
string
`gorm:"column:mode"`
RuleNum
int
`gorm:"column:rule_num"`
AttackNum
int
`gorm:"column:attack_num"`
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment