Skip to content

CLI

Terminal window
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.

Validates a policy file. Use it in CI.

Terminal window
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, teller

An invalid file prints every problem with its line, and exits with status 1.

Writes Go constants for permissions, roles and scope types. See Typo-proof names.

Terminal window
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

Prints the version.

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.