|
7 | 7 |
|
8 | 8 | package crossplane
|
9 | 9 |
|
| 10 | +// Update for headersmore |
| 11 | +//go:generate sh -c "sh ./scripts/generate/generate.sh --url https://github.com/openresty/headers-more-nginx-module.git --config-path ./scripts/generate/configs/headersmore_config.json > ./analyze_headersMore_directives.gen.go" |
| 12 | + |
| 13 | +// Update for njs |
| 14 | +//go:generate sh -c "sh ./scripts/generate/generate.sh --url https://github.com/nginx/njs.git --config-path ./scripts/generate/configs/njs_config.json > ./analyze_njs_directives.gen.go" |
| 15 | + |
| 16 | +// Update for OSS, filter in config is the directives not in https://nginx.org/en/docs/dirindex.html but in source code. |
| 17 | +// Override in config is for the "if" directive. We create a bitmask ngxConfExpr for it in crossplane, which is not in source code. |
| 18 | +//go:generate sh -c "sh ./scripts/generate/generate.sh --url https://github.com/nginx/nginx.git --config-path ./scripts/generate/configs/oss_latest_config.json > ./analyze_oss_latest_directives.gen.go" |
| 19 | +//go:generate sh -c "sh ./scripts/generate/generate.sh --url https://github.com/nginx/nginx.git --config-path ./scripts/generate/configs/oss_126_config.json --branch branches/stable-1.26 > ./analyze_oss_126_directives.gen.go" |
| 20 | +//go:generate sh -c "sh ./scripts/generate/generate.sh --url https://github.com/nginx/nginx.git --config-path ./scripts/generate/configs/oss_124_config.json --branch branches/stable-1.24 > ./analyze_oss_124_directives.gen.go" |
| 21 | + |
| 22 | +// Update for lua, override is for the lua block directives, see https://github.com/nginxinc/nginx-go-crossplane/pull/86. |
| 23 | +//go:generate sh -c "sh ./scripts/generate/generate.sh --url https://github.com/openresty/lua-nginx-module.git --config-path ./scripts/generate/configs/lua_config.json --path ./src > ./analyze_lua_directives.gen.go" |
| 24 | + |
| 25 | +// Update for otel. Filter is for some directives withou context. |
| 26 | +// Otel provides its own config handler for some directives and they don't have context. Currently we don't support them. |
| 27 | +//go:generate sh -c "sh ./scripts/generate/generate.sh --url https://github.com/nginxinc/nginx-otel.git --config-path ./scripts/generate/configs/otel_config.json --branch main > ./analyze_otel_directives.gen.go" |
| 28 | + |
10 | 29 | import (
|
11 | 30 | "fmt"
|
12 | 31 | )
|
@@ -219,7 +238,7 @@ func unionBitmaskMaps(maps ...map[string][]uint) map[string][]uint {
|
219 | 238 | // not provided. It is union of latest Nplus, Njs, and Otel.
|
220 | 239 | //
|
221 | 240 | //nolint:gochecknoglobals
|
222 |
| -var defaultDirectives = unionBitmaskMaps(ngxPlusLatestDirectives, moduleNjsDirectives, moduleOtelDirectives) |
| 241 | +var defaultDirectives = unionBitmaskMaps(nginxPlusLatestDirectives, njsDirectives, otelDirectives) |
223 | 242 |
|
224 | 243 | func DefaultDirectivesMatchFunc(directive string) ([]uint, bool) {
|
225 | 244 | masks, matched := defaultDirectives[directive]
|
|
0 commit comments