vault/internalshared/configutil
Christopher Swenson 961bf20bdb
Use enumer to generate String() methods for most enums (#25705)
We have many hand-written String() methods (and similar) for enums.
These require more maintenance and are more error-prone than using
automatically generated methods. In addition, the auto-generated
versions can be more efficient.

Here, we switch to using https://github.com/loggerhead/enumer, itself
a fork of https://github.com/diegostamigni/enumer, no longer maintained,
and a fork of the mostly standard tool
https://pkg.go.dev/golang.org/x/tools/cmd/stringer.
We use this fork of enumer for Go 1.20+ compatibility and because
we require the `-transform` flag to be able to generate
constants that match our current code base.

Some enums were not targeted for this change:
2024-04-17 11:14:14 -07:00
..
config.go Move Request Limiter to enterprise (#25615) 2024-02-27 16:24:06 -05:00
config_test.go [COMPLIANCE] License changes (#22290) 2023-08-10 18:14:03 -07:00
config_util.go [COMPLIANCE] License changes (#22290) 2023-08-10 18:14:03 -07:00
encrypt_decrypt.go [COMPLIANCE] License changes (#22290) 2023-08-10 18:14:03 -07:00
encrypt_decrypt_test.go [COMPLIANCE] License changes (#22290) 2023-08-10 18:14:03 -07:00
entropymode_enumer.go Use enumer to generate String() methods for most enums (#25705) 2024-04-17 11:14:14 -07:00
env_var_util.go Change to prioritize config over env for transit (#22615) 2023-08-31 15:28:51 +00:00
hcp_link.go [COMPLIANCE] License changes (#22290) 2023-08-10 18:14:03 -07:00
http_response_headers.go [COMPLIANCE] License changes (#22290) 2023-08-10 18:14:03 -07:00
kms.go Use enumer to generate String() methods for most enums (#25705) 2024-04-17 11:14:14 -07:00
kms_test.go [COMPLIANCE] License changes (#22290) 2023-08-10 18:14:03 -07:00
lint.go [COMPLIANCE] License changes (#22290) 2023-08-10 18:14:03 -07:00
listener.go Add support for forwarded Tls-Client-Cert (#17272) 2024-04-05 11:22:46 -05:00
listener_test.go Request Limiter listener config opt-out (#25098) 2024-01-26 15:24:32 -05:00
merge.go Move Request Limiter to enterprise (#25615) 2024-02-27 16:24:06 -05:00
telemetry.go add gosimport to make fmt and run it (#25383) 2024-02-13 14:07:02 -08:00
telemetry_test.go [COMPLIANCE] License changes (#22290) 2023-08-10 18:14:03 -07:00
userlockout.go chore: fix function names (#26087) 2024-03-22 12:43:01 -04:00
userlockout_test.go [COMPLIANCE] License changes (#22290) 2023-08-10 18:14:03 -07:00