-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(schema constraints): use cuelang for schema constraints
- Loading branch information
1 parent
bbe1c78
commit f49672d
Showing
2 changed files
with
47 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
// -*- coding: utf-8 -*- | ||
// vim: ft=yaml | ||
// | ||
// Constraints Schema: | ||
// This is not a prescriptive or forced schema! Many variants of | ||
// formula (and yaml data) exist in the salt user community. | ||
|
||
// template-formula | ||
#template: { | ||
pkg?: name?: string | ||
rootgroup?: string | ||
hide_output?: bool | ||
dir_mode?: =~"^0?[124567]{3}$" // any mode of length 3, with 0 prefix optional | ||
mode?: =~"^0?[124567]{3}$" // any mode of length 3, with 0 prefix optional | ||
config?: string | ||
service?: name?: string | ||
subcomponent?: config: string | ||
|
||
// legacy | ||
pip_pkg?: string | ||
pkgs_add?: [...] | ||
pips?: [...] | ||
|
||
// Just here for testing | ||
added_in_defaults?: string | ||
winner?: string | ||
... | ||
} | ||
values?: {...#template} // probable yaml namespace | ||
|
||
// | ||
// support community diversity :-) | ||
// | ||
|
||
template?: {...#template} // another probable namespace | ||
|
||
Debian?: #template | ||
Suse?: #template | ||
Gentoo?: #template | ||
Arch?: #template | ||
Alpine?: #template | ||
FreeBSD?: #template | ||
OpenBSD?: #template | ||
Solaris?: #template | ||
Windows?: #template | ||
MacOS?: #template |