- Added upstream objects
- Renamed host templates to nginx templates - Generate upstream templates - Better nginx error reporting when reloading - Use tparse for golang test reporting
This commit is contained in:
30
backend/internal/api/schema/create_nginx_template.go
Normal file
30
backend/internal/api/schema/create_nginx_template.go
Normal file
@ -0,0 +1,30 @@
|
||||
package schema
|
||||
|
||||
// CreateNginxTemplate is the schema for incoming data validation
|
||||
func CreateNginxTemplate() string {
|
||||
return `
|
||||
{
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"name",
|
||||
"type",
|
||||
"template"
|
||||
],
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"pattern": "^proxy|redirect|dead|stream|upstream$"
|
||||
},
|
||||
"template": {
|
||||
"type": "string",
|
||||
"minLength": 20
|
||||
}
|
||||
}
|
||||
}
|
||||
`
|
||||
}
|
Reference in New Issue
Block a user