Files
.github
backend
cmd
embed
internal
acme
api
context
filters
handler
http
middleware
schema
certificates.go
common.go
create_certificate_authority.go
create_dns_provider.go
create_host.go
create_host_template.go
create_setting.go
create_stream.go
create_user.go
get_token.go
set_auth.go
update_certificate_authority.go
update_dns_provider.go
update_host.go
update_host_template.go
update_setting.go
update_stream.go
update_user.go
router.go
router_test.go
server.go
cache
config
database
dnsproviders
entity
errors
jwt
logger
model
nginx
state
types
util
validator
worker
scripts
.editorconfig
.golangci.yml
.nancy-ignore
README.md
Taskfile.yml
go.mod
go.sum
docker
docs
frontend
scripts
test
.dockerignore
.gitignore
.version
DEV-README.md
Jenkinsfile
LICENSE
README.md
nginx-proxy-manager/backend/internal/api/schema/create_host_template.go

31 lines
513 B
Go

package schema
// CreateHostTemplate is the schema for incoming data validation
func CreateHostTemplate() string {
return `
{
"type": "object",
"additionalProperties": false,
"required": [
"name",
"host_type",
"template"
],
"properties": {
"name": {
"type": "string",
"minLength": 1
},
"host_type": {
"type": "string",
"pattern": "^proxy|redirect|dead|stream$"
},
"template": {
"type": "string",
"minLength": 20
}
}
}
`
}