mirror of
https://github.com/coder/coder.git
synced 2025-07-15 22:20:27 +00:00
feat: add codegen for audit.AuditableResources entries (#1370)
This commit is contained in:
15
coderd/audit/generate.sh
Executable file
15
coderd/audit/generate.sh
Executable file
@ -0,0 +1,15 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# This script facilitates code generation for auditing types. It outputs code
|
||||
# that can be copied and pasted into the audit.AuditableResources table. By
|
||||
# default, every field is ignored. It is your responsiblity to go through each
|
||||
# field and document why each field should or should not be audited.
|
||||
#
|
||||
# Usage:
|
||||
# ./generate.sh <database type> <database type> ...
|
||||
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
cd "$(dirname "$0")" && cd "$(git rev-parse --show-toplevel)"
|
||||
go run ./scripts/auditgen ./coderd/database "$@"
|
Reference in New Issue
Block a user