feat: 增加nginx config 格式化工具
This commit is contained in:

committed by
zhengkunwang223

parent
7dad47464d
commit
a1ac689a5e
24
backend/utils/nginx/components/statement.go
Normal file
24
backend/utils/nginx/components/statement.go
Normal file
@@ -0,0 +1,24 @@
|
||||
package components
|
||||
|
||||
type IBlock interface {
|
||||
GetDirectives() []IDirective
|
||||
FindDirectives(directiveName string) []IDirective
|
||||
UpdateDirectives(directiveName string, directive Directive)
|
||||
AddDirectives(directive Directive)
|
||||
GetComment() string
|
||||
}
|
||||
|
||||
type IDirective interface {
|
||||
GetName() string
|
||||
GetParameters() []string
|
||||
GetBlock() IBlock
|
||||
GetComment() string
|
||||
}
|
||||
|
||||
type FileDirective interface {
|
||||
isFileDirective()
|
||||
}
|
||||
|
||||
type IncludeDirective interface {
|
||||
FileDirective
|
||||
}
|
Reference in New Issue
Block a user