CLI
go get -tool github.com/MogRex-Limited/wardn/cmd/wardn # then run it as: go tool wardn …The examples below write wardn; inside your module, that’s go tool wardn.
wardn check
Section titled “wardn check”Validates a policy file. Use it in CI.
wardn check [-f wardn.yaml]wardn.yaml is valid. scopes: organisation › region › branch permissions: 6, plus 2 built in roles: branch_manager, org_admin, suspended, tellerAn invalid file prints every problem with its line, and exits with status 1.
wardn gen
Section titled “wardn gen”Writes Go constants for permissions, roles and scope types. See Typo-proof names.
wardn gen [-f wardn.yaml] [-o perm/perm.go] [-pkg perm] [-check]| Flag | Default | Meaning |
|---|---|---|
-f |
wardn.yaml |
Policy file |
-o |
perm/perm.go |
Output file |
-pkg |
the output directory’s name | Package name |
-check |
off | Don’t write; exit 1 if the output is missing or stale |
wardn version
Section titled “wardn version”Prints the version.
Exit codes
Section titled “Exit codes”| Code | Meaning |
|---|---|
0 |
Success |
1 |
Invalid policy, stale output, or a write error |
2 |
Wrong usage |
Questions about this page?
Ask below, point out something wrong or unclear, or suggest an improvement. Reading needs no account; to post, sign in with GitHub.